twitter_cldr 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (473) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -22
  3. data/History.txt +3 -0
  4. data/NOTICE +3 -96
  5. data/README.md +23 -40
  6. data/Rakefile +12 -24
  7. data/lib/twitter_cldr.rb +1 -2
  8. data/lib/twitter_cldr/localized/localized_date.rb +1 -1
  9. data/lib/twitter_cldr/localized/localized_datetime.rb +1 -1
  10. data/lib/twitter_cldr/localized/localized_string.rb +7 -2
  11. data/lib/twitter_cldr/parsers/unicode_regex/component.rb +1 -4
  12. data/lib/twitter_cldr/resources/locales_resources_importer.rb +3 -7
  13. data/lib/twitter_cldr/resources/readme_renderer.rb +0 -7
  14. data/lib/twitter_cldr/shared/calendar.rb +2 -2
  15. data/lib/twitter_cldr/shared/postal_codes.rb +1 -9
  16. data/lib/twitter_cldr/shared/unicode_regex.rb +1 -9
  17. data/lib/twitter_cldr/tokenizers/numbers/rbnf_tokenizer.rb +1 -5
  18. data/lib/twitter_cldr/utils.rb +0 -2
  19. data/lib/twitter_cldr/utils/yaml.rb +0 -2
  20. data/lib/twitter_cldr/version.rb +1 -1
  21. data/resources/locales/af/calendars.yml +181 -181
  22. data/resources/locales/af/currencies.yml +166 -166
  23. data/resources/locales/af/languages.yml +217 -217
  24. data/resources/locales/af/layout.yml +1 -1
  25. data/resources/locales/af/numbers.yml +30 -30
  26. data/resources/locales/af/rbnf.yml +52 -52
  27. data/resources/locales/af/territories.yml +210 -210
  28. data/resources/locales/ar/calendars.yml +181 -181
  29. data/resources/locales/ar/currencies.yml +190 -190
  30. data/resources/locales/ar/languages.yml +413 -413
  31. data/resources/locales/ar/layout.yml +1 -1
  32. data/resources/locales/ar/numbers.yml +84 -84
  33. data/resources/locales/ar/rbnf.yml +59 -59
  34. data/resources/locales/ar/territories.yml +179 -179
  35. data/resources/locales/be/calendars.yml +125 -125
  36. data/resources/locales/be/currencies.yml +99 -99
  37. data/resources/locales/be/languages.yml +119 -119
  38. data/resources/locales/be/layout.yml +1 -1
  39. data/resources/locales/be/numbers.yml +24 -24
  40. data/resources/locales/be/rbnf.yml +157 -157
  41. data/resources/locales/be/territories.yml +185 -185
  42. data/resources/locales/bg/calendars.yml +171 -171
  43. data/resources/locales/bg/currencies.yml +170 -170
  44. data/resources/locales/bg/languages.yml +437 -437
  45. data/resources/locales/bg/layout.yml +1 -1
  46. data/resources/locales/bg/numbers.yml +35 -35
  47. data/resources/locales/bg/rbnf.yml +34 -34
  48. data/resources/locales/bg/territories.yml +181 -181
  49. data/resources/locales/bn/calendars.yml +188 -188
  50. data/resources/locales/bn/currencies.yml +168 -168
  51. data/resources/locales/bn/languages.yml +417 -417
  52. data/resources/locales/bn/layout.yml +1 -1
  53. data/resources/locales/bn/numbers.yml +35 -35
  54. data/resources/locales/bn/territories.yml +185 -185
  55. data/resources/locales/ca/calendars.yml +177 -177
  56. data/resources/locales/ca/currencies.yml +302 -302
  57. data/resources/locales/ca/languages.yml +439 -439
  58. data/resources/locales/ca/layout.yml +1 -1
  59. data/resources/locales/ca/numbers.yml +35 -35
  60. data/resources/locales/ca/rbnf.yml +160 -160
  61. data/resources/locales/ca/territories.yml +179 -179
  62. data/resources/locales/cs/calendars.yml +150 -150
  63. data/resources/locales/cs/currencies.yml +314 -314
  64. data/resources/locales/cs/languages.yml +506 -506
  65. data/resources/locales/cs/layout.yml +1 -1
  66. data/resources/locales/cs/numbers.yml +60 -60
  67. data/resources/locales/cs/rbnf.yml +40 -40
  68. data/resources/locales/cs/territories.yml +188 -188
  69. data/resources/locales/cy/calendars.yml +149 -149
  70. data/resources/locales/cy/currencies.yml +105 -105
  71. data/resources/locales/cy/languages.yml +330 -330
  72. data/resources/locales/cy/layout.yml +1 -1
  73. data/resources/locales/cy/numbers.yml +83 -83
  74. data/resources/locales/cy/rbnf.yml +54 -54
  75. data/resources/locales/cy/territories.yml +164 -164
  76. data/resources/locales/da/calendars.yml +182 -182
  77. data/resources/locales/da/currencies.yml +177 -177
  78. data/resources/locales/da/languages.yml +484 -484
  79. data/resources/locales/da/layout.yml +1 -1
  80. data/resources/locales/da/numbers.yml +35 -35
  81. data/resources/locales/da/rbnf.yml +38 -38
  82. data/resources/locales/da/territories.yml +206 -206
  83. data/resources/locales/de-CH/calendars.yml +192 -192
  84. data/resources/locales/de-CH/currencies.yml +428 -428
  85. data/resources/locales/de-CH/languages.yml +575 -575
  86. data/resources/locales/de-CH/layout.yml +1 -1
  87. data/resources/locales/de-CH/numbers.yml +35 -35
  88. data/resources/locales/de-CH/territories.yml +209 -209
  89. data/resources/locales/de/calendars.yml +192 -192
  90. data/resources/locales/de/currencies.yml +428 -428
  91. data/resources/locales/de/languages.yml +575 -575
  92. data/resources/locales/de/layout.yml +1 -1
  93. data/resources/locales/de/numbers.yml +35 -35
  94. data/resources/locales/de/rbnf.yml +80 -80
  95. data/resources/locales/de/territories.yml +207 -207
  96. data/resources/locales/el/calendars.yml +179 -179
  97. data/resources/locales/el/currencies.yml +162 -162
  98. data/resources/locales/el/languages.yml +441 -441
  99. data/resources/locales/el/layout.yml +1 -1
  100. data/resources/locales/el/numbers.yml +35 -35
  101. data/resources/locales/el/rbnf.yml +98 -98
  102. data/resources/locales/el/territories.yml +182 -182
  103. data/resources/locales/en-150/calendars.yml +105 -105
  104. data/resources/locales/en-150/currencies.yml +103 -103
  105. data/resources/locales/en-150/languages.yml +503 -503
  106. data/resources/locales/en-150/layout.yml +1 -1
  107. data/resources/locales/en-150/numbers.yml +35 -35
  108. data/resources/locales/en-150/territories.yml +182 -182
  109. data/resources/locales/en-AU/calendars.yml +105 -105
  110. data/resources/locales/en-AU/currencies.yml +103 -103
  111. data/resources/locales/en-AU/languages.yml +503 -503
  112. data/resources/locales/en-AU/layout.yml +1 -1
  113. data/resources/locales/en-AU/numbers.yml +35 -35
  114. data/resources/locales/en-AU/territories.yml +182 -182
  115. data/resources/locales/en-CA/calendars.yml +105 -105
  116. data/resources/locales/en-CA/currencies.yml +103 -103
  117. data/resources/locales/en-CA/languages.yml +503 -503
  118. data/resources/locales/en-CA/layout.yml +1 -1
  119. data/resources/locales/en-CA/numbers.yml +35 -35
  120. data/resources/locales/en-CA/territories.yml +182 -182
  121. data/resources/locales/en-GB/calendars.yml +109 -109
  122. data/resources/locales/en-GB/currencies.yml +250 -250
  123. data/resources/locales/en-GB/languages.yml +503 -503
  124. data/resources/locales/en-GB/layout.yml +1 -1
  125. data/resources/locales/en-GB/numbers.yml +35 -35
  126. data/resources/locales/en-GB/territories.yml +181 -181
  127. data/resources/locales/en-IE/calendars.yml +105 -105
  128. data/resources/locales/en-IE/currencies.yml +103 -103
  129. data/resources/locales/en-IE/languages.yml +503 -503
  130. data/resources/locales/en-IE/layout.yml +1 -1
  131. data/resources/locales/en-IE/numbers.yml +35 -35
  132. data/resources/locales/en-IE/territories.yml +182 -182
  133. data/resources/locales/en-SG/calendars.yml +105 -105
  134. data/resources/locales/en-SG/currencies.yml +103 -103
  135. data/resources/locales/en-SG/languages.yml +503 -503
  136. data/resources/locales/en-SG/layout.yml +1 -1
  137. data/resources/locales/en-SG/numbers.yml +35 -35
  138. data/resources/locales/en-SG/territories.yml +182 -182
  139. data/resources/locales/en-ZA/calendars.yml +105 -105
  140. data/resources/locales/en-ZA/currencies.yml +103 -103
  141. data/resources/locales/en-ZA/languages.yml +503 -503
  142. data/resources/locales/en-ZA/layout.yml +1 -1
  143. data/resources/locales/en-ZA/numbers.yml +36 -36
  144. data/resources/locales/en-ZA/territories.yml +182 -182
  145. data/resources/locales/en/calendars.yml +105 -105
  146. data/resources/locales/en/currencies.yml +103 -103
  147. data/resources/locales/en/languages.yml +503 -503
  148. data/resources/locales/en/layout.yml +1 -1
  149. data/resources/locales/en/numbers.yml +35 -35
  150. data/resources/locales/en/rbnf.yml +94 -94
  151. data/resources/locales/en/territories.yml +182 -182
  152. data/resources/locales/es-419/calendars.yml +170 -170
  153. data/resources/locales/es-419/currencies.yml +258 -258
  154. data/resources/locales/es-419/languages.yml +439 -439
  155. data/resources/locales/es-419/layout.yml +1 -1
  156. data/resources/locales/es-419/numbers.yml +33 -33
  157. data/resources/locales/es-419/territories.yml +178 -178
  158. data/resources/locales/es-CO/calendars.yml +182 -182
  159. data/resources/locales/es-CO/currencies.yml +258 -258
  160. data/resources/locales/es-CO/languages.yml +439 -439
  161. data/resources/locales/es-CO/layout.yml +1 -1
  162. data/resources/locales/es-CO/numbers.yml +35 -35
  163. data/resources/locales/es-CO/territories.yml +179 -179
  164. data/resources/locales/es-MX/calendars.yml +181 -181
  165. data/resources/locales/es-MX/currencies.yml +194 -194
  166. data/resources/locales/es-MX/languages.yml +441 -441
  167. data/resources/locales/es-MX/layout.yml +1 -1
  168. data/resources/locales/es-MX/numbers.yml +35 -35
  169. data/resources/locales/es-MX/territories.yml +178 -178
  170. data/resources/locales/es-US/calendars.yml +185 -185
  171. data/resources/locales/es-US/currencies.yml +258 -258
  172. data/resources/locales/es-US/languages.yml +439 -439
  173. data/resources/locales/es-US/layout.yml +1 -1
  174. data/resources/locales/es-US/numbers.yml +35 -35
  175. data/resources/locales/es-US/territories.yml +179 -179
  176. data/resources/locales/es/calendars.yml +183 -183
  177. data/resources/locales/es/currencies.yml +258 -258
  178. data/resources/locales/es/languages.yml +439 -439
  179. data/resources/locales/es/layout.yml +1 -1
  180. data/resources/locales/es/numbers.yml +35 -35
  181. data/resources/locales/es/rbnf.yml +123 -123
  182. data/resources/locales/es/territories.yml +179 -179
  183. data/resources/locales/eu/calendars.yml +185 -185
  184. data/resources/locales/eu/currencies.yml +160 -160
  185. data/resources/locales/eu/languages.yml +213 -213
  186. data/resources/locales/eu/layout.yml +1 -1
  187. data/resources/locales/eu/numbers.yml +29 -29
  188. data/resources/locales/eu/territories.yml +184 -184
  189. data/resources/locales/fa/calendars.yml +191 -191
  190. data/resources/locales/fa/currencies.yml +107 -107
  191. data/resources/locales/fa/languages.yml +412 -412
  192. data/resources/locales/fa/layout.yml +1 -1
  193. data/resources/locales/fa/numbers.yml +36 -36
  194. data/resources/locales/fa/rbnf.yml +28 -28
  195. data/resources/locales/fa/territories.yml +187 -187
  196. data/resources/locales/fi/calendars.yml +186 -186
  197. data/resources/locales/fi/currencies.yml +316 -316
  198. data/resources/locales/fi/languages.yml +590 -590
  199. data/resources/locales/fi/layout.yml +1 -1
  200. data/resources/locales/fi/numbers.yml +37 -37
  201. data/resources/locales/fi/rbnf.yml +39 -39
  202. data/resources/locales/fi/territories.yml +213 -213
  203. data/resources/locales/fil/calendars.yml +182 -182
  204. data/resources/locales/fil/currencies.yml +118 -118
  205. data/resources/locales/fil/languages.yml +214 -214
  206. data/resources/locales/fil/layout.yml +1 -1
  207. data/resources/locales/fil/numbers.yml +35 -35
  208. data/resources/locales/fil/rbnf.yml +35 -35
  209. data/resources/locales/fil/territories.yml +180 -180
  210. data/resources/locales/fr-BE/calendars.yml +198 -198
  211. data/resources/locales/fr-BE/currencies.yml +246 -246
  212. data/resources/locales/fr-BE/languages.yml +448 -448
  213. data/resources/locales/fr-BE/layout.yml +1 -1
  214. data/resources/locales/fr-BE/numbers.yml +35 -35
  215. data/resources/locales/fr-BE/rbnf.yml +140 -140
  216. data/resources/locales/fr-BE/territories.yml +195 -195
  217. data/resources/locales/fr-CA/calendars.yml +199 -199
  218. data/resources/locales/fr-CA/currencies.yml +252 -252
  219. data/resources/locales/fr-CA/languages.yml +449 -449
  220. data/resources/locales/fr-CA/layout.yml +1 -1
  221. data/resources/locales/fr-CA/numbers.yml +36 -36
  222. data/resources/locales/fr-CA/territories.yml +196 -196
  223. data/resources/locales/fr-CH/calendars.yml +200 -200
  224. data/resources/locales/fr-CH/currencies.yml +246 -246
  225. data/resources/locales/fr-CH/languages.yml +448 -448
  226. data/resources/locales/fr-CH/layout.yml +1 -1
  227. data/resources/locales/fr-CH/numbers.yml +36 -36
  228. data/resources/locales/fr-CH/rbnf.yml +139 -139
  229. data/resources/locales/fr-CH/territories.yml +195 -195
  230. data/resources/locales/fr/calendars.yml +198 -198
  231. data/resources/locales/fr/currencies.yml +246 -246
  232. data/resources/locales/fr/languages.yml +448 -448
  233. data/resources/locales/fr/layout.yml +1 -1
  234. data/resources/locales/fr/numbers.yml +36 -36
  235. data/resources/locales/fr/rbnf.yml +145 -145
  236. data/resources/locales/fr/territories.yml +195 -195
  237. data/resources/locales/ga/calendars.yml +162 -162
  238. data/resources/locales/ga/currencies.yml +250 -250
  239. data/resources/locales/ga/languages.yml +247 -247
  240. data/resources/locales/ga/layout.yml +1 -1
  241. data/resources/locales/ga/numbers.yml +71 -71
  242. data/resources/locales/ga/rbnf.yml +115 -115
  243. data/resources/locales/ga/territories.yml +78 -78
  244. data/resources/locales/gl/calendars.yml +183 -183
  245. data/resources/locales/gl/currencies.yml +169 -169
  246. data/resources/locales/gl/languages.yml +213 -213
  247. data/resources/locales/gl/layout.yml +1 -1
  248. data/resources/locales/gl/numbers.yml +35 -35
  249. data/resources/locales/gl/territories.yml +180 -180
  250. data/resources/locales/he/calendars.yml +129 -129
  251. data/resources/locales/he/currencies.yml +173 -173
  252. data/resources/locales/he/languages.yml +443 -443
  253. data/resources/locales/he/layout.yml +1 -1
  254. data/resources/locales/he/numbers.yml +60 -60
  255. data/resources/locales/he/rbnf.yml +133 -133
  256. data/resources/locales/he/territories.yml +179 -179
  257. data/resources/locales/hi/calendars.yml +185 -185
  258. data/resources/locales/hi/currencies.yml +160 -160
  259. data/resources/locales/hi/languages.yml +420 -420
  260. data/resources/locales/hi/layout.yml +1 -1
  261. data/resources/locales/hi/numbers.yml +35 -35
  262. data/resources/locales/hi/rbnf.yml +137 -137
  263. data/resources/locales/hi/territories.yml +183 -183
  264. data/resources/locales/hr/calendars.yml +173 -173
  265. data/resources/locales/hr/currencies.yml +315 -315
  266. data/resources/locales/hr/languages.yml +457 -457
  267. data/resources/locales/hr/layout.yml +1 -1
  268. data/resources/locales/hr/numbers.yml +47 -47
  269. data/resources/locales/hr/rbnf.yml +63 -63
  270. data/resources/locales/hr/territories.yml +181 -181
  271. data/resources/locales/hu/calendars.yml +175 -175
  272. data/resources/locales/hu/currencies.yml +171 -171
  273. data/resources/locales/hu/languages.yml +455 -455
  274. data/resources/locales/hu/layout.yml +1 -1
  275. data/resources/locales/hu/numbers.yml +36 -36
  276. data/resources/locales/hu/rbnf.yml +91 -91
  277. data/resources/locales/hu/territories.yml +212 -212
  278. data/resources/locales/id/calendars.yml +182 -182
  279. data/resources/locales/id/currencies.yml +297 -297
  280. data/resources/locales/id/languages.yml +457 -457
  281. data/resources/locales/id/layout.yml +1 -1
  282. data/resources/locales/id/numbers.yml +22 -22
  283. data/resources/locales/id/rbnf.yml +25 -25
  284. data/resources/locales/id/territories.yml +181 -181
  285. data/resources/locales/is/calendars.yml +182 -182
  286. data/resources/locales/is/currencies.yml +194 -194
  287. data/resources/locales/is/languages.yml +443 -443
  288. data/resources/locales/is/layout.yml +1 -1
  289. data/resources/locales/is/numbers.yml +35 -35
  290. data/resources/locales/is/rbnf.yml +45 -45
  291. data/resources/locales/is/territories.yml +212 -212
  292. data/resources/locales/it-CH/calendars.yml +183 -183
  293. data/resources/locales/it-CH/currencies.yml +168 -168
  294. data/resources/locales/it-CH/languages.yml +501 -501
  295. data/resources/locales/it-CH/layout.yml +1 -1
  296. data/resources/locales/it-CH/numbers.yml +29 -29
  297. data/resources/locales/it-CH/territories.yml +184 -184
  298. data/resources/locales/it/calendars.yml +180 -180
  299. data/resources/locales/it/currencies.yml +168 -168
  300. data/resources/locales/it/languages.yml +501 -501
  301. data/resources/locales/it/layout.yml +1 -1
  302. data/resources/locales/it/numbers.yml +29 -29
  303. data/resources/locales/it/rbnf.yml +368 -368
  304. data/resources/locales/it/territories.yml +184 -184
  305. data/resources/locales/ja/calendars.yml +195 -195
  306. data/resources/locales/ja/currencies.yml +353 -353
  307. data/resources/locales/ja/languages.yml +602 -602
  308. data/resources/locales/ja/layout.yml +1 -1
  309. data/resources/locales/ja/numbers.yml +35 -35
  310. data/resources/locales/ja/rbnf.yml +49 -49
  311. data/resources/locales/ja/territories.yml +260 -260
  312. data/resources/locales/ko/calendars.yml +180 -180
  313. data/resources/locales/ko/currencies.yml +168 -168
  314. data/resources/locales/ko/languages.yml +455 -455
  315. data/resources/locales/ko/layout.yml +1 -1
  316. data/resources/locales/ko/numbers.yml +33 -33
  317. data/resources/locales/ko/rbnf.yml +136 -136
  318. data/resources/locales/ko/territories.yml +219 -219
  319. data/resources/locales/lv/calendars.yml +179 -179
  320. data/resources/locales/lv/currencies.yml +166 -166
  321. data/resources/locales/lv/languages.yml +473 -473
  322. data/resources/locales/lv/layout.yml +1 -1
  323. data/resources/locales/lv/numbers.yml +48 -48
  324. data/resources/locales/lv/rbnf.yml +45 -45
  325. data/resources/locales/lv/territories.yml +202 -202
  326. data/resources/locales/ms/calendars.yml +181 -181
  327. data/resources/locales/ms/currencies.yml +163 -163
  328. data/resources/locales/ms/languages.yml +257 -257
  329. data/resources/locales/ms/layout.yml +1 -1
  330. data/resources/locales/ms/numbers.yml +23 -23
  331. data/resources/locales/ms/rbnf.yml +27 -27
  332. data/resources/locales/ms/territories.yml +179 -179
  333. data/resources/locales/nb/calendars.yml +190 -190
  334. data/resources/locales/nb/currencies.yml +313 -313
  335. data/resources/locales/nb/languages.yml +480 -480
  336. data/resources/locales/nb/layout.yml +1 -1
  337. data/resources/locales/nb/numbers.yml +37 -37
  338. data/resources/locales/nb/rbnf.yml +38 -38
  339. data/resources/locales/nb/territories.yml +213 -213
  340. data/resources/locales/nl/calendars.yml +182 -182
  341. data/resources/locales/nl/currencies.yml +319 -319
  342. data/resources/locales/nl/languages.yml +555 -555
  343. data/resources/locales/nl/layout.yml +1 -1
  344. data/resources/locales/nl/numbers.yml +35 -35
  345. data/resources/locales/nl/rbnf.yml +81 -81
  346. data/resources/locales/nl/territories.yml +215 -215
  347. data/resources/locales/pl/calendars.yml +176 -176
  348. data/resources/locales/pl/currencies.yml +175 -175
  349. data/resources/locales/pl/languages.yml +537 -537
  350. data/resources/locales/pl/layout.yml +1 -1
  351. data/resources/locales/pl/numbers.yml +60 -60
  352. data/resources/locales/pl/rbnf.yml +58 -58
  353. data/resources/locales/pl/territories.yml +191 -191
  354. data/resources/locales/pt/calendars.yml +187 -187
  355. data/resources/locales/pt/currencies.yml +172 -172
  356. data/resources/locales/pt/languages.yml +442 -442
  357. data/resources/locales/pt/layout.yml +1 -1
  358. data/resources/locales/pt/numbers.yml +35 -35
  359. data/resources/locales/pt/rbnf.yml +75 -75
  360. data/resources/locales/pt/territories.yml +178 -178
  361. data/resources/locales/ro/calendars.yml +170 -170
  362. data/resources/locales/ro/currencies.yml +165 -165
  363. data/resources/locales/ro/languages.yml +443 -443
  364. data/resources/locales/ro/layout.yml +1 -1
  365. data/resources/locales/ro/numbers.yml +47 -47
  366. data/resources/locales/ro/rbnf.yml +34 -34
  367. data/resources/locales/ro/territories.yml +178 -178
  368. data/resources/locales/ru/calendars.yml +174 -174
  369. data/resources/locales/ru/currencies.yml +176 -176
  370. data/resources/locales/ru/languages.yml +469 -469
  371. data/resources/locales/ru/layout.yml +1 -1
  372. data/resources/locales/ru/numbers.yml +60 -60
  373. data/resources/locales/ru/rbnf.yml +40 -40
  374. data/resources/locales/ru/territories.yml +197 -197
  375. data/resources/locales/sk/calendars.yml +170 -170
  376. data/resources/locales/sk/currencies.yml +168 -168
  377. data/resources/locales/sk/languages.yml +439 -439
  378. data/resources/locales/sk/layout.yml +1 -1
  379. data/resources/locales/sk/numbers.yml +60 -60
  380. data/resources/locales/sk/rbnf.yml +40 -40
  381. data/resources/locales/sk/territories.yml +191 -191
  382. data/resources/locales/sq/calendars.yml +157 -157
  383. data/resources/locales/sq/currencies.yml +102 -102
  384. data/resources/locales/sq/languages.yml +188 -188
  385. data/resources/locales/sq/layout.yml +1 -1
  386. data/resources/locales/sq/numbers.yml +36 -36
  387. data/resources/locales/sq/rbnf.yml +26 -26
  388. data/resources/locales/sq/territories.yml +180 -180
  389. data/resources/locales/sr/calendars.yml +185 -185
  390. data/resources/locales/sr/currencies.yml +171 -171
  391. data/resources/locales/sr/languages.yml +430 -430
  392. data/resources/locales/sr/layout.yml +1 -1
  393. data/resources/locales/sr/numbers.yml +47 -47
  394. data/resources/locales/sr/rbnf.yml +80 -80
  395. data/resources/locales/sr/territories.yml +184 -184
  396. data/resources/locales/sv/calendars.yml +189 -189
  397. data/resources/locales/sv/currencies.yml +212 -212
  398. data/resources/locales/sv/languages.yml +541 -541
  399. data/resources/locales/sv/layout.yml +1 -1
  400. data/resources/locales/sv/numbers.yml +37 -37
  401. data/resources/locales/sv/rbnf.yml +149 -149
  402. data/resources/locales/sv/territories.yml +207 -207
  403. data/resources/locales/ta/calendars.yml +185 -185
  404. data/resources/locales/ta/currencies.yml +160 -160
  405. data/resources/locales/ta/languages.yml +422 -422
  406. data/resources/locales/ta/layout.yml +1 -1
  407. data/resources/locales/ta/numbers.yml +35 -35
  408. data/resources/locales/ta/rbnf.yml +54 -54
  409. data/resources/locales/ta/territories.yml +184 -184
  410. data/resources/locales/th/calendars.yml +176 -176
  411. data/resources/locales/th/currencies.yml +695 -695
  412. data/resources/locales/th/languages.yml +594 -594
  413. data/resources/locales/th/layout.yml +1 -1
  414. data/resources/locales/th/numbers.yml +23 -23
  415. data/resources/locales/th/rbnf.yml +29 -29
  416. data/resources/locales/th/territories.yml +253 -253
  417. data/resources/locales/tr/calendars.yml +179 -179
  418. data/resources/locales/tr/currencies.yml +268 -268
  419. data/resources/locales/tr/languages.yml +443 -443
  420. data/resources/locales/tr/layout.yml +1 -1
  421. data/resources/locales/tr/numbers.yml +33 -33
  422. data/resources/locales/tr/rbnf.yml +61 -61
  423. data/resources/locales/tr/territories.yml +179 -179
  424. data/resources/locales/uk/calendars.yml +175 -175
  425. data/resources/locales/uk/currencies.yml +175 -175
  426. data/resources/locales/uk/languages.yml +467 -467
  427. data/resources/locales/uk/layout.yml +1 -1
  428. data/resources/locales/uk/numbers.yml +60 -60
  429. data/resources/locales/uk/rbnf.yml +40 -40
  430. data/resources/locales/uk/territories.yml +193 -193
  431. data/resources/locales/ur/calendars.yml +162 -162
  432. data/resources/locales/ur/currencies.yml +160 -160
  433. data/resources/locales/ur/languages.yml +203 -203
  434. data/resources/locales/ur/layout.yml +1 -1
  435. data/resources/locales/ur/numbers.yml +36 -36
  436. data/resources/locales/ur/territories.yml +166 -166
  437. data/resources/locales/vi/calendars.yml +80 -80
  438. data/resources/locales/vi/currencies.yml +295 -295
  439. data/resources/locales/vi/languages.yml +1 -1
  440. data/resources/locales/vi/layout.yml +1 -1
  441. data/resources/locales/vi/numbers.yml +23 -23
  442. data/resources/locales/vi/rbnf.yml +39 -39
  443. data/resources/locales/vi/territories.yml +158 -158
  444. data/resources/locales/zh-Hant/calendars.yml +200 -200
  445. data/resources/locales/zh-Hant/currencies.yml +789 -789
  446. data/resources/locales/zh-Hant/languages.yml +607 -607
  447. data/resources/locales/zh-Hant/layout.yml +1 -1
  448. data/resources/locales/zh-Hant/numbers.yml +34 -34
  449. data/resources/locales/zh-Hant/rbnf.yml +197 -197
  450. data/resources/locales/zh-Hant/territories.yml +260 -260
  451. data/resources/locales/zh/calendars.yml +204 -204
  452. data/resources/locales/zh/currencies.yml +740 -740
  453. data/resources/locales/zh/languages.yml +515 -515
  454. data/resources/locales/zh/layout.yml +1 -1
  455. data/resources/locales/zh/numbers.yml +35 -35
  456. data/resources/locales/zh/rbnf.yml +231 -231
  457. data/resources/locales/zh/territories.yml +260 -260
  458. data/resources/shared/numbering_systems.yml +118 -118
  459. data/resources/shared/rbnf_root.yml +239 -239
  460. data/resources/shared/segments/segments_root.yml +143 -143
  461. data/resources/shared/territories_containment.yml +304 -304
  462. data/spec/bidi/bidi_spec.rb +0 -1
  463. data/spec/core_ext_spec.rb +1 -2
  464. data/spec/parsers/segmentation_parser_spec.rb +8 -4
  465. data/spec/parsers/symbol_table_spec.rb +1 -5
  466. data/spec/parsers/unicode_regex/character_class_spec.rb +5 -3
  467. data/spec/parsers/unicode_regex/unicode_string_spec.rb +1 -1
  468. data/spec/shared/unicode_regex_spec.rb +14 -14
  469. data/spec/spec_helper.rb +3 -12
  470. data/spec/utils/yaml/yaml_spec.rb +10 -26
  471. metadata +14 -15
  472. data/lib/twitter_cldr/utils/interpolation.rb +0 -105
  473. data/spec/utils/interpolation_spec.rb +0 -124
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9c6af08b1eab959bef74d6da6df7187178d6c8a
4
- data.tar.gz: c1e6a87f70fd295d46f4b9bb57951910568a2223
3
+ metadata.gz: 36fb6c8b2e3270ea51a5b6d9dd2a9eb6be7deb30
4
+ data.tar.gz: 2d7d3e08365638d9a7cf73405e5c961063f7754f
5
5
  SHA512:
6
- metadata.gz: 2d4e1affea9c1f3f93f87d4a9378c8cdcb65beadf7d257693285510e72977fbd5fad2f5601000866f5b7cfb18112eba10973377b368423841b4dfc7a83402ecd
7
- data.tar.gz: 19dc931849ded8e6b2717be5a0a2bace3f5605e351fd28c03d302128d17a26a54ea3bf2c7612d282d91774dfcb726f105b6bc4aba40338b178a1f637722b62ca
6
+ metadata.gz: 50be3dcceca9966c50d9a1a36980a84f1b9e14c739a0552fa584e4982181d81deff6a99c8265b3076b0ab366b0c515deaf1821828f424b6f05ad937fa6b3fb80
7
+ data.tar.gz: 127a0e0aeefc5fe7363dc9935b3c2223639e0aef529497a52cb1d5b4c64c6589800c4c2a720e21e140a432e4a48cc24fc7dcb5d4a92c9d190ef58e8a9415f514
data/Gemfile CHANGED
@@ -8,17 +8,7 @@ group :development, :test do
8
8
  gem 'pry'
9
9
  gem 'pry-nav'
10
10
 
11
- platform :rbx do
12
- gem 'rubinius-debugger'
13
- end
14
-
15
- if RUBY_VERSION >= "1.9" && RUBY_PLATFORM != "java" && RUBY_ENGINE != "rbx"
16
- gem 'ruby-prof'
17
- end
18
-
19
- if RUBY_VERSION <= "1.8.7"
20
- gem 'oniguruma'
21
- end
11
+ gem 'ruby-prof' unless RUBY_PLATFORM == "java"
22
12
 
23
13
  gem 'regexp_parser', '~> 0.1.6'
24
14
  end
@@ -27,6 +17,7 @@ group :development do
27
17
  gem 'nokogiri', "~> 1.5.9"
28
18
 
29
19
  gem 'ruby-cldr', :github => 'kl-7/ruby-cldr', :branch => 'kl_nubmber_patttern_pluralization'
20
+ gem 'i18n', '~> 0.6.11'
30
21
  gem 'cldr-plurals', '~> 1.0.0'
31
22
  end
32
23
 
@@ -34,17 +25,10 @@ group :test do
34
25
  gem 'rspec', '~> 2.14.0'
35
26
  gem 'rr', '~> 1.1.2'
36
27
 
37
- if RUBY_VERSION >= "1.9"
38
- gem 'rubyzip'
39
- end
40
-
41
- platform :mri_18 do
42
- gem 'rcov'
43
- end
28
+ gem 'rubyzip'
29
+ gem 'coveralls', :require => false
44
30
 
45
- platform :mri_19 do
46
- gem 'simplecov'
47
- gem 'launchy'
48
- end
31
+ gem 'simplecov'
32
+ gem 'launchy'
49
33
  end
50
34
 
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == 3.1.2
2
+ * Add 'short' as a valid weekday names form in Shared::Calendar.
3
+
1
4
  == 3.1.1
2
5
  * Fixed an issue with single quotes appearing in dates formatting.
3
6
  * Added support for locale codes that have region code in lower case.
data/NOTICE CHANGED
@@ -1,6 +1,7 @@
1
1
  twitter-cldr-rb is a Ruby implementation of the Common Locale Data Repository
2
2
  Copyright (C) 2012 Twitter, Inc.
3
3
 
4
+ ======================================================================================
4
5
 
5
6
  Portions of this gem were borrowed from Sven Fuchs' ruby-cldr gem. Here is
6
7
  the license that accompanied Mr. Fuchs' code:
@@ -26,99 +27,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26
27
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27
28
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
29
 
29
-
30
- Backporting of String interpolation from Ruby 1.9 to Ruby 1.8 implemented in
31
- this gem (see file interpolation.rb) was partially copied and heavily based
32
- on the implementation of i18n and gettext gems. Below are the license agreements
33
- that accompanied these gems.
34
-
35
- License agreement of the i18n gem (https://github.com/svenfuchs/i18n):
36
-
37
- Copyright (c) 2008 The Ruby I18n team
38
-
39
- Permission is hereby granted, free of charge, to any person obtaining
40
- a copy of this software and associated documentation files (the
41
- "Software"), to deal in the Software without restriction, including
42
- without limitation the rights to use, copy, modify, merge, publish,
43
- distribute, sublicense, and/or sell copies of the Software, and to
44
- permit persons to whom the Software is furnished to do so, subject to
45
- the following conditions:
46
-
47
- The above copyright notice and this permission notice shall be
48
- included in all copies or substantial portions of the Software.
49
-
50
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
51
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
52
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
54
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
55
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
56
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
57
-
58
- License of the gettext gem (https://github.com/mutoh/gettext):
59
-
60
- Copyright (C) 2005-2009 Masao Mutoh
61
-
62
- You may redistribute it [the code] and/or modify it under the same license
63
- terms as Ruby or LGPL [http://www.gnu.org/licenses/lgpl-3.0.txt].
64
-
65
- Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
66
- You can redistribute it and/or modify it under either the terms of the GPL
67
- version 2 (see the file GPL), or the conditions below:
68
-
69
- 1. You may make and give away verbatim copies of the source form of the
70
- software without restriction, provided that you duplicate all of the
71
- original copyright notices and associated disclaimers.
72
-
73
- 2. You may modify your copy of the software in any way, provided that
74
- you do at least ONE of the following:
75
-
76
- a) place your modifications in the Public Domain or otherwise
77
- make them Freely Available, such as by posting said
78
- modifications to Usenet or an equivalent medium, or by allowing
79
- the author to include your modifications in the software.
80
-
81
- b) use the modified software only within your corporation or
82
- organization.
83
-
84
- c) give non-standard binaries non-standard names, with
85
- instructions on where to get the original software distribution.
86
-
87
- d) make other distribution arrangements with the author.
88
-
89
- 3. You may distribute the software in object code or binary form,
90
- provided that you do at least ONE of the following:
91
-
92
- a) distribute the binaries and library files of the software,
93
- together with instructions (in the manual page or equivalent)
94
- on where to get the original distribution.
95
-
96
- b) accompany the distribution with the machine-readable source of
97
- the software.
98
-
99
- c) give non-standard binaries non-standard names, with
100
- instructions on where to get the original software distribution.
101
-
102
- d) make other distribution arrangements with the author.
103
-
104
- 4. You may modify and include the part of the software into any other
105
- software (possibly commercial). But some files in the distribution
106
- are not written by the author, so that they are not under these terms.
107
-
108
- For the list of those files and their copying conditions, see the
109
- file LEGAL.
110
-
111
- 5. The scripts and library files supplied as input to or produced as
112
- output from the software do not automatically fall under the
113
- copyright of the software, but belong to whomever generated them,
114
- and may be sold commercially, and may be aggregated with this
115
- software.
116
-
117
- 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
118
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
119
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
120
- PURPOSE.
121
-
30
+ ======================================================================================
122
31
 
123
32
  TwitterCldr::Collation::ImplicitCollationElements module was ported from
124
33
  the ICU4J library (http://site.icu-project.org). Here is its license:
@@ -153,9 +62,7 @@ Except as contained in this notice, the name of a copyright holder shall not be
153
62
  used in advertising or otherwise to promote the sale, use or other dealings in
154
63
  this Software without prior written authorization of the copyright holder.
155
64
 
156
-
157
-
158
-
65
+ ======================================================================================
159
66
 
160
67
  The currencies data in twitter-cldr-rb has been adapted from the currencies gem.
161
68
  Here's the license that accompanied that code:
data/README.md CHANGED
@@ -1,6 +1,4 @@
1
-
2
-
3
- ## twitter-cldr-rb [![Build Status](https://secure.travis-ci.org/twitter/twitter-cldr-rb.png?branch=master)](http://travis-ci.org/twitter/twitter-cldr-rb) [![Code Climate](https://codeclimate.com/github/twitter/twitter-cldr-rb.png)](https://codeclimate.com/github/twitter/twitter-cldr-rb)
1
+ ## twitter-cldr-rb [![Build Status](https://secure.travis-ci.org/twitter/twitter-cldr-rb.png?branch=master)](http://travis-ci.org/twitter/twitter-cldr-rb) [![Code Climate](https://codeclimate.com/github/twitter/twitter-cldr-rb.png)](https://codeclimate.com/github/twitter/twitter-cldr-rb) [![Coverage Status](https://coveralls.io/repos/twitter/twitter-cldr-rb/badge.png?branch=master)](https://coveralls.io/r/twitter/twitter-cldr-rb?branch=master)
4
2
 
5
3
  TwitterCldr uses Unicode's Common Locale Data Repository (CLDR) to format certain types of text into their
6
4
  localized equivalents. Currently supported types of text include dates, times, currencies, decimals, percentages, and symbols.
@@ -39,18 +37,18 @@ TwitterCldr patches core Ruby objects like `Fixnum` and `Date` to make localizat
39
37
 
40
38
  ```ruby
41
39
  # default formatting with to_s
42
- 1337.localize(:es).to_s # "1 337"
40
+ 1337.localize(:es).to_s # "1.337"
43
41
 
44
42
  # currencies, default USD
45
- 1337.localize(:es).to_currency.to_s # "1 337,00 $"
46
- 1337.localize(:es).to_currency.to_s(:currency => "EUR") # "1 337,00 €"
43
+ 1337.localize(:es).to_currency.to_s # "1.337,00 $"
44
+ 1337.localize(:es).to_currency.to_s(:currency => "EUR") # "1.337,00 €"
47
45
 
48
46
  # percentages
49
- 1337.localize(:es).to_percent.to_s # "1 337%"
50
- 1337.localize(:es).to_percent.to_s(:precision => 2) # "1 337,00%"
47
+ 1337.localize(:es).to_percent.to_s # "1.337 %"
48
+ 1337.localize(:es).to_percent.to_s(:precision => 2) # "1.337,00 %"
51
49
 
52
50
  # decimals
53
- 1337.localize(:es).to_decimal.to_s(:precision => 3) # "1 337,000"
51
+ 1337.localize(:es).to_decimal.to_s(:precision => 3) # "1.337,000"
54
52
  ```
55
53
 
56
54
  **Note**: The `:precision` option can be used with all these number formatters.
@@ -154,7 +152,7 @@ For English (and other languages), you can also specify an ordinal spellout:
154
152
  ```ruby
155
153
  DateTime.now.localize(:es).to_full_s # "viernes, 14 de febrero de 2014, 12:20:05 (UTC +00:00)"
156
154
  DateTime.now.localize(:es).to_long_s # "14 de febrero de 2014, 12:20:05 UTC"
157
- DateTime.now.localize(:es).to_medium_s # "14/2/2014 12:20:05"
155
+ DateTime.now.localize(:es).to_medium_s # "14 de feb. de 2014 12:20:05"
158
156
  DateTime.now.localize(:es).to_short_s # "14/2/14 12:20"
159
157
 
160
158
  Time.now.localize(:es).to_full_s # "12:20:05 (UTC +00:00)"
@@ -164,7 +162,7 @@ Time.now.localize(:es).to_short_s # "12:20"
164
162
 
165
163
  DateTime.now.localize(:es).to_date.to_full_s # "viernes, 14 de febrero de 2014"
166
164
  DateTime.now.localize(:es).to_date.to_long_s # "14 de febrero de 2014"
167
- DateTime.now.localize(:es).to_date.to_medium_s # "14/2/2014"
165
+ DateTime.now.localize(:es).to_date.to_medium_s # "14 de feb. de 2014"
168
166
  DateTime.now.localize(:es).to_date.to_short_s # "14/2/14"
169
167
  ```
170
168
 
@@ -184,7 +182,7 @@ dt.to_short_s # ...etc
184
182
  Besides the default date formats, CLDR supports a number of additional ones. The list of available formats varies for each locale. To get a full list, use the `additional_formats` method:
185
183
 
186
184
  ```ruby
187
- # ["EEEEd", "EHm", "EHms", "Ed", "Ehm", "Ehms", "Gy", "GyMMM", "GyMMMEEEEd", "GyMMMEd", "GyMMMd", "H", ... ]
185
+ # ["E", "EEEEd", "EHm", "EHms", "Ed", "Ehm", "Ehms", "Gy", "GyMMM", "GyMMMEEEEd", "GyMMMEd", "GyMMMd", ... ]
188
186
  DateTime.now.localize(:ja).additional_formats
189
187
  ```
190
188
 
@@ -201,6 +199,7 @@ It's important to know that, even though any given format may not be available a
201
199
 
202
200
  | Format | Output |
203
201
  |:-----------|------------------------|
202
+ | E | Fri |
204
203
  | EHm | Fri 12:20 |
205
204
  | EHms | Fri 12:20:05 |
206
205
  | Ed | 14 Fri |
@@ -320,8 +319,9 @@ TwitterCLDR makes it easy to find the plural rules for any numeric value:
320
319
 
321
320
  ```ruby
322
321
  1.localize(:ru).plural_rule # :one
323
- 2.localize(:ru).plural_rule # :other
322
+ 2.localize(:ru).plural_rule # :few
324
323
  5.localize(:ru).plural_rule # :many
324
+ 10.0.localize(:ru).plural_rule # :other
325
325
  ```
326
326
 
327
327
  Behind the scenes, these convenience methods use the `TwitterCldr::Formatters::Plurals::Rules` class. You can do the same thing (and a bit more) if you're feeling adventurous:
@@ -332,11 +332,11 @@ TwitterCldr::Formatters::Plurals::Rules.all # [:one, :other]
332
332
 
333
333
  # get all rules for a specific locale
334
334
  TwitterCldr::Formatters::Plurals::Rules.all_for(:es) # [:one, :other]
335
- TwitterCldr::Formatters::Plurals::Rules.all_for(:ru) # [:one, :many, :other]
335
+ TwitterCldr::Formatters::Plurals::Rules.all_for(:ru) # [:few, :many, :one, :other]
336
336
 
337
337
  # get the rule for a number in a specific locale
338
338
  TwitterCldr::Formatters::Plurals::Rules.rule_for(1, :ru) # :one
339
- TwitterCldr::Formatters::Plurals::Rules.rule_for(2, :ru) # :other
339
+ TwitterCldr::Formatters::Plurals::Rules.rule_for(2, :ru) # :few
340
340
  ```
341
341
 
342
342
  ### Plurals
@@ -375,13 +375,10 @@ NOTE: If you're using TwitterCLDR with Rails 3, you may see an error if you try
375
375
  '%<{"count": {"one": "only one", "other": "tons more!"}}'.to_str.localize % { :count => 2 }
376
376
  ```
377
377
 
378
- The `LocalizedString` class supports all forms of interpolation and combines support from both Ruby 1.8 and 1.9:
378
+ The `LocalizedString` class supports all forms of interpolation:
379
379
 
380
380
  ```ruby
381
- # Ruby 1.8
382
- "five euros plus %.3f in tax" % (13.25 * 0.087)
383
-
384
- # Ruby 1.9
381
+ # Ruby
385
382
  "five euros plus %.3f in tax" % (13.25 * 0.087)
386
383
  "there are %{count} horses in the barn" % { :count => "5" }
387
384
 
@@ -390,7 +387,7 @@ The `LocalizedString` class supports all forms of interpolation and combines sup
390
387
  "there are %{count} horses in the barn".localize % { :count => "5" }
391
388
  ```
392
389
 
393
- When you pass a Hash as an argument and specify placeholders with `%<foo>d`, TwitterCLDR will interpret the hash values as named arguments and format the string according to the instructions appended to the closing `>`. In this way, TwitterCLDR supports both Ruby 1.8 and 1.9 interpolation syntax in the same string:
390
+ When you pass a Hash as an argument and specify placeholders with `%<foo>d`, TwitterCLDR will interpret the hash values as named arguments and format the string according to the instructions appended to the closing `>`:
394
391
 
395
392
  ```ruby
396
393
  "five euros plus %<percent>.3f in %{noun}".localize % { :percent => 13.25 * 0.087, :noun => "tax" }
@@ -480,7 +477,7 @@ postal_code.regexp # /\d{5}([ \-]\d{4})?/
480
477
  Get a sample of valid postal codes with the `#sample` method:
481
478
 
482
479
  ```ruby
483
- postal_code.sample(5) # ["93733-7601", "65796-6586", "93519", "46536", "53158"]
480
+ postal_code.sample(5) # ["20274-2080", "17661", "18705", "77929", "73034-2737"]
484
481
  ```
485
482
 
486
483
  ### Phone Codes
@@ -626,15 +623,9 @@ regex =~ "fooABC" # 3
626
623
 
627
624
  Protip: Try to avoid negation in character classes (eg. [^abc] and \P{Lu}) as it tends to negatively affect both performance when constructing regexes as well as matching.
628
625
 
629
- #### Support for Ruby 1.8
630
-
631
- Ruby 1.8 does not allow escaped Unicode characters in regular expressions and restricts their maximum length. TwitterCLDR's `UnicodeRegex` class supports escaped unicode characters in Ruby 1.8, but cannot offer a work-around for the length issue. For this reason, Ruby 1.8 users are required to install the oniguruma regex engine and require the oniguruma gem in their projects.
632
-
633
- To install oniguruma, run `brew install oniguruma` on MacOS, `[sudo] apt-get install libonig-dev` on Ubuntu (you may need to search for other instructions specific to your platform). Then, install the oniguruma gem via your Gemfile or on your system via `gem install oniguruma`. Once installed, `require oniguruma` somewhere in your project before making use of the `TwitterCldr::Shared::UnicodeRegex` class.
634
-
635
626
  ### Text Segmentation
636
627
 
637
- TwitterCLDR currently supports text segmentation by sentence as described in the [Unicode Technical Report #29](http://www.unicode.org/reports/tr29/). The segmentation algorithm makes use of Unicode regular expressions (described above). Because of this, if you're running Ruby 1.8, you'll need to follow the instructions above to install the oniguruma regular expression engine. Segmentation by word, line, and grapheme boundaries could also be supported if someone wants them.
628
+ TwitterCLDR currently supports text segmentation by sentence as described in the [Unicode Technical Report #29](http://www.unicode.org/reports/tr29/). The segmentation algorithm makes use of Unicode regular expressions (described above). Segmentation by word, line, and grapheme boundaries could also be supported if someone wants them.
638
629
 
639
630
  You can break a string into sentences using the `LocalizedString#each_sentence` method:
640
631
 
@@ -795,7 +786,7 @@ bidi.to_s
795
786
 
796
787
  ### Unicode YAML Support
797
788
 
798
- Ruby 1.8 does not come with great Unicode support, and nowhere is this more apparent then when dumping Unicode characters in YAML. The Psych gem by @tenderlove is a good replacement and is the default in Ruby 1.9, but requires libyaml and still doesn't handle Unicode characters perfectly. To mitigate this problem (especially in Ruby 1.8), TwitterCLDR contains an adaptation of the [ya2yaml](https://github.com/afunai/ya2yaml) gem by Akira Funai. Our changes specifically add better dumping of Ruby symbols. If you can get Mr. Funai's attention, please gently remind him to merge @camertron's pull request so we can use his gem and not have to maintain a separate version :) Fortunately, YAML parsing can still be done with the usual `YAML.load` or `YAML.load_file`.
789
+ The Psych gem that is the default YAML engine inRuby 1.9 doesn't handle Unicode characters perfectly. To mitigate this problem, TwitterCLDR contains an adaptation of the [ya2yaml](https://github.com/afunai/ya2yaml) gem by Akira Funai. Our changes specifically add better dumping of Ruby symbols. If you can get Mr. Funai's attention, please gently remind him to merge @camertron's pull request so we can use his gem and not have to maintain a separate version :) Fortunately, YAML parsing can still be done with the usual `YAML.load` or `YAML.load_file`.
799
790
 
800
791
  You can make use of TwitterCLDR's YAML dumper by calling `localize` and then `to_yaml` on an `Array`, `Hash`, or `String`:
801
792
 
@@ -840,15 +831,7 @@ TwitterCldr.locale # will return :ru
840
831
 
841
832
  ## Compatibility
842
833
 
843
- TwitterCLDR is fully compatible with Ruby 1.8.7, 1.9.3, 2.0.0, 2.1.0, and Rubinius (v2.2.7). We are considering dropping support for Ruby 1.8. If you still need to use TwitterCLDR in a Ruby 1.8 environment, please let us know as soon as possible. Please note that certain TwitterCLDR features require additional dependencies or considerations when run on Ruby 1.8. Refer to the sections above for details.
844
-
845
- #### Notes on Ruby 1.8
846
-
847
- Numerous TwitterCLDR features have been built with the assumption that they will only ever be used on UTF-8 encoded text, which is mostly due to the need to support Ruby 1.8. For this reason, you may find it necessary to set the global `$KCODE` variable to `"UTF-8"`. Setting this variable tells Ruby what encoding to use when loading source files. TwitterCLDR will **not** set this value for you.
848
-
849
- ```ruby
850
- $KCODE = "UTF-8"
851
- ```
834
+ TwitterCLDR is fully compatible with Ruby 1.9.3, 2.0.0, 2.2.0.
852
835
 
853
836
  ## Requirements
854
837
 
@@ -862,7 +845,7 @@ Tests are written in RSpec using RR as the mocking framework.
862
845
 
863
846
  ## Test Coverage
864
847
 
865
- You can run the development test coverage suite with `bundle exec rake spec:cov`, or the full suite with `bundle exec rake spec:cov:full`. TwitterCLDR uses RCov under Ruby 1.8 and Simplecov under Ruby 1.9.
848
+ You can run the development test coverage suite (using simplecov) with `bundle exec rake spec:cov`, or the full suite with `bundle exec rake spec:cov:full`.
866
849
 
867
850
  ## JavaScript Support
868
851
 
data/Rakefile CHANGED
@@ -31,33 +31,21 @@ namespace :spec do
31
31
  end
32
32
  end
33
33
 
34
- if RUBY_VERSION < '1.9.0'
35
- desc 'Run specs with RCov'
36
- RSpec::Core::RakeTask.new('spec:cov') do |t|
37
- t.rcov = true
38
- t.pattern = './spec/**/*_spec.rb'
39
- t.rcov_opts = '-T --sort coverage --exclude gems/,spec/'
40
- end
41
-
42
- desc 'Run full specs suit with RCov'
43
- task 'spec:cov:full' => %w[spec:full_spec_env spec:cov]
44
- else
45
- namespace :spec do
46
- desc 'Run specs with SimpleCov'
47
- task :cov => ['spec:simplecov_env', :spec] do
48
- require 'launchy'
49
- Launchy.open 'coverage/index.html'
50
- end
34
+ namespace :spec do
35
+ desc 'Run specs with SimpleCov'
36
+ task :cov => ['spec:simplecov_env', :spec] do
37
+ require 'launchy'
38
+ Launchy.open 'coverage/index.html'
39
+ end
51
40
 
52
- desc 'Run full specs suit with SimpleCov'
53
- task 'cov:full' => %w[spec:full_spec_env spec:cov]
41
+ desc 'Run full specs suit with SimpleCov'
42
+ task 'cov:full' => %w[spec:full_spec_env spec:cov]
54
43
 
55
- task :simplecov_env do
56
- puts 'Cleaning up coverage reports'
57
- rm_rf 'coverage'
44
+ task :simplecov_env do
45
+ puts 'Cleaning up coverage reports'
46
+ rm_rf 'coverage'
58
47
 
59
- ENV['SCOV'] = 'true'
60
- end
48
+ ENV['SCOV'] = 'true'
61
49
  end
62
50
  end
63
51
 
data/lib/twitter_cldr.rb CHANGED
@@ -3,8 +3,6 @@
3
3
  # Copyright 2012 Twitter, Inc
4
4
  # http://www.apache.org/licenses/LICENSE-2.0
5
5
 
6
- # $KCODE = 'UTF-8' unless RUBY_VERSION >= '1.9.0'
7
-
8
6
  require 'yaml'
9
7
  require 'date'
10
8
  require 'time'
@@ -40,6 +38,7 @@ module TwitterCldr
40
38
 
41
39
  RESOURCES_DIR = File.join(File.dirname(File.dirname(File.expand_path(__FILE__))), 'resources')
42
40
 
41
+ # TODO: convert this and all other hashes to 1.9 syntax
43
42
  # maps twitter locales to cldr locales
44
43
  TWITTER_LOCALE_MAP = {
45
44
  :msa => :ms,
@@ -26,7 +26,7 @@ module TwitterCldr
26
26
  utc_dt.hour,
27
27
  utc_dt.min,
28
28
  utc_dt.sec,
29
- utc_dt.sec_fraction * (RUBY_VERSION < '1.9' ? 86400000000 : 1000000)
29
+ utc_dt.sec_fraction * 1_000_000
30
30
  )
31
31
 
32
32
  LocalizedTime.new(time, @locale, chain_params)
@@ -90,7 +90,7 @@ module TwitterCldr
90
90
  utc_dt.hour,
91
91
  utc_dt.min,
92
92
  utc_dt.sec,
93
- utc_dt.sec_fraction * (RUBY_VERSION < '1.9' ? 86400000000 : 1000000)
93
+ utc_dt.sec_fraction * 1_000_000
94
94
  )
95
95
 
96
96
  LocalizedTime.new(time, @locale, chain_params)
@@ -10,14 +10,14 @@ module TwitterCldr
10
10
  include Enumerable
11
11
 
12
12
  # Uses wrapped string object as a format specification and returns the result of applying it to +args+ (see
13
- # +TwitterCldr::Utils.interpolate+ method for interpolation syntax).
13
+ # standard String#% method documentation for interpolation syntax).
14
14
  #
15
15
  # If +args+ is a Hash than pluralization is performed before interpolation (see +PluralFormatter+ class for
16
16
  # pluralization specification).
17
17
  #
18
18
  def %(args)
19
19
  pluralized = args.is_a?(Hash) ? formatter.format(@base_obj, args) : @base_obj
20
- TwitterCldr::Utils.interpolate(pluralized, args)
20
+ escape_plural_interpolation(pluralized) % args
21
21
  end
22
22
 
23
23
  def normalize(options = {})
@@ -118,6 +118,11 @@ module TwitterCldr
118
118
 
119
119
  protected
120
120
 
121
+ def escape_plural_interpolation(string)
122
+ # escape plura interpolation patterns ()see PluralFormatter)
123
+ string.gsub(TwitterCldr::Formatters::PluralFormatter::PLURALIZATION_REGEXP, '%\0')
124
+ end
125
+
121
126
  def formatter
122
127
  @formatter ||=
123
128
  TwitterCldr::Formatters::PluralFormatter.for_locale(locale)