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

test: add zh_Hant_TW tests #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

easonlin404
Copy link

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.

@deankarn
Copy link
Contributor

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.

@easonlin404
Copy link
Author

@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.

@deankarn
Copy link
Contributor

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

@easonlin404
Copy link
Author

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

@deankarn
Copy link
Contributor

@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.

@easonlin404
Copy link
Author

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

@deankarn
Copy link
Contributor

deankarn commented Aug 5, 2017

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 :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants