| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Resolve missing list-pattern parts individually without mutating locale data. Follow the CLDR root chain for unit-narrow so narrow lists do not fall back to unrelated wide-unit parts. Cover partial start/end patterns, missing two-item patterns, precedence, and locale-cache preservation with regressions.
| Back | FazBrowse Home | New Git URL |
format_list selects the first existing style even when that style only defines some pattern parts. This raises KeyError for valid inputs such as German unit and French standard-narrow lists with three items. When 2 is missing but start and end exist, two-item lists can repeat the last item: Wolof unit-narrow formats ["A", "B"] as "A B B".
Resolve each missing part through the fallback styles, preserving the requested style's parts and collecting the result in a fresh dictionary so cached locale data is unchanged. Correct the unit-narrow chain to unit-short then standard, matching the root aliases in CLDR 45 and 48.2. The previous extra unit step could select wide-unit parts; removing it also changes Urdu two-item narrow lists from "A، B" to "A اور B" (including ur_PK and ur_IN).
Related to #781 and the whole-style fallback added in #1099 for #1098. #781's original German standard-narrow example already works on current master; this addresses the remaining partial-style failures and missing-two-item-pattern behavior.
Validation with generated CLDR 48.2 data:
The local timezone tests fail on the untouched base without TZ=UTC; the same timezone setting was used for the before/after full-suite comparison.