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.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/README.md +31 -28
- data/Rakefile +11 -1
- data/lib/twitter_cldr/formatters/formatter.rb +0 -4
- data/lib/twitter_cldr/resources/calendars_importer.rb +222 -0
- data/lib/twitter_cldr/resources/cldr_data_builder.rb +36 -0
- data/lib/twitter_cldr/resources/cldr_document_set.rb +149 -0
- data/lib/twitter_cldr/resources/cldr_dtd.rb +110 -0
- data/lib/twitter_cldr/resources/cldr_locale.rb +78 -0
- data/lib/twitter_cldr/resources/language_codes_importer.rb +1 -1
- data/lib/twitter_cldr/resources/list_formats_importer.rb +1 -1
- data/lib/twitter_cldr/resources/locales_resources_importer.rb +0 -27
- data/lib/twitter_cldr/resources/number_formats_importer.rb +1 -1
- data/lib/twitter_cldr/resources/readme_renderer.rb +6 -2
- data/lib/twitter_cldr/resources/requirements/cldr_requirement.rb +32 -71
- data/lib/twitter_cldr/resources/requirements/unicode_requirement.rb +7 -3
- data/lib/twitter_cldr/resources/segment_dictionaries_importer.rb +6 -3
- data/lib/twitter_cldr/resources/territories_importer.rb +1 -1
- data/lib/twitter_cldr/resources/timezone_tests_importer.rb +8 -0
- data/lib/twitter_cldr/resources/timezones_importer.rb +1 -1
- data/lib/twitter_cldr/resources/unicode_property_aliases_importer.rb +2 -0
- data/lib/twitter_cldr/resources/units_importer.rb +134 -0
- data/lib/twitter_cldr/resources.rb +11 -2
- data/lib/twitter_cldr/shared/calendar.rb +2 -18
- data/lib/twitter_cldr/shared/casefolder.rb +53 -48
- data/lib/twitter_cldr/shared/unit.rb +2 -4
- data/lib/twitter_cldr/timezones/generic_location.rb +15 -15
- data/lib/twitter_cldr/timezones/gmt_location.rb +2 -2
- data/lib/twitter_cldr/timezones/iso8601_location.rb +2 -2
- data/lib/twitter_cldr/timezones/timezone.rb +11 -7
- data/lib/twitter_cldr/tokenizers/calendars/date_tokenizer.rb +0 -1
- data/lib/twitter_cldr/tokenizers/tokenizer.rb +7 -12
- data/lib/twitter_cldr/tokenizers.rb +0 -1
- data/lib/twitter_cldr/version.rb +1 -1
- data/lib/twitter_cldr/versions.rb +3 -3
- data/resources/locales/af/calendars.yml +1 -0
- data/resources/locales/af/currencies.yml +3 -6
- data/resources/locales/af/languages.yml +2 -1
- data/resources/locales/af/numbers.yml +1 -0
- data/resources/locales/af/timezones.yml +3 -0
- data/resources/locales/af/units.yml +513 -125
- data/resources/locales/ar/calendars.yml +3 -1
- data/resources/locales/ar/currencies.yml +2 -4
- data/resources/locales/ar/languages.yml +1 -1
- data/resources/locales/ar/numbers.yml +1 -0
- data/resources/locales/ar/timezones.yml +3 -0
- data/resources/locales/ar/units.yml +263 -122
- data/resources/locales/az/calendars.yml +3 -1
- data/resources/locales/az/currencies.yml +1 -3
- data/resources/locales/az/languages.yml +2 -2
- data/resources/locales/az/numbers.yml +1 -0
- data/resources/locales/az/timezones.yml +3 -0
- data/resources/locales/az/units.yml +116 -44
- data/resources/locales/be/calendars.yml +4 -2
- data/resources/locales/be/currencies.yml +7 -5
- data/resources/locales/be/languages.yml +2 -1
- data/resources/locales/be/numbers.yml +5 -4
- data/resources/locales/be/timezones.yml +3 -0
- data/resources/locales/be/units.yml +37 -7
- data/resources/locales/bg/calendars.yml +3 -1
- data/resources/locales/bg/currencies.yml +1 -4
- data/resources/locales/bg/languages.yml +1 -1
- data/resources/locales/bg/numbers.yml +1 -0
- data/resources/locales/bg/timezones.yml +3 -0
- data/resources/locales/bg/units.yml +24 -15
- data/resources/locales/bn/calendars.yml +3 -1
- data/resources/locales/bn/currencies.yml +1 -3
- data/resources/locales/bn/languages.yml +1 -1
- data/resources/locales/bn/numbers.yml +1 -0
- data/resources/locales/bn/timezones.yml +3 -0
- data/resources/locales/bn/units.yml +126 -24
- data/resources/locales/bo/calendars.yml +98 -15
- data/resources/locales/bo/currencies.yml +1 -7
- data/resources/locales/bo/numbers.yml +1 -0
- data/resources/locales/bo/units.yml +8 -16
- data/resources/locales/bs/calendars.yml +3 -2
- data/resources/locales/bs/currencies.yml +1 -3
- data/resources/locales/bs/fields.yml +2 -2
- data/resources/locales/bs/languages.yml +5 -1
- data/resources/locales/bs/numbers.yml +1 -0
- data/resources/locales/bs/timezones.yml +3 -0
- data/resources/locales/bs/units.yml +36 -20
- data/resources/locales/ca/calendars.yml +1 -0
- data/resources/locales/ca/currencies.yml +79 -81
- data/resources/locales/ca/languages.yml +1 -1
- data/resources/locales/ca/numbers.yml +1 -0
- data/resources/locales/ca/territories.yml +7 -7
- data/resources/locales/ca/timezones.yml +3 -0
- data/resources/locales/ca/units.yml +52 -68
- data/resources/locales/cs/calendars.yml +1 -0
- data/resources/locales/cs/currencies.yml +1 -1
- data/resources/locales/cs/languages.yml +1 -1
- data/resources/locales/cs/numbers.yml +1 -0
- data/resources/locales/cs/timezones.yml +3 -0
- data/resources/locales/cs/units.yml +417 -190
- data/resources/locales/cy/calendars.yml +4 -0
- data/resources/locales/cy/currencies.yml +1 -4
- data/resources/locales/cy/fields.yml +3 -3
- data/resources/locales/cy/languages.yml +2 -2
- data/resources/locales/cy/numbers.yml +1 -0
- data/resources/locales/cy/timezones.yml +3 -0
- data/resources/locales/cy/units.yml +339 -111
- data/resources/locales/da/calendars.yml +2 -1
- data/resources/locales/da/currencies.yml +6 -8
- data/resources/locales/da/languages.yml +1 -1
- data/resources/locales/da/numbers.yml +1 -0
- data/resources/locales/da/timezones.yml +3 -0
- data/resources/locales/da/units.yml +101 -49
- data/resources/locales/de/calendars.yml +5 -0
- data/resources/locales/de/currencies.yml +1 -1
- data/resources/locales/de/languages.yml +2 -2
- data/resources/locales/de/numbers.yml +1 -0
- data/resources/locales/de/rbnf.yml +65 -2
- data/resources/locales/de/timezones.yml +3 -0
- data/resources/locales/de/units.yml +181 -108
- data/resources/locales/de-AT/calendars.yml +3 -0
- data/resources/locales/de-AT/currencies.yml +1 -1
- data/resources/locales/de-AT/languages.yml +2 -2
- data/resources/locales/de-AT/numbers.yml +1 -0
- data/resources/locales/de-AT/timezones.yml +3 -0
- data/resources/locales/de-AT/units.yml +181 -108
- data/resources/locales/de-CH/calendars.yml +5 -0
- data/resources/locales/de-CH/currencies.yml +1 -1
- data/resources/locales/de-CH/languages.yml +2 -2
- data/resources/locales/de-CH/numbers.yml +1 -0
- data/resources/locales/de-CH/timezones.yml +3 -0
- data/resources/locales/de-CH/units.yml +183 -110
- data/resources/locales/el/calendars.yml +12 -10
- data/resources/locales/el/currencies.yml +3 -5
- data/resources/locales/el/fields.yml +4 -0
- data/resources/locales/el/languages.yml +4 -4
- data/resources/locales/el/numbers.yml +1 -0
- data/resources/locales/el/timezones.yml +3 -0
- data/resources/locales/el/units.yml +143 -118
- data/resources/locales/en/calendars.yml +105 -11
- data/resources/locales/en/currencies.yml +1 -5
- data/resources/locales/en/languages.yml +2 -2
- data/resources/locales/en/numbers.yml +1 -0
- data/resources/locales/en/timezones.yml +3 -0
- data/resources/locales/en/units.yml +42 -30
- data/resources/locales/en-001/calendars.yml +95 -11
- data/resources/locales/en-001/currencies.yml +1 -5
- data/resources/locales/en-001/languages.yml +2 -2
- data/resources/locales/en-001/numbers.yml +1 -0
- data/resources/locales/en-001/timezones.yml +3 -0
- data/resources/locales/en-001/units.yml +41 -27
- data/resources/locales/en-150/calendars.yml +95 -11
- data/resources/locales/en-150/currencies.yml +1 -5
- data/resources/locales/en-150/languages.yml +2 -2
- data/resources/locales/en-150/numbers.yml +1 -0
- data/resources/locales/en-150/timezones.yml +3 -0
- data/resources/locales/en-150/units.yml +41 -27
- data/resources/locales/en-AU/calendars.yml +5 -0
- data/resources/locales/en-AU/currencies.yml +0 -4
- data/resources/locales/en-AU/languages.yml +4 -4
- data/resources/locales/en-AU/numbers.yml +1 -0
- data/resources/locales/en-AU/timezones.yml +3 -0
- data/resources/locales/en-AU/units.yml +49 -35
- data/resources/locales/en-CA/calendars.yml +128 -49
- data/resources/locales/en-CA/currencies.yml +12 -17
- data/resources/locales/en-CA/fields.yml +110 -113
- data/resources/locales/en-CA/languages.yml +2 -2
- data/resources/locales/en-CA/numbers.yml +2 -1
- data/resources/locales/en-CA/territories.yml +19 -19
- data/resources/locales/en-CA/timezones.yml +129 -40
- data/resources/locales/en-CA/units.yml +190 -178
- data/resources/locales/en-GB/calendars.yml +5 -0
- data/resources/locales/en-GB/currencies.yml +1 -5
- data/resources/locales/en-GB/languages.yml +2 -2
- data/resources/locales/en-GB/numbers.yml +1 -0
- data/resources/locales/en-GB/timezones.yml +3 -0
- data/resources/locales/en-GB/units.yml +41 -27
- data/resources/locales/en-IE/calendars.yml +95 -11
- data/resources/locales/en-IE/currencies.yml +1 -5
- data/resources/locales/en-IE/languages.yml +2 -2
- data/resources/locales/en-IE/numbers.yml +1 -0
- data/resources/locales/en-IE/timezones.yml +3 -0
- data/resources/locales/en-IE/units.yml +41 -27
- data/resources/locales/en-IN/calendars.yml +95 -11
- data/resources/locales/en-IN/currencies.yml +1 -5
- data/resources/locales/en-IN/languages.yml +2 -2
- data/resources/locales/en-IN/numbers.yml +25 -24
- data/resources/locales/en-IN/timezones.yml +3 -0
- data/resources/locales/en-IN/units.yml +41 -27
- data/resources/locales/en-NZ/calendars.yml +95 -11
- data/resources/locales/en-NZ/currencies.yml +1 -5
- data/resources/locales/en-NZ/languages.yml +1 -1
- data/resources/locales/en-NZ/numbers.yml +1 -0
- data/resources/locales/en-NZ/timezones.yml +3 -0
- data/resources/locales/en-NZ/units.yml +41 -27
- data/resources/locales/en-SG/calendars.yml +95 -11
- data/resources/locales/en-SG/currencies.yml +1 -5
- data/resources/locales/en-SG/languages.yml +2 -2
- data/resources/locales/en-SG/numbers.yml +1 -0
- data/resources/locales/en-SG/timezones.yml +3 -0
- data/resources/locales/en-SG/units.yml +41 -27
- data/resources/locales/en-US/calendars.yml +105 -11
- data/resources/locales/en-US/currencies.yml +1 -5
- data/resources/locales/en-US/languages.yml +2 -2
- data/resources/locales/en-US/numbers.yml +1 -0
- data/resources/locales/en-US/timezones.yml +3 -0
- data/resources/locales/en-US/units.yml +42 -30
- data/resources/locales/en-ZA/calendars.yml +95 -11
- data/resources/locales/en-ZA/currencies.yml +1 -5
- data/resources/locales/en-ZA/languages.yml +2 -2
- data/resources/locales/en-ZA/numbers.yml +1 -0
- data/resources/locales/en-ZA/timezones.yml +3 -0
- data/resources/locales/en-ZA/units.yml +41 -27
- data/resources/locales/eo/calendars.yml +105 -11
- data/resources/locales/eo/currencies.yml +1 -7
- data/resources/locales/eo/numbers.yml +1 -0
- data/resources/locales/eo/units.yml +274 -102
- data/resources/locales/es/calendars.yml +5 -3
- data/resources/locales/es/currencies.yml +21 -22
- data/resources/locales/es/fields.yml +8 -8
- data/resources/locales/es/languages.yml +3 -3
- data/resources/locales/es/numbers.yml +1 -0
- data/resources/locales/es/plural_rules.yml +2 -1
- data/resources/locales/es/plurals.yml +4 -1
- data/resources/locales/es/timezones.yml +6 -3
- data/resources/locales/es/units.yml +396 -34
- data/resources/locales/es-419/calendars.yml +41 -39
- data/resources/locales/es-419/currencies.yml +19 -20
- data/resources/locales/es-419/languages.yml +2 -2
- data/resources/locales/es-419/numbers.yml +1 -0
- data/resources/locales/es-419/plural_rules.yml +2 -1
- data/resources/locales/es-419/plurals.yml +4 -1
- data/resources/locales/es-419/timezones.yml +6 -3
- data/resources/locales/es-419/units.yml +370 -31
- data/resources/locales/es-AR/calendars.yml +35 -33
- data/resources/locales/es-AR/currencies.yml +19 -20
- data/resources/locales/es-AR/languages.yml +2 -2
- data/resources/locales/es-AR/numbers.yml +1 -0
- data/resources/locales/es-AR/plural_rules.yml +2 -1
- data/resources/locales/es-AR/plurals.yml +4 -1
- data/resources/locales/es-AR/timezones.yml +6 -3
- data/resources/locales/es-AR/units.yml +370 -31
- data/resources/locales/es-CO/calendars.yml +26 -24
- data/resources/locales/es-CO/currencies.yml +19 -20
- data/resources/locales/es-CO/languages.yml +2 -2
- data/resources/locales/es-CO/numbers.yml +1 -0
- data/resources/locales/es-CO/plural_rules.yml +2 -1
- data/resources/locales/es-CO/plurals.yml +4 -1
- data/resources/locales/es-CO/timezones.yml +6 -3
- data/resources/locales/es-CO/units.yml +368 -29
- data/resources/locales/es-MX/calendars.yml +37 -35
- data/resources/locales/es-MX/currencies.yml +17 -18
- data/resources/locales/es-MX/languages.yml +2 -2
- data/resources/locales/es-MX/numbers.yml +1 -0
- data/resources/locales/es-MX/plural_rules.yml +2 -1
- data/resources/locales/es-MX/plurals.yml +4 -1
- data/resources/locales/es-MX/timezones.yml +4 -1
- data/resources/locales/es-MX/units.yml +368 -29
- data/resources/locales/es-US/calendars.yml +43 -41
- data/resources/locales/es-US/currencies.yml +19 -20
- data/resources/locales/es-US/fields.yml +3 -3
- data/resources/locales/es-US/languages.yml +9 -9
- data/resources/locales/es-US/numbers.yml +25 -24
- data/resources/locales/es-US/plural_rules.yml +2 -1
- data/resources/locales/es-US/plurals.yml +4 -1
- data/resources/locales/es-US/territories.yml +2 -2
- data/resources/locales/es-US/timezones.yml +8 -5
- data/resources/locales/es-US/units.yml +381 -42
- data/resources/locales/et/calendars.yml +15 -14
- data/resources/locales/et/currencies.yml +3 -6
- data/resources/locales/et/languages.yml +1 -0
- data/resources/locales/et/numbers.yml +7 -6
- data/resources/locales/et/timezones.yml +3 -0
- data/resources/locales/et/units.yml +48 -27
- data/resources/locales/eu/calendars.yml +3 -1
- data/resources/locales/eu/currencies.yml +612 -23
- data/resources/locales/eu/fields.yml +8 -0
- data/resources/locales/eu/languages.yml +12 -7
- data/resources/locales/eu/numbers.yml +1 -0
- data/resources/locales/eu/timezones.yml +70 -1
- data/resources/locales/eu/units.yml +85 -13
- data/resources/locales/fa/calendars.yml +6 -5
- data/resources/locales/fa/currencies.yml +12 -12
- data/resources/locales/fa/languages.yml +2 -2
- data/resources/locales/fa/numbers.yml +14 -13
- data/resources/locales/fa/territories.yml +1 -1
- data/resources/locales/fa/timezones.yml +7 -4
- data/resources/locales/fa/units.yml +296 -147
- data/resources/locales/fi/calendars.yml +1 -0
- data/resources/locales/fi/currencies.yml +1 -2
- data/resources/locales/fi/languages.yml +1 -1
- data/resources/locales/fi/numbers.yml +1 -0
- data/resources/locales/fi/rbnf.yml +172 -0
- data/resources/locales/fi/timezones.yml +3 -0
- data/resources/locales/fi/units.yml +146 -84
- data/resources/locales/fil/calendars.yml +5 -3
- data/resources/locales/fil/currencies.yml +3 -5
- data/resources/locales/fil/fields.yml +24 -24
- data/resources/locales/fil/languages.yml +3 -2
- data/resources/locales/fil/numbers.yml +1 -0
- data/resources/locales/fil/timezones.yml +4 -1
- data/resources/locales/fil/units.yml +56 -16
- data/resources/locales/fr/calendars.yml +1 -0
- data/resources/locales/fr/currencies.yml +1 -2
- data/resources/locales/fr/languages.yml +1 -1
- data/resources/locales/fr/numbers.yml +1 -0
- data/resources/locales/fr/plural_rules.yml +2 -2
- data/resources/locales/fr/rbnf.yml +1 -1
- data/resources/locales/fr/timezones.yml +4 -1
- data/resources/locales/fr/units.yml +322 -103
- data/resources/locales/fr-BE/calendars.yml +1 -0
- data/resources/locales/fr-BE/currencies.yml +1 -2
- data/resources/locales/fr-BE/languages.yml +1 -1
- data/resources/locales/fr-BE/numbers.yml +1 -0
- data/resources/locales/fr-BE/plural_rules.yml +2 -2
- data/resources/locales/fr-BE/timezones.yml +4 -1
- data/resources/locales/fr-BE/units.yml +322 -103
- data/resources/locales/fr-CA/calendars.yml +1 -0
- data/resources/locales/fr-CA/currencies.yml +1 -2
- data/resources/locales/fr-CA/languages.yml +1 -1
- data/resources/locales/fr-CA/numbers.yml +1 -0
- data/resources/locales/fr-CA/plural_rules.yml +2 -2
- data/resources/locales/fr-CA/timezones.yml +3 -0
- data/resources/locales/fr-CA/units.yml +349 -124
- data/resources/locales/fr-CH/calendars.yml +1 -0
- data/resources/locales/fr-CH/currencies.yml +1 -2
- data/resources/locales/fr-CH/languages.yml +1 -1
- data/resources/locales/fr-CH/numbers.yml +1 -0
- data/resources/locales/fr-CH/plural_rules.yml +2 -2
- data/resources/locales/fr-CH/timezones.yml +4 -1
- data/resources/locales/fr-CH/units.yml +322 -103
- data/resources/locales/ga/calendars.yml +12 -7
- data/resources/locales/ga/currencies.yml +1 -3
- data/resources/locales/ga/fields.yml +5 -5
- data/resources/locales/ga/languages.yml +23 -22
- data/resources/locales/ga/numbers.yml +2 -1
- data/resources/locales/ga/territories.yml +10 -10
- data/resources/locales/ga/timezones.yml +41 -60
- data/resources/locales/ga/units.yml +33 -31
- data/resources/locales/gl/calendars.yml +3 -1
- data/resources/locales/gl/currencies.yml +7 -7
- data/resources/locales/gl/languages.yml +2 -1
- data/resources/locales/gl/numbers.yml +1 -0
- data/resources/locales/gl/timezones.yml +3 -0
- data/resources/locales/gl/units.yml +73 -14
- data/resources/locales/gu/calendars.yml +2 -1
- data/resources/locales/gu/currencies.yml +1 -4
- data/resources/locales/gu/languages.yml +1 -1
- data/resources/locales/gu/numbers.yml +1 -0
- data/resources/locales/gu/timezones.yml +3 -0
- data/resources/locales/gu/units.yml +59 -24
- data/resources/locales/he/calendars.yml +3 -1
- data/resources/locales/he/currencies.yml +39 -24
- data/resources/locales/he/fields.yml +4 -0
- data/resources/locales/he/languages.yml +4 -2
- data/resources/locales/he/numbers.yml +1 -0
- data/resources/locales/he/timezones.yml +3 -0
- data/resources/locales/he/units.yml +60 -38
- data/resources/locales/hi/calendars.yml +3 -1
- data/resources/locales/hi/currencies.yml +1 -4
- data/resources/locales/hi/languages.yml +2 -2
- data/resources/locales/hi/numbers.yml +1 -0
- data/resources/locales/hi/territories.yml +1 -1
- data/resources/locales/hi/timezones.yml +5 -1
- data/resources/locales/hi/units.yml +126 -23
- data/resources/locales/hr/calendars.yml +1 -0
- data/resources/locales/hr/currencies.yml +6 -6
- data/resources/locales/hr/languages.yml +1 -1
- data/resources/locales/hr/numbers.yml +4 -3
- data/resources/locales/hr/timezones.yml +3 -0
- data/resources/locales/hr/units.yml +141 -85
- data/resources/locales/hu/calendars.yml +1 -0
- data/resources/locales/hu/currencies.yml +4 -5
- data/resources/locales/hu/languages.yml +3 -2
- data/resources/locales/hu/numbers.yml +1 -0
- data/resources/locales/hu/timezones.yml +3 -0
- data/resources/locales/hu/units.yml +31 -27
- data/resources/locales/hy/calendars.yml +5 -3
- data/resources/locales/hy/currencies.yml +6 -4
- data/resources/locales/hy/languages.yml +2 -1
- data/resources/locales/hy/numbers.yml +1 -0
- data/resources/locales/hy/timezones.yml +3 -0
- data/resources/locales/hy/units.yml +141 -110
- data/resources/locales/id/calendars.yml +3 -2
- data/resources/locales/id/currencies.yml +1 -3
- data/resources/locales/id/fields.yml +12 -3
- data/resources/locales/id/languages.yml +2 -1
- data/resources/locales/id/numbers.yml +1 -0
- data/resources/locales/id/timezones.yml +47 -0
- data/resources/locales/id/units.yml +64 -67
- data/resources/locales/is/calendars.yml +1 -0
- data/resources/locales/is/currencies.yml +4 -6
- data/resources/locales/is/fields.yml +0 -14
- data/resources/locales/is/languages.yml +2 -2
- data/resources/locales/is/numbers.yml +1 -0
- data/resources/locales/is/units.yml +134 -112
- data/resources/locales/it/calendars.yml +1 -0
- data/resources/locales/it/currencies.yml +2 -3
- data/resources/locales/it/languages.yml +1 -0
- data/resources/locales/it/numbers.yml +1 -0
- data/resources/locales/it/plural_rules.yml +2 -1
- data/resources/locales/it/plurals.yml +4 -1
- data/resources/locales/it/rbnf.yml +1 -1
- data/resources/locales/it/timezones.yml +3 -0
- data/resources/locales/it/units.yml +412 -19
- data/resources/locales/it-CH/calendars.yml +1 -0
- data/resources/locales/it-CH/currencies.yml +2 -3
- data/resources/locales/it-CH/languages.yml +1 -0
- data/resources/locales/it-CH/numbers.yml +1 -0
- data/resources/locales/it-CH/plural_rules.yml +2 -1
- data/resources/locales/it-CH/plurals.yml +4 -1
- data/resources/locales/it-CH/timezones.yml +3 -0
- data/resources/locales/it-CH/units.yml +412 -19
- data/resources/locales/ja/calendars.yml +1 -0
- data/resources/locales/ja/currencies.yml +1 -2
- data/resources/locales/ja/languages.yml +1 -1
- data/resources/locales/ja/numbers.yml +2 -1
- data/resources/locales/ja/timezones.yml +3 -0
- data/resources/locales/ja/units.yml +126 -20
- data/resources/locales/ka/calendars.yml +3 -1
- data/resources/locales/ka/currencies.yml +5 -3
- data/resources/locales/ka/languages.yml +1 -1
- data/resources/locales/ka/numbers.yml +1 -0
- data/resources/locales/ka/timezones.yml +3 -0
- data/resources/locales/ka/units.yml +24 -10
- data/resources/locales/kk/calendars.yml +3 -1
- data/resources/locales/kk/currencies.yml +6 -4
- data/resources/locales/kk/languages.yml +3 -2
- data/resources/locales/kk/numbers.yml +1 -0
- data/resources/locales/kk/timezones.yml +3 -0
- data/resources/locales/kk/units.yml +20 -6
- data/resources/locales/km/calendars.yml +3 -1
- data/resources/locales/km/currencies.yml +6 -4
- data/resources/locales/km/languages.yml +2 -1
- data/resources/locales/km/numbers.yml +1 -0
- data/resources/locales/km/timezones.yml +3 -0
- data/resources/locales/km/units.yml +30 -19
- data/resources/locales/kn/calendars.yml +3 -1
- data/resources/locales/kn/currencies.yml +4 -7
- data/resources/locales/kn/languages.yml +1 -1
- data/resources/locales/kn/numbers.yml +1 -0
- data/resources/locales/kn/timezones.yml +4 -1
- data/resources/locales/kn/units.yml +344 -39
- data/resources/locales/ko/calendars.yml +3 -1
- data/resources/locales/ko/currencies.yml +2 -3
- data/resources/locales/ko/languages.yml +1 -1
- data/resources/locales/ko/numbers.yml +1 -0
- data/resources/locales/ko/territories.yml +1 -1
- data/resources/locales/ko/timezones.yml +3 -0
- data/resources/locales/ko/units.yml +20 -12
- data/resources/locales/lo/calendars.yml +7 -1
- data/resources/locales/lo/currencies.yml +1 -3
- data/resources/locales/lo/languages.yml +1 -1
- data/resources/locales/lo/numbers.yml +1 -0
- data/resources/locales/lo/timezones.yml +3 -0
- data/resources/locales/lo/units.yml +25 -26
- data/resources/locales/lt/calendars.yml +1 -0
- data/resources/locales/lt/currencies.yml +1 -3
- data/resources/locales/lt/languages.yml +1 -1
- data/resources/locales/lt/numbers.yml +1 -0
- data/resources/locales/lt/timezones.yml +3 -0
- data/resources/locales/lt/units.yml +153 -142
- data/resources/locales/lv/calendars.yml +2 -1
- data/resources/locales/lv/currencies.yml +1 -4
- data/resources/locales/lv/languages.yml +1 -1
- data/resources/locales/lv/numbers.yml +1 -0
- data/resources/locales/lv/timezones.yml +3 -0
- data/resources/locales/lv/units.yml +134 -132
- data/resources/locales/mk/calendars.yml +3 -2
- data/resources/locales/mk/currencies.yml +3 -4
- data/resources/locales/mk/languages.yml +2 -2
- data/resources/locales/mk/numbers.yml +7 -6
- data/resources/locales/mk/territories.yml +2 -2
- data/resources/locales/mk/timezones.yml +4 -1
- data/resources/locales/mk/units.yml +74 -241
- data/resources/locales/mr/calendars.yml +3 -1
- data/resources/locales/mr/currencies.yml +1 -5
- data/resources/locales/mr/languages.yml +1 -1
- data/resources/locales/mr/numbers.yml +1 -0
- data/resources/locales/mr/timezones.yml +3 -0
- data/resources/locales/mr/units.yml +55 -20
- data/resources/locales/ms/calendars.yml +1 -0
- data/resources/locales/ms/currencies.yml +1 -4
- data/resources/locales/ms/languages.yml +2 -2
- data/resources/locales/ms/numbers.yml +1 -0
- data/resources/locales/ms/timezones.yml +3 -0
- data/resources/locales/ms/units.yml +110 -13
- data/resources/locales/mt/calendars.yml +3 -1
- data/resources/locales/mt/currencies.yml +1 -4
- data/resources/locales/mt/languages.yml +1 -2
- data/resources/locales/mt/numbers.yml +1 -0
- data/resources/locales/mt/territories.yml +4 -4
- data/resources/locales/mt/units.yml +8 -16
- data/resources/locales/my/calendars.yml +15 -13
- data/resources/locales/my/currencies.yml +11 -9
- data/resources/locales/my/languages.yml +3 -2
- data/resources/locales/my/lists.yml +16 -16
- data/resources/locales/my/numbers.yml +1 -0
- data/resources/locales/my/timezones.yml +3 -0
- data/resources/locales/my/units.yml +20 -16
- data/resources/locales/nb/calendars.yml +2 -1
- data/resources/locales/nb/currencies.yml +1 -2
- data/resources/locales/nb/fields.yml +4 -4
- data/resources/locales/nb/languages.yml +2 -2
- data/resources/locales/nb/numbers.yml +2 -1
- data/resources/locales/nb/rbnf.yml +1 -928
- data/resources/locales/nb/timezones.yml +3 -0
- data/resources/locales/nb/units.yml +133 -67
- data/resources/locales/nl/calendars.yml +1 -0
- data/resources/locales/nl/currencies.yml +1 -1
- data/resources/locales/nl/languages.yml +3 -1
- data/resources/locales/nl/numbers.yml +1 -0
- data/resources/locales/nl/timezones.yml +3 -0
- data/resources/locales/nl/units.yml +55 -23
- data/resources/locales/nl-BE/calendars.yml +1 -0
- data/resources/locales/nl-BE/currencies.yml +1 -1
- data/resources/locales/nl-BE/languages.yml +3 -1
- data/resources/locales/nl-BE/numbers.yml +1 -0
- data/resources/locales/nl-BE/timezones.yml +3 -0
- data/resources/locales/nl-BE/units.yml +55 -23
- data/resources/locales/pl/calendars.yml +4 -2
- data/resources/locales/pl/currencies.yml +6 -6
- data/resources/locales/pl/languages.yml +1 -1
- data/resources/locales/pl/numbers.yml +1 -0
- data/resources/locales/pl/timezones.yml +4 -1
- data/resources/locales/pl/units.yml +219 -162
- data/resources/locales/pt/calendars.yml +40 -5
- data/resources/locales/pt/currencies.yml +4 -6
- data/resources/locales/pt/languages.yml +1 -1
- data/resources/locales/pt/numbers.yml +1 -0
- data/resources/locales/pt/plural_rules.yml +2 -1
- data/resources/locales/pt/plurals.yml +4 -1
- data/resources/locales/pt/rbnf.yml +52 -70
- data/resources/locales/pt/timezones.yml +3 -0
- data/resources/locales/pt/units.yml +28 -33
- data/resources/locales/pt-PT/calendars.yml +24 -3
- data/resources/locales/pt-PT/currencies.yml +4 -6
- data/resources/locales/pt-PT/languages.yml +1 -1
- data/resources/locales/pt-PT/numbers.yml +1 -0
- data/resources/locales/pt-PT/plural_rules.yml +2 -1
- data/resources/locales/pt-PT/plurals.yml +4 -1
- data/resources/locales/pt-PT/territories.yml +2 -2
- data/resources/locales/pt-PT/timezones.yml +3 -0
- data/resources/locales/pt-PT/units.yml +55 -41
- data/resources/locales/ro/calendars.yml +1 -0
- data/resources/locales/ro/currencies.yml +4 -5
- data/resources/locales/ro/languages.yml +3 -1
- data/resources/locales/ro/numbers.yml +1 -0
- data/resources/locales/ro/timezones.yml +3 -0
- data/resources/locales/ro/units.yml +104 -39
- data/resources/locales/ru/calendars.yml +9 -8
- data/resources/locales/ru/currencies.yml +6 -4
- data/resources/locales/ru/day_periods.yml +4 -4
- data/resources/locales/ru/languages.yml +2 -2
- data/resources/locales/ru/numbers.yml +1 -0
- data/resources/locales/ru/timezones.yml +3 -0
- data/resources/locales/ru/units.yml +297 -321
- data/resources/locales/sk/calendars.yml +5 -3
- data/resources/locales/sk/currencies.yml +1 -1
- data/resources/locales/sk/fields.yml +2 -2
- data/resources/locales/sk/languages.yml +1 -1
- data/resources/locales/sk/numbers.yml +1 -0
- data/resources/locales/sk/timezones.yml +3 -0
- data/resources/locales/sk/units.yml +198 -225
- data/resources/locales/sl/calendars.yml +7 -5
- data/resources/locales/sl/currencies.yml +6 -5
- data/resources/locales/sl/languages.yml +1 -1
- data/resources/locales/sl/numbers.yml +1 -0
- data/resources/locales/sl/timezones.yml +3 -0
- data/resources/locales/sl/units.yml +296 -234
- data/resources/locales/sq/calendars.yml +1 -0
- data/resources/locales/sq/currencies.yml +5 -5
- data/resources/locales/sq/languages.yml +6 -1
- data/resources/locales/sq/numbers.yml +1 -0
- data/resources/locales/sq/timezones.yml +3 -0
- data/resources/locales/sq/units.yml +53 -34
- data/resources/locales/sr/calendars.yml +26 -25
- data/resources/locales/sr/currencies.yml +185 -187
- data/resources/locales/sr/fields.yml +2 -8
- data/resources/locales/sr/languages.yml +1 -1
- data/resources/locales/sr/numbers.yml +1 -0
- data/resources/locales/sr/timezones.yml +3 -0
- data/resources/locales/sr/units.yml +123 -78
- data/resources/locales/sr-Cyrl-ME/calendars.yml +19 -18
- data/resources/locales/sr-Cyrl-ME/currencies.yml +185 -187
- data/resources/locales/sr-Cyrl-ME/fields.yml +2 -8
- data/resources/locales/sr-Cyrl-ME/languages.yml +1 -1
- data/resources/locales/sr-Cyrl-ME/numbers.yml +1 -0
- data/resources/locales/sr-Cyrl-ME/timezones.yml +3 -0
- data/resources/locales/sr-Cyrl-ME/units.yml +123 -78
- data/resources/locales/sr-Latn-ME/calendars.yml +201 -200
- data/resources/locales/sr-Latn-ME/currencies.yml +185 -187
- data/resources/locales/sr-Latn-ME/fields.yml +2 -8
- data/resources/locales/sr-Latn-ME/languages.yml +1 -1
- data/resources/locales/sr-Latn-ME/numbers.yml +1 -0
- data/resources/locales/sr-Latn-ME/timezones.yml +3 -0
- data/resources/locales/sr-Latn-ME/units.yml +660 -615
- data/resources/locales/sv/calendars.yml +1 -0
- data/resources/locales/sv/currencies.yml +4 -6
- data/resources/locales/sv/languages.yml +1 -1
- data/resources/locales/sv/numbers.yml +1 -0
- data/resources/locales/sv/timezones.yml +5 -2
- data/resources/locales/sv/units.yml +43 -297
- data/resources/locales/sw/calendars.yml +3 -1
- data/resources/locales/sw/currencies.yml +3 -5
- data/resources/locales/sw/languages.yml +2 -1
- data/resources/locales/sw/numbers.yml +1 -0
- data/resources/locales/sw/timezones.yml +3 -0
- data/resources/locales/sw/units.yml +20 -7
- data/resources/locales/ta/calendars.yml +5 -3
- data/resources/locales/ta/currencies.yml +2 -4
- data/resources/locales/ta/fields.yml +1 -1
- data/resources/locales/ta/languages.yml +1 -1
- data/resources/locales/ta/numbers.yml +1 -0
- data/resources/locales/ta/timezones.yml +3 -0
- data/resources/locales/ta/units.yml +505 -122
- data/resources/locales/th/calendars.yml +2 -12
- data/resources/locales/th/currencies.yml +1 -2
- data/resources/locales/th/languages.yml +1 -1
- data/resources/locales/th/numbers.yml +1 -0
- data/resources/locales/th/timezones.yml +3 -0
- data/resources/locales/th/units.yml +275 -16
- data/resources/locales/tr/calendars.yml +3 -1
- data/resources/locales/tr/currencies.yml +3 -2
- data/resources/locales/tr/languages.yml +1 -1
- data/resources/locales/tr/numbers.yml +1 -0
- data/resources/locales/tr/timezones.yml +3 -0
- data/resources/locales/tr/units.yml +56 -38
- data/resources/locales/uk/calendars.yml +8 -7
- data/resources/locales/uk/currencies.yml +5 -2
- data/resources/locales/uk/languages.yml +2 -6
- data/resources/locales/uk/numbers.yml +1 -0
- data/resources/locales/uk/timezones.yml +3 -0
- data/resources/locales/uk/units.yml +494 -299
- data/resources/locales/ur/calendars.yml +3 -1
- data/resources/locales/ur/currencies.yml +4 -6
- data/resources/locales/ur/languages.yml +2 -1
- data/resources/locales/ur/numbers.yml +1 -0
- data/resources/locales/ur/timezones.yml +3 -0
- data/resources/locales/ur/units.yml +53 -15
- data/resources/locales/vi/calendars.yml +1 -0
- data/resources/locales/vi/currencies.yml +2 -3
- data/resources/locales/vi/languages.yml +2 -2
- data/resources/locales/vi/numbers.yml +1 -0
- data/resources/locales/vi/timezones.yml +3 -0
- data/resources/locales/vi/units.yml +16 -17
- data/resources/locales/xh/calendars.yml +61 -7
- data/resources/locales/xh/currencies.yml +1 -7
- data/resources/locales/xh/numbers.yml +1 -0
- data/resources/locales/xh/units.yml +8 -16
- data/resources/locales/zh/calendars.yml +8 -6
- data/resources/locales/zh/currencies.yml +1 -1
- data/resources/locales/zh/languages.yml +1 -1
- data/resources/locales/zh/numbers.yml +1 -0
- data/resources/locales/zh/timezones.yml +4 -1
- data/resources/locales/zh/units.yml +31 -9
- data/resources/locales/zh-Hant/calendars.yml +18 -12
- data/resources/locales/zh-Hant/currencies.yml +1 -1
- data/resources/locales/zh-Hant/languages.yml +1 -1
- data/resources/locales/zh-Hant/numbers.yml +1 -0
- data/resources/locales/zh-Hant/timezones.yml +4 -1
- data/resources/locales/zh-Hant/units.yml +99 -14
- data/resources/locales/zu/calendars.yml +4 -2
- data/resources/locales/zu/currencies.yml +1 -4
- data/resources/locales/zu/fields.yml +0 -5
- data/resources/locales/zu/languages.yml +1 -1
- data/resources/locales/zu/numbers.yml +1 -0
- data/resources/locales/zu/timezones.yml +3 -0
- data/resources/locales/zu/units.yml +32 -20
- data/resources/shared/aliases.yml +4 -3
- data/resources/shared/bcp47_timezone_metadata.yml +3 -1
- data/resources/shared/hyphenation/ca.yml +1 -1
- data/resources/shared/hyphenation/de-AT.yml +1 -1
- data/resources/shared/hyphenation/de-CH.yml +1 -1
- data/resources/shared/hyphenation/de-DE.yml +1 -1
- data/resources/shared/hyphenation/eo.yml +3180 -0
- data/resources/shared/hyphenation/fr.yml +1 -1
- data/resources/shared/hyphenation/hr-HR.yml +1 -1
- data/resources/shared/hyphenation/hu-HU.yml +1439 -57
- data/resources/shared/hyphenation/mn-MN.yml +1000 -0
- data/resources/shared/hyphenation/sl-SI.yml +1 -1
- data/resources/shared/hyphenation/sq-AL.yml +14015 -0
- data/resources/shared/language_codes_table.dump +0 -0
- data/resources/shared/likely_subtags.yml +18 -9
- data/resources/shared/metazones.yml +9 -39
- data/resources/shared/numbering_systems.yml +3 -0
- data/resources/shared/parent_locales.yml +3 -2
- data/resources/shared/rbnf_root.yml +84 -2
- data/resources/shared/segments/dictionaries/laodict.dump +0 -0
- data/resources/shared/segments/rules/el/sentence.yml +574 -556
- data/resources/shared/segments/rules/en-US-POSIX/word.yml +416 -403
- data/resources/shared/segments/rules/ja/line.yml +804 -776
- data/resources/shared/segments/rules/ja/word.yml +416 -403
- data/resources/shared/segments/rules/root/grapheme.yml +407 -402
- data/resources/shared/segments/rules/root/line.yml +804 -776
- data/resources/shared/segments/rules/root/sentence.yml +574 -556
- data/resources/shared/segments/rules/root/word.yml +416 -403
- data/resources/shared/segments/rules/zh/line.yml +804 -776
- data/resources/shared/segments/rules/zh-Hant/line.yml +804 -776
- data/resources/shared/segments/tests/dictionary_tests/combined.yml +31 -42
- data/resources/shared/segments/tests/dictionary_tests/lo.yml +31 -42
- data/resources/shared/segments/tests/line_break_test.yml +2 -0
- data/resources/shared/transforms/Han-Latin.yml +57 -57
- data/resources/shared/transforms/Latin-ASCII.yml +51 -2
- data/resources/shared/transforms/Turkmen-Latin-BGN.yml +4 -4
- data/resources/shared/validity_data.yml +54 -10
- data/resources/unicode_data/blocks/ahom.yml +112 -0
- data/resources/unicode_data/blocks/arabic.yml +16 -0
- data/resources/unicode_data/blocks/arabic_extended_a.yml +192 -0
- data/resources/unicode_data/blocks/arabic_extended_b.yml +657 -0
- data/resources/unicode_data/blocks/arabic_presentation_forms_a.yml +320 -0
- data/resources/unicode_data/blocks/balinese.yml +48 -0
- data/resources/unicode_data/blocks/brahmi.yml +96 -0
- data/resources/unicode_data/blocks/cjk_unified_ideographs.yml +2 -2
- data/resources/unicode_data/blocks/cjk_unified_ideographs_extension_b.yml +2 -2
- data/resources/unicode_data/blocks/cjk_unified_ideographs_extension_c.yml +2 -2
- data/resources/unicode_data/blocks/combining_diacritical_marks_extended.yml +224 -0
- data/resources/unicode_data/blocks/combining_diacritical_marks_supplement.yml +16 -0
- data/resources/unicode_data/blocks/currency_symbols.yml +16 -0
- data/resources/unicode_data/blocks/cypro_minoan.yml +1585 -0
- data/resources/unicode_data/blocks/ethiopic_extended_b.yml +449 -0
- data/resources/unicode_data/blocks/geometric_shapes_extended.yml +16 -0
- data/resources/unicode_data/blocks/glagolitic.yml +32 -0
- data/resources/unicode_data/blocks/hanunoo.yml +2 -2
- data/resources/unicode_data/blocks/kaithi.yml +16 -0
- data/resources/unicode_data/blocks/kana_extended_a.yml +64 -0
- data/resources/unicode_data/blocks/kana_extended_b.yml +209 -0
- data/resources/unicode_data/blocks/kannada.yml +16 -0
- data/resources/unicode_data/blocks/latin_extended_d.yml +208 -0
- data/resources/unicode_data/blocks/latin_extended_f.yml +913 -0
- data/resources/unicode_data/blocks/latin_extended_g.yml +497 -0
- data/resources/unicode_data/blocks/mongolian.yml +16 -0
- data/resources/unicode_data/blocks/musical_symbols.yml +32 -0
- data/resources/unicode_data/blocks/old_uyghur.yml +417 -0
- data/resources/unicode_data/blocks/supplemental_punctuation.yml +176 -0
- data/resources/unicode_data/blocks/supplemental_symbols_and_pictographs.yml +32 -0
- data/resources/unicode_data/blocks/symbols_and_pictographs_extended_a.yml +496 -0
- data/resources/unicode_data/blocks/tagalog.yml +48 -0
- data/resources/unicode_data/blocks/takri.yml +16 -0
- data/resources/unicode_data/blocks/tangsa.yml +1425 -0
- data/resources/unicode_data/blocks/telugu.yml +32 -0
- data/resources/unicode_data/blocks/toto.yml +497 -0
- data/resources/unicode_data/blocks/transport_and_map_symbols.yml +48 -0
- data/resources/unicode_data/blocks/unified_canadian_aboriginal_syllabics_extended_a.yml +257 -0
- data/resources/unicode_data/blocks/vithkuqi.yml +1121 -0
- data/resources/unicode_data/blocks/znamenny_musical_notation.yml +2961 -0
- data/resources/unicode_data/blocks.yml +50 -2
- data/resources/unicode_data/casefolding.yml +160 -0
- data/resources/unicode_data/properties/Age/14.0/value.dump +0 -0
- data/resources/unicode_data/properties/Alphabetic/value.dump +0 -0
- data/resources/unicode_data/properties/Bidi_Class/AL/value.dump +0 -0
- data/resources/unicode_data/properties/Bidi_Class/AN/value.dump +0 -0
- data/resources/unicode_data/properties/Bidi_Class/ET/value.dump +1 -1
- data/resources/unicode_data/properties/Bidi_Class/L/value.dump +0 -0
- data/resources/unicode_data/properties/Bidi_Class/NSM/value.dump +0 -0
- data/resources/unicode_data/properties/Bidi_Class/ON/value.dump +0 -0
- data/resources/unicode_data/properties/Bidi_Class/R/value.dump +0 -0
- data/resources/unicode_data/properties/Bidi_Mirrored/N/value.dump +0 -0
- data/resources/unicode_data/properties/Bidi_Mirrored/Y/value.dump +3 -2
- data/resources/unicode_data/properties/Bidi_Paired_Bracket_Type/Close/value.dump +6 -2
- data/resources/unicode_data/properties/Bidi_Paired_Bracket_Type/Open/value.dump +6 -2
- data/resources/unicode_data/properties/Block/Ahom/value.dump +0 -0
- data/resources/unicode_data/properties/Block/Arabic Extended-B/value.dump +3 -0
- data/resources/unicode_data/properties/Block/Cypro-Minoan/value.dump +3 -0
- data/resources/unicode_data/properties/Block/Ethiopic Extended-B/value.dump +3 -0
- data/resources/unicode_data/properties/Block/Kana Extended-B/value.dump +3 -0
- data/resources/unicode_data/properties/Block/Latin Extended-F/value.dump +3 -0
- data/resources/unicode_data/properties/Block/Latin Extended-G/value.dump +0 -0
- data/resources/unicode_data/properties/Block/Old Uyghur/value.dump +3 -0
- data/resources/unicode_data/properties/Block/Tangsa/value.dump +3 -0
- data/resources/unicode_data/properties/Block/Tangut Supplement/value.dump +0 -0
- data/resources/unicode_data/properties/Block/Toto/value.dump +3 -0
- data/resources/unicode_data/properties/Block/Unified Canadian Aboriginal Syllabics Extended-A/value.dump +3 -0
- data/resources/unicode_data/properties/Block/Vithkuqi/value.dump +3 -0
- data/resources/unicode_data/properties/Block/Znamenny Musical Notation/value.dump +0 -0
- data/resources/unicode_data/properties/Canonical_Combining_Class/0/value.dump +0 -0
- data/resources/unicode_data/properties/Canonical_Combining_Class/218/value.dump +3 -2
- data/resources/unicode_data/properties/Canonical_Combining_Class/220/value.dump +9 -4
- data/resources/unicode_data/properties/Canonical_Combining_Class/230/value.dump +0 -0
- data/resources/unicode_data/properties/Canonical_Combining_Class/7/value.dump +3 -2
- data/resources/unicode_data/properties/Canonical_Combining_Class/9/value.dump +4 -3
- data/resources/unicode_data/properties/Case_Ignorable/value.dump +0 -0
- data/resources/unicode_data/properties/Cased/value.dump +0 -0
- data/resources/unicode_data/properties/Changes_When_Casefolded/value.dump +0 -0
- data/resources/unicode_data/properties/Changes_When_Casemapped/value.dump +0 -0
- data/resources/unicode_data/properties/Changes_When_Lowercased/value.dump +0 -0
- data/resources/unicode_data/properties/Changes_When_Titlecased/value.dump +13 -5
- data/resources/unicode_data/properties/Changes_When_Uppercased/value.dump +13 -5
- data/resources/unicode_data/properties/Dash/value.dump +0 -0
- data/resources/unicode_data/properties/Default_Ignorable_Code_Point/value.dump +0 -0
- data/resources/unicode_data/properties/Diacritic/value.dump +0 -0
- data/resources/unicode_data/properties/East_Asian_Width/N/value.dump +0 -0
- data/resources/unicode_data/properties/East_Asian_Width/W/value.dump +0 -0
- data/resources/unicode_data/properties/Emoji/value.dump +0 -0
- data/resources/unicode_data/properties/Emoji_Modifier_Base/value.dump +4 -2
- data/resources/unicode_data/properties/Emoji_Presentation/value.dump +0 -0
- data/resources/unicode_data/properties/Extender/value.dump +3 -2
- data/resources/unicode_data/properties/General_Category/C/f/value.dump +0 -0
- data/resources/unicode_data/properties/General_Category/L/l/value.dump +0 -0
- data/resources/unicode_data/properties/General_Category/L/m/value.dump +13 -5
- data/resources/unicode_data/properties/General_Category/L/o/value.dump +0 -0
- data/resources/unicode_data/properties/General_Category/L/u/value.dump +0 -0
- data/resources/unicode_data/properties/General_Category/M/c/value.dump +0 -0
- data/resources/unicode_data/properties/General_Category/M/n/value.dump +0 -0
- data/resources/unicode_data/properties/General_Category/N/d/value.dump +0 -0
- data/resources/unicode_data/properties/General_Category/P/d/value.dump +0 -0
- data/resources/unicode_data/properties/General_Category/P/e/value.dump +6 -2
- data/resources/unicode_data/properties/General_Category/P/o/value.dump +0 -0
- data/resources/unicode_data/properties/General_Category/P/s/value.dump +6 -2
- data/resources/unicode_data/properties/General_Category/S/c/value.dump +1 -1
- data/resources/unicode_data/properties/General_Category/S/k/value.dump +0 -0
- data/resources/unicode_data/properties/General_Category/S/o/value.dump +0 -0
- data/resources/unicode_data/properties/Grapheme_Base/value.dump +0 -0
- data/resources/unicode_data/properties/Grapheme_Cluster_Break/Extend/value.dump +0 -0
- data/resources/unicode_data/properties/Grapheme_Cluster_Break/Prepend/value.dump +0 -0
- data/resources/unicode_data/properties/Grapheme_Cluster_Break/SpacingMark/value.dump +0 -0
- data/resources/unicode_data/properties/Grapheme_Extend/value.dump +0 -0
- data/resources/unicode_data/properties/Grapheme_Link/value.dump +4 -3
- data/resources/unicode_data/properties/ID_Continue/value.dump +0 -0
- data/resources/unicode_data/properties/ID_Start/value.dump +0 -0
- data/resources/unicode_data/properties/Ideographic/value.dump +0 -0
- data/resources/unicode_data/properties/Indic_Positional_Category/Bottom/value.dump +6 -4
- data/resources/unicode_data/properties/Indic_Positional_Category/Right/value.dump +0 -0
- data/resources/unicode_data/properties/Indic_Positional_Category/Top/value.dump +0 -0
- data/resources/unicode_data/properties/Indic_Syllabic_Category/Consonant/value.dump +0 -0
- data/resources/unicode_data/properties/Indic_Syllabic_Category/Consonant_Dead/value.dump +4 -2
- data/resources/unicode_data/properties/Indic_Syllabic_Category/Consonant_Final/value.dump +6 -3
- data/resources/unicode_data/properties/Indic_Syllabic_Category/Consonant_Succeeding_Repha/value.dump +2 -5
- data/resources/unicode_data/properties/Indic_Syllabic_Category/Nukta/value.dump +3 -2
- data/resources/unicode_data/properties/Indic_Syllabic_Category/Pure_Killer/value.dump +4 -3
- data/resources/unicode_data/properties/Indic_Syllabic_Category/Vowel_Dependent/value.dump +5 -3
- data/resources/unicode_data/properties/Indic_Syllabic_Category/Vowel_Independent/value.dump +0 -0
- data/resources/unicode_data/properties/Joining_Group/ALEF/value.dump +3 -2
- data/resources/unicode_data/properties/Joining_Group/GAF/value.dump +5 -3
- data/resources/unicode_data/properties/Joining_Group/HAH/value.dump +3 -2
- data/resources/unicode_data/properties/Joining_Group/NOON/value.dump +3 -2
- data/resources/unicode_data/properties/Joining_Group/No_Joining_Group/value.dump +0 -0
- data/resources/unicode_data/properties/Joining_Group/QAF/value.dump +4 -2
- data/resources/unicode_data/properties/Joining_Group/TAH/value.dump +3 -2
- data/resources/unicode_data/properties/Joining_Group/THIN YEH/value.dump +3 -0
- data/resources/unicode_data/properties/Joining_Group/VERTICAL TAIL/value.dump +3 -0
- data/resources/unicode_data/properties/Joining_Type/Dual_Joining/value.dump +0 -0
- data/resources/unicode_data/properties/Joining_Type/Join_Causing/value.dump +4 -2
- data/resources/unicode_data/properties/Joining_Type/Non_Joining/value.dump +0 -0
- data/resources/unicode_data/properties/Joining_Type/Right_Joining/value.dump +6 -3
- data/resources/unicode_data/properties/Line_Break/AL/value.dump +0 -0
- data/resources/unicode_data/properties/Line_Break/BA/value.dump +0 -0
- data/resources/unicode_data/properties/Line_Break/CL/value.dump +6 -2
- data/resources/unicode_data/properties/Line_Break/CM/value.dump +0 -0
- data/resources/unicode_data/properties/Line_Break/EB/value.dump +4 -2
- data/resources/unicode_data/properties/Line_Break/EX/value.dump +4 -3
- data/resources/unicode_data/properties/Line_Break/ID/value.dump +0 -0
- data/resources/unicode_data/properties/Line_Break/NU/value.dump +0 -0
- data/resources/unicode_data/properties/Line_Break/OP/value.dump +6 -2
- data/resources/unicode_data/properties/Line_Break/PO/value.dump +3 -2
- data/resources/unicode_data/properties/Line_Break/PR/value.dump +2 -1
- data/resources/unicode_data/properties/Line_Break/SA/value.dump +0 -0
- data/resources/unicode_data/properties/Lowercase/value.dump +0 -0
- data/resources/unicode_data/properties/Numeric_Type/0/value.dump +0 -0
- data/resources/unicode_data/properties/Numeric_Type/1/value.dump +3 -2
- data/resources/unicode_data/properties/Numeric_Type/2/value.dump +3 -2
- data/resources/unicode_data/properties/Numeric_Type/3/value.dump +3 -2
- data/resources/unicode_data/properties/Numeric_Type/4/value.dump +3 -2
- data/resources/unicode_data/properties/Numeric_Type/5/value.dump +3 -2
- data/resources/unicode_data/properties/Numeric_Type/6/value.dump +3 -2
- data/resources/unicode_data/properties/Numeric_Type/7/value.dump +3 -2
- data/resources/unicode_data/properties/Numeric_Type/8/value.dump +3 -2
- data/resources/unicode_data/properties/Numeric_Type/9/value.dump +3 -2
- data/resources/unicode_data/properties/Numeric_Type/value.dump +0 -0
- data/resources/unicode_data/properties/Other_Alphabetic/value.dump +0 -0
- data/resources/unicode_data/properties/Other_Lowercase/value.dump +6 -2
- data/resources/unicode_data/properties/Prepended_Concatenation_Mark/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Ahom/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Arabic/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Balinese/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Brahmi/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Canadian_Aboriginal/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Common/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Cypro_Minoan/value.dump +3 -0
- data/resources/unicode_data/properties/Script/Ethiopic/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Glagolitic/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Han/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Hiragana/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Inherited/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Kaithi/value.dump +1 -1
- data/resources/unicode_data/properties/Script/Kannada/value.dump +1 -1
- data/resources/unicode_data/properties/Script/Katakana/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Latin/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Mongolian/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Old_Uyghur/value.dump +3 -0
- data/resources/unicode_data/properties/Script/Tagalog/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Takri/value.dump +1 -1
- data/resources/unicode_data/properties/Script/Tangsa/value.dump +4 -0
- data/resources/unicode_data/properties/Script/Telugu/value.dump +0 -0
- data/resources/unicode_data/properties/Script/Toto/value.dump +3 -0
- data/resources/unicode_data/properties/Script/Vithkuqi/value.dump +10 -0
- data/resources/unicode_data/properties/Script_Extensions/Adlm/value.dump +3 -2
- data/resources/unicode_data/properties/Script_Extensions/Arab/value.dump +3 -2
- data/resources/unicode_data/properties/Script_Extensions/Cpmn/value.dump +0 -0
- data/resources/unicode_data/properties/Script_Extensions/Mani/value.dump +5 -2
- data/resources/unicode_data/properties/Script_Extensions/Nkoo/value.dump +6 -0
- data/resources/unicode_data/properties/Script_Extensions/Ougr/value.dump +6 -0
- data/resources/unicode_data/properties/Script_Extensions/Syrc/value.dump +3 -2
- data/resources/unicode_data/properties/Sentence_Break/Close/value.dump +0 -0
- data/resources/unicode_data/properties/Sentence_Break/Extend/value.dump +0 -0
- data/resources/unicode_data/properties/Sentence_Break/Format/value.dump +0 -0
- data/resources/unicode_data/properties/Sentence_Break/Lower/value.dump +0 -0
- data/resources/unicode_data/properties/Sentence_Break/Numeric/value.dump +0 -0
- data/resources/unicode_data/properties/Sentence_Break/OLetter/value.dump +0 -0
- data/resources/unicode_data/properties/Sentence_Break/STerm/value.dump +0 -0
- data/resources/unicode_data/properties/Sentence_Break/Upper/value.dump +0 -0
- data/resources/unicode_data/properties/Sentence_Terminal/value.dump +0 -0
- data/resources/unicode_data/properties/Soft_Dotted/value.dump +3 -2
- data/resources/unicode_data/properties/Terminal_Punctuation/value.dump +0 -0
- data/resources/unicode_data/properties/Unified_Ideograph/value.dump +0 -0
- data/resources/unicode_data/properties/Uppercase/value.dump +0 -0
- data/resources/unicode_data/properties/Variation_Selector/value.dump +0 -0
- data/resources/unicode_data/properties/Word_Break/ALetter/value.dump +0 -0
- data/resources/unicode_data/properties/Word_Break/Extend/value.dump +0 -0
- data/resources/unicode_data/properties/Word_Break/Format/value.dump +0 -0
- data/resources/unicode_data/properties/Word_Break/Katakana/value.dump +0 -0
- data/resources/unicode_data/properties/Word_Break/Numeric/value.dump +0 -0
- data/resources/unicode_data/properties/XID_Continue/value.dump +0 -0
- data/resources/unicode_data/properties/XID_Start/value.dump +0 -0
- data/resources/unicode_data/property_value_aliases.yml +40 -0
- data/spec/formatters/calendars/datetime_formatter_spec.rb +2 -2
- data/spec/formatters/numbers/rbnf/locales/de/rbnf_test.yml +234 -0
- data/spec/formatters/numbers/rbnf/locales/fi/rbnf_test.yml +234 -0
- data/spec/formatters/numbers/rbnf/locales/pt/rbnf_test.yml +32 -32
- data/spec/localized/localized_date_spec.rb +0 -12
- data/spec/localized/localized_datetime_spec.rb +1 -15
- data/spec/localized/localized_time_spec.rb +0 -12
- data/spec/parsers/unicode_regex/character_set_spec.rb +2 -1
- data/spec/shared/calendar_spec.rb +8 -8
- data/spec/shared/unit_spec.rb +9 -9
- data/spec/timezones/tests/af.yml +3 -3
- data/spec/timezones/tests/ar.yml +3 -3
- data/spec/timezones/tests/az.yml +3 -3
- data/spec/timezones/tests/be.yml +3 -3
- data/spec/timezones/tests/bg.yml +3 -3
- data/spec/timezones/tests/bn.yml +3 -3
- data/spec/timezones/tests/bo.yml +3 -3
- data/spec/timezones/tests/bs.yml +3 -3
- data/spec/timezones/tests/ca.yml +17 -17
- data/spec/timezones/tests/cs.yml +3 -3
- data/spec/timezones/tests/cy.yml +3 -3
- data/spec/timezones/tests/da.yml +3 -3
- data/spec/timezones/tests/de-AT.yml +3 -3
- data/spec/timezones/tests/de-CH.yml +3 -3
- data/spec/timezones/tests/de.yml +3 -3
- data/spec/timezones/tests/el.yml +3 -3
- data/spec/timezones/tests/en-001.yml +3 -3
- data/spec/timezones/tests/en-150.yml +3 -3
- data/spec/timezones/tests/en-AU.yml +3 -3
- data/spec/timezones/tests/en-CA.yml +208 -208
- data/spec/timezones/tests/en-GB.yml +3 -3
- data/spec/timezones/tests/en-IE.yml +3 -3
- data/spec/timezones/tests/en-IN.yml +3 -3
- data/spec/timezones/tests/en-NZ.yml +3 -3
- data/spec/timezones/tests/en-SG.yml +3 -3
- data/spec/timezones/tests/en-US.yml +3 -3
- data/spec/timezones/tests/en-ZA.yml +3 -3
- data/spec/timezones/tests/en.yml +3 -3
- data/spec/timezones/tests/eo.yml +3 -3
- data/spec/timezones/tests/es-419.yml +6 -6
- data/spec/timezones/tests/es-AR.yml +6 -6
- data/spec/timezones/tests/es-CO.yml +6 -6
- data/spec/timezones/tests/es-MX.yml +4 -4
- data/spec/timezones/tests/es-US.yml +13 -13
- data/spec/timezones/tests/es.yml +6 -6
- data/spec/timezones/tests/et.yml +3 -3
- data/spec/timezones/tests/eu.yml +285 -285
- data/spec/timezones/tests/fa.yml +14 -14
- data/spec/timezones/tests/fi.yml +3 -3
- data/spec/timezones/tests/fil.yml +9 -9
- data/spec/timezones/tests/fr-BE.yml +11 -11
- data/spec/timezones/tests/fr-CA.yml +3 -3
- data/spec/timezones/tests/fr-CH.yml +11 -11
- data/spec/timezones/tests/fr.yml +11 -11
- data/spec/timezones/tests/ga.yml +190 -190
- data/spec/timezones/tests/gl.yml +3 -3
- data/spec/timezones/tests/gu.yml +3 -3
- data/spec/timezones/tests/he.yml +3 -3
- data/spec/timezones/tests/hi.yml +7 -7
- data/spec/timezones/tests/hr.yml +3 -3
- data/spec/timezones/tests/hu.yml +3 -3
- data/spec/timezones/tests/hy.yml +3 -3
- data/spec/timezones/tests/id.yml +287 -287
- data/spec/timezones/tests/is.yml +3 -3
- data/spec/timezones/tests/it-CH.yml +3 -3
- data/spec/timezones/tests/it.yml +3 -3
- data/spec/timezones/tests/ja.yml +3 -3
- data/spec/timezones/tests/ka.yml +3 -3
- data/spec/timezones/tests/kk.yml +3 -3
- data/spec/timezones/tests/km.yml +3 -3
- data/spec/timezones/tests/kn.yml +10 -10
- data/spec/timezones/tests/ko.yml +3 -3
- data/spec/timezones/tests/lo.yml +3 -3
- data/spec/timezones/tests/lt.yml +3 -3
- data/spec/timezones/tests/lv.yml +3 -3
- data/spec/timezones/tests/mk.yml +8 -8
- data/spec/timezones/tests/mr.yml +3 -3
- data/spec/timezones/tests/ms.yml +3 -3
- data/spec/timezones/tests/mt.yml +13 -13
- data/spec/timezones/tests/my.yml +3 -3
- data/spec/timezones/tests/nb.yml +3 -3
- data/spec/timezones/tests/nl-BE.yml +3 -3
- data/spec/timezones/tests/nl.yml +3 -3
- data/spec/timezones/tests/pl.yml +5 -5
- data/spec/timezones/tests/pt-PT.yml +3 -3
- data/spec/timezones/tests/pt.yml +3 -3
- data/spec/timezones/tests/ro.yml +3 -3
- data/spec/timezones/tests/ru.yml +3 -3
- data/spec/timezones/tests/sk.yml +3 -3
- data/spec/timezones/tests/sl.yml +3 -3
- data/spec/timezones/tests/sq.yml +3 -3
- data/spec/timezones/tests/sr-Cyrl-ME.yml +3 -3
- data/spec/timezones/tests/sr-Latn-ME.yml +3 -3
- data/spec/timezones/tests/sr.yml +3 -3
- data/spec/timezones/tests/sv.yml +4 -4
- data/spec/timezones/tests/sw.yml +3 -3
- data/spec/timezones/tests/ta.yml +3 -3
- data/spec/timezones/tests/th.yml +3 -3
- data/spec/timezones/tests/tr.yml +3 -3
- data/spec/timezones/tests/uk.yml +3 -3
- data/spec/timezones/tests/ur.yml +3 -3
- data/spec/timezones/tests/vi.yml +3 -3
- data/spec/timezones/tests/xh.yml +3 -3
- data/spec/timezones/tests/zh-Hant.yml +13 -13
- data/spec/timezones/tests/zh.yml +13 -13
- data/spec/timezones/tests/zu.yml +3 -3
- data/spec/timezones/timezone_spec.rb +41 -0
- data/spec/tokenizers/calendars/date_tokenizer_spec.rb +0 -18
- metadata +47 -6
- data/lib/twitter_cldr/tokenizers/composite_token.rb +0 -26
- data/resources/custom/locales/en-AU/calendars.yml +0 -10
- data/spec/tokenizers/composite_token_spec.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce23d1d3e7d5428401b92b60c2570f8a2370e41beb32068fc0df7a6ce4959126
|
4
|
+
data.tar.gz: 595d913024e24dd3fd86426f12288c7040904f446291145e5ba92c0945a33d12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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
|
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 |
|
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) # [:
|
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
|
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
|
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
|
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
|
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
|
515
|
-
TwitterCldr::Shared::Languages.translate_language("Traditional Chinese", :en, :es) # "chino
|
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) # ["
|
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.
|
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
|
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
|
@@ -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
|