Problem/Motivation
Following up on the work done in issue #3539960: Handle catalan and languages with language code mismatch, it is necessary to include the mapping for Portuguese (Portugal) (pt-pt) and Portuguese (Brazil) (pt-br).
Currently, only the generic pt language is supported, which causes the regional variants not to correctly use the Flatpickr date/time translations and formatting.
Steps to reproduce
None.
Proposed resolution
In the file src/Constants/AvailableLanguages.php, add the mapping for pt_pt and pt_br:
public const LANGUAGE_MAPPING = [
'ca' => 'cat',
'pt_pt' => 'pt',
'pt_br' => 'pt',
];
This will ensure that both Portuguese variants correctly use the Flatpickr localization settings for Portuguese.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork datetime_flatpickr-3552868
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
lolgm commentedThe MR !21 implements the solution proposed in the issue.
Comment #6
nagy.balint commentedThanks!