Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not handling inheritance? #7

Open
srl295 opened this issue Mar 14, 2013 · 3 comments
Open

Not handling inheritance? #7

srl295 opened this issue Mar 14, 2013 · 3 comments

Comments

@srl295
Copy link

srl295 commented Mar 14, 2013

NcldrExplorer choked on http://unicode.org/repos/cldr/trunk/seed/main/bss.xml ( I had copied everything in seed/main/.xml into common/main/ for testing purposes, 'seed' are locales that are not ready for prime time. In any event.. )

bss.xml has only Sun,Mon,Sat localized as days for some reason. However, ncldr ought to fall back to data in root.xml instead of crashing:

`
[External Code]

NCldrExtensions.dll!NCldr.Extensions.NCldrCustomCulture.CreateDateTimeFormatInfo(NCldr.Types.Culture culture) Line 425 + 0x2c bytes C#
NCldrExtensions.dll!NCldr.Extensions.NCldrCustomCulture.CreateNCldrCultureAndRegionInfoBuilder(string cldrCultureName, string dotNetCultureName) Line 112 + 0x11 bytes C#
NCldrExplorer.exe!NCldrExplorer.Form1.CreateCustomCultures(bool register) Line 1009 + 0xb bytes C#
NCldrExplorer.exe!NCldrExplorer.Form1.CreateCustomCulturesCheck(bool register) Line 943 + 0xc bytes C#
NCldrExplorer.exe!NCldrExplorer.Form1.btnRegisterCustomCultures_Click(object sender, System.EventArgs e) Line 906 + 0xd bytes C#
[External Code]
NCldrExplorer.exe!NCldrExplorer.Program.Main(string[] args) Line 19 + 0x20 bytes C#
[External Code]
`

dateTimeFormatInfo.AbbreviatedDayNames = gregorianCalendar.AbbreviatedDayNames;

An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll Additional information: Length of the array must be 7. (( not 3 ! )) 'NCldrExplorer.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

Note that ICU also has to deal with such things, and ICU as well expects fully populated weekday arrays, for example. So ICU will 'flesh out' such arrays, copying inherited information into the child locale ( so { 'Sɔ̂ndé', 'Mɔ́nde', 'Tue', 'Wed', 'Thu', 'Fri', 'Sátedɛ́' } )

@GuySmithFerrier
Copy link
Owner

Partially fixed in 0.0.0.005-Alpha. Seed cultures with incomplete data will no longer crash NCLDR but merging with parent data is incomplete.

@srl295
Copy link
Author

srl295 commented Mar 28, 2013

The JSON bindings http://cldr.unicode.org/development/development-process/design-proposals/json are fully resolved (pre-resolved, if you will). Actually, for that matter, the CLDR java tools can create fully resolved XML, which could then be picked up by NCLDR. If you’re interested in trying it, I can [dig up and] send you the command line to accomplish this.

This specific example (only translating 3 days) is definitely not typical, but it does occur.

@srl295 srl295 closed this as completed Mar 28, 2013
@srl295 srl295 reopened this Mar 28, 2013
@GuySmithFerrier
Copy link
Owner

That's very interesting. I will investigate. If I get stuck I'll come back and ask for some help. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants