twitter_cldr 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. data/Gemfile +32 -0
  2. data/History.txt +78 -0
  3. data/README.md +72 -62
  4. data/Rakefile +22 -0
  5. data/js/lib/compiler.rb +40 -0
  6. data/js/lib/mustache/bundle.coffee +14 -0
  7. data/js/lib/mustache/calendars/datetime.coffee +240 -0
  8. data/js/lib/mustache/calendars/timespan.coffee +52 -0
  9. data/js/lib/mustache/plurals/rules.coffee +14 -0
  10. data/js/lib/renderers/base.rb +18 -0
  11. data/js/lib/renderers/bundle.rb +18 -0
  12. data/js/lib/renderers/calendars/datetime_renderer.rb +34 -0
  13. data/js/lib/renderers/calendars/timespan_renderer.rb +39 -0
  14. data/js/lib/renderers/plurals/rules/plural_rules_compiler.rb +89 -0
  15. data/js/lib/renderers/plurals/rules/plural_rules_renderer.rb +26 -0
  16. data/js/lib/twitter_cldr_js.rb +85 -0
  17. data/js/spec/js/calendars/datetime_spec.js +418 -0
  18. data/js/spec/js/calendars/timespan_spec.js +91 -0
  19. data/js/spec/js/plurals/plural_rules_spec.js +28 -0
  20. data/js/spec/js/support/jasmine.yml +8 -0
  21. data/js/spec/rb/renderers/plurals/plural_rules_compiler_spec.rb +52 -0
  22. data/js/spec/rb/spec_helper.rb +13 -0
  23. data/lib/twitter_cldr.rb +2 -1
  24. data/lib/twitter_cldr/collation.rb +2 -1
  25. data/lib/twitter_cldr/collation/collator.rb +49 -31
  26. data/lib/twitter_cldr/collation/{sort_key.rb → sort_key_builder.rb} +31 -8
  27. data/lib/twitter_cldr/collation/trie.rb +116 -24
  28. data/lib/twitter_cldr/collation/trie_builder.rb +54 -28
  29. data/lib/twitter_cldr/collation/trie_with_fallback.rb +55 -0
  30. data/lib/twitter_cldr/core_ext/array.rb +14 -1
  31. data/lib/twitter_cldr/core_ext/calendars/datetime.rb +8 -2
  32. data/lib/twitter_cldr/core_ext/calendars/timespan.rb +5 -5
  33. data/lib/twitter_cldr/formatters/calendars/timespan_formatter.rb +10 -10
  34. data/lib/twitter_cldr/formatters/plurals/rules.rb +3 -5
  35. data/lib/twitter_cldr/resources.rb +11 -0
  36. data/lib/twitter_cldr/resources/import.rb +12 -0
  37. data/lib/twitter_cldr/resources/import/tailoring.rb +193 -0
  38. data/lib/twitter_cldr/{shared/resources.rb → resources/loader.rb} +17 -4
  39. data/lib/twitter_cldr/shared.rb +0 -1
  40. data/lib/twitter_cldr/tokenizers/base.rb +9 -9
  41. data/lib/twitter_cldr/tokenizers/calendars/datetime_tokenizer.rb +0 -4
  42. data/lib/twitter_cldr/tokenizers/calendars/timespan_tokenizer.rb +21 -7
  43. data/lib/twitter_cldr/utils.rb +11 -0
  44. data/lib/twitter_cldr/version.rb +1 -1
  45. data/resources/collation/tailoring/af.yml +3 -0
  46. data/resources/collation/tailoring/ar.yml +21 -0
  47. data/resources/collation/tailoring/ca.yml +9 -0
  48. data/resources/collation/tailoring/cs.yml +25 -0
  49. data/resources/collation/tailoring/da.yml +59 -0
  50. data/resources/collation/tailoring/de.yml +3 -0
  51. data/resources/collation/tailoring/el.yml +3 -0
  52. data/resources/collation/tailoring/en.yml +3 -0
  53. data/resources/collation/tailoring/es.yml +5 -0
  54. data/resources/collation/tailoring/eu.yml +3 -0
  55. data/resources/collation/tailoring/fa.yml +73 -0
  56. data/resources/collation/tailoring/fi.yml +61 -0
  57. data/resources/collation/tailoring/fil.yml +11 -0
  58. data/resources/collation/tailoring/fr.yml +3 -0
  59. data/resources/collation/tailoring/he.yml +3 -0
  60. data/resources/collation/tailoring/hi.yml +7 -0
  61. data/resources/collation/tailoring/hu.yml +125 -0
  62. data/resources/collation/tailoring/id.yml +3 -0
  63. data/resources/collation/tailoring/it.yml +3 -0
  64. data/resources/collation/tailoring/ja.yml +14647 -0
  65. data/resources/collation/tailoring/ko.yml +14953 -0
  66. data/resources/collation/tailoring/ms.yml +3 -0
  67. data/resources/collation/tailoring/nb.yml +59 -0
  68. data/resources/collation/tailoring/nl.yml +3 -0
  69. data/resources/collation/tailoring/pl.yml +37 -0
  70. data/resources/collation/tailoring/pt.yml +3 -0
  71. data/resources/collation/tailoring/ru.yml +3 -0
  72. data/resources/collation/tailoring/sv.yml +63 -0
  73. data/resources/collation/tailoring/th.yml +19 -0
  74. data/resources/collation/tailoring/tr.yml +27 -0
  75. data/resources/collation/tailoring/uk.yml +5 -0
  76. data/resources/collation/tailoring/ur.yml +163 -0
  77. data/resources/collation/tailoring/zh-Hant.yml +3 -0
  78. data/resources/collation/tailoring/zh.yml +149 -0
  79. data/resources/custom/locales/af/units.yml +19 -0
  80. data/resources/custom/locales/ar/units.yml +35 -0
  81. data/resources/custom/locales/ca/units.yml +19 -0
  82. data/resources/custom/locales/cs/units.yml +23 -0
  83. data/resources/custom/locales/da/units.yml +19 -0
  84. data/resources/custom/locales/de/units.yml +19 -0
  85. data/resources/custom/locales/el/units.yml +19 -0
  86. data/resources/custom/locales/en/units.yml +18 -0
  87. data/resources/custom/locales/es/units.yml +19 -0
  88. data/resources/custom/locales/eu/units.yml +19 -0
  89. data/resources/custom/locales/fa/units.yml +15 -0
  90. data/resources/custom/locales/fi/units.yml +19 -0
  91. data/resources/custom/locales/fil/units.yml +19 -0
  92. data/resources/custom/locales/fr/units.yml +19 -0
  93. data/resources/custom/locales/he/units.yml +19 -0
  94. data/resources/custom/locales/hi/units.yml +19 -0
  95. data/resources/custom/locales/hu/units.yml +15 -0
  96. data/resources/custom/locales/id/units.yml +15 -0
  97. data/resources/custom/locales/it/units.yml +19 -0
  98. data/resources/custom/locales/ja/units.yml +15 -0
  99. data/resources/custom/locales/ko/units.yml +15 -0
  100. data/resources/custom/locales/ms/units.yml +15 -0
  101. data/resources/custom/locales/nb/units.yml +19 -0
  102. data/resources/custom/locales/nl/units.yml +19 -0
  103. data/resources/custom/locales/pl/units.yml +23 -0
  104. data/resources/custom/locales/pt/units.yml +19 -0
  105. data/resources/custom/locales/ru/units.yml +27 -0
  106. data/resources/custom/locales/sv/units.yml +19 -0
  107. data/resources/custom/locales/th/units.yml +15 -0
  108. data/resources/custom/locales/tr/units.yml +15 -0
  109. data/resources/custom/locales/uk/units.yml +27 -0
  110. data/resources/custom/locales/ur/units.yml +19 -0
  111. data/resources/custom/locales/zh-Hant/units.yml +15 -0
  112. data/resources/custom/locales/zh/units.yml +15 -0
  113. data/resources/locales/af/units.yml +112 -65
  114. data/resources/locales/ar/units.yml +196 -126
  115. data/resources/locales/ca/units.yml +112 -70
  116. data/resources/locales/cs/units.yml +140 -91
  117. data/resources/locales/da/units.yml +98 -56
  118. data/resources/locales/de/units.yml +112 -70
  119. data/resources/locales/el/units.yml +119 -84
  120. data/resources/locales/en/units.yml +84 -42
  121. data/resources/locales/es/units.yml +112 -70
  122. data/resources/locales/eu/units.yml +105 -68
  123. data/resources/locales/fa/units.yml +98 -63
  124. data/resources/locales/fi/units.yml +112 -70
  125. data/resources/locales/fil/units.yml +98 -56
  126. data/resources/locales/fr/units.yml +112 -70
  127. data/resources/locales/he/units.yml +98 -56
  128. data/resources/locales/hi/units.yml +98 -56
  129. data/resources/locales/hu/units.yml +84 -49
  130. data/resources/locales/id/units.yml +84 -49
  131. data/resources/locales/it/units.yml +98 -56
  132. data/resources/locales/ja/units.yml +84 -49
  133. data/resources/locales/ko/units.yml +84 -49
  134. data/resources/locales/ms/units.yml +112 -63
  135. data/resources/locales/nb/units.yml +106 -64
  136. data/resources/locales/nl/units.yml +98 -56
  137. data/resources/locales/pl/units.yml +181 -112
  138. data/resources/locales/pt/units.yml +112 -70
  139. data/resources/locales/ru/units.yml +168 -112
  140. data/resources/locales/sv/units.yml +112 -70
  141. data/resources/locales/th/units.yml +84 -49
  142. data/resources/locales/tr/units.yml +84 -49
  143. data/resources/locales/uk/units.yml +168 -112
  144. data/resources/locales/ur/units.yml +112 -63
  145. data/resources/locales/zh-Hant/units.yml +84 -49
  146. data/resources/locales/zh/units.yml +84 -49
  147. data/spec/collation/collation_spec.rb +1 -1
  148. data/spec/collation/collator_spec.rb +120 -48
  149. data/spec/collation/sort_key_builder_spec.rb +80 -0
  150. data/spec/collation/tailoring_spec.rb +137 -0
  151. data/spec/collation/tailoring_tests/af.txt +321 -0
  152. data/spec/collation/tailoring_tests/ar.txt +188 -0
  153. data/spec/collation/tailoring_tests/ca.txt +446 -0
  154. data/spec/collation/tailoring_tests/cs.txt +273 -0
  155. data/spec/collation/tailoring_tests/da.txt +293 -0
  156. data/spec/collation/tailoring_tests/de.txt +414 -0
  157. data/spec/collation/tailoring_tests/el.txt +228 -0
  158. data/spec/collation/tailoring_tests/en.txt +399 -0
  159. data/spec/collation/tailoring_tests/es.txt +402 -0
  160. data/spec/collation/tailoring_tests/eu.txt +183 -0
  161. data/spec/collation/tailoring_tests/fa.txt +263 -0
  162. data/spec/collation/tailoring_tests/fi.txt +389 -0
  163. data/spec/collation/tailoring_tests/fil.txt +279 -0
  164. data/spec/collation/tailoring_tests/fr.txt +363 -0
  165. data/spec/collation/tailoring_tests/he.txt +167 -0
  166. data/spec/collation/tailoring_tests/hi.txt +230 -0
  167. data/spec/collation/tailoring_tests/hu.txt +773 -0
  168. data/spec/collation/tailoring_tests/id.txt +171 -0
  169. data/spec/collation/tailoring_tests/it.txt +231 -0
  170. data/spec/collation/tailoring_tests/ja.txt +4287 -0
  171. data/spec/collation/tailoring_tests/ko.txt +1761 -0
  172. data/spec/collation/tailoring_tests/ms.txt +531 -0
  173. data/spec/collation/tailoring_tests/nb.txt +375 -0
  174. data/spec/collation/tailoring_tests/nl.txt +273 -0
  175. data/spec/collation/tailoring_tests/pl.txt +225 -0
  176. data/spec/collation/tailoring_tests/pt.txt +405 -0
  177. data/spec/collation/tailoring_tests/ru.txt +213 -0
  178. data/spec/collation/tailoring_tests/sv.txt +353 -0
  179. data/spec/collation/tailoring_tests/th.txt +239 -0
  180. data/spec/collation/tailoring_tests/tr.txt +414 -0
  181. data/spec/collation/tailoring_tests/uk.txt +218 -0
  182. data/spec/collation/tailoring_tests/ur.txt +284 -0
  183. data/spec/collation/tailoring_tests/zh-Hant.txt +626 -0
  184. data/spec/collation/tailoring_tests/zh.txt +717 -0
  185. data/spec/collation/trie_builder_spec.rb +131 -51
  186. data/spec/collation/trie_spec.rb +301 -26
  187. data/spec/collation/trie_with_fallback_spec.rb +41 -0
  188. data/spec/core_ext/array_spec.rb +46 -3
  189. data/spec/core_ext/calendars/date_spec.rb +24 -24
  190. data/spec/core_ext/calendars/datetime_spec.rb +7 -0
  191. data/spec/core_ext/calendars/time_spec.rb +2 -2
  192. data/spec/formatters/calendars/timespan_formatter_spec.rb +47 -18
  193. data/spec/formatters/plurals/rules_spec.rb +3 -11
  194. data/spec/readme_spec.rb +15 -15
  195. data/spec/resources/loader_spec.rb +94 -0
  196. data/spec/spec_helper.rb +6 -0
  197. data/spec/tokenizers/calendars/timespan_tokenizer_spec.rb +1 -1
  198. data/spec/twitter_cldr_spec.rb +3 -3
  199. data/spec/utils_spec.rb +38 -0
  200. data/twitter_cldr.gemspec +25 -0
  201. metadata +156 -110
  202. data/spec/collation/sort_key_spec.rb +0 -56
  203. data/spec/shared/resources_spec.rb +0 -75
@@ -0,0 +1,531 @@
1
+ x
2
+ X
3
+ x x
4
+ x.
5
+ X.
6
+ x.x
7
+ x0
8
+ X0
9
+ x0x
10
+ x12
11
+ X12
12
+ x12x
13
+ x2
14
+ X2
15
+ x2x
16
+ xa
17
+ xA
18
+ Xa
19
+ XA
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+ xæx
57
+ xÆx
58
+ xai
59
+ xaI
60
+ xAi
61
+ xAI
62
+ Xai
63
+ XaI
64
+ XAi
65
+ XAI
66
+ xaix
67
+ xaIx
68
+ xAix
69
+ xAIx
70
+ xau
71
+ xaU
72
+ xAu
73
+ xAU
74
+ Xau
75
+ XaU
76
+ XAu
77
+ XAU
78
+ xaux
79
+ xaUx
80
+ xAux
81
+ xAUx
82
+ xax
83
+ xAx
84
+ xáx
85
+ xÁx
86
+ xàx
87
+ xÀx
88
+ xăx
89
+ xĂx
90
+ xâx
91
+ xÂx
92
+ xåx
93
+ xÅx
94
+ xäx
95
+ xÄx
96
+ xãx
97
+ xÃx
98
+ xāx
99
+ xĀx
100
+ xb
101
+ xB
102
+ Xb
103
+ XB
104
+ xbx
105
+ xBx
106
+ xc
107
+ xC
108
+ Xc
109
+ XC
110
+
111
+
112
+
113
+
114
+ xcx
115
+ xCx
116
+ xçx
117
+ xÇx
118
+ xd
119
+ xD
120
+ Xd
121
+ XD
122
+ xdx
123
+ xDx
124
+ xdz
125
+ xdZ
126
+ xDz
127
+ xDZ
128
+ Xdz
129
+ XdZ
130
+ XDz
131
+ XDZ
132
+ xdzx
133
+ xdZx
134
+ xDzx
135
+ xDZx
136
+ xe
137
+ xE
138
+ Xe
139
+ XE
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+ xex
165
+ xEx
166
+ xéx
167
+ xÉx
168
+ xèx
169
+ xÈx
170
+ xĕx
171
+ xĔx
172
+ xêx
173
+ xÊx
174
+ xëx
175
+ xËx
176
+ xēx
177
+ xĒx
178
+ xf
179
+ xF
180
+ Xf
181
+ XF
182
+ xfx
183
+ xFx
184
+ xg
185
+ xG
186
+ Xg
187
+ XG
188
+ xgx
189
+ xGx
190
+ xh
191
+ xH
192
+ Xh
193
+ XH
194
+ xhx
195
+ xHx
196
+ xi
197
+ xI
198
+ Xi
199
+ XI
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+ xix
225
+ xIx
226
+ xíx
227
+ xÍx
228
+ xìx
229
+ xÌx
230
+ xĭx
231
+ xĬx
232
+ xîx
233
+ xÎx
234
+ xïx
235
+ xÏx
236
+ xīx
237
+ xĪx
238
+ xj
239
+ xJ
240
+ Xj
241
+ XJ
242
+ xjx
243
+ xJx
244
+ xk
245
+ xK
246
+ Xk
247
+ XK
248
+ xkh
249
+ xkH
250
+ xKh
251
+ xKH
252
+ Xkh
253
+ XkH
254
+ XKh
255
+ XKH
256
+ xkhx
257
+ xkHx
258
+ xKhx
259
+ xKHx
260
+ xkx
261
+ xKx
262
+ xl
263
+ xL
264
+ Xl
265
+ XL
266
+ xlx
267
+ xLx
268
+ xm
269
+ xM
270
+ Xm
271
+ XM
272
+ xmx
273
+ xMx
274
+ xn
275
+ xN
276
+ Xn
277
+ XN
278
+
279
+
280
+
281
+
282
+ xng
283
+ xnG
284
+ xNg
285
+ xNG
286
+ Xng
287
+ XnG
288
+ XNg
289
+ XNG
290
+ xngg
291
+ xngG
292
+ xnGg
293
+ xnGG
294
+ xNgg
295
+ xNgG
296
+ xNGg
297
+ xNGG
298
+ Xngg
299
+ XngG
300
+ XnGg
301
+ XnGG
302
+ XNgg
303
+ XNgG
304
+ XNGg
305
+ XNGG
306
+ xnggx
307
+ xngGx
308
+ xnGgx
309
+ xnGGx
310
+ xNggx
311
+ xNgGx
312
+ xNGgx
313
+ xNGGx
314
+ xngx
315
+ xnGx
316
+ xNgx
317
+ xNGx
318
+ xnx
319
+ xNx
320
+ xñx
321
+ xÑx
322
+ xny
323
+ xnY
324
+ xNy
325
+ xNY
326
+ Xny
327
+ XnY
328
+ XNy
329
+ XNY
330
+ xnyx
331
+ xnYx
332
+ xNyx
333
+ xNYx
334
+ xo
335
+ xO
336
+ Xo
337
+ XO
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+ xœx
371
+ xŒx
372
+ xox
373
+ xOx
374
+ xóx
375
+ xÓx
376
+ xòx
377
+ xÒx
378
+ xŏx
379
+ xŎx
380
+ xôx
381
+ xÔx
382
+ xöx
383
+ xÖx
384
+ xøx
385
+ xØx
386
+ xōx
387
+ xŌx
388
+ xp
389
+ xP
390
+ Xp
391
+ XP
392
+ xpx
393
+ xPx
394
+ xq
395
+ xQ
396
+ Xq
397
+ XQ
398
+ xqx
399
+ xQx
400
+ xr
401
+ xR
402
+ Xr
403
+ XR
404
+ xrx
405
+ xRx
406
+ xs
407
+ xS
408
+ Xs
409
+ XS
410
+ xsx
411
+ xSx
412
+ xsy
413
+ xsY
414
+ xSy
415
+ xSY
416
+ Xsy
417
+ XsY
418
+ XSy
419
+ XSY
420
+ xsyx
421
+ xsYx
422
+ xSyx
423
+ xSYx
424
+ xt
425
+ xT
426
+ Xt
427
+ XT
428
+ xts
429
+ xtS
430
+ xTs
431
+ xTS
432
+ Xts
433
+ XtS
434
+ XTs
435
+ XTS
436
+ xtsx
437
+ xtSx
438
+ xTsx
439
+ xTSx
440
+ xtx
441
+ xTx
442
+ xu
443
+ xU
444
+ Xu
445
+ XU
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+ xua
471
+ xuA
472
+ xUa
473
+ xUA
474
+ Xua
475
+ XuA
476
+ XUa
477
+ XUA
478
+ xuax
479
+ xuAx
480
+ xUax
481
+ xUAx
482
+ xux
483
+ xUx
484
+ xúx
485
+ xÚx
486
+ xùx
487
+ xÙx
488
+ xŭx
489
+ xŬx
490
+ xûx
491
+ xÛx
492
+ xüx
493
+ xÜx
494
+ xūx
495
+ xŪx
496
+ xv
497
+ xV
498
+ Xv
499
+ XV
500
+ xvx
501
+ xVx
502
+ xw
503
+ xW
504
+ Xw
505
+ XW
506
+ xwx
507
+ xWx
508
+ xx
509
+ xX
510
+ Xx
511
+ XX
512
+ xxx
513
+ xXx
514
+ xy
515
+ xY
516
+ Xy
517
+ XY
518
+ xÿ
519
+
520
+ Xÿ
521
+
522
+ xyx
523
+ xYx
524
+ xÿx
525
+ xŸx
526
+ xz
527
+ xZ
528
+ Xz
529
+ XZ
530
+ xzx
531
+ xZx