Closed EdGaere closed 1 year ago
This seems to be correct behavior; with format_spec
= "a"
, you're requesting an abbreviated-width format-context period name for "am"
/ "pm"
:
https://github.com/unicode-org/cldr/blob/f800890ea86482c2eb5f73224897f4a8bc0b653a/common/main/pt_PT.xml#L1796-L1806
You would need to use "aaaa"
(format context, wide width) to get "da tarde"
.
Overview Description
The behavior of _formatdatetime has changed starting babel>=2.10.3
In babel==2.9.1, _formatdatetime correctly applies the time period locale. For example, time period "da tarde" is correctly used for locale "pt_PT"
Starting babel>=2.10.3, _formatdatetime no longer applies the time period locale. Time period "p.m." is generated for locale "pt_PT", which is not correct for this locale. Expected "da tarde".
Steps to Reproduce
Actual Results
babel==2.9.1 : "da tarde" babel==2.10.3 : "p.m." # < incorrect: locale pt_PT is not used babel==2.11.0 : "p.m." # < incorrect: locale pt_PT is not used
Expected Results
babel==2.9.1 : "da tarde" babel==2.10.3 : "da tarde" babel==2.11.0 : "da tarde"
Reproducibility
Yes. Use code as above.
Additional Information
The correct CLDR information for pt_PT is available in all three versions of Babel tested above.
So the issues appears not related to the locale database, but rather in the rendering of the format in the module.
Output