Langcode case mismatch causing exception

Created on 23 September 2024, 3 months ago

Problem/Motivation

Seboettg\CiteProc\Exception\CiteProcException: No Locale file found for pt-pt em Seboettg\CiteProc\StyleSheet::loadLocales() (linha 63 de /var/www/html/vendor/seboettg/citeproc-php/src/StyleSheet.php).

For European Portuguese, this:
$this->languageManager->getCurrentLanguage()->getId();
returns 'pt-pt'
and Citeproc expects the ISO code 'pt-PT', causing and exception.

Proposed resolution

Use a regular expression to make sure the format is correct.
Patch attached

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇵🇹Portugal rfmarcelino

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024