twitter_cldr 6.6.2 → 6.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1033) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/README.md +31 -28
  4. data/Rakefile +11 -1
  5. data/lib/twitter_cldr/formatters/formatter.rb +0 -4
  6. data/lib/twitter_cldr/resources/calendars_importer.rb +222 -0
  7. data/lib/twitter_cldr/resources/cldr_data_builder.rb +36 -0
  8. data/lib/twitter_cldr/resources/cldr_document_set.rb +149 -0
  9. data/lib/twitter_cldr/resources/cldr_dtd.rb +110 -0
  10. data/lib/twitter_cldr/resources/cldr_locale.rb +78 -0
  11. data/lib/twitter_cldr/resources/language_codes_importer.rb +1 -1
  12. data/lib/twitter_cldr/resources/list_formats_importer.rb +1 -1
  13. data/lib/twitter_cldr/resources/locales_resources_importer.rb +0 -27
  14. data/lib/twitter_cldr/resources/number_formats_importer.rb +1 -1
  15. data/lib/twitter_cldr/resources/readme_renderer.rb +6 -2
  16. data/lib/twitter_cldr/resources/requirements/cldr_requirement.rb +32 -71
  17. data/lib/twitter_cldr/resources/requirements/unicode_requirement.rb +7 -3
  18. data/lib/twitter_cldr/resources/segment_dictionaries_importer.rb +6 -3
  19. data/lib/twitter_cldr/resources/territories_importer.rb +1 -1
  20. data/lib/twitter_cldr/resources/timezone_tests_importer.rb +8 -0
  21. data/lib/twitter_cldr/resources/timezones_importer.rb +1 -1
  22. data/lib/twitter_cldr/resources/unicode_property_aliases_importer.rb +2 -0
  23. data/lib/twitter_cldr/resources/units_importer.rb +134 -0
  24. data/lib/twitter_cldr/resources.rb +11 -2
  25. data/lib/twitter_cldr/shared/calendar.rb +2 -18
  26. data/lib/twitter_cldr/shared/casefolder.rb +53 -48
  27. data/lib/twitter_cldr/shared/unit.rb +2 -4
  28. data/lib/twitter_cldr/timezones/generic_location.rb +15 -15
  29. data/lib/twitter_cldr/timezones/gmt_location.rb +2 -2
  30. data/lib/twitter_cldr/timezones/iso8601_location.rb +2 -2
  31. data/lib/twitter_cldr/timezones/timezone.rb +11 -7
  32. data/lib/twitter_cldr/tokenizers/calendars/date_tokenizer.rb +0 -1
  33. data/lib/twitter_cldr/tokenizers/tokenizer.rb +7 -12
  34. data/lib/twitter_cldr/tokenizers.rb +0 -1
  35. data/lib/twitter_cldr/version.rb +1 -1
  36. data/lib/twitter_cldr/versions.rb +3 -3
  37. data/resources/locales/af/calendars.yml +1 -0
  38. data/resources/locales/af/currencies.yml +3 -6
  39. data/resources/locales/af/languages.yml +2 -1
  40. data/resources/locales/af/numbers.yml +1 -0
  41. data/resources/locales/af/timezones.yml +3 -0
  42. data/resources/locales/af/units.yml +513 -125
  43. data/resources/locales/ar/calendars.yml +3 -1
  44. data/resources/locales/ar/currencies.yml +2 -4
  45. data/resources/locales/ar/languages.yml +1 -1
  46. data/resources/locales/ar/numbers.yml +1 -0
  47. data/resources/locales/ar/timezones.yml +3 -0
  48. data/resources/locales/ar/units.yml +263 -122
  49. data/resources/locales/az/calendars.yml +3 -1
  50. data/resources/locales/az/currencies.yml +1 -3
  51. data/resources/locales/az/languages.yml +2 -2
  52. data/resources/locales/az/numbers.yml +1 -0
  53. data/resources/locales/az/timezones.yml +3 -0
  54. data/resources/locales/az/units.yml +116 -44
  55. data/resources/locales/be/calendars.yml +4 -2
  56. data/resources/locales/be/currencies.yml +7 -5
  57. data/resources/locales/be/languages.yml +2 -1
  58. data/resources/locales/be/numbers.yml +5 -4
  59. data/resources/locales/be/timezones.yml +3 -0
  60. data/resources/locales/be/units.yml +37 -7
  61. data/resources/locales/bg/calendars.yml +3 -1
  62. data/resources/locales/bg/currencies.yml +1 -4
  63. data/resources/locales/bg/languages.yml +1 -1
  64. data/resources/locales/bg/numbers.yml +1 -0
  65. data/resources/locales/bg/timezones.yml +3 -0
  66. data/resources/locales/bg/units.yml +24 -15
  67. data/resources/locales/bn/calendars.yml +3 -1
  68. data/resources/locales/bn/currencies.yml +1 -3
  69. data/resources/locales/bn/languages.yml +1 -1
  70. data/resources/locales/bn/numbers.yml +1 -0
  71. data/resources/locales/bn/timezones.yml +3 -0
  72. data/resources/locales/bn/units.yml +126 -24
  73. data/resources/locales/bo/calendars.yml +98 -15
  74. data/resources/locales/bo/currencies.yml +1 -7
  75. data/resources/locales/bo/numbers.yml +1 -0
  76. data/resources/locales/bo/units.yml +8 -16
  77. data/resources/locales/bs/calendars.yml +3 -2
  78. data/resources/locales/bs/currencies.yml +1 -3
  79. data/resources/locales/bs/fields.yml +2 -2
  80. data/resources/locales/bs/languages.yml +5 -1
  81. data/resources/locales/bs/numbers.yml +1 -0
  82. data/resources/locales/bs/timezones.yml +3 -0
  83. data/resources/locales/bs/units.yml +36 -20
  84. data/resources/locales/ca/calendars.yml +1 -0
  85. data/resources/locales/ca/currencies.yml +79 -81
  86. data/resources/locales/ca/languages.yml +1 -1
  87. data/resources/locales/ca/numbers.yml +1 -0
  88. data/resources/locales/ca/territories.yml +7 -7
  89. data/resources/locales/ca/timezones.yml +3 -0
  90. data/resources/locales/ca/units.yml +52 -68
  91. data/resources/locales/cs/calendars.yml +1 -0
  92. data/resources/locales/cs/currencies.yml +1 -1
  93. data/resources/locales/cs/languages.yml +1 -1
  94. data/resources/locales/cs/numbers.yml +1 -0
  95. data/resources/locales/cs/timezones.yml +3 -0
  96. data/resources/locales/cs/units.yml +417 -190
  97. data/resources/locales/cy/calendars.yml +4 -0
  98. data/resources/locales/cy/currencies.yml +1 -4
  99. data/resources/locales/cy/fields.yml +3 -3
  100. data/resources/locales/cy/languages.yml +2 -2
  101. data/resources/locales/cy/numbers.yml +1 -0
  102. data/resources/locales/cy/timezones.yml +3 -0
  103. data/resources/locales/cy/units.yml +339 -111
  104. data/resources/locales/da/calendars.yml +2 -1
  105. data/resources/locales/da/currencies.yml +6 -8
  106. data/resources/locales/da/languages.yml +1 -1
  107. data/resources/locales/da/numbers.yml +1 -0
  108. data/resources/locales/da/timezones.yml +3 -0
  109. data/resources/locales/da/units.yml +101 -49
  110. data/resources/locales/de/calendars.yml +5 -0
  111. data/resources/locales/de/currencies.yml +1 -1
  112. data/resources/locales/de/languages.yml +2 -2
  113. data/resources/locales/de/numbers.yml +1 -0
  114. data/resources/locales/de/rbnf.yml +65 -2
  115. data/resources/locales/de/timezones.yml +3 -0
  116. data/resources/locales/de/units.yml +181 -108
  117. data/resources/locales/de-AT/calendars.yml +3 -0
  118. data/resources/locales/de-AT/currencies.yml +1 -1
  119. data/resources/locales/de-AT/languages.yml +2 -2
  120. data/resources/locales/de-AT/numbers.yml +1 -0
  121. data/resources/locales/de-AT/timezones.yml +3 -0
  122. data/resources/locales/de-AT/units.yml +181 -108
  123. data/resources/locales/de-CH/calendars.yml +5 -0
  124. data/resources/locales/de-CH/currencies.yml +1 -1
  125. data/resources/locales/de-CH/languages.yml +2 -2
  126. data/resources/locales/de-CH/numbers.yml +1 -0
  127. data/resources/locales/de-CH/timezones.yml +3 -0
  128. data/resources/locales/de-CH/units.yml +183 -110
  129. data/resources/locales/el/calendars.yml +12 -10
  130. data/resources/locales/el/currencies.yml +3 -5
  131. data/resources/locales/el/fields.yml +4 -0
  132. data/resources/locales/el/languages.yml +4 -4
  133. data/resources/locales/el/numbers.yml +1 -0
  134. data/resources/locales/el/timezones.yml +3 -0
  135. data/resources/locales/el/units.yml +143 -118
  136. data/resources/locales/en/calendars.yml +105 -11
  137. data/resources/locales/en/currencies.yml +1 -5
  138. data/resources/locales/en/languages.yml +2 -2
  139. data/resources/locales/en/numbers.yml +1 -0
  140. data/resources/locales/en/timezones.yml +3 -0
  141. data/resources/locales/en/units.yml +42 -30
  142. data/resources/locales/en-001/calendars.yml +95 -11
  143. data/resources/locales/en-001/currencies.yml +1 -5
  144. data/resources/locales/en-001/languages.yml +2 -2
  145. data/resources/locales/en-001/numbers.yml +1 -0
  146. data/resources/locales/en-001/timezones.yml +3 -0
  147. data/resources/locales/en-001/units.yml +41 -27
  148. data/resources/locales/en-150/calendars.yml +95 -11
  149. data/resources/locales/en-150/currencies.yml +1 -5
  150. data/resources/locales/en-150/languages.yml +2 -2
  151. data/resources/locales/en-150/numbers.yml +1 -0
  152. data/resources/locales/en-150/timezones.yml +3 -0
  153. data/resources/locales/en-150/units.yml +41 -27
  154. data/resources/locales/en-AU/calendars.yml +5 -0
  155. data/resources/locales/en-AU/currencies.yml +0 -4
  156. data/resources/locales/en-AU/languages.yml +4 -4
  157. data/resources/locales/en-AU/numbers.yml +1 -0
  158. data/resources/locales/en-AU/timezones.yml +3 -0
  159. data/resources/locales/en-AU/units.yml +49 -35
  160. data/resources/locales/en-CA/calendars.yml +128 -49
  161. data/resources/locales/en-CA/currencies.yml +12 -17
  162. data/resources/locales/en-CA/fields.yml +110 -113
  163. data/resources/locales/en-CA/languages.yml +2 -2
  164. data/resources/locales/en-CA/numbers.yml +2 -1
  165. data/resources/locales/en-CA/territories.yml +19 -19
  166. data/resources/locales/en-CA/timezones.yml +129 -40
  167. data/resources/locales/en-CA/units.yml +190 -178
  168. data/resources/locales/en-GB/calendars.yml +5 -0
  169. data/resources/locales/en-GB/currencies.yml +1 -5
  170. data/resources/locales/en-GB/languages.yml +2 -2
  171. data/resources/locales/en-GB/numbers.yml +1 -0
  172. data/resources/locales/en-GB/timezones.yml +3 -0
  173. data/resources/locales/en-GB/units.yml +41 -27
  174. data/resources/locales/en-IE/calendars.yml +95 -11
  175. data/resources/locales/en-IE/currencies.yml +1 -5
  176. data/resources/locales/en-IE/languages.yml +2 -2
  177. data/resources/locales/en-IE/numbers.yml +1 -0
  178. data/resources/locales/en-IE/timezones.yml +3 -0
  179. data/resources/locales/en-IE/units.yml +41 -27
  180. data/resources/locales/en-IN/calendars.yml +95 -11
  181. data/resources/locales/en-IN/currencies.yml +1 -5
  182. data/resources/locales/en-IN/languages.yml +2 -2
  183. data/resources/locales/en-IN/numbers.yml +25 -24
  184. data/resources/locales/en-IN/timezones.yml +3 -0
  185. data/resources/locales/en-IN/units.yml +41 -27
  186. data/resources/locales/en-NZ/calendars.yml +95 -11
  187. data/resources/locales/en-NZ/currencies.yml +1 -5
  188. data/resources/locales/en-NZ/languages.yml +1 -1
  189. data/resources/locales/en-NZ/numbers.yml +1 -0
  190. data/resources/locales/en-NZ/timezones.yml +3 -0
  191. data/resources/locales/en-NZ/units.yml +41 -27
  192. data/resources/locales/en-SG/calendars.yml +95 -11
  193. data/resources/locales/en-SG/currencies.yml +1 -5
  194. data/resources/locales/en-SG/languages.yml +2 -2
  195. data/resources/locales/en-SG/numbers.yml +1 -0
  196. data/resources/locales/en-SG/timezones.yml +3 -0
  197. data/resources/locales/en-SG/units.yml +41 -27
  198. data/resources/locales/en-US/calendars.yml +105 -11
  199. data/resources/locales/en-US/currencies.yml +1 -5
  200. data/resources/locales/en-US/languages.yml +2 -2
  201. data/resources/locales/en-US/numbers.yml +1 -0
  202. data/resources/locales/en-US/timezones.yml +3 -0
  203. data/resources/locales/en-US/units.yml +42 -30
  204. data/resources/locales/en-ZA/calendars.yml +95 -11
  205. data/resources/locales/en-ZA/currencies.yml +1 -5
  206. data/resources/locales/en-ZA/languages.yml +2 -2
  207. data/resources/locales/en-ZA/numbers.yml +1 -0
  208. data/resources/locales/en-ZA/timezones.yml +3 -0
  209. data/resources/locales/en-ZA/units.yml +41 -27
  210. data/resources/locales/eo/calendars.yml +105 -11
  211. data/resources/locales/eo/currencies.yml +1 -7
  212. data/resources/locales/eo/numbers.yml +1 -0
  213. data/resources/locales/eo/units.yml +274 -102
  214. data/resources/locales/es/calendars.yml +5 -3
  215. data/resources/locales/es/currencies.yml +21 -22
  216. data/resources/locales/es/fields.yml +8 -8
  217. data/resources/locales/es/languages.yml +3 -3
  218. data/resources/locales/es/numbers.yml +1 -0
  219. data/resources/locales/es/plural_rules.yml +2 -1
  220. data/resources/locales/es/plurals.yml +4 -1
  221. data/resources/locales/es/timezones.yml +6 -3
  222. data/resources/locales/es/units.yml +396 -34
  223. data/resources/locales/es-419/calendars.yml +41 -39
  224. data/resources/locales/es-419/currencies.yml +19 -20
  225. data/resources/locales/es-419/languages.yml +2 -2
  226. data/resources/locales/es-419/numbers.yml +1 -0
  227. data/resources/locales/es-419/plural_rules.yml +2 -1
  228. data/resources/locales/es-419/plurals.yml +4 -1
  229. data/resources/locales/es-419/timezones.yml +6 -3
  230. data/resources/locales/es-419/units.yml +370 -31
  231. data/resources/locales/es-AR/calendars.yml +35 -33
  232. data/resources/locales/es-AR/currencies.yml +19 -20
  233. data/resources/locales/es-AR/languages.yml +2 -2
  234. data/resources/locales/es-AR/numbers.yml +1 -0
  235. data/resources/locales/es-AR/plural_rules.yml +2 -1
  236. data/resources/locales/es-AR/plurals.yml +4 -1
  237. data/resources/locales/es-AR/timezones.yml +6 -3
  238. data/resources/locales/es-AR/units.yml +370 -31
  239. data/resources/locales/es-CO/calendars.yml +26 -24
  240. data/resources/locales/es-CO/currencies.yml +19 -20
  241. data/resources/locales/es-CO/languages.yml +2 -2
  242. data/resources/locales/es-CO/numbers.yml +1 -0
  243. data/resources/locales/es-CO/plural_rules.yml +2 -1
  244. data/resources/locales/es-CO/plurals.yml +4 -1
  245. data/resources/locales/es-CO/timezones.yml +6 -3
  246. data/resources/locales/es-CO/units.yml +368 -29
  247. data/resources/locales/es-MX/calendars.yml +37 -35
  248. data/resources/locales/es-MX/currencies.yml +17 -18
  249. data/resources/locales/es-MX/languages.yml +2 -2
  250. data/resources/locales/es-MX/numbers.yml +1 -0
  251. data/resources/locales/es-MX/plural_rules.yml +2 -1
  252. data/resources/locales/es-MX/plurals.yml +4 -1
  253. data/resources/locales/es-MX/timezones.yml +4 -1
  254. data/resources/locales/es-MX/units.yml +368 -29
  255. data/resources/locales/es-US/calendars.yml +43 -41
  256. data/resources/locales/es-US/currencies.yml +19 -20
  257. data/resources/locales/es-US/fields.yml +3 -3
  258. data/resources/locales/es-US/languages.yml +9 -9
  259. data/resources/locales/es-US/numbers.yml +25 -24
  260. data/resources/locales/es-US/plural_rules.yml +2 -1
  261. data/resources/locales/es-US/plurals.yml +4 -1
  262. data/resources/locales/es-US/territories.yml +2 -2
  263. data/resources/locales/es-US/timezones.yml +8 -5
  264. data/resources/locales/es-US/units.yml +381 -42
  265. data/resources/locales/et/calendars.yml +15 -14
  266. data/resources/locales/et/currencies.yml +3 -6
  267. data/resources/locales/et/languages.yml +1 -0
  268. data/resources/locales/et/numbers.yml +7 -6
  269. data/resources/locales/et/timezones.yml +3 -0
  270. data/resources/locales/et/units.yml +48 -27
  271. data/resources/locales/eu/calendars.yml +3 -1
  272. data/resources/locales/eu/currencies.yml +612 -23
  273. data/resources/locales/eu/fields.yml +8 -0
  274. data/resources/locales/eu/languages.yml +12 -7
  275. data/resources/locales/eu/numbers.yml +1 -0
  276. data/resources/locales/eu/timezones.yml +70 -1
  277. data/resources/locales/eu/units.yml +85 -13
  278. data/resources/locales/fa/calendars.yml +6 -5
  279. data/resources/locales/fa/currencies.yml +12 -12
  280. data/resources/locales/fa/languages.yml +2 -2
  281. data/resources/locales/fa/numbers.yml +14 -13
  282. data/resources/locales/fa/territories.yml +1 -1
  283. data/resources/locales/fa/timezones.yml +7 -4
  284. data/resources/locales/fa/units.yml +296 -147
  285. data/resources/locales/fi/calendars.yml +1 -0
  286. data/resources/locales/fi/currencies.yml +1 -2
  287. data/resources/locales/fi/languages.yml +1 -1
  288. data/resources/locales/fi/numbers.yml +1 -0
  289. data/resources/locales/fi/rbnf.yml +172 -0
  290. data/resources/locales/fi/timezones.yml +3 -0
  291. data/resources/locales/fi/units.yml +146 -84
  292. data/resources/locales/fil/calendars.yml +5 -3
  293. data/resources/locales/fil/currencies.yml +3 -5
  294. data/resources/locales/fil/fields.yml +24 -24
  295. data/resources/locales/fil/languages.yml +3 -2
  296. data/resources/locales/fil/numbers.yml +1 -0
  297. data/resources/locales/fil/timezones.yml +4 -1
  298. data/resources/locales/fil/units.yml +56 -16
  299. data/resources/locales/fr/calendars.yml +1 -0
  300. data/resources/locales/fr/currencies.yml +1 -2
  301. data/resources/locales/fr/languages.yml +1 -1
  302. data/resources/locales/fr/numbers.yml +1 -0
  303. data/resources/locales/fr/plural_rules.yml +2 -2
  304. data/resources/locales/fr/rbnf.yml +1 -1
  305. data/resources/locales/fr/timezones.yml +4 -1
  306. data/resources/locales/fr/units.yml +322 -103
  307. data/resources/locales/fr-BE/calendars.yml +1 -0
  308. data/resources/locales/fr-BE/currencies.yml +1 -2
  309. data/resources/locales/fr-BE/languages.yml +1 -1
  310. data/resources/locales/fr-BE/numbers.yml +1 -0
  311. data/resources/locales/fr-BE/plural_rules.yml +2 -2
  312. data/resources/locales/fr-BE/timezones.yml +4 -1
  313. data/resources/locales/fr-BE/units.yml +322 -103
  314. data/resources/locales/fr-CA/calendars.yml +1 -0
  315. data/resources/locales/fr-CA/currencies.yml +1 -2
  316. data/resources/locales/fr-CA/languages.yml +1 -1
  317. data/resources/locales/fr-CA/numbers.yml +1 -0
  318. data/resources/locales/fr-CA/plural_rules.yml +2 -2
  319. data/resources/locales/fr-CA/timezones.yml +3 -0
  320. data/resources/locales/fr-CA/units.yml +349 -124
  321. data/resources/locales/fr-CH/calendars.yml +1 -0
  322. data/resources/locales/fr-CH/currencies.yml +1 -2
  323. data/resources/locales/fr-CH/languages.yml +1 -1
  324. data/resources/locales/fr-CH/numbers.yml +1 -0
  325. data/resources/locales/fr-CH/plural_rules.yml +2 -2
  326. data/resources/locales/fr-CH/timezones.yml +4 -1
  327. data/resources/locales/fr-CH/units.yml +322 -103
  328. data/resources/locales/ga/calendars.yml +12 -7
  329. data/resources/locales/ga/currencies.yml +1 -3
  330. data/resources/locales/ga/fields.yml +5 -5
  331. data/resources/locales/ga/languages.yml +23 -22
  332. data/resources/locales/ga/numbers.yml +2 -1
  333. data/resources/locales/ga/territories.yml +10 -10
  334. data/resources/locales/ga/timezones.yml +41 -60
  335. data/resources/locales/ga/units.yml +33 -31
  336. data/resources/locales/gl/calendars.yml +3 -1
  337. data/resources/locales/gl/currencies.yml +7 -7
  338. data/resources/locales/gl/languages.yml +2 -1
  339. data/resources/locales/gl/numbers.yml +1 -0
  340. data/resources/locales/gl/timezones.yml +3 -0
  341. data/resources/locales/gl/units.yml +73 -14
  342. data/resources/locales/gu/calendars.yml +2 -1
  343. data/resources/locales/gu/currencies.yml +1 -4
  344. data/resources/locales/gu/languages.yml +1 -1
  345. data/resources/locales/gu/numbers.yml +1 -0
  346. data/resources/locales/gu/timezones.yml +3 -0
  347. data/resources/locales/gu/units.yml +59 -24
  348. data/resources/locales/he/calendars.yml +3 -1
  349. data/resources/locales/he/currencies.yml +39 -24
  350. data/resources/locales/he/fields.yml +4 -0
  351. data/resources/locales/he/languages.yml +4 -2
  352. data/resources/locales/he/numbers.yml +1 -0
  353. data/resources/locales/he/timezones.yml +3 -0
  354. data/resources/locales/he/units.yml +60 -38
  355. data/resources/locales/hi/calendars.yml +3 -1
  356. data/resources/locales/hi/currencies.yml +1 -4
  357. data/resources/locales/hi/languages.yml +2 -2
  358. data/resources/locales/hi/numbers.yml +1 -0
  359. data/resources/locales/hi/territories.yml +1 -1
  360. data/resources/locales/hi/timezones.yml +5 -1
  361. data/resources/locales/hi/units.yml +126 -23
  362. data/resources/locales/hr/calendars.yml +1 -0
  363. data/resources/locales/hr/currencies.yml +6 -6
  364. data/resources/locales/hr/languages.yml +1 -1
  365. data/resources/locales/hr/numbers.yml +4 -3
  366. data/resources/locales/hr/timezones.yml +3 -0
  367. data/resources/locales/hr/units.yml +141 -85
  368. data/resources/locales/hu/calendars.yml +1 -0
  369. data/resources/locales/hu/currencies.yml +4 -5
  370. data/resources/locales/hu/languages.yml +3 -2
  371. data/resources/locales/hu/numbers.yml +1 -0
  372. data/resources/locales/hu/timezones.yml +3 -0
  373. data/resources/locales/hu/units.yml +31 -27
  374. data/resources/locales/hy/calendars.yml +5 -3
  375. data/resources/locales/hy/currencies.yml +6 -4
  376. data/resources/locales/hy/languages.yml +2 -1
  377. data/resources/locales/hy/numbers.yml +1 -0
  378. data/resources/locales/hy/timezones.yml +3 -0
  379. data/resources/locales/hy/units.yml +141 -110
  380. data/resources/locales/id/calendars.yml +3 -2
  381. data/resources/locales/id/currencies.yml +1 -3
  382. data/resources/locales/id/fields.yml +12 -3
  383. data/resources/locales/id/languages.yml +2 -1
  384. data/resources/locales/id/numbers.yml +1 -0
  385. data/resources/locales/id/timezones.yml +47 -0
  386. data/resources/locales/id/units.yml +64 -67
  387. data/resources/locales/is/calendars.yml +1 -0
  388. data/resources/locales/is/currencies.yml +4 -6
  389. data/resources/locales/is/fields.yml +0 -14
  390. data/resources/locales/is/languages.yml +2 -2
  391. data/resources/locales/is/numbers.yml +1 -0
  392. data/resources/locales/is/units.yml +134 -112
  393. data/resources/locales/it/calendars.yml +1 -0
  394. data/resources/locales/it/currencies.yml +2 -3
  395. data/resources/locales/it/languages.yml +1 -0
  396. data/resources/locales/it/numbers.yml +1 -0
  397. data/resources/locales/it/plural_rules.yml +2 -1
  398. data/resources/locales/it/plurals.yml +4 -1
  399. data/resources/locales/it/rbnf.yml +1 -1
  400. data/resources/locales/it/timezones.yml +3 -0
  401. data/resources/locales/it/units.yml +412 -19
  402. data/resources/locales/it-CH/calendars.yml +1 -0
  403. data/resources/locales/it-CH/currencies.yml +2 -3
  404. data/resources/locales/it-CH/languages.yml +1 -0
  405. data/resources/locales/it-CH/numbers.yml +1 -0
  406. data/resources/locales/it-CH/plural_rules.yml +2 -1
  407. data/resources/locales/it-CH/plurals.yml +4 -1
  408. data/resources/locales/it-CH/timezones.yml +3 -0
  409. data/resources/locales/it-CH/units.yml +412 -19
  410. data/resources/locales/ja/calendars.yml +1 -0
  411. data/resources/locales/ja/currencies.yml +1 -2
  412. data/resources/locales/ja/languages.yml +1 -1
  413. data/resources/locales/ja/numbers.yml +2 -1
  414. data/resources/locales/ja/timezones.yml +3 -0
  415. data/resources/locales/ja/units.yml +126 -20
  416. data/resources/locales/ka/calendars.yml +3 -1
  417. data/resources/locales/ka/currencies.yml +5 -3
  418. data/resources/locales/ka/languages.yml +1 -1
  419. data/resources/locales/ka/numbers.yml +1 -0
  420. data/resources/locales/ka/timezones.yml +3 -0
  421. data/resources/locales/ka/units.yml +24 -10
  422. data/resources/locales/kk/calendars.yml +3 -1
  423. data/resources/locales/kk/currencies.yml +6 -4
  424. data/resources/locales/kk/languages.yml +3 -2
  425. data/resources/locales/kk/numbers.yml +1 -0
  426. data/resources/locales/kk/timezones.yml +3 -0
  427. data/resources/locales/kk/units.yml +20 -6
  428. data/resources/locales/km/calendars.yml +3 -1
  429. data/resources/locales/km/currencies.yml +6 -4
  430. data/resources/locales/km/languages.yml +2 -1
  431. data/resources/locales/km/numbers.yml +1 -0
  432. data/resources/locales/km/timezones.yml +3 -0
  433. data/resources/locales/km/units.yml +30 -19
  434. data/resources/locales/kn/calendars.yml +3 -1
  435. data/resources/locales/kn/currencies.yml +4 -7
  436. data/resources/locales/kn/languages.yml +1 -1
  437. data/resources/locales/kn/numbers.yml +1 -0
  438. data/resources/locales/kn/timezones.yml +4 -1
  439. data/resources/locales/kn/units.yml +344 -39
  440. data/resources/locales/ko/calendars.yml +3 -1
  441. data/resources/locales/ko/currencies.yml +2 -3
  442. data/resources/locales/ko/languages.yml +1 -1
  443. data/resources/locales/ko/numbers.yml +1 -0
  444. data/resources/locales/ko/territories.yml +1 -1
  445. data/resources/locales/ko/timezones.yml +3 -0
  446. data/resources/locales/ko/units.yml +20 -12
  447. data/resources/locales/lo/calendars.yml +7 -1
  448. data/resources/locales/lo/currencies.yml +1 -3
  449. data/resources/locales/lo/languages.yml +1 -1
  450. data/resources/locales/lo/numbers.yml +1 -0
  451. data/resources/locales/lo/timezones.yml +3 -0
  452. data/resources/locales/lo/units.yml +25 -26
  453. data/resources/locales/lt/calendars.yml +1 -0
  454. data/resources/locales/lt/currencies.yml +1 -3
  455. data/resources/locales/lt/languages.yml +1 -1
  456. data/resources/locales/lt/numbers.yml +1 -0
  457. data/resources/locales/lt/timezones.yml +3 -0
  458. data/resources/locales/lt/units.yml +153 -142
  459. data/resources/locales/lv/calendars.yml +2 -1
  460. data/resources/locales/lv/currencies.yml +1 -4
  461. data/resources/locales/lv/languages.yml +1 -1
  462. data/resources/locales/lv/numbers.yml +1 -0
  463. data/resources/locales/lv/timezones.yml +3 -0
  464. data/resources/locales/lv/units.yml +134 -132
  465. data/resources/locales/mk/calendars.yml +3 -2
  466. data/resources/locales/mk/currencies.yml +3 -4
  467. data/resources/locales/mk/languages.yml +2 -2
  468. data/resources/locales/mk/numbers.yml +7 -6
  469. data/resources/locales/mk/territories.yml +2 -2
  470. data/resources/locales/mk/timezones.yml +4 -1
  471. data/resources/locales/mk/units.yml +74 -241
  472. data/resources/locales/mr/calendars.yml +3 -1
  473. data/resources/locales/mr/currencies.yml +1 -5
  474. data/resources/locales/mr/languages.yml +1 -1
  475. data/resources/locales/mr/numbers.yml +1 -0
  476. data/resources/locales/mr/timezones.yml +3 -0
  477. data/resources/locales/mr/units.yml +55 -20
  478. data/resources/locales/ms/calendars.yml +1 -0
  479. data/resources/locales/ms/currencies.yml +1 -4
  480. data/resources/locales/ms/languages.yml +2 -2
  481. data/resources/locales/ms/numbers.yml +1 -0
  482. data/resources/locales/ms/timezones.yml +3 -0
  483. data/resources/locales/ms/units.yml +110 -13
  484. data/resources/locales/mt/calendars.yml +3 -1
  485. data/resources/locales/mt/currencies.yml +1 -4
  486. data/resources/locales/mt/languages.yml +1 -2
  487. data/resources/locales/mt/numbers.yml +1 -0
  488. data/resources/locales/mt/territories.yml +4 -4
  489. data/resources/locales/mt/units.yml +8 -16
  490. data/resources/locales/my/calendars.yml +15 -13
  491. data/resources/locales/my/currencies.yml +11 -9
  492. data/resources/locales/my/languages.yml +3 -2
  493. data/resources/locales/my/lists.yml +16 -16
  494. data/resources/locales/my/numbers.yml +1 -0
  495. data/resources/locales/my/timezones.yml +3 -0
  496. data/resources/locales/my/units.yml +20 -16
  497. data/resources/locales/nb/calendars.yml +2 -1
  498. data/resources/locales/nb/currencies.yml +1 -2
  499. data/resources/locales/nb/fields.yml +4 -4
  500. data/resources/locales/nb/languages.yml +2 -2
  501. data/resources/locales/nb/numbers.yml +2 -1
  502. data/resources/locales/nb/rbnf.yml +1 -928
  503. data/resources/locales/nb/timezones.yml +3 -0
  504. data/resources/locales/nb/units.yml +133 -67
  505. data/resources/locales/nl/calendars.yml +1 -0
  506. data/resources/locales/nl/currencies.yml +1 -1
  507. data/resources/locales/nl/languages.yml +3 -1
  508. data/resources/locales/nl/numbers.yml +1 -0
  509. data/resources/locales/nl/timezones.yml +3 -0
  510. data/resources/locales/nl/units.yml +55 -23
  511. data/resources/locales/nl-BE/calendars.yml +1 -0
  512. data/resources/locales/nl-BE/currencies.yml +1 -1
  513. data/resources/locales/nl-BE/languages.yml +3 -1
  514. data/resources/locales/nl-BE/numbers.yml +1 -0
  515. data/resources/locales/nl-BE/timezones.yml +3 -0
  516. data/resources/locales/nl-BE/units.yml +55 -23
  517. data/resources/locales/pl/calendars.yml +4 -2
  518. data/resources/locales/pl/currencies.yml +6 -6
  519. data/resources/locales/pl/languages.yml +1 -1
  520. data/resources/locales/pl/numbers.yml +1 -0
  521. data/resources/locales/pl/timezones.yml +4 -1
  522. data/resources/locales/pl/units.yml +219 -162
  523. data/resources/locales/pt/calendars.yml +40 -5
  524. data/resources/locales/pt/currencies.yml +4 -6
  525. data/resources/locales/pt/languages.yml +1 -1
  526. data/resources/locales/pt/numbers.yml +1 -0
  527. data/resources/locales/pt/plural_rules.yml +2 -1
  528. data/resources/locales/pt/plurals.yml +4 -1
  529. data/resources/locales/pt/rbnf.yml +52 -70
  530. data/resources/locales/pt/timezones.yml +3 -0
  531. data/resources/locales/pt/units.yml +28 -33
  532. data/resources/locales/pt-PT/calendars.yml +24 -3
  533. data/resources/locales/pt-PT/currencies.yml +4 -6
  534. data/resources/locales/pt-PT/languages.yml +1 -1
  535. data/resources/locales/pt-PT/numbers.yml +1 -0
  536. data/resources/locales/pt-PT/plural_rules.yml +2 -1
  537. data/resources/locales/pt-PT/plurals.yml +4 -1
  538. data/resources/locales/pt-PT/territories.yml +2 -2
  539. data/resources/locales/pt-PT/timezones.yml +3 -0
  540. data/resources/locales/pt-PT/units.yml +55 -41
  541. data/resources/locales/ro/calendars.yml +1 -0
  542. data/resources/locales/ro/currencies.yml +4 -5
  543. data/resources/locales/ro/languages.yml +3 -1
  544. data/resources/locales/ro/numbers.yml +1 -0
  545. data/resources/locales/ro/timezones.yml +3 -0
  546. data/resources/locales/ro/units.yml +104 -39
  547. data/resources/locales/ru/calendars.yml +9 -8
  548. data/resources/locales/ru/currencies.yml +6 -4
  549. data/resources/locales/ru/day_periods.yml +4 -4
  550. data/resources/locales/ru/languages.yml +2 -2
  551. data/resources/locales/ru/numbers.yml +1 -0
  552. data/resources/locales/ru/timezones.yml +3 -0
  553. data/resources/locales/ru/units.yml +297 -321
  554. data/resources/locales/sk/calendars.yml +5 -3
  555. data/resources/locales/sk/currencies.yml +1 -1
  556. data/resources/locales/sk/fields.yml +2 -2
  557. data/resources/locales/sk/languages.yml +1 -1
  558. data/resources/locales/sk/numbers.yml +1 -0
  559. data/resources/locales/sk/timezones.yml +3 -0
  560. data/resources/locales/sk/units.yml +198 -225
  561. data/resources/locales/sl/calendars.yml +7 -5
  562. data/resources/locales/sl/currencies.yml +6 -5
  563. data/resources/locales/sl/languages.yml +1 -1
  564. data/resources/locales/sl/numbers.yml +1 -0
  565. data/resources/locales/sl/timezones.yml +3 -0
  566. data/resources/locales/sl/units.yml +296 -234
  567. data/resources/locales/sq/calendars.yml +1 -0
  568. data/resources/locales/sq/currencies.yml +5 -5
  569. data/resources/locales/sq/languages.yml +6 -1
  570. data/resources/locales/sq/numbers.yml +1 -0
  571. data/resources/locales/sq/timezones.yml +3 -0
  572. data/resources/locales/sq/units.yml +53 -34
  573. data/resources/locales/sr/calendars.yml +26 -25
  574. data/resources/locales/sr/currencies.yml +185 -187
  575. data/resources/locales/sr/fields.yml +2 -8
  576. data/resources/locales/sr/languages.yml +1 -1
  577. data/resources/locales/sr/numbers.yml +1 -0
  578. data/resources/locales/sr/timezones.yml +3 -0
  579. data/resources/locales/sr/units.yml +123 -78
  580. data/resources/locales/sr-Cyrl-ME/calendars.yml +19 -18
  581. data/resources/locales/sr-Cyrl-ME/currencies.yml +185 -187
  582. data/resources/locales/sr-Cyrl-ME/fields.yml +2 -8
  583. data/resources/locales/sr-Cyrl-ME/languages.yml +1 -1
  584. data/resources/locales/sr-Cyrl-ME/numbers.yml +1 -0
  585. data/resources/locales/sr-Cyrl-ME/timezones.yml +3 -0
  586. data/resources/locales/sr-Cyrl-ME/units.yml +123 -78
  587. data/resources/locales/sr-Latn-ME/calendars.yml +201 -200
  588. data/resources/locales/sr-Latn-ME/currencies.yml +185 -187
  589. data/resources/locales/sr-Latn-ME/fields.yml +2 -8
  590. data/resources/locales/sr-Latn-ME/languages.yml +1 -1
  591. data/resources/locales/sr-Latn-ME/numbers.yml +1 -0
  592. data/resources/locales/sr-Latn-ME/timezones.yml +3 -0
  593. data/resources/locales/sr-Latn-ME/units.yml +660 -615
  594. data/resources/locales/sv/calendars.yml +1 -0
  595. data/resources/locales/sv/currencies.yml +4 -6
  596. data/resources/locales/sv/languages.yml +1 -1
  597. data/resources/locales/sv/numbers.yml +1 -0
  598. data/resources/locales/sv/timezones.yml +5 -2
  599. data/resources/locales/sv/units.yml +43 -297
  600. data/resources/locales/sw/calendars.yml +3 -1
  601. data/resources/locales/sw/currencies.yml +3 -5
  602. data/resources/locales/sw/languages.yml +2 -1
  603. data/resources/locales/sw/numbers.yml +1 -0
  604. data/resources/locales/sw/timezones.yml +3 -0
  605. data/resources/locales/sw/units.yml +20 -7
  606. data/resources/locales/ta/calendars.yml +5 -3
  607. data/resources/locales/ta/currencies.yml +2 -4
  608. data/resources/locales/ta/fields.yml +1 -1
  609. data/resources/locales/ta/languages.yml +1 -1
  610. data/resources/locales/ta/numbers.yml +1 -0
  611. data/resources/locales/ta/timezones.yml +3 -0
  612. data/resources/locales/ta/units.yml +505 -122
  613. data/resources/locales/th/calendars.yml +2 -12
  614. data/resources/locales/th/currencies.yml +1 -2
  615. data/resources/locales/th/languages.yml +1 -1
  616. data/resources/locales/th/numbers.yml +1 -0
  617. data/resources/locales/th/timezones.yml +3 -0
  618. data/resources/locales/th/units.yml +275 -16
  619. data/resources/locales/tr/calendars.yml +3 -1
  620. data/resources/locales/tr/currencies.yml +3 -2
  621. data/resources/locales/tr/languages.yml +1 -1
  622. data/resources/locales/tr/numbers.yml +1 -0
  623. data/resources/locales/tr/timezones.yml +3 -0
  624. data/resources/locales/tr/units.yml +56 -38
  625. data/resources/locales/uk/calendars.yml +8 -7
  626. data/resources/locales/uk/currencies.yml +5 -2
  627. data/resources/locales/uk/languages.yml +2 -6
  628. data/resources/locales/uk/numbers.yml +1 -0
  629. data/resources/locales/uk/timezones.yml +3 -0
  630. data/resources/locales/uk/units.yml +494 -299
  631. data/resources/locales/ur/calendars.yml +3 -1
  632. data/resources/locales/ur/currencies.yml +4 -6
  633. data/resources/locales/ur/languages.yml +2 -1
  634. data/resources/locales/ur/numbers.yml +1 -0
  635. data/resources/locales/ur/timezones.yml +3 -0
  636. data/resources/locales/ur/units.yml +53 -15
  637. data/resources/locales/vi/calendars.yml +1 -0
  638. data/resources/locales/vi/currencies.yml +2 -3
  639. data/resources/locales/vi/languages.yml +2 -2
  640. data/resources/locales/vi/numbers.yml +1 -0
  641. data/resources/locales/vi/timezones.yml +3 -0
  642. data/resources/locales/vi/units.yml +16 -17
  643. data/resources/locales/xh/calendars.yml +61 -7
  644. data/resources/locales/xh/currencies.yml +1 -7
  645. data/resources/locales/xh/numbers.yml +1 -0
  646. data/resources/locales/xh/units.yml +8 -16
  647. data/resources/locales/zh/calendars.yml +8 -6
  648. data/resources/locales/zh/currencies.yml +1 -1
  649. data/resources/locales/zh/languages.yml +1 -1
  650. data/resources/locales/zh/numbers.yml +1 -0
  651. data/resources/locales/zh/timezones.yml +4 -1
  652. data/resources/locales/zh/units.yml +31 -9
  653. data/resources/locales/zh-Hant/calendars.yml +18 -12
  654. data/resources/locales/zh-Hant/currencies.yml +1 -1
  655. data/resources/locales/zh-Hant/languages.yml +1 -1
  656. data/resources/locales/zh-Hant/numbers.yml +1 -0
  657. data/resources/locales/zh-Hant/timezones.yml +4 -1
  658. data/resources/locales/zh-Hant/units.yml +99 -14
  659. data/resources/locales/zu/calendars.yml +4 -2
  660. data/resources/locales/zu/currencies.yml +1 -4
  661. data/resources/locales/zu/fields.yml +0 -5
  662. data/resources/locales/zu/languages.yml +1 -1
  663. data/resources/locales/zu/numbers.yml +1 -0
  664. data/resources/locales/zu/timezones.yml +3 -0
  665. data/resources/locales/zu/units.yml +32 -20
  666. data/resources/shared/aliases.yml +4 -3
  667. data/resources/shared/bcp47_timezone_metadata.yml +3 -1
  668. data/resources/shared/hyphenation/ca.yml +1 -1
  669. data/resources/shared/hyphenation/de-AT.yml +1 -1
  670. data/resources/shared/hyphenation/de-CH.yml +1 -1
  671. data/resources/shared/hyphenation/de-DE.yml +1 -1
  672. data/resources/shared/hyphenation/eo.yml +3180 -0
  673. data/resources/shared/hyphenation/fr.yml +1 -1
  674. data/resources/shared/hyphenation/hr-HR.yml +1 -1
  675. data/resources/shared/hyphenation/hu-HU.yml +1439 -57
  676. data/resources/shared/hyphenation/mn-MN.yml +1000 -0
  677. data/resources/shared/hyphenation/sl-SI.yml +1 -1
  678. data/resources/shared/hyphenation/sq-AL.yml +14015 -0
  679. data/resources/shared/language_codes_table.dump +0 -0
  680. data/resources/shared/likely_subtags.yml +18 -9
  681. data/resources/shared/metazones.yml +9 -39
  682. data/resources/shared/numbering_systems.yml +3 -0
  683. data/resources/shared/parent_locales.yml +3 -2
  684. data/resources/shared/rbnf_root.yml +84 -2
  685. data/resources/shared/segments/dictionaries/laodict.dump +0 -0
  686. data/resources/shared/segments/rules/el/sentence.yml +574 -556
  687. data/resources/shared/segments/rules/en-US-POSIX/word.yml +416 -403
  688. data/resources/shared/segments/rules/ja/line.yml +804 -776
  689. data/resources/shared/segments/rules/ja/word.yml +416 -403
  690. data/resources/shared/segments/rules/root/grapheme.yml +407 -402
  691. data/resources/shared/segments/rules/root/line.yml +804 -776
  692. data/resources/shared/segments/rules/root/sentence.yml +574 -556
  693. data/resources/shared/segments/rules/root/word.yml +416 -403
  694. data/resources/shared/segments/rules/zh/line.yml +804 -776
  695. data/resources/shared/segments/rules/zh-Hant/line.yml +804 -776
  696. data/resources/shared/segments/tests/dictionary_tests/combined.yml +31 -42
  697. data/resources/shared/segments/tests/dictionary_tests/lo.yml +31 -42
  698. data/resources/shared/segments/tests/line_break_test.yml +2 -0
  699. data/resources/shared/transforms/Han-Latin.yml +57 -57
  700. data/resources/shared/transforms/Latin-ASCII.yml +51 -2
  701. data/resources/shared/transforms/Turkmen-Latin-BGN.yml +4 -4
  702. data/resources/shared/validity_data.yml +54 -10
  703. data/resources/unicode_data/blocks/ahom.yml +112 -0
  704. data/resources/unicode_data/blocks/arabic.yml +16 -0
  705. data/resources/unicode_data/blocks/arabic_extended_a.yml +192 -0
  706. data/resources/unicode_data/blocks/arabic_extended_b.yml +657 -0
  707. data/resources/unicode_data/blocks/arabic_presentation_forms_a.yml +320 -0
  708. data/resources/unicode_data/blocks/balinese.yml +48 -0
  709. data/resources/unicode_data/blocks/brahmi.yml +96 -0
  710. data/resources/unicode_data/blocks/cjk_unified_ideographs.yml +2 -2
  711. data/resources/unicode_data/blocks/cjk_unified_ideographs_extension_b.yml +2 -2
  712. data/resources/unicode_data/blocks/cjk_unified_ideographs_extension_c.yml +2 -2
  713. data/resources/unicode_data/blocks/combining_diacritical_marks_extended.yml +224 -0
  714. data/resources/unicode_data/blocks/combining_diacritical_marks_supplement.yml +16 -0
  715. data/resources/unicode_data/blocks/currency_symbols.yml +16 -0
  716. data/resources/unicode_data/blocks/cypro_minoan.yml +1585 -0
  717. data/resources/unicode_data/blocks/ethiopic_extended_b.yml +449 -0
  718. data/resources/unicode_data/blocks/geometric_shapes_extended.yml +16 -0
  719. data/resources/unicode_data/blocks/glagolitic.yml +32 -0
  720. data/resources/unicode_data/blocks/hanunoo.yml +2 -2
  721. data/resources/unicode_data/blocks/kaithi.yml +16 -0
  722. data/resources/unicode_data/blocks/kana_extended_a.yml +64 -0
  723. data/resources/unicode_data/blocks/kana_extended_b.yml +209 -0
  724. data/resources/unicode_data/blocks/kannada.yml +16 -0
  725. data/resources/unicode_data/blocks/latin_extended_d.yml +208 -0
  726. data/resources/unicode_data/blocks/latin_extended_f.yml +913 -0
  727. data/resources/unicode_data/blocks/latin_extended_g.yml +497 -0
  728. data/resources/unicode_data/blocks/mongolian.yml +16 -0
  729. data/resources/unicode_data/blocks/musical_symbols.yml +32 -0
  730. data/resources/unicode_data/blocks/old_uyghur.yml +417 -0
  731. data/resources/unicode_data/blocks/supplemental_punctuation.yml +176 -0
  732. data/resources/unicode_data/blocks/supplemental_symbols_and_pictographs.yml +32 -0
  733. data/resources/unicode_data/blocks/symbols_and_pictographs_extended_a.yml +496 -0
  734. data/resources/unicode_data/blocks/tagalog.yml +48 -0
  735. data/resources/unicode_data/blocks/takri.yml +16 -0
  736. data/resources/unicode_data/blocks/tangsa.yml +1425 -0
  737. data/resources/unicode_data/blocks/telugu.yml +32 -0
  738. data/resources/unicode_data/blocks/toto.yml +497 -0
  739. data/resources/unicode_data/blocks/transport_and_map_symbols.yml +48 -0
  740. data/resources/unicode_data/blocks/unified_canadian_aboriginal_syllabics_extended_a.yml +257 -0
  741. data/resources/unicode_data/blocks/vithkuqi.yml +1121 -0
  742. data/resources/unicode_data/blocks/znamenny_musical_notation.yml +2961 -0
  743. data/resources/unicode_data/blocks.yml +50 -2
  744. data/resources/unicode_data/casefolding.yml +160 -0
  745. data/resources/unicode_data/properties/Age/14.0/value.dump +0 -0
  746. data/resources/unicode_data/properties/Alphabetic/value.dump +0 -0
  747. data/resources/unicode_data/properties/Bidi_Class/AL/value.dump +0 -0
  748. data/resources/unicode_data/properties/Bidi_Class/AN/value.dump +0 -0
  749. data/resources/unicode_data/properties/Bidi_Class/ET/value.dump +1 -1
  750. data/resources/unicode_data/properties/Bidi_Class/L/value.dump +0 -0
  751. data/resources/unicode_data/properties/Bidi_Class/NSM/value.dump +0 -0
  752. data/resources/unicode_data/properties/Bidi_Class/ON/value.dump +0 -0
  753. data/resources/unicode_data/properties/Bidi_Class/R/value.dump +0 -0
  754. data/resources/unicode_data/properties/Bidi_Mirrored/N/value.dump +0 -0
  755. data/resources/unicode_data/properties/Bidi_Mirrored/Y/value.dump +3 -2
  756. data/resources/unicode_data/properties/Bidi_Paired_Bracket_Type/Close/value.dump +6 -2
  757. data/resources/unicode_data/properties/Bidi_Paired_Bracket_Type/Open/value.dump +6 -2
  758. data/resources/unicode_data/properties/Block/Ahom/value.dump +0 -0
  759. data/resources/unicode_data/properties/Block/Arabic Extended-B/value.dump +3 -0
  760. data/resources/unicode_data/properties/Block/Cypro-Minoan/value.dump +3 -0
  761. data/resources/unicode_data/properties/Block/Ethiopic Extended-B/value.dump +3 -0
  762. data/resources/unicode_data/properties/Block/Kana Extended-B/value.dump +3 -0
  763. data/resources/unicode_data/properties/Block/Latin Extended-F/value.dump +3 -0
  764. data/resources/unicode_data/properties/Block/Latin Extended-G/value.dump +0 -0
  765. data/resources/unicode_data/properties/Block/Old Uyghur/value.dump +3 -0
  766. data/resources/unicode_data/properties/Block/Tangsa/value.dump +3 -0
  767. data/resources/unicode_data/properties/Block/Tangut Supplement/value.dump +0 -0
  768. data/resources/unicode_data/properties/Block/Toto/value.dump +3 -0
  769. data/resources/unicode_data/properties/Block/Unified Canadian Aboriginal Syllabics Extended-A/value.dump +3 -0
  770. data/resources/unicode_data/properties/Block/Vithkuqi/value.dump +3 -0
  771. data/resources/unicode_data/properties/Block/Znamenny Musical Notation/value.dump +0 -0
  772. data/resources/unicode_data/properties/Canonical_Combining_Class/0/value.dump +0 -0
  773. data/resources/unicode_data/properties/Canonical_Combining_Class/218/value.dump +3 -2
  774. data/resources/unicode_data/properties/Canonical_Combining_Class/220/value.dump +9 -4
  775. data/resources/unicode_data/properties/Canonical_Combining_Class/230/value.dump +0 -0
  776. data/resources/unicode_data/properties/Canonical_Combining_Class/7/value.dump +3 -2
  777. data/resources/unicode_data/properties/Canonical_Combining_Class/9/value.dump +4 -3
  778. data/resources/unicode_data/properties/Case_Ignorable/value.dump +0 -0
  779. data/resources/unicode_data/properties/Cased/value.dump +0 -0
  780. data/resources/unicode_data/properties/Changes_When_Casefolded/value.dump +0 -0
  781. data/resources/unicode_data/properties/Changes_When_Casemapped/value.dump +0 -0
  782. data/resources/unicode_data/properties/Changes_When_Lowercased/value.dump +0 -0
  783. data/resources/unicode_data/properties/Changes_When_Titlecased/value.dump +13 -5
  784. data/resources/unicode_data/properties/Changes_When_Uppercased/value.dump +13 -5
  785. data/resources/unicode_data/properties/Dash/value.dump +0 -0
  786. data/resources/unicode_data/properties/Default_Ignorable_Code_Point/value.dump +0 -0
  787. data/resources/unicode_data/properties/Diacritic/value.dump +0 -0
  788. data/resources/unicode_data/properties/East_Asian_Width/N/value.dump +0 -0
  789. data/resources/unicode_data/properties/East_Asian_Width/W/value.dump +0 -0
  790. data/resources/unicode_data/properties/Emoji/value.dump +0 -0
  791. data/resources/unicode_data/properties/Emoji_Modifier_Base/value.dump +4 -2
  792. data/resources/unicode_data/properties/Emoji_Presentation/value.dump +0 -0
  793. data/resources/unicode_data/properties/Extender/value.dump +3 -2
  794. data/resources/unicode_data/properties/General_Category/C/f/value.dump +0 -0
  795. data/resources/unicode_data/properties/General_Category/L/l/value.dump +0 -0
  796. data/resources/unicode_data/properties/General_Category/L/m/value.dump +13 -5
  797. data/resources/unicode_data/properties/General_Category/L/o/value.dump +0 -0
  798. data/resources/unicode_data/properties/General_Category/L/u/value.dump +0 -0
  799. data/resources/unicode_data/properties/General_Category/M/c/value.dump +0 -0
  800. data/resources/unicode_data/properties/General_Category/M/n/value.dump +0 -0
  801. data/resources/unicode_data/properties/General_Category/N/d/value.dump +0 -0
  802. data/resources/unicode_data/properties/General_Category/P/d/value.dump +0 -0
  803. data/resources/unicode_data/properties/General_Category/P/e/value.dump +6 -2
  804. data/resources/unicode_data/properties/General_Category/P/o/value.dump +0 -0
  805. data/resources/unicode_data/properties/General_Category/P/s/value.dump +6 -2
  806. data/resources/unicode_data/properties/General_Category/S/c/value.dump +1 -1
  807. data/resources/unicode_data/properties/General_Category/S/k/value.dump +0 -0
  808. data/resources/unicode_data/properties/General_Category/S/o/value.dump +0 -0
  809. data/resources/unicode_data/properties/Grapheme_Base/value.dump +0 -0
  810. data/resources/unicode_data/properties/Grapheme_Cluster_Break/Extend/value.dump +0 -0
  811. data/resources/unicode_data/properties/Grapheme_Cluster_Break/Prepend/value.dump +0 -0
  812. data/resources/unicode_data/properties/Grapheme_Cluster_Break/SpacingMark/value.dump +0 -0
  813. data/resources/unicode_data/properties/Grapheme_Extend/value.dump +0 -0
  814. data/resources/unicode_data/properties/Grapheme_Link/value.dump +4 -3
  815. data/resources/unicode_data/properties/ID_Continue/value.dump +0 -0
  816. data/resources/unicode_data/properties/ID_Start/value.dump +0 -0
  817. data/resources/unicode_data/properties/Ideographic/value.dump +0 -0
  818. data/resources/unicode_data/properties/Indic_Positional_Category/Bottom/value.dump +6 -4
  819. data/resources/unicode_data/properties/Indic_Positional_Category/Right/value.dump +0 -0
  820. data/resources/unicode_data/properties/Indic_Positional_Category/Top/value.dump +0 -0
  821. data/resources/unicode_data/properties/Indic_Syllabic_Category/Consonant/value.dump +0 -0
  822. data/resources/unicode_data/properties/Indic_Syllabic_Category/Consonant_Dead/value.dump +4 -2
  823. data/resources/unicode_data/properties/Indic_Syllabic_Category/Consonant_Final/value.dump +6 -3
  824. data/resources/unicode_data/properties/Indic_Syllabic_Category/Consonant_Succeeding_Repha/value.dump +2 -5
  825. data/resources/unicode_data/properties/Indic_Syllabic_Category/Nukta/value.dump +3 -2
  826. data/resources/unicode_data/properties/Indic_Syllabic_Category/Pure_Killer/value.dump +4 -3
  827. data/resources/unicode_data/properties/Indic_Syllabic_Category/Vowel_Dependent/value.dump +5 -3
  828. data/resources/unicode_data/properties/Indic_Syllabic_Category/Vowel_Independent/value.dump +0 -0
  829. data/resources/unicode_data/properties/Joining_Group/ALEF/value.dump +3 -2
  830. data/resources/unicode_data/properties/Joining_Group/GAF/value.dump +5 -3
  831. data/resources/unicode_data/properties/Joining_Group/HAH/value.dump +3 -2
  832. data/resources/unicode_data/properties/Joining_Group/NOON/value.dump +3 -2
  833. data/resources/unicode_data/properties/Joining_Group/No_Joining_Group/value.dump +0 -0
  834. data/resources/unicode_data/properties/Joining_Group/QAF/value.dump +4 -2
  835. data/resources/unicode_data/properties/Joining_Group/TAH/value.dump +3 -2
  836. data/resources/unicode_data/properties/Joining_Group/THIN YEH/value.dump +3 -0
  837. data/resources/unicode_data/properties/Joining_Group/VERTICAL TAIL/value.dump +3 -0
  838. data/resources/unicode_data/properties/Joining_Type/Dual_Joining/value.dump +0 -0
  839. data/resources/unicode_data/properties/Joining_Type/Join_Causing/value.dump +4 -2
  840. data/resources/unicode_data/properties/Joining_Type/Non_Joining/value.dump +0 -0
  841. data/resources/unicode_data/properties/Joining_Type/Right_Joining/value.dump +6 -3
  842. data/resources/unicode_data/properties/Line_Break/AL/value.dump +0 -0
  843. data/resources/unicode_data/properties/Line_Break/BA/value.dump +0 -0
  844. data/resources/unicode_data/properties/Line_Break/CL/value.dump +6 -2
  845. data/resources/unicode_data/properties/Line_Break/CM/value.dump +0 -0
  846. data/resources/unicode_data/properties/Line_Break/EB/value.dump +4 -2
  847. data/resources/unicode_data/properties/Line_Break/EX/value.dump +4 -3
  848. data/resources/unicode_data/properties/Line_Break/ID/value.dump +0 -0
  849. data/resources/unicode_data/properties/Line_Break/NU/value.dump +0 -0
  850. data/resources/unicode_data/properties/Line_Break/OP/value.dump +6 -2
  851. data/resources/unicode_data/properties/Line_Break/PO/value.dump +3 -2
  852. data/resources/unicode_data/properties/Line_Break/PR/value.dump +2 -1
  853. data/resources/unicode_data/properties/Line_Break/SA/value.dump +0 -0
  854. data/resources/unicode_data/properties/Lowercase/value.dump +0 -0
  855. data/resources/unicode_data/properties/Numeric_Type/0/value.dump +0 -0
  856. data/resources/unicode_data/properties/Numeric_Type/1/value.dump +3 -2
  857. data/resources/unicode_data/properties/Numeric_Type/2/value.dump +3 -2
  858. data/resources/unicode_data/properties/Numeric_Type/3/value.dump +3 -2
  859. data/resources/unicode_data/properties/Numeric_Type/4/value.dump +3 -2
  860. data/resources/unicode_data/properties/Numeric_Type/5/value.dump +3 -2
  861. data/resources/unicode_data/properties/Numeric_Type/6/value.dump +3 -2
  862. data/resources/unicode_data/properties/Numeric_Type/7/value.dump +3 -2
  863. data/resources/unicode_data/properties/Numeric_Type/8/value.dump +3 -2
  864. data/resources/unicode_data/properties/Numeric_Type/9/value.dump +3 -2
  865. data/resources/unicode_data/properties/Numeric_Type/value.dump +0 -0
  866. data/resources/unicode_data/properties/Other_Alphabetic/value.dump +0 -0
  867. data/resources/unicode_data/properties/Other_Lowercase/value.dump +6 -2
  868. data/resources/unicode_data/properties/Prepended_Concatenation_Mark/value.dump +0 -0
  869. data/resources/unicode_data/properties/Script/Ahom/value.dump +0 -0
  870. data/resources/unicode_data/properties/Script/Arabic/value.dump +0 -0
  871. data/resources/unicode_data/properties/Script/Balinese/value.dump +0 -0
  872. data/resources/unicode_data/properties/Script/Brahmi/value.dump +0 -0
  873. data/resources/unicode_data/properties/Script/Canadian_Aboriginal/value.dump +0 -0
  874. data/resources/unicode_data/properties/Script/Common/value.dump +0 -0
  875. data/resources/unicode_data/properties/Script/Cypro_Minoan/value.dump +3 -0
  876. data/resources/unicode_data/properties/Script/Ethiopic/value.dump +0 -0
  877. data/resources/unicode_data/properties/Script/Glagolitic/value.dump +0 -0
  878. data/resources/unicode_data/properties/Script/Han/value.dump +0 -0
  879. data/resources/unicode_data/properties/Script/Hiragana/value.dump +0 -0
  880. data/resources/unicode_data/properties/Script/Inherited/value.dump +0 -0
  881. data/resources/unicode_data/properties/Script/Kaithi/value.dump +1 -1
  882. data/resources/unicode_data/properties/Script/Kannada/value.dump +1 -1
  883. data/resources/unicode_data/properties/Script/Katakana/value.dump +0 -0
  884. data/resources/unicode_data/properties/Script/Latin/value.dump +0 -0
  885. data/resources/unicode_data/properties/Script/Mongolian/value.dump +0 -0
  886. data/resources/unicode_data/properties/Script/Old_Uyghur/value.dump +3 -0
  887. data/resources/unicode_data/properties/Script/Tagalog/value.dump +0 -0
  888. data/resources/unicode_data/properties/Script/Takri/value.dump +1 -1
  889. data/resources/unicode_data/properties/Script/Tangsa/value.dump +4 -0
  890. data/resources/unicode_data/properties/Script/Telugu/value.dump +0 -0
  891. data/resources/unicode_data/properties/Script/Toto/value.dump +3 -0
  892. data/resources/unicode_data/properties/Script/Vithkuqi/value.dump +10 -0
  893. data/resources/unicode_data/properties/Script_Extensions/Adlm/value.dump +3 -2
  894. data/resources/unicode_data/properties/Script_Extensions/Arab/value.dump +3 -2
  895. data/resources/unicode_data/properties/Script_Extensions/Cpmn/value.dump +0 -0
  896. data/resources/unicode_data/properties/Script_Extensions/Mani/value.dump +5 -2
  897. data/resources/unicode_data/properties/Script_Extensions/Nkoo/value.dump +6 -0
  898. data/resources/unicode_data/properties/Script_Extensions/Ougr/value.dump +6 -0
  899. data/resources/unicode_data/properties/Script_Extensions/Syrc/value.dump +3 -2
  900. data/resources/unicode_data/properties/Sentence_Break/Close/value.dump +0 -0
  901. data/resources/unicode_data/properties/Sentence_Break/Extend/value.dump +0 -0
  902. data/resources/unicode_data/properties/Sentence_Break/Format/value.dump +0 -0
  903. data/resources/unicode_data/properties/Sentence_Break/Lower/value.dump +0 -0
  904. data/resources/unicode_data/properties/Sentence_Break/Numeric/value.dump +0 -0
  905. data/resources/unicode_data/properties/Sentence_Break/OLetter/value.dump +0 -0
  906. data/resources/unicode_data/properties/Sentence_Break/STerm/value.dump +0 -0
  907. data/resources/unicode_data/properties/Sentence_Break/Upper/value.dump +0 -0
  908. data/resources/unicode_data/properties/Sentence_Terminal/value.dump +0 -0
  909. data/resources/unicode_data/properties/Soft_Dotted/value.dump +3 -2
  910. data/resources/unicode_data/properties/Terminal_Punctuation/value.dump +0 -0
  911. data/resources/unicode_data/properties/Unified_Ideograph/value.dump +0 -0
  912. data/resources/unicode_data/properties/Uppercase/value.dump +0 -0
  913. data/resources/unicode_data/properties/Variation_Selector/value.dump +0 -0
  914. data/resources/unicode_data/properties/Word_Break/ALetter/value.dump +0 -0
  915. data/resources/unicode_data/properties/Word_Break/Extend/value.dump +0 -0
  916. data/resources/unicode_data/properties/Word_Break/Format/value.dump +0 -0
  917. data/resources/unicode_data/properties/Word_Break/Katakana/value.dump +0 -0
  918. data/resources/unicode_data/properties/Word_Break/Numeric/value.dump +0 -0
  919. data/resources/unicode_data/properties/XID_Continue/value.dump +0 -0
  920. data/resources/unicode_data/properties/XID_Start/value.dump +0 -0
  921. data/resources/unicode_data/property_value_aliases.yml +40 -0
  922. data/spec/formatters/calendars/datetime_formatter_spec.rb +2 -2
  923. data/spec/formatters/numbers/rbnf/locales/de/rbnf_test.yml +234 -0
  924. data/spec/formatters/numbers/rbnf/locales/fi/rbnf_test.yml +234 -0
  925. data/spec/formatters/numbers/rbnf/locales/pt/rbnf_test.yml +32 -32
  926. data/spec/localized/localized_date_spec.rb +0 -12
  927. data/spec/localized/localized_datetime_spec.rb +1 -15
  928. data/spec/localized/localized_time_spec.rb +0 -12
  929. data/spec/parsers/unicode_regex/character_set_spec.rb +2 -1
  930. data/spec/shared/calendar_spec.rb +8 -8
  931. data/spec/shared/unit_spec.rb +9 -9
  932. data/spec/timezones/tests/af.yml +3 -3
  933. data/spec/timezones/tests/ar.yml +3 -3
  934. data/spec/timezones/tests/az.yml +3 -3
  935. data/spec/timezones/tests/be.yml +3 -3
  936. data/spec/timezones/tests/bg.yml +3 -3
  937. data/spec/timezones/tests/bn.yml +3 -3
  938. data/spec/timezones/tests/bo.yml +3 -3
  939. data/spec/timezones/tests/bs.yml +3 -3
  940. data/spec/timezones/tests/ca.yml +17 -17
  941. data/spec/timezones/tests/cs.yml +3 -3
  942. data/spec/timezones/tests/cy.yml +3 -3
  943. data/spec/timezones/tests/da.yml +3 -3
  944. data/spec/timezones/tests/de-AT.yml +3 -3
  945. data/spec/timezones/tests/de-CH.yml +3 -3
  946. data/spec/timezones/tests/de.yml +3 -3
  947. data/spec/timezones/tests/el.yml +3 -3
  948. data/spec/timezones/tests/en-001.yml +3 -3
  949. data/spec/timezones/tests/en-150.yml +3 -3
  950. data/spec/timezones/tests/en-AU.yml +3 -3
  951. data/spec/timezones/tests/en-CA.yml +208 -208
  952. data/spec/timezones/tests/en-GB.yml +3 -3
  953. data/spec/timezones/tests/en-IE.yml +3 -3
  954. data/spec/timezones/tests/en-IN.yml +3 -3
  955. data/spec/timezones/tests/en-NZ.yml +3 -3
  956. data/spec/timezones/tests/en-SG.yml +3 -3
  957. data/spec/timezones/tests/en-US.yml +3 -3
  958. data/spec/timezones/tests/en-ZA.yml +3 -3
  959. data/spec/timezones/tests/en.yml +3 -3
  960. data/spec/timezones/tests/eo.yml +3 -3
  961. data/spec/timezones/tests/es-419.yml +6 -6
  962. data/spec/timezones/tests/es-AR.yml +6 -6
  963. data/spec/timezones/tests/es-CO.yml +6 -6
  964. data/spec/timezones/tests/es-MX.yml +4 -4
  965. data/spec/timezones/tests/es-US.yml +13 -13
  966. data/spec/timezones/tests/es.yml +6 -6
  967. data/spec/timezones/tests/et.yml +3 -3
  968. data/spec/timezones/tests/eu.yml +285 -285
  969. data/spec/timezones/tests/fa.yml +14 -14
  970. data/spec/timezones/tests/fi.yml +3 -3
  971. data/spec/timezones/tests/fil.yml +9 -9
  972. data/spec/timezones/tests/fr-BE.yml +11 -11
  973. data/spec/timezones/tests/fr-CA.yml +3 -3
  974. data/spec/timezones/tests/fr-CH.yml +11 -11
  975. data/spec/timezones/tests/fr.yml +11 -11
  976. data/spec/timezones/tests/ga.yml +190 -190
  977. data/spec/timezones/tests/gl.yml +3 -3
  978. data/spec/timezones/tests/gu.yml +3 -3
  979. data/spec/timezones/tests/he.yml +3 -3
  980. data/spec/timezones/tests/hi.yml +7 -7
  981. data/spec/timezones/tests/hr.yml +3 -3
  982. data/spec/timezones/tests/hu.yml +3 -3
  983. data/spec/timezones/tests/hy.yml +3 -3
  984. data/spec/timezones/tests/id.yml +287 -287
  985. data/spec/timezones/tests/is.yml +3 -3
  986. data/spec/timezones/tests/it-CH.yml +3 -3
  987. data/spec/timezones/tests/it.yml +3 -3
  988. data/spec/timezones/tests/ja.yml +3 -3
  989. data/spec/timezones/tests/ka.yml +3 -3
  990. data/spec/timezones/tests/kk.yml +3 -3
  991. data/spec/timezones/tests/km.yml +3 -3
  992. data/spec/timezones/tests/kn.yml +10 -10
  993. data/spec/timezones/tests/ko.yml +3 -3
  994. data/spec/timezones/tests/lo.yml +3 -3
  995. data/spec/timezones/tests/lt.yml +3 -3
  996. data/spec/timezones/tests/lv.yml +3 -3
  997. data/spec/timezones/tests/mk.yml +8 -8
  998. data/spec/timezones/tests/mr.yml +3 -3
  999. data/spec/timezones/tests/ms.yml +3 -3
  1000. data/spec/timezones/tests/mt.yml +13 -13
  1001. data/spec/timezones/tests/my.yml +3 -3
  1002. data/spec/timezones/tests/nb.yml +3 -3
  1003. data/spec/timezones/tests/nl-BE.yml +3 -3
  1004. data/spec/timezones/tests/nl.yml +3 -3
  1005. data/spec/timezones/tests/pl.yml +5 -5
  1006. data/spec/timezones/tests/pt-PT.yml +3 -3
  1007. data/spec/timezones/tests/pt.yml +3 -3
  1008. data/spec/timezones/tests/ro.yml +3 -3
  1009. data/spec/timezones/tests/ru.yml +3 -3
  1010. data/spec/timezones/tests/sk.yml +3 -3
  1011. data/spec/timezones/tests/sl.yml +3 -3
  1012. data/spec/timezones/tests/sq.yml +3 -3
  1013. data/spec/timezones/tests/sr-Cyrl-ME.yml +3 -3
  1014. data/spec/timezones/tests/sr-Latn-ME.yml +3 -3
  1015. data/spec/timezones/tests/sr.yml +3 -3
  1016. data/spec/timezones/tests/sv.yml +4 -4
  1017. data/spec/timezones/tests/sw.yml +3 -3
  1018. data/spec/timezones/tests/ta.yml +3 -3
  1019. data/spec/timezones/tests/th.yml +3 -3
  1020. data/spec/timezones/tests/tr.yml +3 -3
  1021. data/spec/timezones/tests/uk.yml +3 -3
  1022. data/spec/timezones/tests/ur.yml +3 -3
  1023. data/spec/timezones/tests/vi.yml +3 -3
  1024. data/spec/timezones/tests/xh.yml +3 -3
  1025. data/spec/timezones/tests/zh-Hant.yml +13 -13
  1026. data/spec/timezones/tests/zh.yml +13 -13
  1027. data/spec/timezones/tests/zu.yml +3 -3
  1028. data/spec/timezones/timezone_spec.rb +41 -0
  1029. data/spec/tokenizers/calendars/date_tokenizer_spec.rb +0 -18
  1030. metadata +47 -6
  1031. data/lib/twitter_cldr/tokenizers/composite_token.rb +0 -26
  1032. data/resources/custom/locales/en-AU/calendars.yml +0 -10
  1033. data/spec/tokenizers/composite_token_spec.rb +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86de4e3cfb05e54b776d518c6a4c6decb9aaa36ec36ae2593e487cb12d7299ad
4
- data.tar.gz: 8abd9399b1d44d30cd2cf818ef2c881b8dace4cf042b33e8a6086b02b5a0b561
3
+ metadata.gz: ce23d1d3e7d5428401b92b60c2570f8a2370e41beb32068fc0df7a6ce4959126
4
+ data.tar.gz: 595d913024e24dd3fd86426f12288c7040904f446291145e5ba92c0945a33d12
5
5
  SHA512:
6
- metadata.gz: 57f9bb2095d152659a1a34f9a1c565496ddc6ac00cf5148f322709b5236d2c201502d7b9988e8ef7373ecff507b8fac944423d2c9a18dc8e65613fee9faf7440
7
- data.tar.gz: 646cf95c956f2fa9655d4b96be566f4b59d18e5665ffe4bf04af3470aa0a75a9dbe1e163c74ed448eebed2b37ea98cd7e6c1b431e0b12c602a12a6cc47c438e4
6
+ metadata.gz: 402c8198faf70a1f72631e202278e2bf464a67c81d42dec357f0c474d078085054651b2bd166e1de6c1d078c83ddfbcc757de638affb3415e597d6283033465e
7
+ data.tar.gz: d06ad1e4fc3aac7d069d606b75c1bcde9261f53805d9441914a042a641ed83cd0e06caa8039e7f44308726f686cc02ebeb0aeda52a693d5dbbbd9da3c0b46694
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ gemspec
4
4
 
5
5
  group :development, :test do
6
6
  gem 'rake'
7
- gem 'pry-byebug'
7
+ gem 'pry-byebug' unless RUBY_PLATFORM == 'java'
8
8
  gem 'ruby-prof' unless RUBY_PLATFORM == 'java'
9
9
  gem 'regexp_parser', '~> 0.5'
10
10
  gem 'benchmark-ips'
@@ -13,7 +13,7 @@ group :development, :test do
13
13
  # gemspec allows any version, but most people are probably using 1.x, so
14
14
  # let's test and develop against that
15
15
  gem 'tzinfo', '< 2'
16
- gem 'tzinfo-data', '= 1.2020.4' # keep in sync with ICU
16
+ gem 'tzinfo-data', '= 1.2021.1' # try to keep in sync with ICU
17
17
  end
18
18
 
19
19
  group :development do
data/README.md CHANGED
@@ -92,7 +92,7 @@ TwitterCLDR supports formatting numbers with an attached unit, for example "12 d
92
92
 
93
93
  ```ruby
94
94
  12.localize.to_unit.length_mile # "12 miles"
95
- 12.localize(:ru).to_unit.length_mile # "12 миль"
95
+ 12.localize(:ru).to_unit.length_mile # "12 милях"
96
96
  ```
97
97
  Units support a few different forms, long, short, and narrow:
98
98
 
@@ -177,8 +177,8 @@ For English (and other languages), you can also specify an ordinal spellout:
177
177
  ```ruby
178
178
  DateTime.now.localize(:es).to_full_s # "viernes, 14 de febrero de 2014, 12:20:05 (tiempo universal coordinado)"
179
179
  DateTime.now.localize(:es).to_long_s # "14 de febrero de 2014, 12:20:05 UTC"
180
- DateTime.now.localize(:es).to_medium_s # "14 feb. 2014 12:20:05"
181
- DateTime.now.localize(:es).to_short_s # "14/2/14 12:20"
180
+ DateTime.now.localize(:es).to_medium_s # "14 feb 2014, 12:20:05"
181
+ DateTime.now.localize(:es).to_short_s # "14/2/14, 12:20"
182
182
 
183
183
  Time.now.localize(:es).to_full_s # "12:20:05 (tiempo universal coordinado)"
184
184
  Time.now.localize(:es).to_long_s # "12:20:05 UTC"
@@ -187,7 +187,7 @@ Time.now.localize(:es).to_short_s # "12:20"
187
187
 
188
188
  DateTime.now.localize(:es).to_date.to_full_s # "viernes, 14 de febrero de 2014"
189
189
  DateTime.now.localize(:es).to_date.to_long_s # "14 de febrero de 2014"
190
- DateTime.now.localize(:es).to_date.to_medium_s # "14 feb. 2014"
190
+ DateTime.now.localize(:es).to_date.to_medium_s # "14 feb 2014"
191
191
  DateTime.now.localize(:es).to_date.to_short_s # "14/2/14"
192
192
  ```
193
193
 
@@ -239,6 +239,7 @@ It's important to know that, even though any given format may not be available a
239
239
  | GyMMM | Feb 2014 CE |
240
240
  | GyMMMEd | Fri, Feb 14, 2014 CE |
241
241
  | GyMMMd | Feb 14, 2014 CE |
242
+ | GyMd | 2/14/2014 Common Era |
242
243
  | H | 12 |
243
244
  | Hm | 12:20 |
244
245
  | Hms | 12:20:05 |
@@ -246,7 +247,7 @@ It's important to know that, even though any given format may not be available a
246
247
  | Hmv | 12:20 GMT |
247
248
  | M | 2 |
248
249
  | MEd | Fri, 2/14 |
249
- | MMM | Feb |
250
+ | MMM | M02 |
250
251
  | MMMEd | Fri, Feb 14 |
251
252
  | MMMMW | week 3 of February |
252
253
  | MMMMd | February 14 |
@@ -366,6 +367,8 @@ tz.display_name_for(DateTime.new(2019, 11, 5), :generic_location)
366
367
  tz.display_name_for(DateTime.new(2019, 11, 5), :generic_long)
367
368
  ```
368
369
 
370
+ `#display_name_for` also accepts arguments for resolving ambiguous times. See [TZInfo Documentation](https://www.rubydoc.info/gems/tzinfo/TZInfo/Timezone#period_for_local-instance_method) for more information.
371
+
369
372
  ### Calendar Data
370
373
 
371
374
  CLDR contains a trove of calendar data, much of which can be accessed. One example is names of months, days, years.
@@ -416,8 +419,8 @@ Behind the scenes, these convenience methods use the `TwitterCldr::Formatters::P
416
419
  TwitterCldr::Formatters::Plurals::Rules.all # [:one, :other]
417
420
 
418
421
  # get all rules for a specific locale
419
- TwitterCldr::Formatters::Plurals::Rules.all_for(:es) # [:one, :other]
420
- TwitterCldr::Formatters::Plurals::Rules.all_for(:ru) # [:few, :many, :one, :other]
422
+ TwitterCldr::Formatters::Plurals::Rules.all_for(:es) # [:one, :many, :other]
423
+ TwitterCldr::Formatters::Plurals::Rules.all_for(:ru) # [:one, :few, :many, :other]
421
424
 
422
425
  # get the rule for a number in a specific locale
423
426
  TwitterCldr::Formatters::Plurals::Rules.rule_for(1, :ru) # :one
@@ -498,21 +501,21 @@ In addition to translating language codes, TwitterCLDR provides access to the fu
498
501
 
499
502
  ```ruby
500
503
  # get all languages for the default locale
501
- TwitterCldr::Shared::Languages.all # { ... :vi => "Vietnamese", :"zh-Hant" => "Traditional Mandarin Chinese" ... }
504
+ TwitterCldr::Shared::Languages.all # { ... :vi => "Vietnamese", :"zh-Hant" => "Traditional Chinese" ... }
502
505
 
503
506
  # get all languages for a specific locale
504
- TwitterCldr::Shared::Languages.all_for(:es) # { ... :vi => "vietnamita", :"zh-Hant" => "chino mandarín tradicional" ... }
507
+ TwitterCldr::Shared::Languages.all_for(:es) # { ... :vi => "vietnamita", :"zh-Hant" => "chino tradicional" ... }
505
508
 
506
509
  # get a language by its code for the default locale
507
- TwitterCldr::Shared::Languages.from_code(:'zh-Hant') # "Traditional Mandarin Chinese"
510
+ TwitterCldr::Shared::Languages.from_code(:'zh-Hant') # "Traditional Chinese"
508
511
 
509
512
  # get a language from its code for a specific locale
510
- TwitterCldr::Shared::Languages.from_code_for_locale(:'zh-Hant', :es) # "chino mandarín tradicional"
513
+ TwitterCldr::Shared::Languages.from_code_for_locale(:'zh-Hant', :es) # "chino tradicional"
511
514
 
512
515
  # translate a language from one locale to another
513
516
  # signature: translate_language(lang, source_locale, destination_locale)
514
- TwitterCldr::Shared::Languages.translate_language("chino tradicional", :es, :en) # "Traditional Mandarin Chinese"
515
- TwitterCldr::Shared::Languages.translate_language("Traditional Chinese", :en, :es) # "chino mandarín tradicional"
517
+ TwitterCldr::Shared::Languages.translate_language("chino tradicional", :es, :en) # "Traditional Chinese"
518
+ TwitterCldr::Shared::Languages.translate_language("Traditional Chinese", :en, :es) # "chino tradicional"
516
519
  ```
517
520
 
518
521
  ### World Territories
@@ -558,20 +561,20 @@ The CLDR contains postal code validation regexes for a number of countries.
558
561
 
559
562
  ```ruby
560
563
  # United States
561
- postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:us)
564
+ postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:us)
562
565
  postal_code.valid?("94103") # true
563
566
  postal_code.valid?("9410") # false
564
567
 
565
568
  # England (Great Britain)
566
- postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:gb)
569
+ postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:gb)
567
570
  postal_code.valid?("BS98 1TL") # true
568
571
 
569
572
  # Sweden
570
- postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:se)
573
+ postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:se)
571
574
  postal_code.valid?("280 12") # true
572
575
 
573
576
  # Canada
574
- postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:ca)
577
+ postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:ca)
575
578
  postal_code.valid?("V3H 1Z7") # true
576
579
  ```
577
580
 
@@ -579,7 +582,7 @@ Match all valid postal codes in a string with the `#find_all` method:
579
582
 
580
583
  ```ruby
581
584
  # United States
582
- postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:us)
585
+ postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:us)
583
586
  postal_code.find_all("12345 23456") # ["12345", "23456"]
584
587
  ```
585
588
 
@@ -592,14 +595,14 @@ TwitterCldr::Shared::PostalCodes.territories # [:ac, :ad, :af, :ai, :al, ... ]
592
595
  Just want the regex? No problem:
593
596
 
594
597
  ```ruby
595
- postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:us)
598
+ postal_code = TwitterCldr::Shared::PostalCodes.for_territory(:us)
596
599
  postal_code.regexp # /(\d{5})(?:[ \-](\d{4}))?/
597
600
  ```
598
601
 
599
602
  Get a sample of valid postal codes with the `#sample` method:
600
603
 
601
604
  ```ruby
602
- postal_code.sample(5) # ["29294", "22486-2369", "76632", "40800-9860", "06727-6194"]
605
+ postal_code.sample(5) # ["60668-3382", "36022", "22364-5670", "32142-1738", "32633-0502"]
603
606
  ```
604
607
 
605
608
  ### Phone Codes
@@ -1014,17 +1017,17 @@ The Psych gem that is the default YAML engine in Ruby 1.9 doesn't handle Unicode
1014
1017
  You can make use of TwitterCLDR's YAML dumper by calling `localize` and then `to_yaml` on an `Array`, `Hash`, or `String`:
1015
1018
 
1016
1019
  ```ruby
1017
- { :hello => "world" }.localize.to_yaml
1018
- ["hello", "world"].localize.to_yaml
1019
- "hello, world".localize.to_yaml
1020
+ { :hello => "world" }.localize.to_yaml
1021
+ ["hello", "world"].localize.to_yaml
1022
+ "hello, world".localize.to_yaml
1020
1023
  ```
1021
1024
 
1022
1025
  Behind the scenes, these convenience methods are using the `TwitterCldr::Shared::YAML` class. You can do the same thing if you're feeling adventurous:
1023
1026
 
1024
1027
  ```ruby
1025
- TwitterCldr::Shared::YAML.dump({ :hello => "world" })
1026
- TwitterCldr::Shared::YAML.dump(["hello", "world"])
1027
- TwitterCldr::Shared::YAML.dump("hello, world")
1028
+ TwitterCldr::Shared::YAML.dump({ :hello => "world" })
1029
+ TwitterCldr::Shared::YAML.dump(["hello", "world"])
1030
+ TwitterCldr::Shared::YAML.dump("hello, world")
1028
1031
  ```
1029
1032
 
1030
1033
  ## Adding New Locales
@@ -1070,7 +1073,7 @@ TwitterCldr.locale # will return :ru
1070
1073
 
1071
1074
  ## Compatibility
1072
1075
 
1073
- TwitterCLDR is fully compatible with Ruby 1.9.3, 2.0.0, 2.2.0.
1076
+ TwitterCLDR is fully compatible with Ruby 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0.
1074
1077
 
1075
1078
  ## Requirements
1076
1079
 
@@ -1103,6 +1106,6 @@ TwitterCLDR currently supports localization of certain textual objects in JavaSc
1103
1106
 
1104
1107
  ## License
1105
1108
 
1106
- Copyright 2019 Twitter, Inc.
1109
+ Copyright 2021 Twitter, Inc.
1107
1110
 
1108
1111
  Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ require 'rubygems/package_task'
13
13
 
14
14
  require './lib/twitter_cldr'
15
15
 
16
- require 'pry-byebug'
16
+ require 'pry-byebug' unless RUBY_PLATFORM == 'java'
17
17
 
18
18
  Bundler::GemHelper.install_tasks
19
19
 
@@ -141,6 +141,16 @@ namespace :update do
141
141
  TwitterCldr::Resources::UnicodePropertyAliasesImporter.new.import
142
142
  end
143
143
 
144
+ desc 'Import unit data'
145
+ task :units do
146
+ TwitterCldr::Resources::UnitsImporter.new.import
147
+ end
148
+
149
+ desc 'Import calendar data'
150
+ task :calendars do
151
+ TwitterCldr::Resources::CalendarsImporter.new.import
152
+ end
153
+
144
154
  desc 'Generate the casefolder class. Depends on unicode data'
145
155
  task :casefolder do
146
156
  TwitterCldr::Resources::CasefolderClassGenerator.new.import
@@ -26,10 +26,6 @@ module TwitterCldr
26
26
  token.value.gsub(/'([^']+)'/, '\1') # remove single-quote escaping for "real" characters
27
27
  end
28
28
 
29
- def format_composite(token, index, obj, options)
30
- eval(format(token.tokens, obj)).to_s
31
- end
32
-
33
29
  end
34
30
  end
35
31
  end
@@ -0,0 +1,222 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2012 Twitter, Inc
4
+ # http://www.apache.org/licenses/LICENSE-2.0
5
+
6
+ require 'nokogiri'
7
+ require 'fileutils'
8
+ require 'parallel'
9
+ require 'etc'
10
+ require 'set'
11
+
12
+ module TwitterCldr
13
+ module Resources
14
+
15
+ class CalendarsImporter < Importer
16
+
17
+ requirement :cldr, Versions.cldr_version
18
+ output_path 'locales'
19
+ locales TwitterCldr.supported_locales
20
+ ruby_engine :mri
21
+
22
+ private
23
+
24
+ def execute
25
+ locales = Set.new
26
+
27
+ finish = -> (locale, *) do
28
+ locales.add(locale)
29
+ STDOUT.write "\rImported #{locale}, #{locales.size} of #{params[:locales].size} total"
30
+ end
31
+
32
+ Parallel.each(params[:locales], in_processes: Etc.nprocessors, finish: finish) do |locale|
33
+ import_locale(locale)
34
+ locales << locale
35
+ end
36
+ end
37
+
38
+ def import_locale(locale)
39
+ data = requirements[:cldr].build_data(locale) do |ancestor_locale|
40
+ GregorianCalendar.new(ancestor_locale, requirements[:cldr]).to_h
41
+ end
42
+
43
+ output_file = File.join(output_path, locale.to_s, 'calendars.yml')
44
+ FileUtils.mkdir_p(File.dirname(output_file))
45
+
46
+ File.open(output_file, 'w:utf-8') do |output|
47
+ output.write(
48
+ TwitterCldr::Utils::YAML.dump(
49
+ TwitterCldr::Utils.deep_symbolize_keys(locale => data),
50
+ use_natural_symbols: true
51
+ )
52
+ )
53
+ end
54
+ end
55
+
56
+ def output_path
57
+ params.fetch(:output_path)
58
+ end
59
+
60
+ end
61
+
62
+
63
+ class GregorianCalendar
64
+ ERA_TAGS = ['eraNames', 'eraAbbr', 'eraNarrow'].freeze
65
+
66
+ attr_reader :locale, :cldr_req
67
+
68
+ def initialize(locale, cldr_req)
69
+ @locale = locale
70
+ @cldr_req = cldr_req
71
+ end
72
+
73
+ def to_h
74
+ {
75
+ calendars: {
76
+ gregorian: {
77
+ days: contexts('day'),
78
+ months: contexts('month'),
79
+ eras: eras,
80
+ quarters: contexts('quarter'),
81
+ periods: contexts('dayPeriod', group: "alt"),
82
+ fields: fields,
83
+ formats: {
84
+ date: formats('date'),
85
+ time: formats('time'),
86
+ datetime: formats('dateTime')
87
+ },
88
+ additional_formats: additional_formats
89
+ }
90
+ }
91
+ }
92
+ end
93
+
94
+ private
95
+
96
+ def calendar
97
+ @calendar ||= docset.xpath('//ldml/dates/calendars/calendar[@type="gregorian"]').first
98
+ end
99
+
100
+ def contexts(kind, options = {})
101
+ return {} unless calendar
102
+
103
+ dtd.find_attr("#{kind}Context", 'type').values.each_with_object({}) do |context, result|
104
+ node = calendar.xpath("#{kind}s/#{kind}Context[@type='#{context}']").first
105
+ next unless node
106
+
107
+ result[context] = widths(node, kind, context, options)
108
+ end
109
+ end
110
+
111
+ def widths(node, kind, context, options = {})
112
+ dtd.find_attr("#{kind}Width", 'type').values.each_with_object({}) do |width, result|
113
+ width_node = node.xpath("#{kind}Width[@type='#{width}']").first
114
+ next unless width_node
115
+
116
+ result[width] = elements(width_node, kind, context, width, options)
117
+ end
118
+ end
119
+
120
+ def elements(node, kind, context, width, options = {})
121
+ node.xpath(kind).each_with_object({}) do |node, result|
122
+ key = node.attribute('type').value
123
+ key = key =~ /^\d*$/ ? key.to_i : key.to_sym
124
+
125
+ if options[:group] && found_group = node.attribute(options[:group])
126
+ result[found_group.value] ||= {}
127
+ result[found_group.value][key] = node.content
128
+ else
129
+ result[key] = node.content
130
+ end
131
+ end
132
+ end
133
+
134
+ def periods
135
+ am = calendar.xpath("am").first
136
+ pm = calendar.xpath("pm").first
137
+
138
+ {}.tap do |result|
139
+ result[:am] = am.content if am
140
+ result[:pm] = pm.content if pm
141
+ end
142
+ end
143
+
144
+ def eras
145
+ return {} unless calendar
146
+
147
+ ERA_TAGS.each_with_object({}) do |era_tag, result|
148
+ key = era_tag.gsub('era', '').gsub(/s$/, '').downcase.to_sym
149
+ path = "eras/#{era_tag}"
150
+
151
+ result[key] = dtd.find_attr('era', 'type').values.each_with_object({}) do |type, ret|
152
+ node = calendar.xpath("#{path}/era[@type='#{type}' and @alt='variant']").first ||
153
+ calendar.xpath("#{path}/era[@type='#{type}']").first
154
+ ret[type] = node.content if node
155
+ ret
156
+ end
157
+ end
158
+ end
159
+
160
+ def formats(type)
161
+ return {} unless calendar
162
+
163
+ formats = dtd.find_attr("#{type}FormatLength", 'type').values.each_with_object({}) do |format_length, result|
164
+ node = calendar.xpath("#{type}Formats/#{type}FormatLength[@type='#{format_length}']").first
165
+ result[format_length] = pattern(node, type) if node
166
+ end
167
+
168
+ if default = default_format(type)
169
+ formats = default.merge(formats)
170
+ end
171
+
172
+ formats
173
+ end
174
+
175
+ def additional_formats
176
+ return {} unless calendar
177
+
178
+ dtd.find_attr('dateFormatItem', 'id').values.each_with_object({}) do |id, result|
179
+ node = calendar.xpath("dateTimeFormats/availableFormats/dateFormatItem[@id='#{id}']").first
180
+ result[id] = node.content if node
181
+ end
182
+ end
183
+
184
+ def default_format(type)
185
+ if node = calendar.xpath("#{type}Formats/default").first
186
+ key = node.attribute('choice').value.to_sym
187
+ { :default => :"calendars.gregorian.formats.#{type.downcase}.#{key}" }
188
+ end
189
+ end
190
+
191
+ def pattern(node, type)
192
+ node.xpath("#{type}Format/pattern").each_with_object({}) do |node, result|
193
+ pattern = node.content
194
+ pattern = pattern.gsub('{0}', '{{time}}').gsub('{1}', '{{date}}') if type == 'dateTime'
195
+ result[:pattern] = pattern
196
+ end
197
+ end
198
+
199
+ def fields
200
+ dtd.find_attr('field', 'type').values.each_with_object({}) do |field, result|
201
+ node = docset.xpath("//ldml/dates/fields/field[@type='#{field}']").first
202
+ name = node.xpath('displayName').first
203
+ result[field] = name.content if name
204
+ end
205
+ end
206
+
207
+ def docset
208
+ @docset ||= cldr_req.docset(cldr_main_path, locale)
209
+ end
210
+
211
+ def cldr_main_path
212
+ @cldr_main_path ||= File.join(cldr_req.common_path, 'main')
213
+ end
214
+
215
+ def dtd
216
+ cldr_req.dtd
217
+ end
218
+
219
+ end
220
+
221
+ end
222
+ end
@@ -0,0 +1,36 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2012 Twitter, Inc
4
+ # http://www.apache.org/licenses/LICENSE-2.0
5
+
6
+ require 'nokogiri'
7
+
8
+ module TwitterCldr
9
+ module Resources
10
+
11
+ class CldrDataBuilder
12
+ DEEP_MERGER = proc do |key, v1, v2|
13
+ Hash === v1 && Hash === v2 ? v1.merge(v2, &DEEP_MERGER) : (v2 || v1)
14
+ end
15
+
16
+ attr_reader :cldr_locale
17
+
18
+ def initialize(cldr_locale)
19
+ @cldr_locale = cldr_locale
20
+ end
21
+
22
+ def merge_each_ancestor
23
+ cldr_locale.ancestors.inject({}) do |result, ancestor_locale|
24
+ deep_merge(yield(ancestor_locale), result)
25
+ end
26
+ end
27
+
28
+ private
29
+
30
+ def deep_merge(h1, h2)
31
+ h1.merge(h2, &DEEP_MERGER)
32
+ end
33
+ end
34
+
35
+ end
36
+ end
@@ -0,0 +1,149 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2012 Twitter, Inc
4
+ # http://www.apache.org/licenses/LICENSE-2.0
5
+
6
+ require 'forwardable'
7
+ require 'nokogiri'
8
+
9
+ module TwitterCldr
10
+ module Resources
11
+ class CldrDocumentSet
12
+
13
+ class Element
14
+ extend Forwardable
15
+
16
+ def_delegators :@element, :attribute, :content, :name, :path
17
+
18
+ attr_reader :docset, :element
19
+
20
+ def initialize(docset, element)
21
+ @docset = docset
22
+ @element = element
23
+ end
24
+
25
+ def xpath(path)
26
+ path = CldrDocumentSet.join_xpaths(docset.path_for(element), path)
27
+ docset.xpath(path)
28
+ end
29
+ end
30
+
31
+ class ElementList
32
+ include Enumerable
33
+ extend Forwardable
34
+
35
+ def_delegators :@elements, :size
36
+
37
+ attr_reader :docset, :elements
38
+
39
+ def initialize(docset, elements)
40
+ @docset = docset
41
+ @elements = elements
42
+ end
43
+
44
+ def [](idx)
45
+ return unless elements[idx]
46
+
47
+ Element.new(docset, elements[idx])
48
+ end
49
+
50
+ def first
51
+ self[0]
52
+ end
53
+
54
+ def each
55
+ return to_enum(__method__) unless block_given?
56
+
57
+ elements.size.times do |idx|
58
+ yield self[idx]
59
+ end
60
+ end
61
+ end
62
+
63
+
64
+ def self.join_xpaths(*paths)
65
+ paths.map { |a| a.chomp('/') }.join('/')
66
+ end
67
+
68
+ attr_reader :path, :cldr_locale, :cldr_requirement
69
+
70
+ def initialize(path, cldr_locale, cldr_requirement)
71
+ @path = path
72
+ @cldr_locale = cldr_locale
73
+ @cldr_requirement = cldr_requirement
74
+ end
75
+
76
+
77
+ def xpath(path)
78
+ cldr_locale.ancestors.each do |ancestor_locale|
79
+ data = doc_for(ancestor_locale).xpath(path)
80
+
81
+ unless data.empty?
82
+ return ElementList.new(self, resolve_aliases_in(data))
83
+ end
84
+ end
85
+
86
+ ElementList.new(self, [])
87
+ end
88
+
89
+ def path_for(node)
90
+ orig_node = node
91
+ path = []
92
+
93
+ while node
94
+ path << selector_for(node)
95
+ node = node.parent
96
+ break if node.name == 'document'
97
+ end
98
+
99
+ "//#{path.reverse.join('/')}"
100
+ end
101
+
102
+ private
103
+
104
+ def resolve_aliases_in(data)
105
+ alias_nodes = data.xpath('.//alias')
106
+ alias_nodes.each do |alias_node|
107
+ alias_path = alias_node.attribute('path').value
108
+ full_path = join_xpaths(path_for(alias_node.parent), alias_path)
109
+
110
+ cldr_locale.ancestors.find do |ancestor_locale|
111
+ resolved_node = doc_for(ancestor_locale).xpath(full_path).first.dup
112
+
113
+ if resolved_node
114
+ resolved_copy = Nokogiri::XML(resolved_node.to_xml).children.first
115
+ parent = alias_node.parent
116
+ alias_node.replace(resolved_copy.children)
117
+ resolve_aliases_in(parent)
118
+ break
119
+ end
120
+ end
121
+ end
122
+
123
+ data
124
+ end
125
+
126
+ def join_xpaths(*paths)
127
+ self.class.join_xpaths(*paths)
128
+ end
129
+
130
+ def selector_for(node)
131
+ node.name.dup.tap do |selector|
132
+ if type = node.attribute('type')
133
+ selector << "[@type='#{type.value}']"
134
+ end
135
+ end
136
+ end
137
+
138
+ def doc_for(locale)
139
+ locale_fs = locale.to_s.gsub('-', '_')
140
+ docs[locale_fs] ||= Nokogiri.XML(File.read(File.join(path, "#{locale_fs}.xml")))
141
+ end
142
+
143
+ def docs
144
+ @docs ||= {}
145
+ end
146
+ end
147
+
148
+ end
149
+ end