diff --git a/build.properties b/build.properties index 01621a1a8b..16cb9c334b 100644 --- a/build.properties +++ b/build.properties @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -version=14.2.0 +version=14.3.0 diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index 92b022b4be..8eff75aaee 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -1,6 +1,22 @@ Release Notes for Version 14 ============================ +Build 006 +------- +Published as version 14.3.0 + +New Features: +* Now uses webpack4 to package up all of the classes and data +* Added style "disjunction" to the list formatter do you can now format lists with "or" as well: + * "One, Two, Three, or Four" vs. "One, Two, Three, and Four" + +Bug Fixes: +* Updated to IANA time zone data version 2019b +* Fixed a bug where the DateRngFmt was not heeding the specified + time zone when formatting the start and end dates +* Fixed a bug which a default script for pa-IN should be Guru instead of Arabic + + Build 005 ------- Published as version 14.2.0 diff --git a/js/build.xml b/js/build.xml index cd247cdcb4..a6b7cffb37 100644 --- a/js/build.xml +++ b/js/build.xml @@ -104,7 +104,11 @@ limitations under the License. + + + + @@ -125,10 +129,11 @@ limitations under the License. - + + executing webpack - + @@ -137,8 +142,9 @@ limitations under the License. + - + @@ -147,6 +153,7 @@ limitations under the License. + @@ -225,8 +232,8 @@ limitations under the License. - - + + @@ -236,8 +243,8 @@ limitations under the License. - - + + @@ -248,8 +255,8 @@ limitations under the License. - - + + @@ -259,8 +266,8 @@ limitations under the License. - - + + @@ -536,38 +543,38 @@ limitations under the License. - + - + Scanning demo dir for ilib classes - + - + - + Executing webpack - + - + @@ -576,11 +583,11 @@ limitations under the License. Executing webpack - + - + diff --git a/js/data/locale/af/list.json b/js/data/locale/af/list.json index 1ca3319e38..a2337a5122 100644 --- a/js/data/locale/af/list.json +++ b/js/data/locale/af/list.json @@ -3,6 +3,10 @@ "2": "{0} en {1}", "end": "{0} en {1}" }, + "or": { + "2": "{0} of {1}", + "end": "{0} of {1}" + }, "unit": { "2": "{0} en {1}", "end": "{0} en {1}" diff --git a/js/data/locale/am/list.json b/js/data/locale/am/list.json index 665861151a..5dad1b2a0b 100644 --- a/js/data/locale/am/list.json +++ b/js/data/locale/am/list.json @@ -5,6 +5,12 @@ "middle": "{0}፣ {1}", "end": "{0}, እና {1}" }, + "or": { + "2": "{0} ወይም {1}", + "start": "{0}፣ {1}", + "middle": "{0}፣ {1}", + "end": "{0} ወይም {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/ar/list.json b/js/data/locale/ar/list.json index 67540e2706..9bf05f280f 100644 --- a/js/data/locale/ar/list.json +++ b/js/data/locale/ar/list.json @@ -25,6 +25,12 @@ "end": "{0}، و{1}" } }, + "or": { + "2": "{0} أو {1}", + "start": "{0} و{1}", + "middle": "{0} و{1}", + "end": "{0} أو {1}" + }, "unit": { "short": { "2": "{0}، {1}", diff --git a/js/data/locale/as/list.json b/js/data/locale/as/list.json new file mode 100644 index 0000000000..ddb02a6336 --- /dev/null +++ b/js/data/locale/as/list.json @@ -0,0 +1,36 @@ +{ + "standard": { + "2": "{0} আৰু {1}", + "end": "{0} আৰু {1}" + }, + "or": { + "2": "{0} বা {1}", + "end": "{0} বা {1}" + }, + "unit": { + "short": { + "2": "{0} {1}", + "start": "{0} {1}", + "middle": "{0} {1}", + "end": "{0} {1}" + }, + "medium": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "long": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "full": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + } + } +} \ No newline at end of file diff --git a/js/data/locale/ast/list.json b/js/data/locale/ast/list.json index aedd6d9966..8b288c484f 100644 --- a/js/data/locale/ast/list.json +++ b/js/data/locale/ast/list.json @@ -3,6 +3,10 @@ "2": "{0} y {1}", "end": "{0} y {1}" }, + "or": { + "2": "{0} o {1}", + "end": "{0} o {1}" + }, "unit": { "2": "{0} y {1}", "end": "{0} y {1}" diff --git a/js/data/locale/az/Cyrl/list.json b/js/data/locale/az/Cyrl/list.json index 4d6dedf0e2..04b81bd3a8 100644 --- a/js/data/locale/az/Cyrl/list.json +++ b/js/data/locale/az/Cyrl/list.json @@ -2,5 +2,9 @@ "standard": { "2": "{0}, {1}", "end": "{0}, {1}" + }, + "or": { + "2": "{0} or {1}", + "end": "{0}, or {1}" } } \ No newline at end of file diff --git a/js/data/locale/az/list.json b/js/data/locale/az/list.json index 8c5c18d19d..360aba98da 100644 --- a/js/data/locale/az/list.json +++ b/js/data/locale/az/list.json @@ -2,5 +2,9 @@ "standard": { "2": "{0} və {1}", "end": "{0} və {1}" + }, + "or": { + "2": "{0} yaxud {1}", + "end": "{0}, yaxud {1}" } } \ No newline at end of file diff --git a/js/data/locale/be/list.json b/js/data/locale/be/list.json index f63beb2985..6722efb977 100644 --- a/js/data/locale/be/list.json +++ b/js/data/locale/be/list.json @@ -3,6 +3,10 @@ "2": "{0} і {1}", "end": "{0} і {1}" }, + "or": { + "2": "{0} ці {1}", + "end": "{0} ці {1}" + }, "unit": { "2": "{0} {1}", "start": "{0} {1}", diff --git a/js/data/locale/bg/list.json b/js/data/locale/bg/list.json index 8d57ce05d8..abacb371e4 100644 --- a/js/data/locale/bg/list.json +++ b/js/data/locale/bg/list.json @@ -25,6 +25,10 @@ "end": "{0} и {1}" } }, + "or": { + "2": "{0} или {1}", + "end": "{0} или {1}" + }, "unit": { "short": { "2": "{0} и {1}", diff --git a/js/data/locale/bn/list.json b/js/data/locale/bn/list.json index a65ab27cc7..3867a00d00 100644 --- a/js/data/locale/bn/list.json +++ b/js/data/locale/bn/list.json @@ -2,5 +2,9 @@ "standard": { "2": "{0} এবং {1}", "end": "{0} এবং {1}" + }, + "or": { + "2": "{0} বা {1}", + "end": "{0}, বা {1}" } } \ No newline at end of file diff --git a/js/data/locale/br/list.json b/js/data/locale/br/list.json new file mode 100644 index 0000000000..552cc8a1fb --- /dev/null +++ b/js/data/locale/br/list.json @@ -0,0 +1,6 @@ +{ + "or": { + "2": "{0} pe {1}", + "end": "{0}, pe {1}" + } +} \ No newline at end of file diff --git a/js/data/locale/bs/Cyrl/list.json b/js/data/locale/bs/Cyrl/list.json index 599a1e92f4..671202577a 100644 --- a/js/data/locale/bs/Cyrl/list.json +++ b/js/data/locale/bs/Cyrl/list.json @@ -3,6 +3,10 @@ "2": "{0} и {1}", "end": "{0} и {1}" }, + "or": { + "2": "{0} or {1}", + "end": "{0}, or {1}" + }, "unit": { "2": "{0} и {1}", "end": "{0} и {1}" diff --git a/js/data/locale/bs/list.json b/js/data/locale/bs/list.json index 2885dc4882..81350e7056 100644 --- a/js/data/locale/bs/list.json +++ b/js/data/locale/bs/list.json @@ -3,6 +3,10 @@ "2": "{0} i {1}", "end": "{0} i {1}" }, + "or": { + "2": "{0} ili {1}", + "end": "{0} ili {1}" + }, "unit": { "2": "{0} i {1}", "end": "{0} i {1}" diff --git a/js/data/locale/ca/list.json b/js/data/locale/ca/list.json index 2885dc4882..b721ce3f50 100644 --- a/js/data/locale/ca/list.json +++ b/js/data/locale/ca/list.json @@ -3,6 +3,10 @@ "2": "{0} i {1}", "end": "{0} i {1}" }, + "or": { + "2": "{0} o {1}", + "end": "{0} o {1}" + }, "unit": { "2": "{0} i {1}", "end": "{0} i {1}" diff --git a/js/data/locale/ccp/list.json b/js/data/locale/ccp/list.json new file mode 100644 index 0000000000..18ca33cd67 --- /dev/null +++ b/js/data/locale/ccp/list.json @@ -0,0 +1,6 @@ +{ + "standard": { + "2": "{0} 𑄃𑄳𑄃 {1}", + "end": "{0} 𑄃𑄳𑄃 {1}" + } +} \ No newline at end of file diff --git a/js/data/locale/chr/list.json b/js/data/locale/chr/list.json index 0d322827bd..e625b42e8b 100644 --- a/js/data/locale/chr/list.json +++ b/js/data/locale/chr/list.json @@ -1,7 +1,11 @@ { "standard": { "2": "{0} ᎠᎴ {1}", - "end": "{0} ᎠᎴ {1}" + "end": "{0}, ᎠᎴ {1}" + }, + "or": { + "2": "{0} ᎠᎴᏱᎩ {1}", + "end": "{0}, ᎠᎴᏱᎩ {1}" }, "unit": { "short": { diff --git a/js/data/locale/cs/list.json b/js/data/locale/cs/list.json index 35f432758b..39b7114716 100644 --- a/js/data/locale/cs/list.json +++ b/js/data/locale/cs/list.json @@ -3,6 +3,10 @@ "2": "{0} a {1}", "end": "{0} a {1}" }, + "or": { + "2": "{0} nebo {1}", + "end": "{0} nebo {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/cy/list.json b/js/data/locale/cy/list.json index ae2d431340..592a184a91 100644 --- a/js/data/locale/cy/list.json +++ b/js/data/locale/cy/list.json @@ -2,5 +2,9 @@ "standard": { "2": "{0} a(c) {1}", "end": "{0}, a(c) {1}" + }, + "or": { + "2": "{0} neu {1}", + "end": "{0} neu {1}" } } \ No newline at end of file diff --git a/js/data/locale/da/list.json b/js/data/locale/da/list.json index beedb9c606..8e0105a29c 100644 --- a/js/data/locale/da/list.json +++ b/js/data/locale/da/list.json @@ -3,6 +3,10 @@ "2": "{0} og {1}", "end": "{0} og {1}" }, + "or": { + "2": "{0} eller {1}", + "end": "{0} eller {1}" + }, "unit": { "2": "{0} og {1}", "end": "{0} og {1}" diff --git a/js/data/locale/de/list.json b/js/data/locale/de/list.json index f7c8f4eae0..8e04642494 100644 --- a/js/data/locale/de/list.json +++ b/js/data/locale/de/list.json @@ -3,6 +3,10 @@ "2": "{0} und {1}", "end": "{0} und {1}" }, + "or": { + "2": "{0} oder {1}", + "end": "{0} oder {1}" + }, "unit": { "end": "{0} und {1}" } diff --git a/js/data/locale/el/list.json b/js/data/locale/el/list.json index 6bd043ae70..7e6f01e43f 100644 --- a/js/data/locale/el/list.json +++ b/js/data/locale/el/list.json @@ -3,6 +3,10 @@ "2": "{0} και {1}", "end": "{0} και {1}" }, + "or": { + "2": "{0} ή {1}", + "end": "{0} ή {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/en/AU/list.json b/js/data/locale/en/AU/list.json index d7a218fdfd..920fb855b5 100644 --- a/js/data/locale/en/AU/list.json +++ b/js/data/locale/en/AU/list.json @@ -1,5 +1,8 @@ { "standard": { "end": "{0} and {1}" + }, + "or": { + "end": "{0} or {1}" } } \ No newline at end of file diff --git a/js/data/locale/en/GB/list.json b/js/data/locale/en/GB/list.json index d7a218fdfd..920fb855b5 100644 --- a/js/data/locale/en/GB/list.json +++ b/js/data/locale/en/GB/list.json @@ -1,5 +1,8 @@ { "standard": { "end": "{0} and {1}" + }, + "or": { + "end": "{0} or {1}" } } \ No newline at end of file diff --git a/js/data/locale/es/list.json b/js/data/locale/es/list.json index e8a8a0d604..6ffc11c01a 100644 --- a/js/data/locale/es/list.json +++ b/js/data/locale/es/list.json @@ -3,6 +3,10 @@ "2": "{0} y {1}", "end": "{0} y {1}" }, + "or": { + "2": "{0} o {1}", + "end": "{0} o {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/et/list.json b/js/data/locale/et/list.json index 017b5f9aa5..f3dbdfd884 100644 --- a/js/data/locale/et/list.json +++ b/js/data/locale/et/list.json @@ -3,6 +3,10 @@ "2": "{0} ja {1}", "end": "{0} ja {1}" }, + "or": { + "2": "{0} või {1}", + "end": "{0} või {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/eu/list.json b/js/data/locale/eu/list.json index abb37baf6f..24c0a9419e 100644 --- a/js/data/locale/eu/list.json +++ b/js/data/locale/eu/list.json @@ -3,6 +3,10 @@ "2": "{0} eta {1}", "end": "{0} eta {1}" }, + "or": { + "2": "{0} edo {1}", + "end": "{0} edo {1}" + }, "unit": { "2": "{0} eta {1}", "end": "{0} eta {1}" diff --git a/js/data/locale/fa/list.json b/js/data/locale/fa/list.json index 404a0c2f0f..ca31ae275c 100644 --- a/js/data/locale/fa/list.json +++ b/js/data/locale/fa/list.json @@ -5,6 +5,12 @@ "middle": "{0}،‏ {1}", "end": "{0}، و {1}" }, + "or": { + "2": "{0} یا {1}", + "start": "{0}، {1}", + "middle": "{0}، {1}", + "end": "{0}، یا {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/fi/list.json b/js/data/locale/fi/list.json index 99a88e9793..a315ab2f24 100644 --- a/js/data/locale/fi/list.json +++ b/js/data/locale/fi/list.json @@ -3,6 +3,10 @@ "2": "{0} ja {1}", "end": "{0} ja {1}" }, + "or": { + "2": "{0} tai {1}", + "end": "{0} tai {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/fil/list.json b/js/data/locale/fil/list.json index 7b838a62e8..db9b4b951b 100644 --- a/js/data/locale/fil/list.json +++ b/js/data/locale/fil/list.json @@ -3,6 +3,10 @@ "2": "{0} at {1}", "end": "{0}, at {1}" }, + "or": { + "2": "{0} o {1}", + "end": "{0}, o {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/fo/list.json b/js/data/locale/fo/list.json index 018fab6ad4..bc525d0163 100644 --- a/js/data/locale/fo/list.json +++ b/js/data/locale/fo/list.json @@ -3,6 +3,10 @@ "2": "{0} og {1}", "end": "{0} og {1}" }, + "or": { + "2": "{0} ella {1}", + "end": "{0}, ella {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/fr/list.json b/js/data/locale/fr/list.json index c631478934..91f180325d 100644 --- a/js/data/locale/fr/list.json +++ b/js/data/locale/fr/list.json @@ -3,6 +3,10 @@ "2": "{0} et {1}", "end": "{0} et {1}" }, + "or": { + "2": "{0} ou {1}", + "end": "{0} ou {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/ga/list.json b/js/data/locale/ga/list.json index 0657c6db92..fef74bde3f 100644 --- a/js/data/locale/ga/list.json +++ b/js/data/locale/ga/list.json @@ -3,6 +3,10 @@ "2": "{0} agus {1}", "end": "{0}, agus {1}" }, + "or": { + "2": "{0} nó {1}", + "end": "{0}, nó {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/gd/list.json b/js/data/locale/gd/list.json index a4ac81f887..5b3c54fa61 100644 --- a/js/data/locale/gd/list.json +++ b/js/data/locale/gd/list.json @@ -1,7 +1,33 @@ { "standard": { - "2": "{0} agus {1}", - "end": "{0} agus {1}" + "short": { + "2": "{0} is {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0} is {1}" + }, + "medium": { + "2": "{0} is {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0} is {1}" + }, + "long": { + "2": "{0} agus {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0} agus {1}" + }, + "full": { + "2": "{0} agus {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0} agus {1}" + } + }, + "or": { + "2": "{0} no {1}", + "end": "{0} no {1}" }, "unit": { "short": { diff --git a/js/data/locale/gl/list.json b/js/data/locale/gl/list.json index a82d2de888..f2ffabe98a 100644 --- a/js/data/locale/gl/list.json +++ b/js/data/locale/gl/list.json @@ -3,6 +3,10 @@ "2": "{0} e {1}", "end": "{0} e {1}" }, + "or": { + "2": "{0} ou {1}", + "end": "{0} ou {1}" + }, "unit": { "short": { "2": "{0}, {1}", diff --git a/js/data/locale/gu/list.json b/js/data/locale/gu/list.json index 930b4699c5..006b27191f 100644 --- a/js/data/locale/gu/list.json +++ b/js/data/locale/gu/list.json @@ -3,6 +3,10 @@ "2": "{0} અને {1}", "end": "{0} અને {1}" }, + "or": { + "2": "{0} અથવા {1}", + "end": "{0}, અથવા {1}" + }, "unit": { "short": { "2": "{0}, {1}", diff --git a/js/data/locale/he/list.json b/js/data/locale/he/list.json index eb9441d28b..62bd0f6f90 100644 --- a/js/data/locale/he/list.json +++ b/js/data/locale/he/list.json @@ -3,6 +3,10 @@ "2": "{0} ו{1}", "end": "{0} ו{1}" }, + "or": { + "2": "{0} או {1}", + "end": "{0}, או {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/hi/list.json b/js/data/locale/hi/list.json index 5e6cab63fa..c5224168b5 100644 --- a/js/data/locale/hi/list.json +++ b/js/data/locale/hi/list.json @@ -25,6 +25,10 @@ "end": "{0}, और {1}" } }, + "or": { + "2": "{0} या {1}", + "end": "{0} या {1}" + }, "unit": { "short": { "2": "{0}, {1}", diff --git a/js/data/locale/hr/list.json b/js/data/locale/hr/list.json index d989211ff5..f0c152e522 100644 --- a/js/data/locale/hr/list.json +++ b/js/data/locale/hr/list.json @@ -3,6 +3,10 @@ "2": "{0} i {1}", "end": "{0} i {1}" }, + "or": { + "2": "{0} ili {1}", + "end": "{0} ili {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/hu/list.json b/js/data/locale/hu/list.json index d54fdc4704..27cba9b5a5 100644 --- a/js/data/locale/hu/list.json +++ b/js/data/locale/hu/list.json @@ -3,6 +3,10 @@ "2": "{0} és {1}", "end": "{0} és {1}" }, + "or": { + "2": "{0} vagy {1}", + "end": "{0} vagy {1}" + }, "unit": { "2": "{0} és {1}", "end": "{0} és {1}" diff --git a/js/data/locale/hy/list.json b/js/data/locale/hy/list.json index 0b211b934f..68307564f9 100644 --- a/js/data/locale/hy/list.json +++ b/js/data/locale/hy/list.json @@ -3,6 +3,10 @@ "2": "{0} և {1}", "end": "{0} և {1}" }, + "or": { + "2": "{0} կամ {1}", + "end": "{0} կամ {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/ia/list.json b/js/data/locale/ia/list.json new file mode 100644 index 0000000000..56756dad0f --- /dev/null +++ b/js/data/locale/ia/list.json @@ -0,0 +1,36 @@ +{ + "standard": { + "2": "{0} e {1}", + "end": "{0} e {1}" + }, + "or": { + "2": "{0} o {1}", + "end": "{0} o {1}" + }, + "unit": { + "short": { + "2": "{0} {1}", + "start": "{0} {1}", + "middle": "{0} {1}", + "end": "{0} {1}" + }, + "medium": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "long": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "full": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + } + } +} \ No newline at end of file diff --git a/js/data/locale/id/list.json b/js/data/locale/id/list.json index aa7c97373b..b494fed2fc 100644 --- a/js/data/locale/id/list.json +++ b/js/data/locale/id/list.json @@ -2,5 +2,9 @@ "standard": { "2": "{0} dan {1}", "end": "{0}, dan {1}" + }, + "or": { + "2": "{0} atau {1}", + "end": "{0}, atau {1}" } } \ No newline at end of file diff --git a/js/data/locale/is/list.json b/js/data/locale/is/list.json index e2f0db98b1..a143116f71 100644 --- a/js/data/locale/is/list.json +++ b/js/data/locale/is/list.json @@ -3,6 +3,10 @@ "2": "{0} og {1}", "end": "{0} og {1}" }, + "or": { + "2": "{0} eða {1}", + "end": "{0} eða {1}" + }, "unit": { "short": { "2": "{0} og {1}", diff --git a/js/data/locale/it/list.json b/js/data/locale/it/list.json index 993b8d62a5..01b70ce22b 100644 --- a/js/data/locale/it/list.json +++ b/js/data/locale/it/list.json @@ -3,6 +3,10 @@ "2": "{0} e {1}", "end": "{0} e {1}" }, + "or": { + "2": "{0} o {1}", + "end": "{0} o {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/ja/list.json b/js/data/locale/ja/list.json index cdde3a2f2e..e1ed2745eb 100644 --- a/js/data/locale/ja/list.json +++ b/js/data/locale/ja/list.json @@ -5,6 +5,12 @@ "middle": "{0}、{1}", "end": "{0}、{1}" }, + "or": { + "2": "{0}または{1}", + "start": "{0}、{1}", + "middle": "{0}、{1}", + "end": "{0}、または{1}" + }, "unit": { "short": { "2": "{0}{1}", diff --git a/js/data/locale/jv/list.json b/js/data/locale/jv/list.json new file mode 100644 index 0000000000..2b29b4c66a --- /dev/null +++ b/js/data/locale/jv/list.json @@ -0,0 +1,36 @@ +{ + "standard": { + "2": "{0} lan {1}", + "end": "{0}, lan {1}" + }, + "or": { + "2": "{0} utowo {1}", + "end": "{0}, utowo {1}" + }, + "unit": { + "short": { + "2": "{0} {1}", + "start": "{0} {1}", + "middle": "{0} {1}", + "end": "{0} {1}" + }, + "medium": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "long": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "full": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + } + } +} \ No newline at end of file diff --git a/js/data/locale/ka/list.json b/js/data/locale/ka/list.json index aca4aad12e..b47421e2fb 100644 --- a/js/data/locale/ka/list.json +++ b/js/data/locale/ka/list.json @@ -2,5 +2,9 @@ "standard": { "2": "{0} და {1}", "end": "{0} და {1}" + }, + "or": { + "2": "{0} ან {1}", + "end": "{0} ან {1}" } } \ No newline at end of file diff --git a/js/data/locale/kk/list.json b/js/data/locale/kk/list.json index b57908c133..4a9782fa43 100644 --- a/js/data/locale/kk/list.json +++ b/js/data/locale/kk/list.json @@ -2,6 +2,10 @@ "standard": { "2": "{0} және {1}" }, + "or": { + "2": "{0} не {1}", + "end": "{0}, не болмаса {1}" + }, "unit": { "2": "{0} {1}", "start": "{0} {1}", diff --git a/js/data/locale/km/list.json b/js/data/locale/km/list.json index c6150a6bf3..59efb2c3bf 100644 --- a/js/data/locale/km/list.json +++ b/js/data/locale/km/list.json @@ -3,6 +3,10 @@ "2": "{0} និង​{1}", "end": "{0} និង {1}" }, + "or": { + "2": "{0} ឬ {1}", + "end": "{0} ឬ {1}" + }, "unit": { "2": "{0} {1}", "start": "{0} {1}", diff --git a/js/data/locale/kn/list.json b/js/data/locale/kn/list.json index 70190005fc..79efc95e58 100644 --- a/js/data/locale/kn/list.json +++ b/js/data/locale/kn/list.json @@ -3,6 +3,10 @@ "2": "{0} ಮತ್ತು {1}", "end": "{0}, ಮತ್ತು {1}" }, + "or": { + "2": "{0} ಅಥವಾ {1}", + "end": "{0}, ಅಥವಾ {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/ko/list.json b/js/data/locale/ko/list.json index 584903b189..6456ead7a8 100644 --- a/js/data/locale/ko/list.json +++ b/js/data/locale/ko/list.json @@ -3,6 +3,10 @@ "2": "{0} 및 {1}", "end": "{0} 및 {1}" }, + "or": { + "2": "{0} 또는 {1}", + "end": "{0} 또는 {1}" + }, "unit": { "2": "{0} {1}", "start": "{0} {1}", diff --git a/js/data/locale/ku/list.json b/js/data/locale/ku/list.json new file mode 100644 index 0000000000..3131948730 --- /dev/null +++ b/js/data/locale/ku/list.json @@ -0,0 +1,36 @@ +{ + "standard": { + "2": "{0} û {1}", + "end": "{0} û {1}" + }, + "or": { + "2": "{0} an {1}", + "end": "{0} an {1}" + }, + "unit": { + "short": { + "2": "{0} {1}", + "start": "{0} {1}", + "middle": "{0} {1}", + "end": "{0} {1}" + }, + "medium": { + "2": "{0} û {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0} û {1}" + }, + "long": { + "2": "{0} û {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0} û {1}" + }, + "full": { + "2": "{0} û {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0} û {1}" + } + } +} \ No newline at end of file diff --git a/js/data/locale/ky/list.json b/js/data/locale/ky/list.json index c624968fc2..56a6d23564 100644 --- a/js/data/locale/ky/list.json +++ b/js/data/locale/ky/list.json @@ -3,6 +3,10 @@ "2": "{0} жана {1}", "end": "{0} жана {1}" }, + "or": { + "2": "{0} же {1}", + "end": "{0}, же {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/list.json b/js/data/locale/list.json index 8a0aafed3b..3c0b3a1a81 100644 --- a/js/data/locale/list.json +++ b/js/data/locale/list.json @@ -5,6 +5,12 @@ "middle": "{0}, {1}", "end": "{0}, {1}" }, + "or": { + "2": "{0} or {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, or {1}" + }, "unit": { "2": "{0}, {1}", "start": "{0}, {1}", diff --git a/js/data/locale/lo/list.json b/js/data/locale/lo/list.json index f9709eaee6..0e36f2a15b 100644 --- a/js/data/locale/lo/list.json +++ b/js/data/locale/lo/list.json @@ -2,6 +2,10 @@ "standard": { "2": "{0} ແລະ {1}" }, + "or": { + "2": "{0} ຫຼື {1}", + "end": "{0} ຫຼື {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/lt/list.json b/js/data/locale/lt/list.json index d61de7d345..74299960d2 100644 --- a/js/data/locale/lt/list.json +++ b/js/data/locale/lt/list.json @@ -3,6 +3,10 @@ "2": "{0} ir {1}", "end": "{0} ir {1}" }, + "or": { + "2": "{0} ar {1}", + "end": "{0} ar {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/lv/list.json b/js/data/locale/lv/list.json index cb00645fd5..184ae05f29 100644 --- a/js/data/locale/lv/list.json +++ b/js/data/locale/lv/list.json @@ -3,6 +3,10 @@ "2": "{0} un {1}", "end": "{0} un {1}" }, + "or": { + "2": "{0} vai {1}", + "end": "{0} vai {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/mk/list.json b/js/data/locale/mk/list.json index 599a1e92f4..049c693435 100644 --- a/js/data/locale/mk/list.json +++ b/js/data/locale/mk/list.json @@ -3,6 +3,10 @@ "2": "{0} и {1}", "end": "{0} и {1}" }, + "or": { + "2": "{0} или {1}", + "end": "{0} или {1}" + }, "unit": { "2": "{0} и {1}", "end": "{0} и {1}" diff --git a/js/data/locale/ml/list.json b/js/data/locale/ml/list.json index a68597c03f..ace803b6e4 100644 --- a/js/data/locale/ml/list.json +++ b/js/data/locale/ml/list.json @@ -3,6 +3,12 @@ "2": "{0} കൂടാതെ {1}", "end": "{0}, {1} എന്നിവ" }, + "or": { + "2": "{0} അല്ലെങ്കിൽ {1}", + "start": "{0}, {1} എന്നിവ", + "middle": "{0}, {1} എന്നിവ", + "end": "{0}, അല്ലെങ്കിൽ {1}" + }, "unit": { "short": { "2": "{0} കൂടാതെ {1}", diff --git a/js/data/locale/mn/list.json b/js/data/locale/mn/list.json new file mode 100644 index 0000000000..f2a030c04f --- /dev/null +++ b/js/data/locale/mn/list.json @@ -0,0 +1,6 @@ +{ + "or": { + "2": "{0} эсвэл {1}", + "end": "{0}, эсвэл {1}" + } +} \ No newline at end of file diff --git a/js/data/locale/mr/list.json b/js/data/locale/mr/list.json index 88fd918ae8..1c3e50d8f9 100644 --- a/js/data/locale/mr/list.json +++ b/js/data/locale/mr/list.json @@ -3,6 +3,10 @@ "2": "{0} आणि {1}", "end": "{0} आणि {1}" }, + "or": { + "2": "{0} किंवा {1}", + "end": "{0}, किंवा {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/ms/list.json b/js/data/locale/ms/list.json index 57b0b8bd45..f2a59d82e8 100644 --- a/js/data/locale/ms/list.json +++ b/js/data/locale/ms/list.json @@ -3,6 +3,10 @@ "2": "{0} dan {1}", "end": "{0} dan {1}" }, + "or": { + "2": "{0} atau {1}", + "end": "{0}, atau {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/my/list.json b/js/data/locale/my/list.json index d1862dcbd6..3cac63a93f 100644 --- a/js/data/locale/my/list.json +++ b/js/data/locale/my/list.json @@ -5,6 +5,12 @@ "middle": "{0} {1}", "end": "{0}နှင့် {1}" }, + "or": { + "2": "{0} သို့မဟုတ် {1}", + "start": "{0} {1}", + "middle": "{0} {1}", + "end": "{0} သို့မဟုတ် {1}" + }, "unit": { "short": { "2": "{0}နှင့် {1}", diff --git a/js/data/locale/nb/list.json b/js/data/locale/nb/list.json index 1c2f92062b..a4573a1bc7 100644 --- a/js/data/locale/nb/list.json +++ b/js/data/locale/nb/list.json @@ -3,6 +3,10 @@ "2": "{0} og {1}", "end": "{0} og {1}" }, + "or": { + "2": "{0} eller {1}", + "end": "{0} eller {1}" + }, "unit": { "short": { "2": "{0}, {1}", diff --git a/js/data/locale/ne/list.json b/js/data/locale/ne/list.json index 57a858328f..d7dd7813c2 100644 --- a/js/data/locale/ne/list.json +++ b/js/data/locale/ne/list.json @@ -4,6 +4,10 @@ "start": "{0},{1}", "end": "{0} र {1}" }, + "or": { + "2": "{0} वा {1}", + "end": "{0}, वा {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/nl/list.json b/js/data/locale/nl/list.json index 17ade12c27..3983b811d0 100644 --- a/js/data/locale/nl/list.json +++ b/js/data/locale/nl/list.json @@ -3,6 +3,10 @@ "2": "{0} en {1}", "end": "{0} en {1}" }, + "or": { + "2": "{0} of {1}", + "end": "{0} of {1}" + }, "unit": { "short": { "2": "{0}, {1}", diff --git a/js/data/locale/or/list.json b/js/data/locale/or/list.json new file mode 100644 index 0000000000..1c3015862b --- /dev/null +++ b/js/data/locale/or/list.json @@ -0,0 +1,36 @@ +{ + "standard": { + "2": "{0} ଓ {1}", + "end": "{0}, ଓ {1}" + }, + "or": { + "2": "{0} କିମ୍ବା {1}", + "end": "{0} କିମ୍ବା {1}" + }, + "unit": { + "short": { + "2": "{0} {1}", + "start": "{0} {1}", + "middle": "{0} {1}", + "end": "{0} {1}" + }, + "medium": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "long": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "full": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + } + } +} \ No newline at end of file diff --git a/js/data/locale/pa/Arab/list.json b/js/data/locale/pa/Arab/list.json index 4d6dedf0e2..ce3284de48 100644 --- a/js/data/locale/pa/Arab/list.json +++ b/js/data/locale/pa/Arab/list.json @@ -2,5 +2,8 @@ "standard": { "2": "{0}, {1}", "end": "{0}, {1}" + }, + "or": { + "2": "{0} or {1}" } } \ No newline at end of file diff --git a/js/data/locale/pa/list.json b/js/data/locale/pa/list.json index 3f7a3772ae..084353afe5 100644 --- a/js/data/locale/pa/list.json +++ b/js/data/locale/pa/list.json @@ -2,5 +2,8 @@ "standard": { "2": "{0} ਅਤੇ {1}", "end": "{0} ਅਤੇ {1}" + }, + "or": { + "2": "{0} ਜਾਂ {1}" } } \ No newline at end of file diff --git a/js/data/locale/pa/scripts.jf b/js/data/locale/pa/scripts.jf index 6340b3066d..1ea244b08b 100644 --- a/js/data/locale/pa/scripts.jf +++ b/js/data/locale/pa/scripts.jf @@ -1,7 +1,7 @@ { "scripts": [ - "Arab", - "Guru" + "Guru", + "Arab" ], "generated": true } \ No newline at end of file diff --git a/js/data/locale/pl/list.json b/js/data/locale/pl/list.json index 2885dc4882..6648ab48d5 100644 --- a/js/data/locale/pl/list.json +++ b/js/data/locale/pl/list.json @@ -3,6 +3,10 @@ "2": "{0} i {1}", "end": "{0} i {1}" }, + "or": { + "2": "{0} lub {1}", + "end": "{0} lub {1}" + }, "unit": { "2": "{0} i {1}", "end": "{0} i {1}" diff --git a/js/data/locale/ps/list.json b/js/data/locale/ps/list.json new file mode 100644 index 0000000000..b56257b265 --- /dev/null +++ b/js/data/locale/ps/list.json @@ -0,0 +1,54 @@ +{ + "standard": { + "short": { + "2": "{0} او {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "medium": { + "2": "{0} او {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "long": { + "2": "{0} او {1}", + "start": "{0}، {1}", + "middle": "{0}، {1}", + "end": "{0}، او {1}" + }, + "full": { + "2": "{0} او {1}", + "start": "{0}، {1}", + "middle": "{0}، {1}", + "end": "{0}، او {1}" + } + }, + "unit": { + "short": { + "2": "{0} {1}", + "start": "{0} {1}", + "middle": "{0} {1}", + "end": "{0} {1}" + }, + "medium": { + "2": "{0} و {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "long": { + "2": "{0} او {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "full": { + "2": "{0} او {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + } + } +} \ No newline at end of file diff --git a/js/data/locale/pt/list.json b/js/data/locale/pt/list.json index 3ed14e6593..814c21c991 100644 --- a/js/data/locale/pt/list.json +++ b/js/data/locale/pt/list.json @@ -3,6 +3,10 @@ "2": "{0} e {1}", "end": "{0} e {1}" }, + "or": { + "2": "{0} ou {1}", + "end": "{0} ou {1}" + }, "unit": { "2": "{0} e {1}", "end": "{0} e {1}" diff --git a/js/data/locale/ro/list.json b/js/data/locale/ro/list.json index c2670925ed..5293456ff3 100644 --- a/js/data/locale/ro/list.json +++ b/js/data/locale/ro/list.json @@ -3,6 +3,10 @@ "2": "{0} și {1}", "end": "{0} și {1}" }, + "or": { + "2": "{0} sau {1}", + "end": "{0} sau {1}" + }, "unit": { "short": { "2": "{0}, {1}", diff --git a/js/data/locale/ru/list.json b/js/data/locale/ru/list.json index 959fa3c444..a873579956 100644 --- a/js/data/locale/ru/list.json +++ b/js/data/locale/ru/list.json @@ -3,6 +3,10 @@ "2": "{0} и {1}", "end": "{0} и {1}" }, + "or": { + "2": "{0} или {1}", + "end": "{0} или {1}" + }, "unit": { "2": "{0} {1}", "start": "{0} {1}", diff --git a/js/data/locale/sd/list.json b/js/data/locale/sd/list.json new file mode 100644 index 0000000000..c4eeb99f25 --- /dev/null +++ b/js/data/locale/sd/list.json @@ -0,0 +1,10 @@ +{ + "standard": { + "2": "{0} ۽ {1}", + "end": "{0}، ۽ {1}" + }, + "or": { + "2": "{0} يا {1}", + "end": "{0}, يا {1}" + } +} \ No newline at end of file diff --git a/js/data/locale/si/list.json b/js/data/locale/si/list.json index b344a64bac..544100b21e 100644 --- a/js/data/locale/si/list.json +++ b/js/data/locale/si/list.json @@ -3,6 +3,10 @@ "2": "{0} සහ {1}", "end": "{0}, සහ {1}" }, + "or": { + "2": "{0} හෝ {1}", + "end": "{0}, හෝ {1}" + }, "unit": { "2": "{0} සහ {1}", "end": "{0}, සහ {1}" diff --git a/js/data/locale/sk/list.json b/js/data/locale/sk/list.json index 60f62fa6da..aa1df6495a 100644 --- a/js/data/locale/sk/list.json +++ b/js/data/locale/sk/list.json @@ -2,5 +2,9 @@ "standard": { "2": "{0} a {1}", "end": "{0} a {1}" + }, + "or": { + "2": "{0} alebo {1}", + "end": "{0} alebo {1}" } } \ No newline at end of file diff --git a/js/data/locale/sl/list.json b/js/data/locale/sl/list.json index 64039b5d03..8dadfefd39 100644 --- a/js/data/locale/sl/list.json +++ b/js/data/locale/sl/list.json @@ -3,6 +3,10 @@ "2": "{0} in {1}", "end": "{0} in {1}" }, + "or": { + "2": "{0} ali {1}", + "end": "{0} ali {1}" + }, "unit": { "2": "{0} in {1}", "end": "{0} in {1}" diff --git a/js/data/locale/so/list.json b/js/data/locale/so/list.json new file mode 100644 index 0000000000..a50cd5a720 --- /dev/null +++ b/js/data/locale/so/list.json @@ -0,0 +1,36 @@ +{ + "standard": { + "2": "{0} iyo {1}", + "end": "{0} iyo {1}" + }, + "or": { + "2": "{0} ama {1}", + "end": "{0} ama {1}" + }, + "unit": { + "short": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "medium": { + "2": "{0}, {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0}, {1}" + }, + "long": { + "2": "{0} iyo {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0} iyo {1}" + }, + "full": { + "2": "{0} iyo {1}", + "start": "{0}, {1}", + "middle": "{0}, {1}", + "end": "{0} iyo {1}" + } + } +} \ No newline at end of file diff --git a/js/data/locale/sq/list.json b/js/data/locale/sq/list.json index 14a76a5d64..18aca3d077 100644 --- a/js/data/locale/sq/list.json +++ b/js/data/locale/sq/list.json @@ -3,6 +3,10 @@ "2": "{0} dhe {1}", "end": "{0} dhe {1}" }, + "or": { + "2": "{0} ose {1}", + "end": "{0} ose {1}" + }, "unit": { "2": "{0} e {1}", "end": "{0} e {1}" diff --git a/js/data/locale/sr/Latn/list.json b/js/data/locale/sr/Latn/list.json index 2885dc4882..81350e7056 100644 --- a/js/data/locale/sr/Latn/list.json +++ b/js/data/locale/sr/Latn/list.json @@ -3,6 +3,10 @@ "2": "{0} i {1}", "end": "{0} i {1}" }, + "or": { + "2": "{0} ili {1}", + "end": "{0} ili {1}" + }, "unit": { "2": "{0} i {1}", "end": "{0} i {1}" diff --git a/js/data/locale/sr/list.json b/js/data/locale/sr/list.json index 599a1e92f4..049c693435 100644 --- a/js/data/locale/sr/list.json +++ b/js/data/locale/sr/list.json @@ -3,6 +3,10 @@ "2": "{0} и {1}", "end": "{0} и {1}" }, + "or": { + "2": "{0} или {1}", + "end": "{0} или {1}" + }, "unit": { "2": "{0} и {1}", "end": "{0} и {1}" diff --git a/js/data/locale/sv/list.json b/js/data/locale/sv/list.json index 107ddd9592..2607d169f8 100644 --- a/js/data/locale/sv/list.json +++ b/js/data/locale/sv/list.json @@ -3,6 +3,10 @@ "2": "{0} och {1}", "end": "{0} och {1}" }, + "or": { + "2": "{0} eller {1}", + "end": "{0} eller {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/sw/list.json b/js/data/locale/sw/list.json index 0ce53b99c6..14ed400519 100644 --- a/js/data/locale/sw/list.json +++ b/js/data/locale/sw/list.json @@ -3,6 +3,10 @@ "2": "{0} na {1}", "end": "{0} na {1}" }, + "or": { + "2": "{0} au {1}", + "end": "{0} au {1}" + }, "unit": { "2": "{0} na {1}", "end": "{0} na {1}" diff --git a/js/data/locale/ta/list.json b/js/data/locale/ta/list.json index eef16171f6..ab69d6460f 100644 --- a/js/data/locale/ta/list.json +++ b/js/data/locale/ta/list.json @@ -3,6 +3,10 @@ "2": "{0} மற்றும் {1}", "end": "{0} மற்றும் {1}" }, + "or": { + "2": "{0} அல்லது {1}", + "end": "{0} அல்லது {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/te/list.json b/js/data/locale/te/list.json index b7db4c2c4b..1bf7c1d88d 100644 --- a/js/data/locale/te/list.json +++ b/js/data/locale/te/list.json @@ -2,5 +2,9 @@ "standard": { "2": "{0} మరియు {1}", "end": "{0} మరియు {1}" + }, + "or": { + "2": "{0} లేదా {1}", + "end": "{0} లేదా {1}" } } \ No newline at end of file diff --git a/js/data/locale/th/list.json b/js/data/locale/th/list.json index 3ce05e4895..3acfea4c8a 100644 --- a/js/data/locale/th/list.json +++ b/js/data/locale/th/list.json @@ -25,6 +25,10 @@ "end": "{0} และ{1}" } }, + "or": { + "2": "{0} หรือ {1}", + "end": "{0} หรือ {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/tk/list.json b/js/data/locale/tk/list.json index ea8f7b7e72..84c3e08b1f 100644 --- a/js/data/locale/tk/list.json +++ b/js/data/locale/tk/list.json @@ -3,6 +3,10 @@ "2": "{0} we {1}", "end": "{0} we {1}" }, + "or": { + "2": "{0} ýa-da {1}", + "end": "{0} ýa-da {1}" + }, "unit": { "short": { "2": "{0} {1}", @@ -14,19 +18,19 @@ "2": "{0}, {1}", "start": "{0}, {1}", "middle": "{0}, {1}", - "end": "{0} we {1}" + "end": "{0}, {1}" }, "long": { "2": "{0} we {1}", "start": "{0}, {1}", "middle": "{0}, {1}", - "end": "{0} we {1}" + "end": "{0}, {1}" }, "full": { "2": "{0} we {1}", "start": "{0}, {1}", "middle": "{0}, {1}", - "end": "{0} we {1}" + "end": "{0}, {1}" } } } \ No newline at end of file diff --git a/js/data/locale/to/list.json b/js/data/locale/to/list.json index 1218e4fe58..a3f8a419b5 100644 --- a/js/data/locale/to/list.json +++ b/js/data/locale/to/list.json @@ -5,6 +5,10 @@ "middle": "{0} mo {1}", "end": "{0} mo {1}" }, + "or": { + "2": "{0} pē {1}", + "end": "{0}, pē {1}" + }, "unit": { "short": { "2": "{0} mo e {1}", diff --git a/js/data/locale/tr/list.json b/js/data/locale/tr/list.json index ea0b97400d..7b3581c1d8 100644 --- a/js/data/locale/tr/list.json +++ b/js/data/locale/tr/list.json @@ -3,6 +3,10 @@ "2": "{0} ve {1}", "end": "{0} ve {1}" }, + "or": { + "2": "{0} veya {1}", + "end": "{0} veya {1}" + }, "unit": { "2": "{0} {1}", "start": "{0} {1}", diff --git a/js/data/locale/tt/list.json b/js/data/locale/tt/list.json new file mode 100644 index 0000000000..904c9828d0 --- /dev/null +++ b/js/data/locale/tt/list.json @@ -0,0 +1,10 @@ +{ + "standard": { + "2": "{0} һәм {1}", + "end": "{0} һәм {1}" + }, + "unit": { + "2": "{0} һәм {1}", + "end": "{0} һәм {1}" + } +} \ No newline at end of file diff --git a/js/data/locale/uk/list.json b/js/data/locale/uk/list.json index cad007e9cd..4e5133bbdc 100644 --- a/js/data/locale/uk/list.json +++ b/js/data/locale/uk/list.json @@ -3,6 +3,10 @@ "2": "{0} і {1}", "end": "{0} і {1}" }, + "or": { + "2": "{0} або {1}", + "end": "{0} або {1}" + }, "unit": { "short": { "2": "{0}, {1}", diff --git a/js/data/locale/ur/list.json b/js/data/locale/ur/list.json index dad3d29c37..42197b9319 100644 --- a/js/data/locale/ur/list.json +++ b/js/data/locale/ur/list.json @@ -5,6 +5,12 @@ "middle": "{0}، {1}", "end": "{0}، اور {1}" }, + "or": { + "2": "{0} یا {1}", + "start": "{0}، {1}", + "middle": "{0}، {1}", + "end": "{0}، یا {1}" + }, "unit": { "short": { "2": "{0} اور {1}", diff --git a/js/data/locale/uz/Latn/list.json b/js/data/locale/uz/Latn/list.json index 9e6fe72734..5c1fc0ac14 100644 --- a/js/data/locale/uz/Latn/list.json +++ b/js/data/locale/uz/Latn/list.json @@ -3,6 +3,10 @@ "2": "{0} va {1}", "end": "{0} va {1}" }, + "or": { + "2": "{0} yoki {1}", + "end": "{0} yoki {1}" + }, "unit": { "2": "{0} {1}", "start": "{0} {1}", diff --git a/js/data/locale/vi/list.json b/js/data/locale/vi/list.json index 426ecff339..681b42da36 100644 --- a/js/data/locale/vi/list.json +++ b/js/data/locale/vi/list.json @@ -3,6 +3,10 @@ "2": "{0} và {1}", "end": "{0} và {1}" }, + "or": { + "2": "{0} hoặc {1}", + "end": "{0} hoặc {1}" + }, "unit": { "short": { "2": "{0} {1}", diff --git a/js/data/locale/yue/list.json b/js/data/locale/yue/list.json index a8fedb8367..66e188eac1 100644 --- a/js/data/locale/yue/list.json +++ b/js/data/locale/yue/list.json @@ -5,6 +5,12 @@ "middle": "{0}、{1}", "end": "{0}同{1}" }, + "or": { + "2": "{0} 或 {1}", + "start": "{0}、{1}", + "middle": "{0}、{1}", + "end": "{0} 或 {1}" + }, "unit": { "short": { "2": "{0}{1}", diff --git a/js/data/locale/zh/list.json b/js/data/locale/zh/list.json index c46de63c25..230bb3e008 100644 --- a/js/data/locale/zh/list.json +++ b/js/data/locale/zh/list.json @@ -5,6 +5,12 @@ "middle": "{0}、{1}", "end": "{0}和{1}" }, + "or": { + "2": "{0}或{1}", + "start": "{0}、{1}", + "middle": "{0}、{1}", + "end": "{0}或{1}" + }, "unit": { "2": "{0}{1}", "start": "{0}{1}", diff --git a/js/data/locale/zoneinfo/Africa/Casablanca.json b/js/data/locale/zoneinfo/Africa/Casablanca.json index db85daa003..23439448df 100644 --- a/js/data/locale/zoneinfo/Africa/Casablanca.json +++ b/js/data/locale/zoneinfo/Africa/Casablanca.json @@ -1,13 +1,12 @@ { "e": { - "m": 5, - "r": "13", - "t": "3:0" + "m": 6, + "r": "9", + "t": "2:0" }, - "f": "WE{c}T", - "o": "0:0", + "f": "+01/+00", + "o": "1:0", "s": { - "c": "S", "m": 6, "r": "17", "t": "2:0", diff --git a/js/data/locale/zoneinfo/Africa/El_Aaiun.json b/js/data/locale/zoneinfo/Africa/El_Aaiun.json index d7efc5fcc4..b474f84e39 100644 --- a/js/data/locale/zoneinfo/Africa/El_Aaiun.json +++ b/js/data/locale/zoneinfo/Africa/El_Aaiun.json @@ -1,13 +1,12 @@ { "e": { - "m": 5, - "r": "13", - "t": "3:0" + "m": 6, + "r": "9", + "t": "2:0" }, - "f": "WE{c}T", - "o": "0:0", + "f": "+01/+00", + "o": "1:0", "s": { - "c": "S", "m": 6, "r": "17", "t": "2:0", diff --git a/js/data/locale/zoneinfo/Africa/Khartoum.json b/js/data/locale/zoneinfo/Africa/Khartoum.json index bc9cdd9c6e..786140a940 100644 --- a/js/data/locale/zoneinfo/Africa/Khartoum.json +++ b/js/data/locale/zoneinfo/Africa/Khartoum.json @@ -2,5 +2,5 @@ "f": "CAT", "o": "2:0", "c": "SD", - "n": "E. Africa {c} Time" + "n": "Sudan {c} Time" } \ No newline at end of file diff --git a/js/data/locale/zoneinfo/Africa/Sao_Tome.json b/js/data/locale/zoneinfo/Africa/Sao_Tome.json index 27bfdf6fea..b19766b349 100644 --- a/js/data/locale/zoneinfo/Africa/Sao_Tome.json +++ b/js/data/locale/zoneinfo/Africa/Sao_Tome.json @@ -1,6 +1,6 @@ { - "f": "WAT", - "o": "1:0", + "f": "GMT", + "o": "0:0", "c": "ST", - "n": "Greenwich {c} Time" + "n": "Sao Tome {c} Time" } \ No newline at end of file diff --git a/js/data/locale/zoneinfo/Africa/Windhoek.json b/js/data/locale/zoneinfo/Africa/Windhoek.json index 88c363b60c..7f3b98e4dd 100644 --- a/js/data/locale/zoneinfo/Africa/Windhoek.json +++ b/js/data/locale/zoneinfo/Africa/Windhoek.json @@ -1,11 +1,5 @@ { - "e": { - "c": "WAT", - "m": 4, - "r": "0>1", - "t": "2:0" - }, - "f": "{c}", + "f": "CAT", "o": "2:0", "c": "NA", "n": "Namibia {c} Time" diff --git a/js/data/locale/zoneinfo/America/Santiago.json b/js/data/locale/zoneinfo/America/Santiago.json index f59a732399..02d8ca6765 100644 --- a/js/data/locale/zoneinfo/America/Santiago.json +++ b/js/data/locale/zoneinfo/America/Santiago.json @@ -1,14 +1,14 @@ { "e": { - "m": 5, - "r": "0>9", + "m": 4, + "r": "0>2", "t": "0:0" }, "f": "-04/-03", "o": "-4:0", "s": { - "m": 8, - "r": "0>9", + "m": 9, + "r": "0>2", "t": "0:0", "v": "1:0" }, diff --git a/js/data/locale/zoneinfo/Antarctica/Casey.json b/js/data/locale/zoneinfo/Antarctica/Casey.json index ce50bc1f6a..3d7679979d 100644 --- a/js/data/locale/zoneinfo/Antarctica/Casey.json +++ b/js/data/locale/zoneinfo/Antarctica/Casey.json @@ -2,5 +2,5 @@ "f": "+08", "o": "8:0", "c": "AQ", - "n": "Central Pacific {c} Time" + "n": "W. Australia {c} Time" } \ No newline at end of file diff --git a/js/data/locale/zoneinfo/Asia/Famagusta.json b/js/data/locale/zoneinfo/Asia/Famagusta.json index 8f49473a37..5584505a03 100644 --- a/js/data/locale/zoneinfo/Asia/Famagusta.json +++ b/js/data/locale/zoneinfo/Asia/Famagusta.json @@ -14,5 +14,5 @@ "v": "1:0" }, "c": "CY", - "n": "Turkey {c} Time" + "n": "GTB {c} Time" } \ No newline at end of file diff --git a/js/data/locale/zoneinfo/Asia/Gaza.json b/js/data/locale/zoneinfo/Asia/Gaza.json index 3a080726f7..16e125f2f3 100644 --- a/js/data/locale/zoneinfo/Asia/Gaza.json +++ b/js/data/locale/zoneinfo/Asia/Gaza.json @@ -9,8 +9,8 @@ "s": { "c": "S", "m": 3, - "r": "6>22", - "t": "1:0", + "r": "l5", + "t": "0:0", "v": "1:0" }, "c": "PS", diff --git a/js/data/locale/zoneinfo/Asia/Hebron.json b/js/data/locale/zoneinfo/Asia/Hebron.json index 3a080726f7..16e125f2f3 100644 --- a/js/data/locale/zoneinfo/Asia/Hebron.json +++ b/js/data/locale/zoneinfo/Asia/Hebron.json @@ -9,8 +9,8 @@ "s": { "c": "S", "m": 3, - "r": "6>22", - "t": "1:0", + "r": "l5", + "t": "0:0", "v": "1:0" }, "c": "PS", diff --git a/js/data/locale/zoneinfo/Asia/Manila.json b/js/data/locale/zoneinfo/Asia/Manila.json index e71c04fd70..db1489efd5 100644 --- a/js/data/locale/zoneinfo/Asia/Manila.json +++ b/js/data/locale/zoneinfo/Asia/Manila.json @@ -1,5 +1,5 @@ { - "f": "+08/+09", + "f": "PST", "o": "8:0", "c": "PH", "n": "Singapore {c} Time" diff --git a/js/data/locale/zoneinfo/Asia/Qostanay.json b/js/data/locale/zoneinfo/Asia/Qostanay.json new file mode 100644 index 0000000000..30863558de --- /dev/null +++ b/js/data/locale/zoneinfo/Asia/Qostanay.json @@ -0,0 +1,5 @@ +{ + "f": "+06", + "o": "6:0", + "c": "KZ" +} \ No newline at end of file diff --git a/js/data/locale/zoneinfo/Asia/Qyzylorda.json b/js/data/locale/zoneinfo/Asia/Qyzylorda.json index a3374ddb1f..82230c3417 100644 --- a/js/data/locale/zoneinfo/Asia/Qyzylorda.json +++ b/js/data/locale/zoneinfo/Asia/Qyzylorda.json @@ -1,6 +1,6 @@ { - "f": "+06", - "o": "6:0", + "f": "+05", + "o": "5:0", "c": "KZ", "n": "Central Asia {c} Time" } \ No newline at end of file diff --git a/js/data/locale/zoneinfo/Chile/Continental.json b/js/data/locale/zoneinfo/Chile/Continental.json index 61b7eae008..4abe355f97 100644 --- a/js/data/locale/zoneinfo/Chile/Continental.json +++ b/js/data/locale/zoneinfo/Chile/Continental.json @@ -1,14 +1,14 @@ { "e": { - "m": 5, - "r": "0>9", + "m": 4, + "r": "0>2", "t": "0:0" }, "f": "-04/-03", "o": "-4:0", "s": { - "m": 8, - "r": "0>9", + "m": 9, + "r": "0>2", "t": "0:0", "v": "1:0" }, diff --git a/js/data/locale/zoneinfo/Europe/Simferopol.json b/js/data/locale/zoneinfo/Europe/Simferopol.json index 9ed278a805..39342c4dfb 100644 --- a/js/data/locale/zoneinfo/Europe/Simferopol.json +++ b/js/data/locale/zoneinfo/Europe/Simferopol.json @@ -1,6 +1,6 @@ { "f": "MSK", "o": "3:0", - "c": "RU", + "c": "UA", "n": "Russian {c} Time" } \ No newline at end of file diff --git a/js/data/locale/zoneinfo/Europe/Volgograd.json b/js/data/locale/zoneinfo/Europe/Volgograd.json index 591506b408..e30c3e6acf 100644 --- a/js/data/locale/zoneinfo/Europe/Volgograd.json +++ b/js/data/locale/zoneinfo/Europe/Volgograd.json @@ -1,6 +1,6 @@ { - "f": "+03", - "o": "3:0", + "f": "+04", + "o": "4:0", "c": "RU", "n": "Russian {c} Time" } \ No newline at end of file diff --git a/js/data/locale/zoneinfo/Pacific/Easter.json b/js/data/locale/zoneinfo/Pacific/Easter.json index bbaba51e49..205c3a535d 100644 --- a/js/data/locale/zoneinfo/Pacific/Easter.json +++ b/js/data/locale/zoneinfo/Pacific/Easter.json @@ -1,14 +1,14 @@ { "e": { - "m": 5, - "r": "0>8", + "m": 4, + "r": "0>1", "t": "22:0" }, "f": "-06/-05", "o": "-6:0", "s": { - "m": 8, - "r": "0>8", + "m": 9, + "r": "0>1", "t": "22:0", "v": "1:0" }, diff --git a/js/data/locale/zoneinfo/Pacific/Fiji.json b/js/data/locale/zoneinfo/Pacific/Fiji.json index 670b1a2a2c..4bcb9959d0 100644 --- a/js/data/locale/zoneinfo/Pacific/Fiji.json +++ b/js/data/locale/zoneinfo/Pacific/Fiji.json @@ -1,7 +1,7 @@ { "e": { "m": 1, - "r": "0>14", + "r": "0>13", "t": "3:0" }, "f": "+12/+13", diff --git a/js/data/locale/zoneinfo/Pacific/Tongatapu.json b/js/data/locale/zoneinfo/Pacific/Tongatapu.json index 5be0957519..a2913eddc8 100644 --- a/js/data/locale/zoneinfo/Pacific/Tongatapu.json +++ b/js/data/locale/zoneinfo/Pacific/Tongatapu.json @@ -1,9 +1,4 @@ { - "e": { - "m": 1, - "r": "0>15", - "t": "3:0" - }, "f": "+13/+14", "o": "13:0", "c": "TO", diff --git a/js/data/locale/zoneinfo/zonetab.json b/js/data/locale/zoneinfo/zonetab.json index 5a41aa7576..71081dc1c5 100644 --- a/js/data/locale/zoneinfo/zonetab.json +++ b/js/data/locale/zoneinfo/zonetab.json @@ -527,6 +527,7 @@ "KZ": [ "Asia/Almaty", "Asia/Qyzylorda", + "Asia/Qostanay", "Asia/Aqtobe", "Asia/Aqtau", "Asia/Atyrau", @@ -769,10 +770,9 @@ "RU": [ "Europe/Kaliningrad", "Europe/Moscow", - "Europe/Simferopol", - "Europe/Volgograd", "Europe/Kirov", "Europe/Astrakhan", + "Europe/Volgograd", "Europe/Saratov", "Europe/Ulyanovsk", "Europe/Samara", @@ -796,6 +796,12 @@ "Asia/Anadyr", "W-SU" ], + "UA": [ + "Europe/Simferopol", + "Europe/Kiev", + "Europe/Uzhgorod", + "Europe/Zaporozhye" + ], "RW": [ "Africa/Kigali" ], @@ -915,11 +921,6 @@ "TZ": [ "Africa/Dar_es_Salaam" ], - "UA": [ - "Europe/Kiev", - "Europe/Uzhgorod", - "Europe/Zaporozhye" - ], "UG": [ "Africa/Kampala" ], diff --git a/js/lib/DateRngFmt.js b/js/lib/DateRngFmt.js index dfe5f32554..b6d57a35ad 100644 --- a/js/lib/DateRngFmt.js +++ b/js/lib/DateRngFmt.js @@ -136,6 +136,11 @@ var DateRngFmt = function(options) { this.length = options.length.charAt(0); } } + + if (options.timezone) { + this.timezone = options.timezone; + } + if (typeof(options.sync) !== 'undefined') { sync = !!options.sync; } @@ -300,9 +305,20 @@ DateRngFmt.prototype = { var start = DateFactory._dateToIlib(startDateLike, thisZoneName, this.locale); var end = DateFactory._dateToIlib(endDateLike, thisZoneName, this.locale); - if (typeof(start) !== 'object' || !start.getCalendar || start.getCalendar() !== this.calName || - typeof(end) !== 'object' || !end.getCalendar || end.getCalendar() !== this.calName) { - throw "Wrong calendar type"; + if (typeof(start) !== 'object' || !start.getCalendar || start.getCalendar() !== this.calName || (this.timezone && start.timezone && start.timezone !== this.timezone)) { + start = DateFactory({ + type: this.calName, + timezone: thisZoneName, + julianday: start.getJulianDay() + }); + } + + if (typeof(end) !== 'object' || !end.getCalendar || end.getCalendar() !== this.calName || (this.timezone && end.timezone && end.timezone !== this.timezone)) { + end = DateFactory({ + type: this.calName, + timezone: thisZoneName, + julianday: end.getJulianDay() + }); } startRd = start.getRataDie(); diff --git a/js/lib/ListFmt.js b/js/lib/ListFmt.js index 76fafe7042..3b2d06c168 100644 --- a/js/lib/ListFmt.js +++ b/js/lib/ListFmt.js @@ -1,7 +1,7 @@ /* * ListFmt.js - Represent a list formatter. * - * Copyright © 2017-2018, JEDLSoft + * Copyright © 2017-2019, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,13 @@ var ilib = require("../index.js"); var Utils = require("./Utils.js"); var Locale = require("./Locale.js"); +// map our style parameter to the cldr style in the list.json files +var styleMap = { + "standard": "standard", + "conjunction": "standard", + "disjunction": "or", + "unit": "unit" +}; /** * @class @@ -47,7 +54,16 @@ var Locale = require("./Locale.js"); * * *
  • style the name of style to use to format the list, or undefined - * to use the default "standard" style. another style option is "units". + * to use the default "conjunction" style. Valid values are: + * + *
      + *
        standard create a standard list. + *
          conjunction this list should be concatenated with a conjunction "and". + * This is the default style for "standard". + *
            disjunction this list should be concatenated with a disjunction "or". + *
              unit this is a list of measures like "5 minutes, 4 seconds". In + * some languages, these type of lists are concatenated without a conjunction. + *
            * *
          • onLoad - a callback function to call when the locale data is fully loaded and the address has been * parsed. When the onLoad option is given, the address formatter object @@ -79,6 +95,10 @@ var ListFmt = function(options) { this.loadParams = {}; if (options) { + if (options.type) { + this.type = options.type; + } + if (options.locale) { this.locale = options.locale; } @@ -96,7 +116,9 @@ var ListFmt = function(options) { } if (options.style) { - this.style = options.style; + if (styleMap[options.style]) { + this.style = styleMap[options.style]; + } } } @@ -109,6 +131,11 @@ var ListFmt = function(options) { callback: ilib.bind(this, function (fmtdata) { this.fmtdata = fmtdata; + // if the requested style is not available in this locale, fall back + // to the default "standard" style + if (!fmtdata[this.style]) { + this.style = "standard"; + } if (options && typeof(options.onLoad) === 'function') { options.onLoad(this); } @@ -184,4 +211,4 @@ ListFmt.prototype.getStyle = function() { return this.style; }; -module.exports = ListFmt; \ No newline at end of file +module.exports = ListFmt; diff --git a/js/lib/PhoneFmt.js b/js/lib/PhoneFmt.js index a3e51d2dc6..993c4ff56c 100644 --- a/js/lib/PhoneFmt.js +++ b/js/lib/PhoneFmt.js @@ -1,7 +1,7 @@ /* - * phonefmt.js - Represent a phone number formatter. + * PhoneFmt.js - Represent a phone number formatter. * - * Copyright © 2014-2015, 2018, JEDLSoft + * Copyright © 2014-2015, 2018-2019, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ var Utils = require("./Utils.js"); var JSUtils = require("./JSUtils.js"); var Locale = require("./Locale.js"); var PhoneNumber = require("./PhoneNumber.js"); -var NumberingPlan = require("./NumberingPlan.js"); var PhoneLocale = require("./PhoneLocale.js"); /** @@ -105,30 +104,20 @@ var PhoneFmt = function(options) { /** @type {PhoneLocale} */ this.locale = data; - new NumberingPlan({ + Utils.loadData({ + name: "phonefmt.json", + object: "PhoneFmt", locale: this.locale, sync: this.sync, - loadParms: this.loadParams, - onLoad: ilib.bind(this, function (plan) { - /** @type {NumberingPlan} */ - this.plan = plan; - - Utils.loadData({ - name: "phonefmt.json", - object: "PhoneFmt", - locale: this.locale, - sync: this.sync, - loadParams: JSUtils.merge(this.loadParams, { - returnOne: true - }), - callback: ilib.bind(this, function (fmtdata) { - this.fmtdata = fmtdata; - - if (options && typeof(options.onLoad) === 'function') { - options.onLoad(this); - } - }) - }); + loadParams: JSUtils.merge(this.loadParams, { + returnOne: true + }), + callback: ilib.bind(this, function (fmtdata) { + this.fmtdata = fmtdata; + + if (options && typeof(options.onLoad) === 'function') { + options.onLoad(this); + } }) }); }) diff --git a/js/package.json.template b/js/package.json.template index 960dab747c..7b9656395f 100644 --- a/js/package.json.template +++ b/js/package.json.template @@ -61,14 +61,10 @@ "url": "git@github.com:iLib-js/iLib.git" } ], - "engines": { - "ringojs": ">=0.9", - "nodejs": ">= 0.10" - }, "scripts": { "test": "ant test" }, - "devDependencies": { - "http-server": "^0.9.0" - } + "devDependencies": { + "http-server": "^0.9.0" + } } diff --git a/js/test/date/testMeridiems.js b/js/test/date/testMeridiems.js index 2a5d963e45..11eae4e0bd 100644 --- a/js/test/date/testMeridiems.js +++ b/js/test/date/testMeridiems.js @@ -1894,13 +1894,13 @@ module.exports.testmeridiems = { test.done(); }, - testMeridiem_pa_PK: function(test) { + testMeridiem_pa_Arab_PK: function(test) { test.expect(3); - var fmt = DateFmt.getMeridiemsRange({locale:"pa-PK"}); + var fmt = DateFmt.getMeridiemsRange({locale:"pa-Arab-PK"}); test.ok(fmt !== null); - test.equal(fmt[0].name, "ਪੂ.ਦੁ."); - test.equal(fmt[1].name, "ਬਾ.ਦੁ."); + test.equal(fmt[0].name, 'AM'); + test.equal(fmt[1].name, 'PM'); test.done(); }, diff --git a/js/test/date/testdatefmt_af_NA.js b/js/test/date/testdatefmt_af_NA.js index f0ed175585..d75e043be9 100644 --- a/js/test/date/testdatefmt_af_NA.js +++ b/js/test/date/testdatefmt_af_NA.js @@ -1,7 +1,7 @@ /* - * testdatefmt_af_NA.js - test the date formatter object in Afrikaans + * testdatefmt_af_NA.js - test the date formatter object in Afrikaans for Namibia * - * Copyright © 2015,2017, JEDLSoft + * Copyright © 2015,2017,2019 JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1225,7 +1225,7 @@ module.exports.testdatefmt_af_NA = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "13:45 WAT"); + test.equal(fmt.format(date), "13:45 CAT"); test.done(); }, @@ -1249,7 +1249,7 @@ module.exports.testdatefmt_af_NA = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "13:45 WAT"); + test.equal(fmt.format(date), "13:45 CAT"); test.done(); }, @@ -1292,7 +1292,7 @@ module.exports.testdatefmt_af_NA = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "13:45:37 WAT"); + test.equal(fmt.format(date), "13:45:37 CAT"); test.done(); }, @@ -1316,7 +1316,7 @@ module.exports.testdatefmt_af_NA = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "13:45:37 WAT"); + test.equal(fmt.format(date), "13:45:37 CAT"); test.done(); }, @@ -1474,7 +1474,7 @@ module.exports.testdatefmt_af_NA = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "13:45 WAT"); + test.equal(fmt.format(date), "13:45 CAT"); test.done(); }, @@ -1498,7 +1498,7 @@ module.exports.testdatefmt_af_NA = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "13:45 WAT"); + test.equal(fmt.format(date), "13:45 CAT"); test.done(); }, @@ -1542,7 +1542,7 @@ module.exports.testdatefmt_af_NA = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "13:45:37 WAT"); + test.equal(fmt.format(date), "13:45:37 CAT"); test.done(); }, @@ -1566,7 +1566,7 @@ module.exports.testdatefmt_af_NA = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "13:45:37 WAT"); + test.equal(fmt.format(date), "13:45:37 CAT"); test.done(); }, @@ -1590,7 +1590,7 @@ module.exports.testdatefmt_af_NA = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "13:45:37 WAT"); + test.equal(fmt.format(date), "13:45:37 CAT"); test.done(); }, diff --git a/js/test/daterange/testdatefmtrange.js b/js/test/daterange/testdatefmtrange.js index 98a3dc2b77..4d0a690ec2 100644 --- a/js/test/daterange/testdatefmtrange.js +++ b/js/test/daterange/testdatefmtrange.js @@ -1,6 +1,6 @@ /* * testdatefmtrange.js - test the date range formatter object - * + * * Copyright © 2012-2018, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -35,7 +35,7 @@ if (typeof(DateFmt) === "undefined") { function mockLoaderDRF(paths, sync, params, callback) { var data = []; - + paths.forEach(function(path) { if (path.indexOf("localeinfo") !== -1) { if (path === "yy/localeinfo.json") { @@ -53,7 +53,7 @@ function mockLoaderDRF(paths, sync, params, callback) { }); if (typeof(callback) !== 'undefined') { - callback.call(this, data); + callback.call(this, data); } return data; } @@ -65,7 +65,7 @@ module.exports.testdatefmtrange = { ilib.clearCache(); callback(); }, - + tearDown: function(callback) { ilib._load = oldLoader; callback(); @@ -74,57 +74,57 @@ module.exports.testdatefmtrange = { testDateRngFmtConstructorEmpty: function(test) { test.expect(1); var fmt = new DateRngFmt(); - + test.ok(fmt !== null); test.done(); }, - + testDateRngFmtConstructorDefaultLocale: function(test) { test.expect(2); var fmt = new DateRngFmt(); - + test.ok(fmt !== null); - + test.equal(fmt.getLocale().toString(), "en-US"); test.done(); }, - + testDateRngFmtGetCalendarDefault: function(test) { test.expect(3); var fmt = new DateRngFmt(); - + test.ok(fmt !== null); var cal = fmt.getCalendar(); test.ok(cal !== null); - + test.equal(cal, "gregorian"); test.done(); }, - + testDateRngFmtGetCalendarExplicit: function(test) { test.expect(3); var fmt = new DateRngFmt({calendar: "julian"}); - + test.ok(fmt !== null); var cal = fmt.getCalendar(); test.ok(cal !== null); - + test.equal(cal, "julian"); test.done(); }, - + testDateRngFmtGetCalendarExplicitDefault: function(test) { test.expect(3); var fmt = new DateRngFmt({calendar: "gregorian"}); - + test.ok(fmt !== null); var cal = fmt.getCalendar(); test.ok(cal !== null); - + test.equal(cal, "gregorian"); test.done(); }, - + testDateRngFmtGetCalendarNotInThisLocale: function(test) { try { var fmt = new DateRngFmt({calendar: "arabic", locale: 'en-US'}); @@ -135,141 +135,141 @@ module.exports.testdatefmtrange = { } test.done(); }, - + testDateRngFmtGetLength: function(test) { test.expect(2); var fmt = new DateRngFmt({length: "full"}); test.ok(fmt !== null); - + test.equal(fmt.getLength(), "full"); test.done(); }, - + testDateRngFmtGetLengthDefault: function(test) { test.expect(2); var fmt = new DateRngFmt(); test.ok(fmt !== null); - + test.equal(fmt.getLength(), "short"); test.done(); }, - + testDateRngFmtGetLengthBogus: function(test) { test.expect(2); var fmt = new DateRngFmt({length: "asdf"}); test.ok(fmt !== null); - + test.equal(fmt.getLength(), "short"); test.done(); }, - + testDateRngFmtGetLocale: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "de-DE"}); test.ok(fmt !== null); - + test.equal(fmt.getLocale().toString(), "de-DE"); test.done(); }, - + testDateRngFmtGetLocaleDefault: function(test) { test.expect(2); var fmt = new DateRngFmt(); test.ok(fmt !== null); - + test.equal(fmt.getLocale().toString(), "en-US"); test.done(); }, - + testDateRngFmtGetLocaleBogus: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "zyy-XX"}); test.ok(fmt !== null); - + test.equal(fmt.getLocale().toString(), "zyy-XX"); test.done(); }, - + testDateRngFmtGetClockDefaultUS: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "en-US"}); test.ok(fmt !== null); - + // use the default test.equal(fmt.getClock(), "12"); test.done(); }, - + testDateRngFmtGetClockDefaultDE: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "de-DE"}); test.ok(fmt !== null); - + // use the default test.equal(fmt.getClock(), "24"); test.done(); }, - + testDateRngFmtGetClock: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "en-US", clock: "24"}); test.ok(fmt !== null); - + // use the default test.equal(fmt.getClock(), "24"); test.done(); }, - + testDateRngFmtGetClockBogus: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "en-US", clock: "asdf"}); test.ok(fmt !== null); - + // use the default test.equal(fmt.getClock(), "12"); test.done(); }, - + testDateRngFmtGetTimeZoneDefault: function(test) { test.expect(2); ilib.tz = undefined; // just in case if (ilib._getPlatform() === "nodejs") { process.env.TZ = ""; // just in case } - + var fmt = new DateRngFmt(); test.ok(fmt !== null); - + var tz = fmt.getTimeZone(); test.equal(tz.getId(), "local"); test.done(); }, - + testDateRngFmtGetTimeZone: function(test) { test.expect(2); var fmt = new DateRngFmt({timezone: "Europe/Paris"}); test.ok(fmt !== null); - + var tz = fmt.getTimeZone(); test.equal(tz.getId(), "Europe/Paris"); test.done(); }, - + testDateRngFmtGetDefaultLocale: function(test) { test.expect(2); - + var fmt = new DateRngFmt({locale: "yy-YY"}); test.ok(fmt !== null); - + test.equal(fmt.getLocale().toString(), "yy-YY"); test.done(); }, - + testDateRngFmtGetDefaultFormat: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "yy-YY"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2013, month: 2, @@ -278,7 +278,7 @@ module.exports.testdatefmtrange = { minute: 20, second: 0 }); - + var end = new GregorianDate({ year: 2013, month: 2, @@ -290,7 +290,7 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), "20/2/13 12:20 – 16:35"); test.done(); }, - + testDateRngFmtDynamicLoadSync: function(test) { if (ilib.isDynData()) { // don't need to test loading on the dynamic load version because we are testing @@ -302,13 +302,13 @@ module.exports.testdatefmtrange = { ilib.data.localeinfo_yy = ilib.data.localeinfo_und_YY = ilib.data.localeinfo_yy_YY = undefined; ilib.data.dateformats_yy = ilib.data.dateformats_und_YY = ilib.data.dateformats_yy_YY = undefined; ilib.clearCache(); - + var fmt = new DateRngFmt({ locale: "yy-YY" }); test.expect(2); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2013, month: 2, @@ -317,7 +317,7 @@ module.exports.testdatefmtrange = { minute: 20, second: 0 }); - + var end = new GregorianDate({ year: 2013, month: 2, @@ -326,12 +326,12 @@ module.exports.testdatefmtrange = { minute: 35, second: 0 }); - + ilib.setLoaderCallback(oldLoader); test.equal(fmt.format(start, end), "2/20/13, 12:20 PM – 4:35 PM"); test.done(); }, - + testDateRngFmtDynamicLoadSyncCached: function(test) { if (ilib.isDynData()) { // don't need to test loading on the dynamic load version because we are testing @@ -343,13 +343,13 @@ module.exports.testdatefmtrange = { ilib.data.localeinfo_yy = ilib.data.localeinfo_und_YY = ilib.data.localeinfo_yy_YY = undefined; ilib.data.dateformats_yy = ilib.data.dateformats_und_YY = ilib.data.dateformats_yy_YY = undefined; ilib.clearCache(); - + var fmt = new DateRngFmt({ locale: "yy-YY" }); test.expect(2); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2013, month: 2, @@ -358,7 +358,7 @@ module.exports.testdatefmtrange = { minute: 20, second: 0 }); - + var end = new GregorianDate({ year: 2013, month: 2, @@ -367,12 +367,12 @@ module.exports.testdatefmtrange = { minute: 35, second: 0 }); - + ilib.setLoaderCallback(oldLoader); test.equal(fmt.format(start, end), "2/20/13, 12:20 PM – 4:35 PM"); test.done(); }, - + testDateRngFmtDynamicLoadAsync: function(test) { if (ilib.isDynData()) { // don't need to test loading on the dynamic load version because we are testing @@ -394,7 +394,7 @@ module.exports.testdatefmtrange = { minute: 20, second: 0 }); - + var end = new GregorianDate({ year: 2013, month: 2, @@ -403,7 +403,7 @@ module.exports.testdatefmtrange = { minute: 35, second: 0 }); - + new DateRngFmt({ locale: "yy-YY", sync: false, @@ -416,7 +416,7 @@ module.exports.testdatefmtrange = { } }); }, - + testDateRngFmtDynamicLoadAsyncCached: function(test) { if (ilib.isDynData()) { // don't need to test loading on the dynamic load version because we are testing @@ -437,7 +437,7 @@ module.exports.testdatefmtrange = { minute: 20, second: 0 }); - + var end = new GregorianDate({ year: 2013, month: 2, @@ -446,7 +446,7 @@ module.exports.testdatefmtrange = { minute: 35, second: 0 }); - + new DateRngFmt({ locale: "yy-YY", sync: false, @@ -459,15 +459,15 @@ module.exports.testdatefmtrange = { } }); }, - - + + //Miscellaneous UnitTest - + testDateRngFmtesPAMultiDayMedium: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "es-PA", length: "medium"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -489,12 +489,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), "06/20 – 28/2011"); test.done(); }, - + testDateRngFmtesPANextMonthMedium: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "es-PA", length: "medium"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -516,12 +516,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), '06/20 – 11/28/2011'); test.done(); }, - + testDateRngFmtesPRMultiDayMedium: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "es-PR", length: "medium"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -543,12 +543,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), "06/20 – 28/2011"); test.done(); }, - + testDateRngFmtesPRNextMonthMedium: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "es-PR", length: "medium"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -570,12 +570,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), '06/20 – 11/28/2011'); test.done(); }, - + testDateRngFmtptGQNextDayFull: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "pt-GQ", length: "medium"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -597,12 +597,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), "20/06/2011, 13:45 – 22/06/2011, 15:30"); test.done(); }, - + testDateRngFmtptGQNextDayLong: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "pt-GQ", length: "long"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -624,12 +624,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), "20 de junho de 2011 às 13:45 – 22 de junho de 2011 às 15:30"); test.done(); }, - + testDateRngFmtptGQNextDayMedium: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "pt-GQ", length: "medium"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -651,12 +651,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), "20/06/2011, 13:45 – 22/06/2011, 15:30"); test.done(); }, - + testDateRngFmtptGQNextDayShort: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "pt-GQ", length: "short"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -678,13 +678,13 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), "20/06/11, 13:45 – 22/06/11, 15:30"); test.done(); }, - - + + testDateRngFmtenCAinDayShort: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "en-CA", length: "short"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -706,12 +706,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), '2011-06-20, 1:45 p.m. – 4:30 p.m.'); test.done(); }, - + testDateRngFmtenCAMultitDayShort: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "en-CA", length: "short"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -733,12 +733,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), "2011-06-20 – 26"); test.done(); }, - + testDateRngFmtenCANextMonthShort: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "en-CA", length: "short"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -760,12 +760,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), "2011-06-20 – 2011-09-26"); test.done(); }, - + testDateRngFmtenCANextYearShort: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "en-CA", length: "short"}); test.ok(fmt !== null); - + var start = new GregorianDate({ year: 2011, month: 6, @@ -787,12 +787,12 @@ module.exports.testdatefmtrange = { test.equal(fmt.format(start, end), "2011-06-20 – 2012-05-26"); test.done(); }, - + testDateRngFmtAcceptJSIntrisicDates: function(test) { test.expect(2); var fmt = new DateRngFmt({locale: "en-US", length: "short"}); test.ok(fmt !== null); - + var start = new Date(2011, 5, 20, 13, 45, 0); var end = new Date(2012, 4, 26, 16, 30, 0); test.equal(fmt.format(start, end), "6/20/11 – 5/26/12"); @@ -803,11 +803,44 @@ module.exports.testdatefmtrange = { test.expect(2); var fmt = new DateRngFmt({locale: "en-US", length: "short"}); test.ok(fmt !== null); - + var start = 1308602700000; var end = 1338075000000; test.equal(fmt.format(start, end), "6/20/11 – 5/26/12"); test.done(); - } + }, + testDateRngFmtTestTimeZone: function(test) { + test.expect(2); + var fmt = new DateRngFmt({ + timezone: "Europe/London", + length: "short" + }); + test.ok(fmt !== null); + + // make sure the dates are offset by the time zone offset + // before they are formatted + var start = new GregorianDate({ + year: 2011, + month: 6, + day: 20, + hour: 21, + minute: 45, + second: 0, + millisecond: 0, + timezone: "America/Los_Angeles" + }); + var end = new GregorianDate({ + year: 2011, + month: 6, + day: 28, + hour: 23, + minute: 5, + second: 30, + millisecond: 0, + timezone: "America/Los_Angeles" + }); + test.equal(fmt.format(start, end), "6/21/11 – 6/29/11"); + test.done(); + }, }; \ No newline at end of file diff --git a/js/test/durfmt/testdurfmt2.js b/js/test/durfmt/testdurfmt2.js index cf3383e6a2..627b3ae8e8 100644 --- a/js/test/durfmt/testdurfmt2.js +++ b/js/test/durfmt/testdurfmt2.js @@ -4219,23 +4219,26 @@ module.exports.testdurfmt2 = { test.done(); }, testDurFmt_pa_Guru_IN: function(test) { - test.expect(16); - // 1 2 + test.expect(24); + // 1 2 18 var textfmt; var data = setVariable(); var length = data["fullLength"]; - var textformatted_1 = [],textformatted_2 = []; - var clockformatted_1 = [],clockformatted_2 = []; + var textformatted_1 = [],textformatted_2 = [],textformatted_18 = []; + var clockformatted_1 = [],clockformatted_2 = [],clockformatted_18 = [];; + for (var i=0; i<4; i++) { textfmt = new DurationFmt({locale: "pa-Guru-IN", style:"text", length:length[i]}); textformatted_1.push(textfmt.format({year: 1,month: 1,week: 1,day: 1}).toString()); textformatted_2.push(textfmt.format({year: 2,month: 2,week: 2,day: 2}).toString()); + textformatted_18.push(textfmt.format({year: 18,month: 18,week: 18,day: 18}).toString()); clockformatted_1.push(textfmt.format({hour: 1,minute: 1,second: 1}).toString()); clockformatted_2.push(textfmt.format({hour: 2,minute: 2,second: 2}).toString()); + clockformatted_18.push(textfmt.format({hour: 18,minute: 18,second: 18}).toString()); } test.equal(textformatted_1[0], '1 ਸਾਲ, 1 ਮਹੀਨਾ, 1 ਹਫ਼ਤਾ, 1 ਦਿਨ'); @@ -4248,6 +4251,11 @@ module.exports.testdurfmt2 = { test.equal(textformatted_2[2], '2 ਸਾਲ, 2 ਮਹੀਨੇ, 2 ਹਫ਼ਤੇ, 2 ਦਿਨ'); test.equal(textformatted_2[3], '2 ਸਾਲ, 2 ਮਹੀਨੇ, 2 ਹਫ਼ਤੇ, 2 ਦਿਨ'); + test.equal(textformatted_18[0], '18 ਸਾਲ, 18 ਮਹੀਨੇ, 18 ਹਫ਼ਤੇ, 18 ਦਿਨ'); + test.equal(textformatted_18[1], '18 ਸਾਲ, 18 ਮਹੀਨੇ, 18 ਹਫ਼ਤੇ, 18 ਦਿਨ'); + test.equal(textformatted_18[2], '18 ਸਾਲ, 18 ਮਹੀਨੇ, 18 ਹਫ਼ਤੇ, 18 ਦਿਨ'); + test.equal(textformatted_18[3], '18 ਸਾਲ, 18 ਮਹੀਨੇ, 18 ਹਫ਼ਤੇ, 18 ਦਿਨ'); + test.equal(clockformatted_1[0], '1 ਘੰਟਾ, 1 ਮਿੰਟ, 1 ਸਕਿੰਟ'); test.equal(clockformatted_1[1], '1 ਘੰਟਾ, 1 ਮਿੰਟ, 1 ਸਕਿੰਟ'); test.equal(clockformatted_1[2], '1 ਘੰਟਾ, 1 ਮਿੰਟ, 1 ਸਕਿੰਟ'); @@ -4258,6 +4266,11 @@ module.exports.testdurfmt2 = { test.equal(clockformatted_2[2], '2 ਘੰਟੇ, 2 ਮਿੰਟ, 2 ਸਕਿੰਟ'); test.equal(clockformatted_2[3], '2 ਘੰਟੇ, 2 ਮਿੰਟ, 2 ਸਕਿੰਟ'); + test.equal(clockformatted_18[0], '18 ਘੰਟੇ, 18 ਮਿੰਟ, 18 ਸਕਿੰਟ'); + test.equal(clockformatted_18[1], '18 ਘੰਟੇ, 18 ਮਿੰਟ, 18 ਸਕਿੰਟ'); + test.equal(clockformatted_18[2], '18 ਘੰਟੇ, 18 ਮਿੰਟ, 18 ਸਕਿੰਟ'); + test.equal(clockformatted_18[3], '18 ਘੰਟੇ, 18 ਮਿੰਟ, 18 ਸਕਿੰਟ'); + test.done(); }, testDurFmt_pl_PL: function(test) { @@ -8720,7 +8733,7 @@ module.exports.testdurfmt2 = { test.done(); }, - testDurFmt_pa_PK: function(test) { + testDurFmt_pa_Arab_PK: function(test) { test.expect(16); // 1 18 var textfmt; @@ -8731,7 +8744,7 @@ module.exports.testdurfmt2 = { var clockformatted_1 = [],clockformatted_18 = []; for (var i=0; i<4; i++) { - textfmt = new DurationFmt({locale: "pa-PK", style:"text", length:length[i]}); + textfmt = new DurationFmt({locale: "pa-Arab-PK", style:"text", length:length[i], useNative:false}); textformatted_1.push(textfmt.format({year: 1,month: 1,week: 1,day: 1}).toString()); textformatted_18.push(textfmt.format({year: 18,month: 18,week: 18,day: 18}).toString()); @@ -8740,25 +8753,25 @@ module.exports.testdurfmt2 = { clockformatted_18.push(textfmt.format({hour: 18,minute: 18,second: 18}).toString()); } - test.equal(textformatted_1[0], '‏1 ਸਾਲ, 1 ਮਹੀਨਾ, 1 ਹਫ਼ਤਾ, 1 ਦਿਨ'); - test.equal(textformatted_1[1], '‏1 ਸਾਲ, 1 ਮਹੀਨਾ, 1 ਹਫ਼ਤਾ, 1 ਦਿਨ'); - test.equal(textformatted_1[2], '‏1 ਸਾਲ, 1 ਮਹੀਨਾ, 1 ਹਫ਼ਤਾ, 1 ਦਿਨ'); - test.equal(textformatted_1[3], '‏1 ਸਾਲ, 1 ਮਹੀਨਾ, 1 ਹਫ਼ਤਾ, 1 ਦਿਨ'); + test.equal(textformatted_1[0], '‏1 y, 1 m, 1 w, 1 d'); + test.equal(textformatted_1[1], '‏1 y, 1 m, 1 w, 1 d'); + test.equal(textformatted_1[2], '‏1 y, 1 m, 1 w, 1 d'); + test.equal(textformatted_1[3], '‏1 y, 1 m, 1 w, 1 d'); - test.equal(textformatted_18[0], '‏18 ਸਾਲ, 18 ਮਹੀਨੇ, 18 ਹਫ਼ਤੇ, 18 ਦਿਨ'); - test.equal(textformatted_18[1], '‏18 ਸਾਲ, 18 ਮਹੀਨੇ, 18 ਹਫ਼ਤੇ, 18 ਦਿਨ'); - test.equal(textformatted_18[2], '‏18 ਸਾਲ, 18 ਮਹੀਨੇ, 18 ਹਫ਼ਤੇ, 18 ਦਿਨ'); - test.equal(textformatted_18[3], '‏18 ਸਾਲ, 18 ਮਹੀਨੇ, 18 ਹਫ਼ਤੇ, 18 ਦਿਨ'); + test.equal(textformatted_18[0], '‏18 y, 18 m, 18 w, 18 d'); + test.equal(textformatted_18[1], '‏18 y, 18 m, 18 w, 18 d'); + test.equal(textformatted_18[2], '‏18 y, 18 m, 18 w, 18 d'); + test.equal(textformatted_18[3], '‏18 y, 18 m, 18 w, 18 d'); - test.equal(clockformatted_1[0], '‏1 ਘੰਟਾ, 1 ਮਿੰਟ, 1 ਸਕਿੰਟ'); - test.equal(clockformatted_1[1], '‏1 ਘੰਟਾ, 1 ਮਿੰਟ, 1 ਸਕਿੰਟ'); - test.equal(clockformatted_1[2], '‏1 ਘੰਟਾ, 1 ਮਿੰਟ, 1 ਸਕਿੰਟ'); - test.equal(clockformatted_1[3], '‏1 ਘੰਟਾ, 1 ਮਿੰਟ, 1 ਸਕਿੰਟ'); + test.equal(clockformatted_1[0], '‏1 h, 1 min, 1 s'); + test.equal(clockformatted_1[1], '‏1 h, 1 min, 1 s'); + test.equal(clockformatted_1[2], '‏1 h, 1 min, 1 s'); + test.equal(clockformatted_1[3], '‏1 h, 1 min, 1 s'); - test.equal(clockformatted_18[0], '‏18 ਘੰਟੇ, 18 ਮਿੰਟ, 18 ਸਕਿੰਟ'); - test.equal(clockformatted_18[1], '‏18 ਘੰਟੇ, 18 ਮਿੰਟ, 18 ਸਕਿੰਟ'); - test.equal(clockformatted_18[2], '‏18 ਘੰਟੇ, 18 ਮਿੰਟ, 18 ਸਕਿੰਟ'); - test.equal(clockformatted_18[3], '‏18 ਘੰਟੇ, 18 ਮਿੰਟ, 18 ਸਕਿੰਟ'); + test.equal(clockformatted_18[0], '‏18 h, 18 min, 18 s'); + test.equal(clockformatted_18[1], '‏18 h, 18 min, 18 s'); + test.equal(clockformatted_18[2], '‏18 h, 18 min, 18 s'); + test.equal(clockformatted_18[3], '‏18 h, 18 min, 18 s'); test.done(); }, diff --git a/js/test/nodeunit/nodeunit-qml.js b/js/test/nodeunit/nodeunit-qml.js index f2d5258d4a..812582d893 100644 --- a/js/test/nodeunit/nodeunit-qml.js +++ b/js/test/nodeunit/nodeunit-qml.js @@ -359,7 +359,8 @@ var nodeunit = (function(){ (function(exports){ var totalCaseNum = 0, assertionNum = 0; var failNum = 0, successNum = 0; - var startTime = 0, endTime = 0; + var endTime = 0; + var startTime = new Date().getTime(); function getFailureDetails(assertion) { if (assertion.error && assertion.error.name === "AssertionError") { @@ -371,8 +372,6 @@ var nodeunit = (function(){ } exports.run = function (modules) { - startTime = new Date().getTime(); - exports.runModules(modules, { moduleStart: function (name) { console.log("moduleStart"); @@ -465,7 +464,7 @@ var nodeunit = (function(){ }; }; - exports.test = function(name, start, options, callback) { + exports.test = function(name, options, callback) { var expecting; var a_list = []; @@ -509,12 +508,11 @@ var nodeunit = (function(){ exports.runSuite = function (name, fn, opt, callback) { var prop = fn; var options = exports.options(opt); - var start = new Date().getTime(); for (var prop in fn) { if (fn.hasOwnProperty(prop)) { if (typeof fn[prop] === 'function') { - var test = exports.test(prop, start, options, callback); + var test = exports.test(prop, options, callback); try { fn[prop](test); } catch(e) { @@ -548,6 +546,7 @@ var nodeunit = (function(){ console.log("[Result] " + successNum + " assertions of " + assertionNum + " passed, " + failNum + " failed"); console.log("[Result] Test completed in " + (endTime - startTime)/1000 + " seconds"); console.log("==========================================================================================="); + console.log(" "); } })(reporter); diff --git a/js/test/root/testglobal.js b/js/test/root/testglobal.js index 6b6eee204f..609887180a 100644 --- a/js/test/root/testglobal.js +++ b/js/test/root/testglobal.js @@ -74,7 +74,7 @@ module.exports.testglobal = { return; } test.expect(1); - test.equal(ilib.getVersion().substring(0,4), "14.2"); + test.equal(ilib.getVersion().substring(0,4), "14.3"); test.done(); }, diff --git a/js/test/root/testscriptinfo.js b/js/test/root/testscriptinfo.js index 54cda92c19..87b249a9dd 100644 --- a/js/test/root/testscriptinfo.js +++ b/js/test/root/testscriptinfo.js @@ -1186,6 +1186,16 @@ module.exports.testscriptinfo = { test.equal(scinfo.getScriptDirection(), "ltr"); test.done(); }, + testScriptInfo_pa_IN: function(test) { + test.expect(4); + var li = new LocaleInfo("pa-IN"); + var scinfo = new ScriptInfo(li.getScript()); + test.ok(li !== null); + test.ok(scinfo !== null); + test.equal(li.getScript(), "Guru"); + test.equal(scinfo.getScriptDirection(), "ltr"); + test.done(); + }, testScriptInfo_pa_Guru_IN: function(test) { test.expect(4); var li = new LocaleInfo("pa-Guru-IN"); @@ -2096,9 +2106,9 @@ module.exports.testscriptinfo = { test.equal(scinfo.getScriptDirection(), "ltr"); test.done(); }, - testScriptInfo_pa_PK: function(test) { + testScriptInfo_pa_Arab_PK: function(test) { test.expect(4); - var li = new LocaleInfo("pa-PK"); + var li = new LocaleInfo("pa-Arab-PK"); var scinfo = new ScriptInfo(li.getScript()); test.ok(li !== null); test.ok(scinfo !== null); diff --git a/js/test/strings-ext/testSuite.js b/js/test/strings-ext/testSuite.js index 33c9e4e199..c7eb9cce81 100644 --- a/js/test/strings-ext/testSuite.js +++ b/js/test/strings-ext/testSuite.js @@ -1,7 +1,7 @@ /* * testSuite.js - test suite for this directory * - * Copyright © 2017-2018, JEDLSoft + * Copyright © 2017-2019, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,8 +25,6 @@ var suites = require("./testSuiteFiles.js").files; var ilib = require("../../lib/ilib-node.js"); -var ilib = require("../../lib/ilib-node.js"); - suites.forEach(function (path) { var test = require("./" + path); for (var suite in test) { diff --git a/js/test/strings-ext/testlistfmt.js b/js/test/strings-ext/testlistfmt.js index af5b2b5ec2..d5aacb6e7a 100644 --- a/js/test/strings-ext/testlistfmt.js +++ b/js/test/strings-ext/testlistfmt.js @@ -1,7 +1,7 @@ /* * testlistfmt.js - test the list formatter object * - * Copyright © 2017, JEDLSoft + * Copyright © 2017, 2019 JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,144 +33,322 @@ module.exports.testlistfmt = { testListFmtConstructorEmpty: function(test) { var fmt = new ListFmt(); - + test.expect(1); test.ok(fmt !== null); test.done(); }, - + testListFmtDefaults: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.getLocale(), "en-US"); test.done(); }, - + testListFmtDefaultStyle: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.getStyle(), "standard"); test.done(); }, - + testListFmtTestProperty1: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format([""]), ""); test.done(); }, - + testListFmtTestProperty2: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(), ""); test.done(); }, - + testListFmtTestProperty3: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(undefined), ""); test.done(); }, - + testListFmtTestProperty4: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format("one"), ""); test.done(); }, - + testListFmtTestProperty5: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format("one", "two"), ""); test.done(); }, - + testListFmtTestProperty6: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(100), ""); test.done(); }, - + testListFmtTestProperty7: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(false), ""); test.done(); }, - + testListFmtTestProperty8: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["true", "false"]), "true and false"); test.done(); }, - + testListFmtNumberFormatOne: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["one"]), "one"); test.done(); }, - + testListFmtNumberFormatTwo: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["one", "two"]), "one and two"); test.done(); }, - + testListFmtNumberFormatThree: function(test) { var fmt = new ListFmt(); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["one", "two", "three"]), "one, two, and three"); test.done(); }, - + testListFmtNumberFormatFour: function(test) { var fmt = new ListFmt(); - + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two", "three", "four"]), "one, two, three, and four"); + test.done(); + }, + + testListFmtStyleConjunctionOne: function(test) { + var fmt = new ListFmt({ + style: "conjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one"]), "one"); + test.done(); + }, + + testListFmtStyleConjunctionTwo: function(test) { + var fmt = new ListFmt({ + style: "conjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two"]), "one and two"); + test.done(); + }, + + testListFmtStyleConjunctionThree: function(test) { + var fmt = new ListFmt({ + style: "conjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two", "three"]), "one, two, and three"); + test.done(); + }, + + testListFmtStyleConjunctionFour: function(test) { + var fmt = new ListFmt({ + style: "conjunction" + }); + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["one", "two", "three", "four"]), "one, two, three, and four"); test.done(); }, + + testListFmtStyleDisjunctionOne: function(test) { + var fmt = new ListFmt({ + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one"]), "one"); + test.done(); + }, + testListFmtStyleDisjunctionTwo: function(test) { + var fmt = new ListFmt({ + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two"]), "one or two"); + test.done(); + }, + + testListFmtStyleDisjunctionThree: function(test) { + var fmt = new ListFmt({ + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two", "three"]), "one, two, or three"); + test.done(); + }, + + testListFmtStyleDisjunctionFour: function(test) { + var fmt = new ListFmt({ + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two", "three", "four"]), "one, two, three, or four"); + test.done(); + }, + + testListFmtStyleUnitOne: function(test) { + var fmt = new ListFmt({ + style: "unit" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one"]), "one"); + test.done(); + }, + testListFmtStyleUnitTwo: function(test) { + var fmt = new ListFmt({ + style: "unit" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two"]), "one two"); + test.done(); + }, + + testListFmtStyleUnitThree: function(test) { + var fmt = new ListFmt({ + style: "unit" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two", "three"]), "one two three"); + test.done(); + }, + + testListFmtStyleUnitFour: function(test) { + var fmt = new ListFmt({ + style: "unit" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two", "three", "four"]), "one two three four"); + test.done(); + }, + + testListFmtStyleUnitLongtOne: function(test) { + var fmt = new ListFmt({ + style: "unit", + length: "long" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one"]), "one"); + test.done(); + }, + testListFmtStyleUnitLongTwo: function(test) { + var fmt = new ListFmt({ + style: "unit", + length: "long" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two"]), "one, two"); + test.done(); + }, + + testListFmtStyleUnitLongThree: function(test) { + var fmt = new ListFmt({ + style: "unit", + length: "long" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two", "three"]), "one, two, three"); + test.done(); + }, + + testListFmtStyleUnitLongFour: function(test) { + var fmt = new ListFmt({ + style: "unit", + length: "long" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["one", "two", "three", "four"]), "one, two, three, four"); + test.done(); + }, + // af-ZA testListFmtafZAMonthOne: function(test) { var fmt = new ListFmt({ locale: "af-ZA" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["een"]), "een"); @@ -180,7 +358,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "af-ZA" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["een", "twee"]), "een en twee"); @@ -190,7 +368,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "af-ZA" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["een", "twee", "drie"]), "een, twee en drie"); @@ -200,7 +378,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "af-ZA" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["een", "twee", "drie", "vier"]), "een, twee, drie en vier"); @@ -212,7 +390,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "as-IN" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["জানু"]), "জানু"); @@ -222,30 +400,30 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "as-IN" }); - + test.expect(2); test.ok(fmt !== null); - test.equal(fmt.format(["জানু", "ফেব্ৰু"]), "জানু, ফেব্ৰু"); + test.equal(fmt.format(["জানু", "ফেব্ৰু"]), 'জানু আৰু ফেব্ৰু'); test.done(); }, testListFmtasINMonthThree: function(test) { var fmt = new ListFmt({ locale: "as-IN" }); - + test.expect(2); test.ok(fmt !== null); - test.equal(fmt.format(["জানু", "ফেব্ৰু", "মাৰ্চ"]), "জানু, ফেব্ৰু, মাৰ্চ"); + test.equal(fmt.format(["জানু", "ফেব্ৰু", "মাৰ্চ"]), 'জানু, ফেব্ৰু আৰু মাৰ্চ'); test.done(); }, testListFmtasINMonthFour: function(test) { var fmt = new ListFmt({ locale: "as-IN" }); - + test.expect(2); test.ok(fmt !== null); - test.equal(fmt.format(["জানু", "ফেব্ৰু", "মাৰ্চ", "এপ্ৰিল"]), "জানু, ফেব্ৰু, মাৰ্চ, এপ্ৰিল"); + test.equal(fmt.format(["জানু", "ফেব্ৰু", "মাৰ্চ", "এপ্ৰিল"]), 'জানু, ফেব্ৰু, মাৰ্চ আৰু এপ্ৰিল'); test.done(); }, //az-Latn-AZ @@ -253,7 +431,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "az-Latn-AZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir"]), "bir"); @@ -263,7 +441,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "az-Latn-AZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "iki"]), "bir və iki"); @@ -273,7 +451,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "az-Latn-AZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "iki", "üç"]), "bir, iki və üç"); @@ -283,7 +461,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "az-Latn-AZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "iki", "üç", "dörd"]), "bir, iki, üç və dörd"); @@ -294,7 +472,7 @@ module.exports.testlistfmt = { locale: "az-Latn-AZ", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir"]), "bir"); @@ -305,7 +483,7 @@ module.exports.testlistfmt = { locale: "az-Latn-AZ", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "iki"]), "bir, iki"); @@ -316,7 +494,7 @@ module.exports.testlistfmt = { locale: "az-Latn-AZ", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "iki", "üç"]), "bir, iki, üç"); @@ -327,7 +505,7 @@ module.exports.testlistfmt = { locale: "az-Latn-AZ", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "iki", "üç", "dörd"]), "bir, iki, üç, dörd"); @@ -339,7 +517,7 @@ module.exports.testlistfmt = { style : "unit", length : "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format([""]), ""); @@ -351,7 +529,7 @@ module.exports.testlistfmt = { style : "unit", length : "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format([""]), ""); @@ -363,7 +541,7 @@ module.exports.testlistfmt = { style : "unit", length : "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format([""]), ""); @@ -375,7 +553,7 @@ module.exports.testlistfmt = { style : "unit", length : "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format([""]), ""); @@ -387,7 +565,7 @@ module.exports.testlistfmt = { style : "unit", length : "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format([""]), ""); @@ -399,7 +577,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "bg-BG" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format([""]), ""); @@ -409,7 +587,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "bg-BG" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два"]), "един идва"); @@ -419,7 +597,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "bg-BG" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два", "три"]), "един, два и три"); @@ -429,7 +607,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "bg-BG" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два", "три", "четири"]), "един, два, три и четири"); @@ -440,7 +618,7 @@ module.exports.testlistfmt = { locale: "bg-BG", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един"]), "един"); @@ -451,7 +629,7 @@ module.exports.testlistfmt = { locale: "bg-BG", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два"]), "един и два"); @@ -462,7 +640,7 @@ module.exports.testlistfmt = { locale: "bg-BG", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два", "три"]), "един, два и три"); @@ -473,7 +651,7 @@ module.exports.testlistfmt = { locale: "bg-BG", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два", "три", "четири"]), "един, два, три и четири"); @@ -485,7 +663,7 @@ module.exports.testlistfmt = { style: "unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един"]), "един"); @@ -497,7 +675,7 @@ module.exports.testlistfmt = { style: "unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два"]), "един и два"); @@ -509,7 +687,7 @@ module.exports.testlistfmt = { style: "unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два", "три"]), "един, два, три"); @@ -521,7 +699,7 @@ module.exports.testlistfmt = { style: "unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два", "три", "четири"]), "един, два, три, четири"); @@ -533,7 +711,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един"]), "един"); @@ -545,7 +723,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два", "три"]), "един, два и три"); @@ -557,7 +735,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два", "три"]), "един, два и три"); @@ -569,7 +747,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["един", "два", "три", "четири"]), "един, два, три и четири"); @@ -581,7 +759,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "bn-IN" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["এক"]), "এক"); @@ -591,7 +769,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "bn-IN" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["এক", "দুই"]), "এক এবং দুই"); @@ -601,7 +779,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "bn-IN" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["এক", "দুই", "তিন"]), "এক, দুই এবং তিন"); @@ -611,7 +789,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "bn-IN" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["এক", "দুই", "তিন", "চার"]), "এক, দুই, তিন এবং চার"); @@ -623,7 +801,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "cs-CZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden"]), "jeden"); @@ -633,7 +811,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "cs-CZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva"]), "jeden a dva"); @@ -643,7 +821,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "cs-CZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva", "tři"]), "jeden, dva a tři"); @@ -653,7 +831,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "cs-CZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva", "tři", "čtyři"]), "jeden, dva, tři a čtyři"); @@ -665,7 +843,7 @@ module.exports.testlistfmt = { locale: "cs-CZ", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden"]), "jeden"); @@ -676,7 +854,7 @@ module.exports.testlistfmt = { locale: "cs-CZ", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva"]), "jeden dva"); @@ -687,7 +865,7 @@ module.exports.testlistfmt = { locale: "cs-CZ", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva", "tři"]), "jeden dva tři"); @@ -698,7 +876,7 @@ module.exports.testlistfmt = { locale: "cs-CZ", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva", "tři", "čtyři"]), "jeden dva tři čtyři"); @@ -711,7 +889,7 @@ module.exports.testlistfmt = { style : "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden"]), "jeden"); @@ -723,7 +901,7 @@ module.exports.testlistfmt = { style : "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva"]), "jeden a dva"); @@ -735,7 +913,7 @@ module.exports.testlistfmt = { style : "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva", "tři"]), "jeden, dva a tři"); @@ -747,7 +925,7 @@ module.exports.testlistfmt = { style : "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva", "tři", "čtyři"]), "jeden, dva, tři a čtyři"); @@ -760,7 +938,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "da-DK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["en"]), "en"); @@ -770,7 +948,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "da-DK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["en", "to"]), "en og to"); @@ -780,7 +958,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "da-DK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["en", "to", "tre"]), "en, to og tre"); @@ -790,7 +968,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "da-DK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["en", "to", "tre", "fire"]), "en, to, tre og fire"); @@ -802,7 +980,7 @@ module.exports.testlistfmt = { locale: "da-DK", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["en"]), "en"); @@ -813,7 +991,7 @@ module.exports.testlistfmt = { locale: "da-DK", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["en", "to"]), "en og to"); @@ -824,7 +1002,7 @@ module.exports.testlistfmt = { locale: "da-DK", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["en", "to", "tre"]), "en, to og tre"); @@ -835,7 +1013,7 @@ module.exports.testlistfmt = { locale: "da-DK", style : "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["en", "to", "tre", "fire"]), "en, to, tre og fire"); @@ -847,7 +1025,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "et-EE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks"]), "Üks"); @@ -857,7 +1035,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "et-EE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks", "Kaks"]), "Üks ja Kaks"); @@ -867,7 +1045,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "et-EE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks", "Kaks", "kolm"]), "Üks, Kaks ja kolm"); @@ -877,7 +1055,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "et-EE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks", "Kaks", "kolm", "Neli"]), "Üks, Kaks, kolm ja Neli"); @@ -889,7 +1067,7 @@ module.exports.testlistfmt = { locale: "et-EE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks"]), "Üks"); @@ -900,7 +1078,7 @@ module.exports.testlistfmt = { locale: "et-EE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks", "Kaks"]), "Üks Kaks"); @@ -911,7 +1089,7 @@ module.exports.testlistfmt = { locale: "et-EE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks", "Kaks", "kolm"]), "Üks Kaks kolm"); @@ -922,7 +1100,7 @@ module.exports.testlistfmt = { locale: "et-EE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks", "Kaks", "kolm", "Neli"]), "Üks Kaks kolm Neli"); @@ -934,7 +1112,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks"]), "Üks"); @@ -946,7 +1124,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks", "Kaks"]), "Üks, Kaks"); @@ -958,7 +1136,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks", "Kaks", "kolm"]), "Üks, Kaks, kolm"); @@ -970,7 +1148,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Üks", "Kaks", "kolm", "Neli"]), "Üks, Kaks, kolm, Neli"); @@ -982,7 +1160,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "fi-FI" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["yksi"]), "yksi"); @@ -992,7 +1170,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "fi-FI" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["yksi", "kaksi"]), "yksi ja kaksi"); @@ -1002,7 +1180,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "fi-FI" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["yksi", "kaksi", "kolmikko"]), "yksi, kaksi ja kolmikko"); @@ -1012,7 +1190,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "fi-FI" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["yksi", "kaksi", "kolmikko", "neljä"]), "yksi, kaksi, kolmikko ja neljä"); @@ -1024,7 +1202,7 @@ module.exports.testlistfmt = { locale: "fi-FI", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["yksi"]), "yksi"); @@ -1035,7 +1213,7 @@ module.exports.testlistfmt = { locale: "fi-FI", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["yksi", "kaksi"]), "yksi kaksi"); @@ -1046,7 +1224,7 @@ module.exports.testlistfmt = { locale: "fi-FI", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["yksi", "kaksi", "kolmikko"]), "yksi kaksi kolmikko"); @@ -1057,7 +1235,7 @@ module.exports.testlistfmt = { locale: "fi-FI", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["yksi", "kaksi", "kolmikko", "neljä"]), "yksi kaksi kolmikko neljä"); @@ -1069,7 +1247,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "ga-IE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann"]), "ceann"); @@ -1079,7 +1257,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "ga-IE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann", "dhá"]), "ceann agus dhá"); @@ -1089,7 +1267,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "ga-IE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann", "dhá", "trí"]), "ceann, dhá, agus trí"); @@ -1099,7 +1277,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "ga-IE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann", "dhá", "trí", "ceithre"]), "ceann, dhá, trí, agus ceithre"); @@ -1112,7 +1290,7 @@ module.exports.testlistfmt = { locale: "ga-IE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann"]), "ceann"); @@ -1123,7 +1301,7 @@ module.exports.testlistfmt = { locale: "ga-IE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann", "dhá"]), "ceann dhá"); @@ -1134,7 +1312,7 @@ module.exports.testlistfmt = { locale: "ga-IE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann", "dhá", "trí"]), "ceann dhá trí"); @@ -1145,7 +1323,7 @@ module.exports.testlistfmt = { locale: "ga-IE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann", "dhá", "trí", "ceithre"]), "ceann dhá trí ceithre"); @@ -1158,7 +1336,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann"]), "ceann"); @@ -1170,7 +1348,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann", "dhá"]), "ceann agus dhá"); @@ -1182,7 +1360,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann", "dhá", "trí"]), "ceann, dhá, agus trí"); @@ -1194,7 +1372,7 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["ceann", "dhá", "trí", "ceithre"]), "ceann, dhá, trí, agus ceithre"); @@ -1206,7 +1384,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "hu-HU" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["egy"]), "egy"); @@ -1216,7 +1394,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "hu-HU" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["egy", "kettő"]), "egy és kettő"); @@ -1226,7 +1404,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "hu-HU" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["egy", "kettő", "három"]), "egy, kettő és három"); @@ -1236,7 +1414,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "hu-HU" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["egy", "kettő", "három", "négy"]), "egy, kettő, három és négy"); @@ -1248,7 +1426,7 @@ module.exports.testlistfmt = { locale: "hu-HU", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["egy"]), "egy"); @@ -1259,7 +1437,7 @@ module.exports.testlistfmt = { locale: "hu-HU", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["egy", "kettő"]), "egy és kettő"); @@ -1270,7 +1448,7 @@ module.exports.testlistfmt = { locale: "hu-HU", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["egy", "kettő", "három"]), "egy, kettő és három"); @@ -1281,7 +1459,7 @@ module.exports.testlistfmt = { locale: "hu-HU", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["egy", "kettő", "három", "négy"]), "egy, kettő, három és négy"); @@ -1293,7 +1471,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "lv-LV" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu"]), "Vienu"); @@ -1303,7 +1481,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "lv-LV" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu", "Divi"]), "Vienu un Divi"); @@ -1313,7 +1491,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "lv-LV" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu", "Divi", "Trīs"]), "Vienu, Divi un Trīs"); @@ -1323,7 +1501,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "lv-LV" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu", "Divi", "Trīs", "Četri"]), "Vienu, Divi, Trīs un Četri"); @@ -1335,7 +1513,7 @@ module.exports.testlistfmt = { locale: "lv-LV", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu"]), "Vienu"); @@ -1346,7 +1524,7 @@ module.exports.testlistfmt = { locale: "lv-LV", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu", "Divi"]), "Vienu Divi"); @@ -1357,7 +1535,7 @@ module.exports.testlistfmt = { locale: "lv-LV", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu", "Divi", "Trīs"]), "Vienu Divi Trīs"); @@ -1368,7 +1546,7 @@ module.exports.testlistfmt = { locale: "lv-LV", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu", "Divi", "Trīs", "Četri"]), "Vienu Divi Trīs Četri"); @@ -1380,7 +1558,7 @@ module.exports.testlistfmt = { style: "unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu"]), "Vienu"); @@ -1392,7 +1570,7 @@ module.exports.testlistfmt = { style: "unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu", "Divi"]), "Vienu un Divi"); @@ -1404,7 +1582,7 @@ module.exports.testlistfmt = { style: "unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu", "Divi", "Trīs"]), "Vienu, Divi un Trīs"); @@ -1416,7 +1594,7 @@ module.exports.testlistfmt = { style: "unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienu", "Divi", "Trīs", "Četri"]), "Vienu, Divi, Trīs un Četri"); @@ -1429,7 +1607,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "lt-LT" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienas"]), "Vienas"); @@ -1439,7 +1617,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "lt-LT" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienas", "Du"]), "Vienas ir Du"); @@ -1449,7 +1627,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "lt-LT" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienas", "Du", "Trys"]), "Vienas, Du ir Trys"); @@ -1459,7 +1637,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "lt-LT" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienas", "Du", "Trys", "Keturi"]), "Vienas, Du, Trys ir Keturi"); @@ -1472,7 +1650,7 @@ module.exports.testlistfmt = { locale: "lt-LT", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienas"]), "Vienas"); @@ -1483,7 +1661,7 @@ module.exports.testlistfmt = { locale: "lt-LT", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienas", "Du"]), "Vienas Du"); @@ -1494,7 +1672,7 @@ module.exports.testlistfmt = { locale: "lt-LT", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienas", "Du", "Trys"]), "Vienas Du Trys"); @@ -1505,7 +1683,7 @@ module.exports.testlistfmt = { locale: "lt-LT", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Vienas", "Du", "Trys", "Keturi"]), "Vienas Du Trys Keturi"); @@ -1517,7 +1695,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "mk-MK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Еден"]), "Еден"); @@ -1527,7 +1705,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "mk-MK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Еден", "Два"]), "Еден и Два"); @@ -1537,7 +1715,7 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "mk-MK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Еден", "Два", "Три"]), "Еден, Два и Три"); @@ -1547,51 +1725,51 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "mk-MK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Еден", "Два", "Три", "Четири"]), "Еден, Два, Три и Четири"); test.done(); }, - // kk-KZ + // kk-KZ testListFmtkkKZNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "kk-KZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["бір"]), "бір"); test.done(); }, - + testListFmtkkKZNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "kk-KZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["бір", "Екі"]), "бір Төртеуі Екі"); test.done(); }, - + testListFmtkkKZNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "kk-KZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["бір", "Екі", "Үшеуі"]), "бір, Екі Төртеуі Үшеуі"); test.done(); }, - + testListFmtkkKZNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "kk-KZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["бір", "Екі", "Үшеуі", "Төртеуі"]), "бір, Екі, Үшеуі Төртеуі Төртеуі"); @@ -1603,43 +1781,43 @@ module.exports.testlistfmt = { locale: "kk-KZ", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["бір"]), "бір"); test.done(); }, - + testListFmtkkKZNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "kk-KZ", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["бір", "Екі"]), "бір Екі"); test.done(); }, - + testListFmtkkKZNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "kk-KZ", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["бір", "Екі", "Үшеуі"]), "бір Екі Үшеуі"); test.done(); }, - + testListFmtkkKZNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "kk-KZ", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["бір", "Екі", "Үшеуі", "Төртеуі"]), "бір Екі Үшеуі Төртеуі"); @@ -1650,40 +1828,40 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "km-KH" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["មួយ"]), "មួយ"); test.done(); }, - + testListFmtkmKHNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "km-KH" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["មួយ", "ពីរ"]), "មួយ និង​ពីរ"); test.done(); }, - + testListFmtkmKHNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "km-KH" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["មួយ", "ពីរ", "បី"]), "មួយ, ពីរ និង បី"); test.done(); }, - + testListFmtkmKHNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "km-KH" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["មួយ", "ពីរ", "បី", "បួននាក់"]), "មួយ, ពីរ, បី និង បួននាក់"); @@ -1694,43 +1872,43 @@ module.exports.testlistfmt = { locale: "km-KH", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["មួយ"]), "មួយ"); test.done(); }, - + testListFmtUnitStylekmKHNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "km-KH", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["មួយ", "ពីរ"]), "មួយ ពីរ"); test.done(); }, - + testListFmtUnitStylekmKHNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "km-KH", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["មួយ", "ពីរ", "បី"]), "មួយ ពីរ បី"); test.done(); }, - + testListFmtUnitStylekmKHNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "km-KH", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["មួយ", "ពីរ", "បី", "បួននាក់"]), "មួយ ពីរ បី បួននាក់"); @@ -1739,290 +1917,290 @@ module.exports.testlistfmt = { // ko-KR - + testListFmtkoKRNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "ko-KR" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["하나"]), "하나"); test.done(); }, - + testListFmtkoKRNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "ko-KR" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["하나", "둘"]), "하나 및 둘"); test.done(); }, - + testListFmtkoKRNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "ko-KR" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["하나", "둘", "셋"]), "하나, 둘 및 셋"); test.done(); }, - + testListFmtkoKRNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "ko-KR" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["하나", "둘", "셋", "넷"]), "하나, 둘, 셋 및 넷"); test.done(); }, - + testListFmtUnitStyleNamekoKR: function(test) { var fmt = new ListFmt({ locale: "ko-KR", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.getStyle(), "unit"); test.done(); }, - + testListFmtUnitStylekoKRNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "ko-KR", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["1월"]), "1월"); test.done(); }, - + testListFmtUnitStylekoKRNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "ko-KR", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["1월","2월"]), "1월 2월"); test.done(); }, - + testListFmtUnitStylekoKRNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "ko-KR", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["1월","2월","3월"]), "1월 2월 3월"); test.done(); }, - + testListFmtUnitStylekoKRNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "ko-KR", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["1월","2월","3월","4월"]), "1월 2월 3월 4월"); test.done(); }, - + testListFmtUnitStylekoKRNumberFormatFive: function(test) { var fmt = new ListFmt({ locale: "ko-KR", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["1월","2월","3월","4월","5월"]), "1월 2월 3월 4월 5월"); test.done(); }, - + // id-ID - + testListFmtidIDStyleName: function(test) { var fmt = new ListFmt({ locale: "id-ID" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.getStyle(), "standard"); test.done(); }, - + testListFmtidIDNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "id-ID" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["satu"]), "satu"); test.done(); }, - + testListFmtitIDNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "id-ID" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["satu", "dua"]), "satu dan dua"); test.done(); }, - + testListFmtidIDNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "id-ID" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["satu", "dua", "tiga"]), "satu, dua, dan tiga"); test.done(); }, - + testListFmtidIDNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "id-ID" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["satu", "dua", "tiga", "empat"]), "satu, dua, tiga, dan empat"); test.done(); }, - + testListFmtidIDUnitStyleName: function(test) { var fmt = new ListFmt({ locale: "id-ID", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.getStyle(), "unit"); test.done(); }, - + testListFmtUnitStyleidIDNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "id-ID", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["satu"]), "satu"); test.done(); }, - + testListFmtUnitStyleidIDNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "id-ID", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["satu", "dua"]), "satu, dua"); test.done(); }, - + testListFmtUnitStyleidIDNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "id-ID", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["satu", "dua", "tiga"]), "satu, dua, tiga"); test.done(); }, - + testListFmtUnitStyleidIDNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "id-ID", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["satu", "dua", "tiga", "empat"]), "satu, dua, tiga, empat"); test.done(); }, - + testListFmtUnitStyleidIDNumberFormatFive: function(test) { var fmt = new ListFmt({ locale: "id-ID", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["satu", "dua", "tiga", "empat", "lima"]), "satu, dua, tiga, empat, lima"); test.done(); - }, + }, // pl-PL testListFmtplPLNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "pl-PL" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden"]), "jeden"); test.done(); }, - + testListFmtplPLNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "pl-PL" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dwa"]), "jeden i dwa"); test.done(); }, - + testListFmtplPLNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "pl-PL" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dwa", "trzy"]), "jeden, dwa i trzy"); test.done(); }, - + testListFmtplPLNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "pl-PL" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dwa", "trzy", "cztery"]), "jeden, dwa, trzy i cztery"); @@ -2034,43 +2212,43 @@ module.exports.testlistfmt = { locale: "pl-PL", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden"]), "jeden"); test.done(); }, - + testListFmtUnitStyleplPLNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "pl-PL", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dwa"]), "jeden i dwa"); test.done(); }, - + testListFmtUnitStyleplPLNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "pl-PL", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dwa", "trzy"]), "jeden, dwa i trzy"); test.done(); }, - + testListFmtUnitStyleplPLNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "pl-PL", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dwa", "trzy", "cztery"]), "jeden, dwa, trzy i cztery"); @@ -2083,40 +2261,40 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "ro-RO" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu"]), "unu"); test.done(); }, - + testListFmtroRONumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "ro-RO" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu", "Două"]), "unu și Două"); test.done(); }, - + testListFmtroRONumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "ro-RO" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu", "Două", "Trei"]), "unu, Două și Trei"); test.done(); }, - + testListFmtroRONumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "ro-RO" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu", "Două", "Trei", "patru"]), "unu, Două, Trei și patru"); @@ -2128,43 +2306,43 @@ module.exports.testlistfmt = { locale: "ro-RO", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu"]), "unu"); test.done(); }, - + testListFmtUnitStyleroRONumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "ro-RO", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu", "Două"]), "unu, Două"); test.done(); }, - + testListFmtUnitStyleroRONumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "ro-RO", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu", "Două", "Trei"]), "unu, Două, Trei"); test.done(); }, - + testListFmtUnitStyleroRONumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "ro-RO", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu", "Două", "Trei", "patru"]), "unu, Două, Trei, patru"); @@ -2177,46 +2355,46 @@ module.exports.testlistfmt = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu"]), "unu"); test.done(); }, - + testListFmtUnitStyleroRONumberFormatTwoFull: function(test) { var fmt = new ListFmt({ locale: "ro-RO", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu", "Două"]), "unu și Două"); test.done(); }, - + testListFmtUnitStyleroRONumberFormatThreeFull: function(test) { var fmt = new ListFmt({ locale: "ro-RO", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu", "Două", "Trei"]), "unu, Două, Trei"); test.done(); }, - + testListFmtUnitStyleroRONumberFormatFourFull: function(test) { var fmt = new ListFmt({ locale: "ro-RO", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["unu", "Două", "Trei", "patru"]), "unu, Două, Trei, patru"); @@ -2228,40 +2406,40 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "sk-SK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden"]), "jeden"); test.done(); }, - + testListFmtskSKNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "sk-SK" }); - + test.expect(2); - test.ok(fmt !== null); + test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva"]), "jeden a dva"); test.done(); }, - + testListFmtskSKNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "sk-SK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva", "tri"]), "jeden, dva a tri"); test.done(); }, - + testListFmtskSKNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "sk-SK" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["jeden", "dva", "tri", "štyri"]), "jeden, dva, tri a štyri"); @@ -2273,40 +2451,40 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "sl-SI" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Eno"]), "Eno"); test.done(); }, - + testListFmtslSINumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "sl-SI" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Eno", "Dva"]), "Eno in Dva"); test.done(); }, - + testListFmtslSINumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "sl-SI" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Eno", "Dva", "Tri"]), "Eno, Dva in Tri"); test.done(); }, - + testListFmtslSINumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "sl-SI" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Eno", "Dva", "Tri", "Štiri"]), "Eno, Dva, Tri in Štiri"); @@ -2318,43 +2496,43 @@ module.exports.testlistfmt = { locale: "sl-SI", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Eno"]), "Eno"); test.done(); }, - + testListFmtUnitStyleslSINumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "sl-SI", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Eno", "Dva"]), "Eno in Dva"); test.done(); }, - + testListFmtUnitStyleslSINumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "sl-SI", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Eno", "Dva", "Tri"]), "Eno, Dva in Tri"); test.done(); }, - + testListFmtUnitStyleslSINumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "sl-SI", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Eno", "Dva", "Tri", "Štiri"]), "Eno, Dva, Tri in Štiri"); @@ -2366,88 +2544,88 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "sw-Latn-KE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Moja"]), "Moja"); test.done(); }, - + testListFmtswLatnKENumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "sw-Latn-KE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Moja", "Mbili"]), "Moja na Mbili"); test.done(); }, - + testListFmtswLatnKENumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "sw-Latn-KE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Moja", "Mbili", "Tatu"]), "Moja, Mbili na Tatu"); test.done(); }, - + testListFmtswLatnKENumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "sw-Latn-KE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Moja", "Mbili", "Tatu", "Fou"]), "Moja, Mbili, Tatu na Fou"); test.done(); }, - + testListFmtUnitStyleswLatnKEumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "sw-Latn-KE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Moja"]), "Moja"); test.done(); }, - + testListFmtUnitStyleswLatnKENumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "sw-Latn-KE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Moja", "Mbili"]), "Moja na Mbili"); test.done(); }, - + testListFmtUnitStyleswLatnKENumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "sw-Latn-KE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Moja", "Mbili", "Tatu"]), "Moja, Mbili na Tatu"); test.done(); }, - + testListFmtUnitStyleswLatnKENumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "sw-Latn-KE", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Moja", "Mbili", "Tatu", "Fou"]), "Moja, Mbili, Tatu na Fou"); @@ -2460,258 +2638,258 @@ module.exports.testlistfmt = { var fmt = new ListFmt({ locale: "uz-Latn-UZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Biri"]), "Biri"); test.done(); }, - + testListFmtuzLatnUZNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "uz-Latn-UZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Biri", "Ikkita"]), "Biri va Ikkita"); test.done(); }, - + testListFmtuzLatnUZNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "uz-Latn-UZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Biri", "Ikkita", "Uchta"]), "Biri, Ikkita va Uchta"); test.done(); }, - + testListFmtuzLatnUZNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "uz-Latn-UZ" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Biri", "Ikkita", "Uchta", "To'rtta"]), "Biri, Ikkita, Uchta va To'rtta"); test.done(); }, - + testListFmtUnitStyleuzLatnUZNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "uz-Latn-UZ", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Biri"]), "Biri"); test.done(); }, - + testListFmtUnitStyleuzLatnUZNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "uz-Latn-UZ", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Biri", "Ikkita"]), "Biri Ikkita"); test.done(); }, - + testListFmtUnitStyleuzLatnUZNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "uz-Latn-UZ", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Biri", "Ikkita", "Uchta"]), "Biri Ikkita Uchta"); test.done(); }, - + testListFmtUnitStyleuzLatnUZNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "uz-Latn-UZ", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["Biri", "Ikkita", "Uchta", "To'rtta"]), "Biri Ikkita Uchta To'rtta"); test.done(); }, - + // vi-VN testListFmtviVNNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "vi-VN" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["một"]), "một"); test.done(); }, - + testListFmtviVNNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "vi-VN" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["một", "hai"]), "một và hai"); test.done(); }, - + testListFmtviVNNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "vi-VN" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["một", "hai", "ba"]), "một, hai và ba"); test.done(); }, - + testListFmtviVNNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "vi-VN" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["một", "hai", "ba", "bốn"]), "một, hai, ba và bốn"); test.done(); }, - + testListFmtUnitStyleviVNNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "vi-VN", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir"]), "bir"); test.done(); }, - + testListFmtUnitStyleviVNNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "vi-VN", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "два"]), "bir два"); test.done(); }, - + testListFmtUnitStyleviVNNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "vi-VN", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "два", "три"]), "bir два три"); test.done(); }, - + testListFmtUnitStyleviVNNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "vi-VN", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "два", "три", "четыре"]), "bir два три четыре"); test.done(); }, - + testListFmtUnitStyleviVNNumberFormatFive: function(test) { var fmt = new ListFmt({ locale: "vi-VN", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "два", "три", "четыре", "пять"]), "bir два три четыре пять"); test.done(); }, - + testListFmtUnitStyleviVNNumberFormatOneFull: function(test) { var fmt = new ListFmt({ locale: "vi-VN", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir"]), "bir"); test.done(); }, - + testListFmtUnitStyleviVNNumberFormatTwoFull: function(test) { var fmt = new ListFmt({ locale: "vi-VN", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "два"]), "bir, два"); test.done(); }, - + testListFmtUnitStyleviVNNumberFormatThreeFull: function(test) { var fmt = new ListFmt({ locale: "vi-VN", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "два", "три"]), "bir, два, три"); test.done(); }, - + testListFmtUnitStyleviVNNumberFormatFourFull: function(test) { var fmt = new ListFmt({ locale: "vi-VN", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "два", "три", "четыре"]), "bir, два, три, четыре"); test.done(); }, - + testListFmtUnitStyleviVNNumberFormatFiveFull: function(test) { var fmt = new ListFmt({ locale: "vi-VN", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["bir", "два", "три", "четыре", "пять"]), "bir, два, три, четыре, пять"); diff --git a/js/test/strings-ext/testlistfmt_de.js b/js/test/strings-ext/testlistfmt_de.js index a9369dbe08..36065a6804 100644 --- a/js/test/strings-ext/testlistfmt_de.js +++ b/js/test/strings-ext/testlistfmt_de.js @@ -35,89 +35,137 @@ module.exports.testlistfmt_de = { var fmt = new ListFmt({ locale: "de-DE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins"]), "eins"); test.done(); }, - + testListFmtdeDENumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "de-DE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei"]), "eins und zwei"); test.done(); }, - + testListFmtdeDENumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "de-DE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei"]), "eins, zwei und drei"); test.done(); }, - + testListFmtledeDENumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "de-DE" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei", "vier"]), "eins, zwei, drei und vier"); test.done(); }, + testListFmtdeDEDisjunctionFormatOne: function(test) { + var fmt = new ListFmt({ + locale: "de-DE", + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["eins"]), "eins"); + test.done(); + }, + + testListFmtdeDEDisjunctionFormatTwo: function(test) { + var fmt = new ListFmt({ + locale: "de-DE", + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["eins", "zwei"]), "eins oder zwei"); + test.done(); + }, + + testListFmtdeDEDisjunctionFormatThree: function(test) { + var fmt = new ListFmt({ + locale: "de-DE", + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["eins", "zwei", "drei"]), "eins, zwei oder drei"); + test.done(); + }, + + testListFmtledeDEDisjunctionFormatFour: function(test) { + var fmt = new ListFmt({ + locale: "de-DE", + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["eins", "zwei", "drei", "vier"]), "eins, zwei, drei oder vier"); + test.done(); + }, + // de-AT testListFmtUnitStyledeATNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "de-AT", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins"]), "eins"); test.done(); }, - + testListFmtUnitStyledeATNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "de-AT", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei"]), "eins, zwei"); test.done(); }, - + testListFmtUnitStyledeATNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "de-AT", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei"]), "eins, zwei und drei"); test.done(); }, - + testListFmtUnitStyledeATNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "de-AT", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei", "vier"]), "eins, zwei, drei und vier"); @@ -129,46 +177,46 @@ module.exports.testlistfmt_de = { style: "unit", length : "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins"]), "eins"); test.done(); }, - + testListFmtUnitStyledeATNumberFormatTwoLong: function(test) { var fmt = new ListFmt({ locale: "de-AT", style: "unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei"]), "eins, zwei"); test.done(); }, - + testListFmtUnitStyledeATNumberFormatThreeLong: function(test) { var fmt = new ListFmt({ locale: "de-AT", style: "unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei"]), "eins, zwei und drei"); test.done(); }, - + testListFmtUnitStyledeATNumberFormatFourLong: function(test) { var fmt = new ListFmt({ locale: "de-AT", style: "unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei", "vier"]), "eins, zwei, drei und vier"); @@ -182,43 +230,43 @@ module.exports.testlistfmt_de = { locale: "de-CH", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins"]), "eins"); test.done(); }, - + testListFmtdeCHNumberFormatTwoLong: function(test) { var fmt = new ListFmt({ locale: "de-CH", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei"]), "eins und zwei"); test.done(); }, - + testListFmtdeCHNumberFormatThreeLong: function(test) { var fmt = new ListFmt({ locale: "de-CH", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei"]), "eins, zwei und drei"); test.done(); }, - + testListFmtledeCHNumberFormatFourLong: function(test) { var fmt = new ListFmt({ locale: "de-CH", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei", "vier"]), "eins, zwei, drei und vier"); @@ -231,46 +279,46 @@ module.exports.testlistfmt_de = { style: "unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins"]), "eins"); test.done(); }, - + testListFmtUnitStyledeCHNumberFormatTwoMedium: function(test) { var fmt = new ListFmt({ locale: "de-CH", style: "unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei"]), "eins, zwei"); test.done(); }, - + testListFmtUnitStyledeCHNumberFormatThreeMedium: function(test) { var fmt = new ListFmt({ locale: "de-CH", style: "unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei"]), "eins, zwei und drei"); test.done(); }, - + testListFmtUnitStyledeCHNumberFormatFourMedium: function(test) { var fmt = new ListFmt({ locale: "de-CH", style: "unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei", "vier"]), "eins, zwei, drei und vier"); @@ -282,46 +330,46 @@ module.exports.testlistfmt_de = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins"]), "eins"); test.done(); }, - + testListFmtUnitStyledeCHNumberFormatTwoFull: function(test) { var fmt = new ListFmt({ locale: "de-CH", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei"]), "eins, zwei"); test.done(); }, - + testListFmtUnitStyledeCHNumberFormatThreeFull: function(test) { var fmt = new ListFmt({ locale: "de-CH", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei"]), "eins, zwei und drei"); test.done(); }, - + testListFmtUnitStyledeCHNumberFormatFourFull: function(test) { var fmt = new ListFmt({ locale: "de-CH", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei", "vier"]), "eins, zwei, drei und vier"); @@ -334,40 +382,40 @@ module.exports.testlistfmt_de = { var fmt = new ListFmt({ locale: "de-LU" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins"]), "eins"); test.done(); }, - + testListFmtdeLUNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "de-LU" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei"]), "eins und zwei"); test.done(); }, - + testListFmtdeLUNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "de-LU" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei"]), "eins, zwei und drei"); test.done(); }, - + testListFmtledeLUNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "de-LU" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei", "vier"]), "eins, zwei, drei und vier"); @@ -379,43 +427,43 @@ module.exports.testlistfmt_de = { locale: "de-AT", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins"]), "eins"); test.done(); }, - + testListFmtUnitStyledeLUNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "de-LU", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei"]), "eins, zwei"); test.done(); }, - + testListFmtUnitStyledeLUNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "de-LU", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei"]), "eins, zwei und drei"); test.done(); }, - + testListFmtUnitStyledeLUNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "de-LU", style: "unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei", "vier"]), "eins, zwei, drei und vier"); @@ -427,46 +475,46 @@ module.exports.testlistfmt_de = { style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins"]), "eins"); test.done(); }, - + testListFmtUnitStyledeLUNumberFormatTwoFull: function(test) { var fmt = new ListFmt({ locale: "de-LU", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei"]), "eins, zwei"); test.done(); }, - + testListFmtUnitStyledeLUNumberFormatThreeFull: function(test) { var fmt = new ListFmt({ locale: "de-LU", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei"]), "eins, zwei und drei"); test.done(); }, - + testListFmtUnitStyledeLUNumberFormatFourFull: function(test) { var fmt = new ListFmt({ locale: "de-LU", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["eins", "zwei", "drei", "vier"]), "eins, zwei, drei und vier"); diff --git a/js/test/strings-ext/testlistfmt_ja_JP.js b/js/test/strings-ext/testlistfmt_ja_JP.js index df3365d755..2ebc6e841f 100644 --- a/js/test/strings-ext/testlistfmt_ja_JP.js +++ b/js/test/strings-ext/testlistfmt_ja_JP.js @@ -35,312 +35,362 @@ module.exports.testlistfmt_ja_JP = { var fmt = new ListFmt({ locale: "ja-JP" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち"]), "いち"); test.done(); }, - + testListFmtjaJPNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "ja-JP" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に"]), "いち、に"); test.done(); }, - + testListFmtjaJPNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "ja-JP" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん"]), "いち、に、さん"); test.done(); }, - + testListFmtjaJPNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "ja-JP" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん", "し"]), "いち、に、さん、し"); test.done(); }, - + testListFmtjaJPNumberFormatFive: function(test) { var fmt = new ListFmt({ locale: "ja-JP" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん", "し", "ご"]), "いち、に、さん、し、ご"); test.done(); }, - + + //ja-JP : disjunction style + + testListFmtUnitStylejaJPDisjunctionFormatOne: function(test) { + var fmt = new ListFmt({ + locale: "ja-JP", + style:"disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["いち"]), "いち"); + test.done(); + }, + + testListFmtUnitStylejaJPDisjunctionFormatTwo: function(test) { + var fmt = new ListFmt({ + locale: "ja-JP", + style:"disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["いち", "に"]), "いちまたはに"); + test.done(); + }, + + testListFmtUnitStylejaJPDisjunctionFormatThree: function(test) { + var fmt = new ListFmt({ + locale: "ja-JP", + style:"disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["いち", "に", "さん"]), "いち、に、またはさん"); + test.done(); + }, + + testListFmtUnitStylejaJPDisjunctionFormatFour: function(test) { + var fmt = new ListFmt({ + locale: "ja-JP", + style:"disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["いち", "に", "さん", "し"]), "いち、に、さん、またはし"); + test.done(); + }, + //ja-JP : unit style - + testListFmtUnitStylejaJPNumberFormatOne: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち"]), "いち"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatTwo: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に"]), "いちに"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatThree: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん"]), "いちにさん"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatFour: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん", "し"]), "いちにさんし"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatFive: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん", "し", "ご"]), "いちにさんしご"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatOneMedium: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち"]), "いち"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatTwoMedium: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に"]), "いち に"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatThreeMedium: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん"]), "いち に さん"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatFourMedium: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん", "し"]), "いち に さん し"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatFiveMedium: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "medium" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん", "し", "ご"]), "いち に さん し ご"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatOneLong: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち"]), "いち"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatTwoLong: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に"]), "いち に"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatThreeLong: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん"]), "いち に さん"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatFourLong: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん", "し"]), "いち に さん し"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatFiveLong: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "long" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん", "し", "ご"]), "いち に さん し ご"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatOneFull: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち"]), "いち"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatTwoFull: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に"]), "いち に"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatThreeFull: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん"]), "いち に さん"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatFourFull: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style:"unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん", "し"]), "いち に さん し"); test.done(); }, - + testListFmtUnitStylejaJPNumberFormatFiveFull: function(test) { var fmt = new ListFmt({ locale: "ja-JP", style: "unit", length: "full" }); - + test.expect(2); test.ok(fmt !== null); test.equal(fmt.format(["いち", "に", "さん", "し", "ご"]), "いち に さん し ご"); test.done(); } - + }; diff --git a/package.json b/package.json index 1935339549..d66a866b54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ilib", - "version": "14.2.0", + "version": "14.3.0", "main": "js/index.js", "description": "iLib is a cross-engine library of internationalization (i18n) classes written in pure JS", "keywords": [ @@ -48,10 +48,6 @@ "type": "git", "url": "git@github.com:iLib-js/iLib.git" }, - "engines": { - "ringojs": ">=0.9", - "nodejs": ">= 0.10" - }, "cldr-data-coverage": "full", "devDependencies": { "babel-loader": "^7.1.5", @@ -63,7 +59,7 @@ "grunt-contrib-compress": "^1.4.3", "grunt-contrib-copy": "^1.0.0", "grunt-contrib-nodeunit": "~0.4.1", - "grunt-contrib-uglify": "~0.5.0", + "grunt-contrib-uglify": "^3.4.0", "grunt-eslint": "^21.0.0", "grunt-http-server": "^2.1.0", "grunt-jsdoc": "^2.2.1", @@ -73,9 +69,9 @@ "grunt-shell": "^2.1.0", "grunt-text-replace": "^0.4.0", "http-server": "^0.11.1", - "ilib-scanner": "^1.2.2", - "ilib-webpack-loader": "^1.2.2", - "ilib-webpack-plugin": "^1.2.2", + "ilib-scanner": "^1.3.0", + "ilib-webpack-loader": "^1.3.0", + "ilib-webpack-plugin": "^1.3.0", "iso-15924": "^2.1.0", "jsdoc2": "^2.4.0", "nodeunit": "^0.11.0", @@ -84,7 +80,8 @@ "trireme": "^0.9.3", "uglify-js": "^3.4.9", "uglifyjs-webpack-plugin": "^1.3.0", - "webpack": "^3.12.0", + "webpack": "^4.32.2", + "webpack-cli": "^3.3.2", "xml2json": "^0.11.2" }, "scripts": { diff --git a/tools/cldr/genlangscripts.js b/tools/cldr/genlangscripts.js index f18fa0b3d3..1c1e236ca9 100644 --- a/tools/cldr/genlangscripts.js +++ b/tools/cldr/genlangscripts.js @@ -111,7 +111,7 @@ for (var language in scripts) { if (!fs.existsSync(filename)) { fs.mkdirSync(filename); } - if (language === 'ms' || language === 'kk') { + if (language === 'ms' || language === 'kk' || language === 'pa') { scripts[language] = scripts[language].reverse(); } console.log(language + ':\t"scripts": ' + JSON.stringify(scripts[language]) + ','); diff --git a/tools/cldr/genlist.js b/tools/cldr/genlist.js index 63fc2e16e5..bb9a52310a 100644 --- a/tools/cldr/genlist.js +++ b/tools/cldr/genlist.js @@ -1,7 +1,7 @@ /* * genlist.js - ilib tool to generate the ilib format list data from cldr - * - * Copyright © 2017-2018, JEDLSoft + * + * Copyright © 2017-2019, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ /* - * This code is intended to be run under node.js + * This code is intended to be run under node.js */ var fs = require('fs'); @@ -83,7 +83,7 @@ locales.forEach(function(locale) { }; if (cldrPatterns["listPattern-type-standard"]) { - if (comparePatterns(cldrPatterns["listPattern-type-standard-short"], cldrPatterns["listPattern-type-standard"]) || + if (comparePatterns(cldrPatterns["listPattern-type-standard-short"], cldrPatterns["listPattern-type-standard"]) || comparePatterns(cldrPatterns["listPattern-type-standard-narrow"], cldrPatterns["listPattern-type-standard"])) { patterns.standard.short = cldrPatterns["listPattern-type-standard"]; patterns.standard.medium = cldrPatterns["listPattern-type-standard"]; @@ -101,8 +101,28 @@ locales.forEach(function(locale) { } } + if (cldrPatterns["listPattern-type-or"]) { + if (comparePatterns(cldrPatterns["listPattern-type-or-short"], cldrPatterns["listPattern-type-or"]) || + comparePatterns(cldrPatterns["listPattern-type-or-narrow"], cldrPatterns["listPattern-type-or"])) { + patterns.or = {}; + patterns.or.short = cldrPatterns["listPattern-type-or"]; + patterns.or.medium = cldrPatterns["listPattern-type-or"]; + patterns.or.long = cldrPatterns["listPattern-type-or"]; + patterns.or.full = cldrPatterns["listPattern-type-or"]; + if (cldrPatterns["listPattern-type-or-short"]) { + patterns.or.short = cldrPatterns["listPattern-type-or-short"]; + patterns.or.medium = cldrPatterns["listPattern-type-or-short"]; + } + if (cldrPatterns["listPattern-type-or-narrow"]) { + patterns.or.short = cldrPatterns["listPattern-type-or-narrow"]; + } + } else { + patterns.or = cldrPatterns["listPattern-type-or"]; + } + } + if (cldrPatterns["listPattern-type-unit"]) { - if (comparePatterns(cldrPatterns["listPattern-type-unit-short"], cldrPatterns["listPattern-type-unit"]) || + if (comparePatterns(cldrPatterns["listPattern-type-unit-short"], cldrPatterns["listPattern-type-unit"]) || comparePatterns(cldrPatterns["listPattern-type-unit-narrow"], cldrPatterns["listPattern-type-unit"])) { patterns.unit = {}; patterns.unit.short = cldrPatterns["listPattern-type-unit"]; @@ -154,7 +174,7 @@ for (var language in localePatterns) { console.log("\n\nPruning duplicated formats ...\n"); //Don't prune the root. Iterate through the first level so we can -//skip the root and only prune the "language" level of the locale +//skip the root and only prune the "language" level of the locale //spec. (And recursively everything under it of course.) aux.pruneFormats(localePatterns);