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,228 @@
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
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+ xαx
25
+ xΑx
26
+ xάx
27
+ xΆx
28
+
29
+
30
+
31
+
32
+ xβx
33
+ xΒx
34
+
35
+
36
+
37
+
38
+ xγx
39
+ xΓx
40
+
41
+
42
+
43
+
44
+ xδx
45
+ xΔx
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+ xεx
55
+ xΕx
56
+ xέx
57
+ xΈx
58
+
59
+
60
+
61
+
62
+ xζx
63
+ xΖx
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+ xηx
73
+ xΗx
74
+ xήx
75
+ xΉx
76
+
77
+
78
+
79
+
80
+ xθx
81
+ xΘx
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ xΪ́
96
+
97
+ XΪ́
98
+ xιx
99
+ xΙx
100
+ xίx
101
+ xΊx
102
+ xϊx
103
+ xΪx
104
+ xΐx
105
+ xΪ́x
106
+
107
+
108
+
109
+
110
+ xκx
111
+ xΚx
112
+
113
+
114
+
115
+
116
+ xλx
117
+ xΛx
118
+
119
+
120
+
121
+
122
+ xμx
123
+ xΜx
124
+
125
+
126
+
127
+
128
+ xνx
129
+ xΝx
130
+
131
+
132
+
133
+
134
+ xξx
135
+ xΞx
136
+ xο
137
+
138
+ Xο
139
+
140
+
141
+
142
+
143
+
144
+ xοx
145
+ xΟx
146
+ xόx
147
+ xΌx
148
+
149
+
150
+
151
+
152
+ xπx
153
+ xΠx
154
+
155
+
156
+
157
+
158
+ xρx
159
+ xΡx
160
+
161
+
162
+
163
+
164
+
165
+
166
+ xσx
167
+ xΣx
168
+ xςx
169
+
170
+
171
+
172
+
173
+ xτx
174
+ xΤx
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ xΫ́
189
+
190
+ XΫ́
191
+ xυx
192
+ xΥx
193
+ xύx
194
+ xΎx
195
+ xϋx
196
+ xΫx
197
+ xΰx
198
+ xΫ́x
199
+
200
+
201
+
202
+
203
+ xφx
204
+ xΦx
205
+
206
+
207
+
208
+
209
+ xχx
210
+ xΧx
211
+
212
+
213
+
214
+
215
+ xψx
216
+ xΨx
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+ xωx
226
+ xΩx
227
+ xώx
228
+ xΏx
@@ -0,0 +1,399 @@
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
+ xax
59
+ xAx
60
+ xáx
61
+ xÁx
62
+ xàx
63
+ xÀx
64
+ xăx
65
+ xĂx
66
+ xâx
67
+ xÂx
68
+ xåx
69
+ xÅx
70
+ xäx
71
+ xÄx
72
+ xãx
73
+ xÃx
74
+ xāx
75
+ xĀx
76
+ xb
77
+ xB
78
+ Xb
79
+ XB
80
+ xbx
81
+ xBx
82
+ xc
83
+ xC
84
+ Xc
85
+ XC
86
+
87
+
88
+
89
+
90
+ xcx
91
+ xCx
92
+ xçx
93
+ xÇx
94
+ xd
95
+ xD
96
+ Xd
97
+ XD
98
+ xdx
99
+ xDx
100
+ xe
101
+ xE
102
+ Xe
103
+ XE
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+ xex
129
+ xEx
130
+ xéx
131
+ xÉx
132
+ xèx
133
+ xÈx
134
+ xĕx
135
+ xĔx
136
+ xêx
137
+ xÊx
138
+ xëx
139
+ xËx
140
+ xēx
141
+ xĒx
142
+ xf
143
+ xF
144
+ Xf
145
+ XF
146
+ xfx
147
+ xFx
148
+ xg
149
+ xG
150
+ Xg
151
+ XG
152
+ xgx
153
+ xGx
154
+ xh
155
+ xH
156
+ Xh
157
+ XH
158
+ xhx
159
+ xHx
160
+ xi
161
+ xI
162
+ Xi
163
+ XI
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ xix
189
+ xIx
190
+ xíx
191
+ xÍx
192
+ xìx
193
+ xÌx
194
+ xĭx
195
+ xĬx
196
+ xîx
197
+ xÎx
198
+ xïx
199
+ xÏx
200
+ xīx
201
+ xĪx
202
+ xj
203
+ xJ
204
+ Xj
205
+ XJ
206
+ xjx
207
+ xJx
208
+ xk
209
+ xK
210
+ Xk
211
+ XK
212
+ xkx
213
+ xKx
214
+ xl
215
+ xL
216
+ Xl
217
+ XL
218
+ xlx
219
+ xLx
220
+ xm
221
+ xM
222
+ Xm
223
+ XM
224
+ xmx
225
+ xMx
226
+ xn
227
+ xN
228
+ Xn
229
+ XN
230
+
231
+
232
+
233
+
234
+ xnx
235
+ xNx
236
+ xñx
237
+ xÑx
238
+ xo
239
+ xO
240
+ Xo
241
+ XO
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+ xœx
275
+ xŒx
276
+ xox
277
+ xOx
278
+ xóx
279
+ xÓx
280
+ xòx
281
+ xÒx
282
+ xŏx
283
+ xŎx
284
+ xôx
285
+ xÔx
286
+ xöx
287
+ xÖx
288
+ xøx
289
+ xØx
290
+ xōx
291
+ xŌx
292
+ xp
293
+ xP
294
+ Xp
295
+ XP
296
+ xpx
297
+ xPx
298
+ xq
299
+ xQ
300
+ Xq
301
+ XQ
302
+ xqx
303
+ xQx
304
+ xr
305
+ xR
306
+ Xr
307
+ XR
308
+ xrx
309
+ xRx
310
+ xs
311
+ xS
312
+ Xs
313
+ XS
314
+ xsx
315
+ xSx
316
+ xt
317
+ xT
318
+ Xt
319
+ XT
320
+ xtx
321
+ xTx
322
+ xu
323
+ xU
324
+ Xu
325
+ XU
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+ xux
351
+ xUx
352
+ xúx
353
+ xÚx
354
+ xùx
355
+ xÙx
356
+ xŭx
357
+ xŬx
358
+ xûx
359
+ xÛx
360
+ xüx
361
+ xÜx
362
+ xūx
363
+ xŪx
364
+ xv
365
+ xV
366
+ Xv
367
+ XV
368
+ xvx
369
+ xVx
370
+ xw
371
+ xW
372
+ Xw
373
+ XW
374
+ xwx
375
+ xWx
376
+ xx
377
+ xX
378
+ Xx
379
+ XX
380
+ xxx
381
+ xXx
382
+ xy
383
+ xY
384
+ Xy
385
+ XY
386
+ xÿ
387
+
388
+ Xÿ
389
+
390
+ xyx
391
+ xYx
392
+ xÿx
393
+ xŸx
394
+ xz
395
+ xZ
396
+ Xz
397
+ XZ
398
+ xzx
399
+ xZx