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

[locale] Relative seconds i18n #4183

Merged
merged 113 commits into from Dec 17, 2017

Conversation

Projects
None yet
8 participants
@JLHwung
Contributor

JLHwung commented Sep 21, 2017

Closes #3860 as is included in this PR.

It was not a small PR at first glance but every changes on i18n was limited to 1 locale per commit so it can makes review easier.

Most translation of ss is referenced from Unicode CLDR duration-second property, the other CLDR-missing locales are translated by searching 30 seconds on Google pages.

It is recommended to squash merging for better commit history readability.

fixes #3981

@jsf-clabot

This comment has been minimized.

jsf-clabot commented Sep 21, 2017

CLA assistant check
All committers have signed the CLA.

@ichernev

This comment has been minimized.

Contributor

ichernev commented Oct 24, 2017

@JLHwung oh wow, this is massive. We'll get this in.

@@ -32,6 +32,7 @@ export default moment.defineLocale('fr-ca', {
future : 'dans %s',
past : 'il y a %s',
s : 'quelques secondes',

This comment has been minimized.

@yanickrochon

yanickrochon Nov 15, 2017

To be consistent, the s should be une minute (and apply to the other strings as well)

This comment has been minimized.

@JLHwung

JLHwung Dec 1, 2017

Contributor

The duration-second in Unicode CLDR 32.0 (link) is {0} à la seconde.

@yanickrochon Would both s and ss be une minute in fr-ca?

This comment has been minimized.

@yanickrochon

yanickrochon Dec 1, 2017

No, because this is an acceleration unit, and the "duration-second"'s {0} parameter is a prefix, not a numeric value. Much as "100 miles per gallon" is, where the localization string "duration-second" would be "{0} per gallon", and the prefix is "100 miles".

E.g. "{0} à la second" (i.e. "{0} per second") translates to "0 mètre à la seconde" or "2 mètres à la seconde" (notice the plural for the last one vs singlar for the first.

In French, the 0 is always singular, unlike in English.(see plurals and ordinals for languages)

If you want to cover the proper internationalization for an interval of [0..1.999*] seconds, the proper string "s" would be "une seconde", and "ss" would be "%d secondes".

(Note: in French, we usually use "à l'instant", meaning "just now", when the event happened less than a few seconds ago. But this would be invariant. Just like "now", you cannot say "now ago", neither "il y a à l'instant". Thus, "s" would technically need to be invariant for certain langauges.)

This comment has been minimized.

@yanickrochon

yanickrochon Dec 1, 2017

I just realized that I wrote a typo in my first comment, I wrote "minute" instead of "seconde". Sorry for the confusion.

@icambron icambron added the Needs docs label Dec 11, 2017

@marwahaha marwahaha changed the title from Relative seconds i18n to [locale] Relative seconds i18n Dec 11, 2017

@marwahaha marwahaha removed the Needs docs label Dec 14, 2017

@marwahaha marwahaha merged commit 4d0340c into moment:develop Dec 17, 2017

3 checks passed

Title Your title looks great!
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details

marwahaha added a commit that referenced this pull request Dec 17, 2017

[locale] Relative seconds i18n (#4183)
* locales ru, uk: added relative seconds

* feat(i18n): add relativeSeconds for zh-*

* feat(i18n): add relativeSeconds for en-*

* af

* ar

* az

* be

* add relativeSeconds for th

* add relativeSeconds for vi

* ar-dz

* change style

* bg

* bm

* bn

* add relativeSeconds for fr-*

* add relativeSeconds for de-*

* add relativeSeconds for es-*

* ja

* ms

* nl

* pt

* jv

* it

* ca

* cv

* cy

* da

* el

* eo

* eu

* lo

* my

* ta

* fix lo

* si

* sv

* fy

* gl

* gu

* hr

* hu

* id

* pl

* bs

* remove executable mode on pl.js

* fi

* lb

* lt

* lv

* me

* mi

* mk

* ml

* mr

* nb

* pa-in

* uz-latn

* te tet tl-ph tlh tr tzl tzm tzm-latn ur uz x-pseudo yo

* fix tzm

* et

* fa

* fo

* gd

* sd se si sk sl sq sr sr-cyrl ss sw

* mr ms-my ne nn

* kk km kn ky

* fix ro

* fix tlh

* fix tzl

* fix tlh ro

* gom-latn

* he

* is

* fix pl

* fix sw sr-cyrl sr

* fix nn

* fix sl

* fix sk

* hy-am

* hi

* gom-latn

* et

* fix sr

* dv

* fix sk

* ar-ly

* bo

* cs

* bs

* ar-kw

* ar-ma

* ar-tn

* ar-sa

* fix ar-dz

* br

* fix ka

* fix tl-ph

* fix az from CLDR

* fix bm from CLDR

* fix bs from CLDR

* fix cs from CLDR

* fix fo from CLDR

* fix gu from CLDR

* fix hr from CLDR

* fix ka from CLDR

* fix km from CLDR

* fix my from CLDR

* fix ne from CLDR

* fix sk from CLDR

* fix sr-cyrl from CLDR

* fix sr from CLDR

* fix te from CLDR

* fix style

@JLHwung JLHwung deleted the JLHwung:relative-seconds-i18n branch Dec 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment