-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update locale vi #1
Conversation
@trongthanh When I created this fork I just copy & pasted over the new en-US locale and then filled in the values from the CLDR data. I think I need to re-integrate your version which is slightly different from the CLDR data. |
Let me take a closer look this evening. FWIW, CLDR data may not represent current usage of the speaker of the language, as you may notice the native speakers of Chinese and Thai had commented some errors in another PR. Ultimately, we want the translation sounds naturally. I'll consult instances from local online newspaper and provide proof so that we both agree on the correction (if any). |
OK. I'll take previous comment back. It seems more news outlets use "giờ" instead of "tiếng". |
@trongthanh Ok. I've finished updating everything. I've tried to keep everything as close as possible to the previous version. |
src/locale/vi/_lib/localize/index.js
Outdated
var monthValues = { | ||
narrow: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], | ||
short: ['Thg 1', 'Thg 2', 'Thg 3', 'Thg 4', 'Thg 5', 'Thg 6', 'Thg 7', 'Thg 8', 'Thg 9', 'Thg 10', 'Thg 11', 'Thg 12'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think monthValues
has short form as per i18n documentation and the format notation for Months are: M (number), Mo (ordinal number), MM (narrow), MMM (abbreviated), MMMM (wide).
…' usage; Update tests to pass new format
I just pushed some changes with comments inside and fix the tests. Although all tests pass now, but I think we should add some more for cases that only applicable for Vietnamese, so that it'll thoroughly validate the updates we make for VI locale. |
Enhance parser for quarter "quý IV";
I just changed relative distance hours from "tiếng" back to "giờ". Reasons:
|
src/locale/vi/_lib/localize/index.js
Outdated
narrow: { | ||
am: 'a', | ||
pm: 'p', | ||
midnight: 'nửa đêm', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In vietnamese :
"nửa đêm", not "nưả đêm"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you pulled an old version. There's no "nưả đêm" as mentioned.
src/locale/vi/_lib/localize/index.js
Outdated
noon: 'TR', | ||
morning: 'sáng', | ||
afternoon: 'chiều', | ||
evening: 'tối', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and "tối" not "tôí"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This weird. There's no occurrence of "tôí". Are you viewing with full Vietnamese-supported font?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh sorry, my pc was miss some font of vietnamese
I think these updates are good to be merged into main project for now. If there are updates, let's do in another PR. |
Ok. I will open a pull request to date-fns. |
Opened pr to upstream in date-fns#846 |
@trongthanh Please feel free to add comments here or branch of a create your own changes.