locales icon indicating copy to clipboard operation
locales copied to clipboard

test: add zh_Hant_TW tests

Open easonlin404 opened this issue 7 years ago • 7 comments

Add test for zh_Hant_TW locale and also fix timezones wording as Traditional Chinese.

I don't really understand like TestPluralsRange and TestPluralsOrdinal and other PluralsXXX func mean. Please give me any advice. Thanks.

easonlin404 avatar Jul 27 '17 16:07 easonlin404

Sorry for my late reply, life's super busy right now.

Thanks @easonlin404 but would you be able to make the timezone changes here in the code generator?

All of this code is generated by the above linked program using the cldr data here. Trying to get it generated from this new JSON data, which is a little more accurate/easier to parse, just can't find time.

As for plural rules

candinal is like when a different word is needed depending on a value modifier eg. Your payment is due in 1 day Your payment is due in 2 days

so depending on the day, in English locale anyways, it needs to be day or days depending on the value and each language has it's own rules.

Ordinal eg. He/She got 1st place He/She got 2nd place

so place modifiers st, nd, rd, th for 1st, 2nd, 3rd, 4th in English locale and again each locale has it's own rules

Range are very much like the cardinal rules, but for a range eg. 0-1 or 1-2 In English locale result of a range would be days for the word but, take danish for example: 0-1 dag 1-2 dagen

and again each locale has it's own rules; I don't know the zh_Hant_TW language well enough to write the tests for it, perhaps you can read the rules from here and come up with some examples.

deankarn avatar Jul 29 '17 16:07 deankarn

@joeybloggs Thank you for your explanation in detail. It’s clear to me now. I will add the timezone changes in the code generator and other TestPlurals func.

easonlin404 avatar Jul 29 '17 17:07 easonlin404

did you regenerate based off of the data to test the changes work?

deankarn avatar Jul 30 '17 04:07 deankarn

I have tested using CLDR v30.0.3. And timezones just the same as ori version. So I will undo my timezones change.

easonlin404 avatar Jul 30 '17 06:07 easonlin404

@easonlin404 so I'm a little confused, did adding your timezone change and regenerating correct the timezone issues? and I don't see any changes to the actual locale?

I do want to have the correct timezone parsing, regardless of what's in the CLDR data.

deankarn avatar Jul 30 '17 19:07 deankarn

Sorry for my late reply, I had undo my change. And how do I correct timezone parsing? I don't exactly know how to start for it here

easonlin404 avatar Aug 01 '17 16:08 easonlin404

Sorry for late reply, super busy

The link in your previous message should be the correct location to make the changes, just check that it matches the locale, or Base local, and make changes as necessary as you did before and then regenerate using the CLDR data, your changes should override and you'll see the changes reflected in the locale.

If not let me know :)

deankarn avatar Aug 05 '17 13:08 deankarn