fix(cy): set abbreviated am/pm to yb/yh instead of inheriting from root#5839
fix(cy): set abbreviated am/pm to yb/yh instead of inheriting from root#5839wildtangent wants to merge 1 commit into
Conversation
The format/abbreviated and stand-alone/abbreviated am and pm entries for Welsh (cy) were ↑↑↑, causing ICU to inherit AM/PM from the root locale. Under ICU 77 (CLDR 47) this was masked by a lateral fallback that resolved ↑↑↑ at the abbreviated width to the locale's own wide entries (yb/yh). ICU 78 (CLDR 48) now resolves ↑↑↑ correctly against the parent locale, surfacing the gap. Fix: replace ↑↑↑ with explicit Welsh values yb (y bore, AM) and yh (yr hwyr, PM) in both format/abbreviated and stand-alone/abbreviated contexts, consistent with the existing wide entries. Also adds four datetime test cases (hm/hms × AM/PM) for locale cy to prevent silent regression. Identified via: commit f81989f (CLDR-18850 v48 vxml merge to main)
|
|
|
Can you file a ticket? There was some mixed feedback about whether yb/yh are appropriate when we fixed the other locales in 48.2 as part of CLDR-19304 and we should ask the language specialists to review in the Survey Tool while it is currently open for CLDR 49. We have guidance about requests for data changes in the contributing.md guidelines: https://github.com/unicode-org/cldr/blob/main/CONTRIBUTING.md#tips-for-contributing-to-cldr If you have evidence of common usage for Welsh it would be really great! |
Summary
Welsh users formatting 12-hour times (e.g.
h:mm a) receive the English stringsAM/PMinstead of the Welsh abbreviated day-period formsyb(y bore) andyh(yr hwyr). This regressed between CLDR 47 and CLDR 48.Root cause
In
common/main/cy.xmltheformat/abbreviatedam and pm entries were↑↑↑in both releases — the data itself did not change. Under ICU 77 (CLDR 47) this was masked by a lateral fallback that resolved↑↑↑at the abbreviated width to the locale's own wide entries (yb/yh). ICU 78 (CLDR 48) now resolves↑↑↑correctly against the parent locale (root), which hasAM/PM, surfacing the gap.The identifying commit is
f81989f8b(CLDR-18850 v48 vxml merge to main), which is the Survey Tool merge that leftformat/abbreviatedam/pm as↑↑↑.Changes
common/main/cy.xml— replace↑↑↑withyb/yhin bothformat/abbreviatedandstand-alone/abbreviatedcontexts, consistent with the existingwideentries.common/testData/datetime/datetime.json— add four test cases (hm/hms× AM/PM for localecy) to prevent silent regression.Reproduction (Node.js / Intl, which delegates to ICU)
Diff
<dayPeriodContext type="format"> <dayPeriodWidth type="abbreviated"> <dayPeriod type="midnight">canol nos</dayPeriod> - <dayPeriod type="am">↑↑↑</dayPeriod> + <dayPeriod type="am">yb</dayPeriod> <dayPeriod type="noon">canol dydd</dayPeriod> - <dayPeriod type="pm">↑↑↑</dayPeriod> + <dayPeriod type="pm">yh</dayPeriod> ... </dayPeriodWidth>