Closed Vexed01 closed 4 months ago
The given locale doesn't have the data required to format these patterns.
zh
only has unit-short
patterns, not unit
:
https://www.unicode.org/cldr/charts/45/summary/zh.html#28f7e602f689c61b
See the spec for a discussion of the various list types.
... on second thought, we should then be getting the ValueError
for a missing pattern family...
Ah yeah, this is a bona fide bug – it's actually #1076 :)
Overview Description
babel.lists.format_list does not work with non-English locales, when style is set to "unit".
Steps to Reproduce
Install latest babel 2.15.0
Actual Results
Expected Results
Something like
1, 2, 3, 4
but locale dependent of course!Reproducibility
I can reproduce this in every non-Engilsh language I've tried, es_ES zh_CN fr_FR Various EN locales en_GB en_US en_CN produce the expected result
1, 2, 3, 4
Additional Information
Similar to #781 but this error occurs with supported style
unit
and has a wider language scope