Opened 4 years ago

Last modified 20 months ago

#18483 new defect

CLDR System Broken for Locales using parentLocale

Reported by: George Sexton Owned by: Adam Peller
Priority: undecided Milestone: 1.14
Component: Internationalization Version: 1.10.4
Keywords: Cc: emmo@…, yoshito_umaoka@…, cjolif
Blocked By: Blocking:

Description

Say you add en-ie to $DOJO_SRC/util/buildscripts/cldr/build.xml and build it.

The generated gregorian.js file only contains the data for locale explicitly contained in $DOJO_SRC/util/buildscripts/cldr/ldml/core/common/main/en_IE.xml

However, this is wrong. If you examine the ldml/core/common/supplemental/supplementalData.xml you find that the parent locale for en-ie is en-gb.

So, the correct generation of the file for en-ie would be to:

Generate the initial content from the parent locale en-gb. Override any elements present in the parent locale with the supplied values contained in en_IE.xml

For additional information, refer to:

http://unicode.org/reports/tr35/#Parent_Locales

for English only, affected locales include:

en_AU en_BE en_DG en_FK en_GG en_GI en_HK en_IE en_IM en_IN en_IO en_JE en_MO en_MT en_NZ en_PK en_SG en_SH en_VG

I mentioned to the CLDR people that it's brain dead that the identity of parentLocale is not in the identity block of the en_IE.xml file, and that instead it's squirreled away in some file in another directory.

Change History (8)

comment:1 Changed 4 years ago by Adam Peller

Cc: emmo@… yoshito_umaoka@… added

If memory serves, I believe the parent 'en' locale was once defined to be the root. Is it possible that convention has changed? As you allude to, that type of indirection makes processing much more difficult.

comment:2 Changed 4 years ago by George Sexton

I understand. The problem is the LDML people seem to have bolted the "parentLocale" mechanism into place as a way to have inheritance and reduce redundancy in their maintained files. This reference explains it:

http://unicode.org/reports/tr35/#Parent_Locales

I agree that the way they're doing it makes things more difficult. I looked at the source, and it appears to be doing a transformation into json from XML. now, you'll need a mechanism to identify if a parent locale exists, and merge the parent locale file prior to generating the json.

comment:3 Changed 4 years ago by George Sexton

One other quick comment from

http://unicode.org/reports/tr35/#Locale_Inheritance

Section 4 on inheritance:

"The inheritance is often not simple truncation, as will be seen later in this section."

comment:4 Changed 4 years ago by Adam Peller

Yes, life was much simpler ~8 years ago when we wrote dojo.i18n! Now that the LDML folks support JSON, the goal is to migrate to the JSON they produce and ditch our own XSLT transforms. Any complexities fall on them ;-) Not sure what that means for the Dojo 1.x line.

comment:5 Changed 4 years ago by cjolif

Cc: cjolif added

comment:6 Changed 4 years ago by dylan

Milestone: tbd1.11

comment:7 Changed 3 years ago by dylan

Milestone: 1.111.12

Unfortunately punting until 1.12.

comment:8 Changed 20 months ago by dylan

Milestone: 1.131.14
Note: See TracTickets for help on using tickets.