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

Update locale vi #1

Closed
wants to merge 4 commits into from
Closed

Update locale vi #1

wants to merge 4 commits into from

Conversation

lihop
Copy link
Owner

@lihop lihop commented Aug 8, 2018

@trongthanh Please feel free to add comments here or branch of a create your own changes.

@lihop lihop self-assigned this Aug 8, 2018
@lihop lihop requested a review from trongthanh August 8, 2018 06:34
@lihop
Copy link
Owner Author

lihop commented Aug 8, 2018

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

@lihop lihop force-pushed the update-locale-vi branch from f64093c to 67c20bf Compare August 8, 2018 06:42
@trongthanh
Copy link
Collaborator

@lihop,

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

@trongthanh
Copy link
Collaborator

In favor of "X tiếng trước" instead of "X giờ trước":
screenshot at 2018-08-08 15-30-04

@lihop lihop force-pushed the update-locale-vi branch from 67c20bf to 714b473 Compare August 8, 2018 09:21
@trongthanh
Copy link
Collaborator

OK. I'll take previous comment back. It seems more news outlets use "giờ" instead of "tiếng".

@lihop lihop force-pushed the update-locale-vi branch from 714b473 to 1068b29 Compare August 8, 2018 11:25
@lihop
Copy link
Owner Author

lihop commented Aug 8, 2018

@trongthanh Ok. I've finished updating everything. I've tried to keep everything as close as possible to the previous version.

@lihop lihop force-pushed the update-locale-vi branch from 1068b29 to d26ac59 Compare August 8, 2018 11:30
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'],
Copy link
Collaborator

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

@trongthanh
Copy link
Collaborator

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.

@lihop lihop requested a review from hieunguyendut August 9, 2018 01:48
Enhance parser for quarter "quý IV";
@trongthanh
Copy link
Collaborator

trongthanh commented Aug 9, 2018

I just changed relative distance hours from "tiếng" back to "giờ". Reasons:

  • Most news outlets use "giờ". I can only find instances of "tiếng" from Thanhnien.vn so far.
  • According to tratu.soha.vn, "tiếng" is used in spoken informal context.
  • Writing "giờ" is obviously shorter and more space-saving than "tiếng".

narrow: {
am: 'a',
pm: 'p',
midnight: 'nửa đêm',
Copy link
Collaborator

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"

Copy link
Collaborator

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.

noon: 'TR',
morning: 'sáng',
afternoon: 'chiều',
evening: 'tối',
Copy link
Collaborator

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ôí"

Copy link
Collaborator

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?

Copy link
Collaborator

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

@trongthanh
Copy link
Collaborator

I think these updates are good to be merged into main project for now. If there are updates, let's do in another PR.

@lihop
Copy link
Owner Author

lihop commented Aug 20, 2018

Ok. I will open a pull request to date-fns.

@lihop
Copy link
Owner Author

lihop commented Aug 20, 2018

Opened pr to upstream in date-fns#846

@lihop lihop closed this Aug 20, 2018
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.

3 participants