i18n 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of i18n might be problematic. Click here for more details.
- data/README.textile +24 -1
- data/Rakefile +6 -2
- data/lib/i18n.rb +13 -13
- data/lib/i18n/backend.rb +2 -0
- data/lib/i18n/backend/active_record.rb +9 -13
- data/lib/i18n/backend/active_record/missing.rb +1 -1
- data/lib/i18n/backend/active_record/store_procs.rb +5 -5
- data/lib/i18n/backend/active_record/translation.rb +6 -4
- data/lib/i18n/backend/base.rb +21 -14
- data/lib/i18n/backend/cache.rb +1 -0
- data/lib/i18n/backend/cascade.rb +22 -8
- data/lib/i18n/backend/chain.rb +2 -1
- data/lib/i18n/backend/cldr.rb +100 -0
- data/lib/i18n/backend/fallbacks.rb +15 -3
- data/lib/i18n/backend/fast.rb +14 -13
- data/lib/i18n/backend/gettext.rb +2 -1
- data/lib/i18n/backend/helpers.rb +4 -16
- data/lib/i18n/backend/interpolation_compiler.rb +2 -2
- data/lib/i18n/backend/links.rb +34 -0
- data/lib/i18n/backend/pluralization.rb +1 -1
- data/lib/i18n/core_ext/hash/except.rb +8 -0
- data/lib/i18n/core_ext/hash/slice.rb +8 -0
- data/lib/i18n/core_ext/string/interpolate.rb +6 -2
- data/lib/i18n/exceptions.rb +1 -1
- data/lib/i18n/helpers/gettext.rb +3 -2
- data/lib/i18n/version.rb +1 -1
- data/test/api.rb +18 -0
- data/test/{cases/api → api}/active_record_test.rb +6 -5
- data/test/{cases/api → api}/all_features_test.rb +22 -3
- data/test/{cases/api → api}/cascade_test.rb +4 -3
- data/test/{cases/api → api}/chain_test.rb +4 -3
- data/test/{cases/api → api}/fallbacks_test.rb +4 -3
- data/test/{cases/api → api}/fast_test.rb +4 -3
- data/test/{cases/api → api}/pluralization_test.rb +4 -3
- data/test/{cases/api → api}/simple_test.rb +5 -3
- data/test/api/{basics.rb → tests/basics.rb} +0 -0
- data/test/api/{defaults.rb → tests/defaults.rb} +1 -1
- data/test/api/{interpolation.rb → tests/interpolation.rb} +6 -6
- data/test/api/{link.rb → tests/link.rb} +4 -3
- data/test/api/{localization → tests/localization}/date.rb +6 -2
- data/test/api/{localization → tests/localization}/date_time.rb +7 -5
- data/test/api/{localization → tests/localization}/procs.rb +0 -0
- data/test/api/{localization → tests/localization}/time.rb +16 -12
- data/test/api/{lookup.rb → tests/lookup.rb} +20 -3
- data/test/api/{pluralization.rb → tests/pluralization.rb} +1 -1
- data/test/api/{procs.rb → tests/procs.rb} +10 -1
- data/test/{cases/backend → backend}/active_record/missing_test.rb +12 -21
- data/test/{cases/backend → backend}/active_record_test.rb +11 -6
- data/test/{cases/backend → backend}/cache_test.rb +9 -10
- data/test/backend/cascade_test.rb +73 -0
- data/test/{cases/backend → backend}/chain_test.rb +10 -11
- data/test/backend/cldr_test.rb +151 -0
- data/test/backend/exceptions_test.rb +25 -0
- data/test/backend/fallbacks_test.rb +107 -0
- data/test/{cases/backend → backend}/fast_test.rb +7 -7
- data/test/{cases/backend → backend}/helpers_test.rb +7 -6
- data/test/{cases/backend → backend}/interpolation_compiler_test.rb +3 -2
- data/test/{cases/backend → backend}/metadata_test.rb +11 -12
- data/test/{cases/backend → backend}/pluralization_test.rb +20 -16
- data/test/{cases/backend → backend}/simple_test.rb +15 -15
- data/test/{cases/core_ext → core_ext}/string/interpolate_test.rb +26 -21
- data/test/{cases/gettext → gettext}/api_test.rb +11 -5
- data/test/{cases/gettext → gettext}/backend_test.rb +4 -4
- data/test/{cases/i18n_exceptions_test.rb → i18n_exceptions_test.rb} +3 -3
- data/test/{cases/i18n_load_path_test.rb → i18n_load_path_test.rb} +2 -2
- data/test/{cases/i18n_test.rb → i18n_test.rb} +15 -15
- data/test/{cases/locale → locale}/fallbacks_test.rb +2 -2
- data/test/{cases/locale → locale}/tag/rfc4646_test.rb +3 -3
- data/test/{cases/locale → locale}/tag/simple_test.rb +2 -2
- data/test/test_data/locales/cldr/de/calendars.yml +152 -0
- data/test/test_data/locales/cldr/de/currencies.yml +8 -0
- data/test/test_data/locales/cldr/de/numbers.yml +31 -0
- data/test/{fixtures → test_data}/locales/de.po +0 -0
- data/test/{fixtures → test_data}/locales/en.rb +0 -0
- data/test/{fixtures → test_data}/locales/en.yml +0 -0
- data/test/{fixtures → test_data}/locales/plurals.rb +0 -0
- data/test/test_helper.rb +49 -36
- data/vendor/cldr/common/bcp47/calendar.xml +26 -0
- data/vendor/cldr/common/bcp47/collation.xml +72 -0
- data/vendor/cldr/common/bcp47/currency.xml +177 -0
- data/vendor/cldr/common/bcp47/number.xml +47 -0
- data/vendor/cldr/common/bcp47/timezone.xml +443 -0
- data/vendor/cldr/common/bcp47/variant.xml +14 -0
- data/vendor/cldr/common/collation/af.xml +17 -0
- data/vendor/cldr/common/collation/ar.xml +17 -0
- data/vendor/cldr/common/collation/as.xml +42 -0
- data/vendor/cldr/common/collation/az.xml +44 -0
- data/vendor/cldr/common/collation/be.xml +12 -0
- data/vendor/cldr/common/collation/bg.xml +12 -0
- data/vendor/cldr/common/collation/bn.xml +99 -0
- data/vendor/cldr/common/collation/bn_IN.xml +733 -0
- data/vendor/cldr/common/collation/ca.xml +49 -0
- data/vendor/cldr/common/collation/cs.xml +55 -0
- data/vendor/cldr/common/collation/cy.xml +55 -0
- data/vendor/cldr/common/collation/da.xml +90 -0
- data/vendor/cldr/common/collation/de.xml +42 -0
- data/vendor/cldr/common/collation/dz.xml +525 -0
- data/vendor/cldr/common/collation/el.xml +14 -0
- data/vendor/cldr/common/collation/en.xml +24 -0
- data/vendor/cldr/common/collation/en_BE.xml +15 -0
- data/vendor/cldr/common/collation/eo.xml +33 -0
- data/vendor/cldr/common/collation/es.xml +59 -0
- data/vendor/cldr/common/collation/et.xml +34 -0
- data/vendor/cldr/common/collation/fa.xml +34 -0
- data/vendor/cldr/common/collation/fa_AF.xml +13 -0
- data/vendor/cldr/common/collation/fi.xml +134 -0
- data/vendor/cldr/common/collation/fil.xml +21 -0
- data/vendor/cldr/common/collation/fo.xml +88 -0
- data/vendor/cldr/common/collation/fr.xml +25 -0
- data/vendor/cldr/common/collation/gu.xml +47 -0
- data/vendor/cldr/common/collation/haw.xml +41 -0
- data/vendor/cldr/common/collation/he.xml +14 -0
- data/vendor/cldr/common/collation/hi.xml +62 -0
- data/vendor/cldr/common/collation/hr.xml +70 -0
- data/vendor/cldr/common/collation/hu.xml +295 -0
- data/vendor/cldr/common/collation/is.xml +51 -0
- data/vendor/cldr/common/collation/it.xml +24 -0
- data/vendor/cldr/common/collation/ja.xml +2419 -0
- data/vendor/cldr/common/collation/kk.xml +35 -0
- data/vendor/cldr/common/collation/kl.xml +49 -0
- data/vendor/cldr/common/collation/km.xml +155 -0
- data/vendor/cldr/common/collation/kn.xml +765 -0
- data/vendor/cldr/common/collation/ko.xml +976 -0
- data/vendor/cldr/common/collation/kok.xml +45 -0
- data/vendor/cldr/common/collation/ln.xml +107 -0
- data/vendor/cldr/common/collation/lt.xml +47 -0
- data/vendor/cldr/common/collation/lv.xml +75 -0
- data/vendor/cldr/common/collation/mk.xml +12 -0
- data/vendor/cldr/common/collation/ml.xml +166 -0
- data/vendor/cldr/common/collation/mr.xml +52 -0
- data/vendor/cldr/common/collation/mt.xml +33 -0
- data/vendor/cldr/common/collation/my.xml +980 -0
- data/vendor/cldr/common/collation/nb.xml +46 -0
- data/vendor/cldr/common/collation/nn.xml +46 -0
- data/vendor/cldr/common/collation/om.xml +33 -0
- data/vendor/cldr/common/collation/or.xml +64 -0
- data/vendor/cldr/common/collation/pa.xml +28 -0
- data/vendor/cldr/common/collation/pl.xml +41 -0
- data/vendor/cldr/common/collation/ps.xml +58 -0
- data/vendor/cldr/common/collation/ro.xml +61 -0
- data/vendor/cldr/common/collation/root.xml +15 -0
- data/vendor/cldr/common/collation/ru.xml +14 -0
- data/vendor/cldr/common/collation/sa.xml +898 -0
- data/vendor/cldr/common/collation/si.xml +47 -0
- data/vendor/cldr/common/collation/sk.xml +70 -0
- data/vendor/cldr/common/collation/sl.xml +39 -0
- data/vendor/cldr/common/collation/sq.xml +112 -0
- data/vendor/cldr/common/collation/sr.xml +12 -0
- data/vendor/cldr/common/collation/sr_Latn.xml +13 -0
- data/vendor/cldr/common/collation/sv.xml +90 -0
- data/vendor/cldr/common/collation/ta.xml +82 -0
- data/vendor/cldr/common/collation/te.xml +46 -0
- data/vendor/cldr/common/collation/th.xml +58 -0
- data/vendor/cldr/common/collation/to.xml +52 -0
- data/vendor/cldr/common/collation/tr.xml +35 -0
- data/vendor/cldr/common/collation/uk.xml +18 -0
- data/vendor/cldr/common/collation/ur.xml +77 -0
- data/vendor/cldr/common/collation/vi.xml +37 -0
- data/vendor/cldr/common/collation/zh.xml +544 -0
- data/vendor/cldr/common/collation/zh_Hant.xml +13 -0
- data/vendor/cldr/common/dtd/cldrTest.dtd +46 -0
- data/vendor/cldr/common/dtd/ldml.dtd +1198 -0
- data/vendor/cldr/common/dtd/ldmlBCP47.dtd +36 -0
- data/vendor/cldr/common/dtd/ldmlICIR.dtd +142 -0
- data/vendor/cldr/common/dtd/ldmlICU.dtd +111 -0
- data/vendor/cldr/common/dtd/ldmlOpenOffice.dtd +192 -0
- data/vendor/cldr/common/dtd/ldmlSupplemental.dtd +423 -0
- data/vendor/cldr/common/main/aa.xml +221 -0
- data/vendor/cldr/common/main/aa_DJ.xml +26 -0
- data/vendor/cldr/common/main/aa_ER.xml +11 -0
- data/vendor/cldr/common/main/aa_ER_SAAHO.xml +39 -0
- data/vendor/cldr/common/main/aa_ET.xml +10 -0
- data/vendor/cldr/common/main/af.xml +827 -0
- data/vendor/cldr/common/main/af_NA.xml +75 -0
- data/vendor/cldr/common/main/af_ZA.xml +10 -0
- data/vendor/cldr/common/main/ak.xml +194 -0
- data/vendor/cldr/common/main/ak_GH.xml +10 -0
- data/vendor/cldr/common/main/am.xml +1413 -0
- data/vendor/cldr/common/main/am_ET.xml +10 -0
- data/vendor/cldr/common/main/ar.xml +3232 -0
- data/vendor/cldr/common/main/ar_AE.xml +15 -0
- data/vendor/cldr/common/main/ar_BH.xml +15 -0
- data/vendor/cldr/common/main/ar_DZ.xml +44 -0
- data/vendor/cldr/common/main/ar_EG.xml +10 -0
- data/vendor/cldr/common/main/ar_IQ.xml +15 -0
- data/vendor/cldr/common/main/ar_JO.xml +66 -0
- data/vendor/cldr/common/main/ar_KW.xml +15 -0
- data/vendor/cldr/common/main/ar_LB.xml +67 -0
- data/vendor/cldr/common/main/ar_LY.xml +15 -0
- data/vendor/cldr/common/main/ar_MA.xml +47 -0
- data/vendor/cldr/common/main/ar_OM.xml +15 -0
- data/vendor/cldr/common/main/ar_QA.xml +50 -0
- data/vendor/cldr/common/main/ar_SA.xml +50 -0
- data/vendor/cldr/common/main/ar_SD.xml +15 -0
- data/vendor/cldr/common/main/ar_SY.xml +82 -0
- data/vendor/cldr/common/main/ar_TN.xml +75 -0
- data/vendor/cldr/common/main/ar_YE.xml +50 -0
- data/vendor/cldr/common/main/as.xml +278 -0
- data/vendor/cldr/common/main/as_IN.xml +10 -0
- data/vendor/cldr/common/main/az.xml +2718 -0
- data/vendor/cldr/common/main/az_AZ.xml +11 -0
- data/vendor/cldr/common/main/az_Cyrl.xml +85 -0
- data/vendor/cldr/common/main/az_Cyrl_AZ.xml +11 -0
- data/vendor/cldr/common/main/az_Latn.xml +10 -0
- data/vendor/cldr/common/main/az_Latn_AZ.xml +11 -0
- data/vendor/cldr/common/main/be.xml +1096 -0
- data/vendor/cldr/common/main/be_BY.xml +10 -0
- data/vendor/cldr/common/main/bg.xml +3985 -0
- data/vendor/cldr/common/main/bg_BG.xml +10 -0
- data/vendor/cldr/common/main/bn.xml +3193 -0
- data/vendor/cldr/common/main/bn_BD.xml +10 -0
- data/vendor/cldr/common/main/bn_IN.xml +36 -0
- data/vendor/cldr/common/main/bo.xml +449 -0
- data/vendor/cldr/common/main/bo_CN.xml +10 -0
- data/vendor/cldr/common/main/bo_IN.xml +10 -0
- data/vendor/cldr/common/main/bs.xml +330 -0
- data/vendor/cldr/common/main/bs_BA.xml +10 -0
- data/vendor/cldr/common/main/byn.xml +502 -0
- data/vendor/cldr/common/main/byn_ER.xml +10 -0
- data/vendor/cldr/common/main/ca.xml +3284 -0
- data/vendor/cldr/common/main/ca_ES.xml +10 -0
- data/vendor/cldr/common/main/cch.xml +189 -0
- data/vendor/cldr/common/main/cch_NG.xml +10 -0
- data/vendor/cldr/common/main/cop.xml +201 -0
- data/vendor/cldr/common/main/cs.xml +2588 -0
- data/vendor/cldr/common/main/cs_CZ.xml +10 -0
- data/vendor/cldr/common/main/cy.xml +783 -0
- data/vendor/cldr/common/main/cy_GB.xml +10 -0
- data/vendor/cldr/common/main/da.xml +3379 -0
- data/vendor/cldr/common/main/da_DK.xml +10 -0
- data/vendor/cldr/common/main/de.xml +3092 -0
- data/vendor/cldr/common/main/de_AT.xml +70 -0
- data/vendor/cldr/common/main/de_BE.xml +115 -0
- data/vendor/cldr/common/main/de_CH.xml +65 -0
- data/vendor/cldr/common/main/de_DE.xml +10 -0
- data/vendor/cldr/common/main/de_LI.xml +23 -0
- data/vendor/cldr/common/main/de_LU.xml +19 -0
- data/vendor/cldr/common/main/dv.xml +228 -0
- data/vendor/cldr/common/main/dv_MV.xml +10 -0
- data/vendor/cldr/common/main/dz.xml +412 -0
- data/vendor/cldr/common/main/dz_BT.xml +10 -0
- data/vendor/cldr/common/main/ee.xml +197 -0
- data/vendor/cldr/common/main/ee_GH.xml +10 -0
- data/vendor/cldr/common/main/ee_TG.xml +10 -0
- data/vendor/cldr/common/main/el.xml +4148 -0
- data/vendor/cldr/common/main/el_CY.xml +20 -0
- data/vendor/cldr/common/main/el_GR.xml +10 -0
- data/vendor/cldr/common/main/el_POLYTON.xml +542 -0
- data/vendor/cldr/common/main/en.xml +4150 -0
- data/vendor/cldr/common/main/en_AS.xml +10 -0
- data/vendor/cldr/common/main/en_AU.xml +161 -0
- data/vendor/cldr/common/main/en_BE.xml +159 -0
- data/vendor/cldr/common/main/en_BW.xml +131 -0
- data/vendor/cldr/common/main/en_BZ.xml +161 -0
- data/vendor/cldr/common/main/en_CA.xml +127 -0
- data/vendor/cldr/common/main/en_Dsrt.xml +1029 -0
- data/vendor/cldr/common/main/en_Dsrt_US.xml +11 -0
- data/vendor/cldr/common/main/en_GB.xml +170 -0
- data/vendor/cldr/common/main/en_GU.xml +10 -0
- data/vendor/cldr/common/main/en_HK.xml +57 -0
- data/vendor/cldr/common/main/en_IE.xml +150 -0
- data/vendor/cldr/common/main/en_IN.xml +146 -0
- data/vendor/cldr/common/main/en_JM.xml +27 -0
- data/vendor/cldr/common/main/en_MH.xml +10 -0
- data/vendor/cldr/common/main/en_MP.xml +10 -0
- data/vendor/cldr/common/main/en_MT.xml +155 -0
- data/vendor/cldr/common/main/en_NA.xml +27 -0
- data/vendor/cldr/common/main/en_NZ.xml +158 -0
- data/vendor/cldr/common/main/en_PH.xml +17 -0
- data/vendor/cldr/common/main/en_PK.xml +154 -0
- data/vendor/cldr/common/main/en_SG.xml +48 -0
- data/vendor/cldr/common/main/en_Shaw.xml +188 -0
- data/vendor/cldr/common/main/en_TT.xml +27 -0
- data/vendor/cldr/common/main/en_UM.xml +10 -0
- data/vendor/cldr/common/main/en_US.xml +10 -0
- data/vendor/cldr/common/main/en_US_POSIX.xml +54 -0
- data/vendor/cldr/common/main/en_VI.xml +10 -0
- data/vendor/cldr/common/main/en_ZA.xml +153 -0
- data/vendor/cldr/common/main/en_ZW.xml +145 -0
- data/vendor/cldr/common/main/eo.xml +636 -0
- data/vendor/cldr/common/main/es.xml +3746 -0
- data/vendor/cldr/common/main/es_AR.xml +130 -0
- data/vendor/cldr/common/main/es_BO.xml +10 -0
- data/vendor/cldr/common/main/es_CL.xml +160 -0
- data/vendor/cldr/common/main/es_CO.xml +128 -0
- data/vendor/cldr/common/main/es_CR.xml +10 -0
- data/vendor/cldr/common/main/es_DO.xml +16 -0
- data/vendor/cldr/common/main/es_EC.xml +123 -0
- data/vendor/cldr/common/main/es_ES.xml +10 -0
- data/vendor/cldr/common/main/es_GT.xml +115 -0
- data/vendor/cldr/common/main/es_HN.xml +115 -0
- data/vendor/cldr/common/main/es_MX.xml +21 -0
- data/vendor/cldr/common/main/es_NI.xml +16 -0
- data/vendor/cldr/common/main/es_PA.xml +110 -0
- data/vendor/cldr/common/main/es_PE.xml +112 -0
- data/vendor/cldr/common/main/es_PR.xml +115 -0
- data/vendor/cldr/common/main/es_PY.xml +19 -0
- data/vendor/cldr/common/main/es_SV.xml +16 -0
- data/vendor/cldr/common/main/es_US.xml +148 -0
- data/vendor/cldr/common/main/es_UY.xml +24 -0
- data/vendor/cldr/common/main/es_VE.xml +19 -0
- data/vendor/cldr/common/main/et.xml +2045 -0
- data/vendor/cldr/common/main/et_EE.xml +10 -0
- data/vendor/cldr/common/main/eu.xml +1004 -0
- data/vendor/cldr/common/main/eu_ES.xml +10 -0
- data/vendor/cldr/common/main/fa.xml +3334 -0
- data/vendor/cldr/common/main/fa_AF.xml +309 -0
- data/vendor/cldr/common/main/fa_IR.xml +10 -0
- data/vendor/cldr/common/main/fi.xml +3870 -0
- data/vendor/cldr/common/main/fi_FI.xml +10 -0
- data/vendor/cldr/common/main/fil.xml +1031 -0
- data/vendor/cldr/common/main/fil_PH.xml +10 -0
- data/vendor/cldr/common/main/fo.xml +799 -0
- data/vendor/cldr/common/main/fo_FO.xml +10 -0
- data/vendor/cldr/common/main/fr.xml +5705 -0
- data/vendor/cldr/common/main/fr_BE.xml +104 -0
- data/vendor/cldr/common/main/fr_CA.xml +152 -0
- data/vendor/cldr/common/main/fr_CH.xml +125 -0
- data/vendor/cldr/common/main/fr_FR.xml +10 -0
- data/vendor/cldr/common/main/fr_LU.xml +23 -0
- data/vendor/cldr/common/main/fr_MC.xml +10 -0
- data/vendor/cldr/common/main/fr_SN.xml +10 -0
- data/vendor/cldr/common/main/fur.xml +1226 -0
- data/vendor/cldr/common/main/fur_IT.xml +10 -0
- data/vendor/cldr/common/main/ga.xml +1504 -0
- data/vendor/cldr/common/main/ga_IE.xml +10 -0
- data/vendor/cldr/common/main/gaa.xml +194 -0
- data/vendor/cldr/common/main/gaa_GH.xml +10 -0
- data/vendor/cldr/common/main/gez.xml +504 -0
- data/vendor/cldr/common/main/gez_ER.xml +10 -0
- data/vendor/cldr/common/main/gez_ET.xml +10 -0
- data/vendor/cldr/common/main/gl.xml +1364 -0
- data/vendor/cldr/common/main/gl_ES.xml +10 -0
- data/vendor/cldr/common/main/gsw.xml +2921 -0
- data/vendor/cldr/common/main/gsw_CH.xml +10 -0
- data/vendor/cldr/common/main/gu.xml +1165 -0
- data/vendor/cldr/common/main/gu_IN.xml +10 -0
- data/vendor/cldr/common/main/gv.xml +201 -0
- data/vendor/cldr/common/main/gv_GB.xml +10 -0
- data/vendor/cldr/common/main/ha.xml +380 -0
- data/vendor/cldr/common/main/ha_Arab.xml +95 -0
- data/vendor/cldr/common/main/ha_Arab_NG.xml +11 -0
- data/vendor/cldr/common/main/ha_Arab_SD.xml +11 -0
- data/vendor/cldr/common/main/ha_GH.xml +11 -0
- data/vendor/cldr/common/main/ha_Latn.xml +10 -0
- data/vendor/cldr/common/main/ha_Latn_GH.xml +11 -0
- data/vendor/cldr/common/main/ha_Latn_NE.xml +11 -0
- data/vendor/cldr/common/main/ha_Latn_NG.xml +11 -0
- data/vendor/cldr/common/main/ha_NE.xml +11 -0
- data/vendor/cldr/common/main/ha_NG.xml +11 -0
- data/vendor/cldr/common/main/ha_SD.xml +11 -0
- data/vendor/cldr/common/main/haw.xml +219 -0
- data/vendor/cldr/common/main/haw_US.xml +10 -0
- data/vendor/cldr/common/main/he.xml +2809 -0
- data/vendor/cldr/common/main/he_IL.xml +10 -0
- data/vendor/cldr/common/main/hi.xml +3376 -0
- data/vendor/cldr/common/main/hi_IN.xml +10 -0
- data/vendor/cldr/common/main/hr.xml +3765 -0
- data/vendor/cldr/common/main/hr_HR.xml +10 -0
- data/vendor/cldr/common/main/hu.xml +3767 -0
- data/vendor/cldr/common/main/hu_HU.xml +10 -0
- data/vendor/cldr/common/main/hy.xml +594 -0
- data/vendor/cldr/common/main/hy_AM.xml +10 -0
- data/vendor/cldr/common/main/hy_AM_REVISED.xml +40 -0
- data/vendor/cldr/common/main/ia.xml +553 -0
- data/vendor/cldr/common/main/id.xml +1342 -0
- data/vendor/cldr/common/main/id_ID.xml +10 -0
- data/vendor/cldr/common/main/ig.xml +198 -0
- data/vendor/cldr/common/main/ig_NG.xml +10 -0
- data/vendor/cldr/common/main/ii.xml +255 -0
- data/vendor/cldr/common/main/ii_CN.xml +10 -0
- data/vendor/cldr/common/main/in.xml +10 -0
- data/vendor/cldr/common/main/is.xml +2394 -0
- data/vendor/cldr/common/main/is_IS.xml +10 -0
- data/vendor/cldr/common/main/it.xml +3028 -0
- data/vendor/cldr/common/main/it_CH.xml +117 -0
- data/vendor/cldr/common/main/it_IT.xml +10 -0
- data/vendor/cldr/common/main/iu.xml +182 -0
- data/vendor/cldr/common/main/iw.xml +10 -0
- data/vendor/cldr/common/main/ja.xml +3816 -0
- data/vendor/cldr/common/main/ja_JP.xml +10 -0
- data/vendor/cldr/common/main/ka.xml +2160 -0
- data/vendor/cldr/common/main/ka_GE.xml +10 -0
- data/vendor/cldr/common/main/kaj.xml +189 -0
- data/vendor/cldr/common/main/kaj_NG.xml +10 -0
- data/vendor/cldr/common/main/kam.xml +188 -0
- data/vendor/cldr/common/main/kam_KE.xml +10 -0
- data/vendor/cldr/common/main/kcg.xml +189 -0
- data/vendor/cldr/common/main/kcg_NG.xml +10 -0
- data/vendor/cldr/common/main/kfo.xml +189 -0
- data/vendor/cldr/common/main/kfo_CI.xml +10 -0
- data/vendor/cldr/common/main/kk.xml +389 -0
- data/vendor/cldr/common/main/kk_Cyrl.xml +10 -0
- data/vendor/cldr/common/main/kk_Cyrl_KZ.xml +11 -0
- data/vendor/cldr/common/main/kk_KZ.xml +11 -0
- data/vendor/cldr/common/main/kl.xml +208 -0
- data/vendor/cldr/common/main/kl_GL.xml +10 -0
- data/vendor/cldr/common/main/km.xml +668 -0
- data/vendor/cldr/common/main/km_KH.xml +10 -0
- data/vendor/cldr/common/main/kn.xml +1166 -0
- data/vendor/cldr/common/main/kn_IN.xml +10 -0
- data/vendor/cldr/common/main/ko.xml +3961 -0
- data/vendor/cldr/common/main/ko_KR.xml +10 -0
- data/vendor/cldr/common/main/kok.xml +364 -0
- data/vendor/cldr/common/main/kok_IN.xml +10 -0
- data/vendor/cldr/common/main/kpe.xml +188 -0
- data/vendor/cldr/common/main/kpe_GN.xml +17 -0
- data/vendor/cldr/common/main/kpe_LR.xml +10 -0
- data/vendor/cldr/common/main/ku.xml +159 -0
- data/vendor/cldr/common/main/ku_Arab.xml +10 -0
- data/vendor/cldr/common/main/ku_Arab_IQ.xml +11 -0
- data/vendor/cldr/common/main/ku_Arab_IR.xml +11 -0
- data/vendor/cldr/common/main/ku_Arab_SY.xml +11 -0
- data/vendor/cldr/common/main/ku_IQ.xml +11 -0
- data/vendor/cldr/common/main/ku_IR.xml +11 -0
- data/vendor/cldr/common/main/ku_Latn.xml +190 -0
- data/vendor/cldr/common/main/ku_Latn_TR.xml +11 -0
- data/vendor/cldr/common/main/ku_SY.xml +11 -0
- data/vendor/cldr/common/main/ku_TR.xml +11 -0
- data/vendor/cldr/common/main/kw.xml +201 -0
- data/vendor/cldr/common/main/kw_GB.xml +10 -0
- data/vendor/cldr/common/main/ky.xml +276 -0
- data/vendor/cldr/common/main/ky_KG.xml +10 -0
- data/vendor/cldr/common/main/ln.xml +492 -0
- data/vendor/cldr/common/main/ln_CD.xml +10 -0
- data/vendor/cldr/common/main/ln_CG.xml +10 -0
- data/vendor/cldr/common/main/lo.xml +624 -0
- data/vendor/cldr/common/main/lo_LA.xml +10 -0
- data/vendor/cldr/common/main/lt.xml +3394 -0
- data/vendor/cldr/common/main/lt_LT.xml +10 -0
- data/vendor/cldr/common/main/lv.xml +3086 -0
- data/vendor/cldr/common/main/lv_LV.xml +10 -0
- data/vendor/cldr/common/main/mk.xml +2323 -0
- data/vendor/cldr/common/main/mk_MK.xml +10 -0
- data/vendor/cldr/common/main/ml.xml +4443 -0
- data/vendor/cldr/common/main/ml_IN.xml +10 -0
- data/vendor/cldr/common/main/mn.xml +320 -0
- data/vendor/cldr/common/main/mn_CN.xml +11 -0
- data/vendor/cldr/common/main/mn_Cyrl.xml +10 -0
- data/vendor/cldr/common/main/mn_Cyrl_MN.xml +11 -0
- data/vendor/cldr/common/main/mn_MN.xml +11 -0
- data/vendor/cldr/common/main/mn_Mong.xml +17 -0
- data/vendor/cldr/common/main/mn_Mong_CN.xml +11 -0
- data/vendor/cldr/common/main/mo.xml +10 -0
- data/vendor/cldr/common/main/mr.xml +1199 -0
- data/vendor/cldr/common/main/mr_IN.xml +10 -0
- data/vendor/cldr/common/main/ms.xml +558 -0
- data/vendor/cldr/common/main/ms_BN.xml +135 -0
- data/vendor/cldr/common/main/ms_MY.xml +10 -0
- data/vendor/cldr/common/main/mt.xml +1146 -0
- data/vendor/cldr/common/main/mt_MT.xml +10 -0
- data/vendor/cldr/common/main/my.xml +1590 -0
- data/vendor/cldr/common/main/my_MM.xml +10 -0
- data/vendor/cldr/common/main/nb.xml +3300 -0
- data/vendor/cldr/common/main/nb_NO.xml +10 -0
- data/vendor/cldr/common/main/nds.xml +1151 -0
- data/vendor/cldr/common/main/nds_DE.xml +10 -0
- data/vendor/cldr/common/main/ne.xml +1387 -0
- data/vendor/cldr/common/main/ne_IN.xml +10 -0
- data/vendor/cldr/common/main/ne_NP.xml +10 -0
- data/vendor/cldr/common/main/nl.xml +3888 -0
- data/vendor/cldr/common/main/nl_BE.xml +81 -0
- data/vendor/cldr/common/main/nl_NL.xml +10 -0
- data/vendor/cldr/common/main/nn.xml +2999 -0
- data/vendor/cldr/common/main/nn_NO.xml +10 -0
- data/vendor/cldr/common/main/no.xml +10 -0
- data/vendor/cldr/common/main/nr.xml +227 -0
- data/vendor/cldr/common/main/nr_ZA.xml +10 -0
- data/vendor/cldr/common/main/nso.xml +229 -0
- data/vendor/cldr/common/main/nso_ZA.xml +10 -0
- data/vendor/cldr/common/main/ny.xml +193 -0
- data/vendor/cldr/common/main/ny_MW.xml +10 -0
- data/vendor/cldr/common/main/oc.xml +280 -0
- data/vendor/cldr/common/main/oc_FR.xml +10 -0
- data/vendor/cldr/common/main/om.xml +328 -0
- data/vendor/cldr/common/main/om_ET.xml +10 -0
- data/vendor/cldr/common/main/om_KE.xml +10 -0
- data/vendor/cldr/common/main/or.xml +1146 -0
- data/vendor/cldr/common/main/or_IN.xml +10 -0
- data/vendor/cldr/common/main/pa.xml +314 -0
- data/vendor/cldr/common/main/pa_Arab.xml +135 -0
- data/vendor/cldr/common/main/pa_Arab_PK.xml +11 -0
- data/vendor/cldr/common/main/pa_Guru.xml +10 -0
- data/vendor/cldr/common/main/pa_Guru_IN.xml +11 -0
- data/vendor/cldr/common/main/pa_IN.xml +11 -0
- data/vendor/cldr/common/main/pa_PK.xml +11 -0
- data/vendor/cldr/common/main/pl.xml +3124 -0
- data/vendor/cldr/common/main/pl_PL.xml +10 -0
- data/vendor/cldr/common/main/ps.xml +425 -0
- data/vendor/cldr/common/main/ps_AF.xml +10 -0
- data/vendor/cldr/common/main/pt.xml +4373 -0
- data/vendor/cldr/common/main/pt_BR.xml +10 -0
- data/vendor/cldr/common/main/pt_PT.xml +1866 -0
- data/vendor/cldr/common/main/ro.xml +2515 -0
- data/vendor/cldr/common/main/ro_MD.xml +10 -0
- data/vendor/cldr/common/main/ro_RO.xml +10 -0
- data/vendor/cldr/common/main/root.xml +3193 -0
- data/vendor/cldr/common/main/ru.xml +3992 -0
- data/vendor/cldr/common/main/ru_RU.xml +10 -0
- data/vendor/cldr/common/main/ru_UA.xml +117 -0
- data/vendor/cldr/common/main/rw.xml +306 -0
- data/vendor/cldr/common/main/rw_RW.xml +10 -0
- data/vendor/cldr/common/main/sa.xml +152 -0
- data/vendor/cldr/common/main/sa_IN.xml +10 -0
- data/vendor/cldr/common/main/se.xml +745 -0
- data/vendor/cldr/common/main/se_FI.xml +250 -0
- data/vendor/cldr/common/main/se_NO.xml +10 -0
- data/vendor/cldr/common/main/sh.xml +10 -0
- data/vendor/cldr/common/main/sh_BA.xml +11 -0
- data/vendor/cldr/common/main/sh_CS.xml +11 -0
- data/vendor/cldr/common/main/sh_YU.xml +11 -0
- data/vendor/cldr/common/main/si.xml +242 -0
- data/vendor/cldr/common/main/si_LK.xml +10 -0
- data/vendor/cldr/common/main/sid.xml +249 -0
- data/vendor/cldr/common/main/sid_ET.xml +10 -0
- data/vendor/cldr/common/main/sk.xml +1923 -0
- data/vendor/cldr/common/main/sk_SK.xml +10 -0
- data/vendor/cldr/common/main/sl.xml +2573 -0
- data/vendor/cldr/common/main/sl_SI.xml +10 -0
- data/vendor/cldr/common/main/so.xml +560 -0
- data/vendor/cldr/common/main/so_DJ.xml +10 -0
- data/vendor/cldr/common/main/so_ET.xml +10 -0
- data/vendor/cldr/common/main/so_KE.xml +10 -0
- data/vendor/cldr/common/main/so_SO.xml +10 -0
- data/vendor/cldr/common/main/sq.xml +657 -0
- data/vendor/cldr/common/main/sq_AL.xml +10 -0
- data/vendor/cldr/common/main/sr.xml +5983 -0
- data/vendor/cldr/common/main/sr_BA.xml +11 -0
- data/vendor/cldr/common/main/sr_CS.xml +11 -0
- data/vendor/cldr/common/main/sr_Cyrl.xml +10 -0
- data/vendor/cldr/common/main/sr_Cyrl_BA.xml +104 -0
- data/vendor/cldr/common/main/sr_Cyrl_CS.xml +12 -0
- data/vendor/cldr/common/main/sr_Cyrl_ME.xml +11 -0
- data/vendor/cldr/common/main/sr_Cyrl_RS.xml +11 -0
- data/vendor/cldr/common/main/sr_Cyrl_YU.xml +12 -0
- data/vendor/cldr/common/main/sr_Latn.xml +5382 -0
- data/vendor/cldr/common/main/sr_Latn_BA.xml +11 -0
- data/vendor/cldr/common/main/sr_Latn_CS.xml +12 -0
- data/vendor/cldr/common/main/sr_Latn_ME.xml +55 -0
- data/vendor/cldr/common/main/sr_Latn_RS.xml +11 -0
- data/vendor/cldr/common/main/sr_Latn_YU.xml +12 -0
- data/vendor/cldr/common/main/sr_ME.xml +11 -0
- data/vendor/cldr/common/main/sr_RS.xml +11 -0
- data/vendor/cldr/common/main/sr_YU.xml +11 -0
- data/vendor/cldr/common/main/ss.xml +231 -0
- data/vendor/cldr/common/main/ss_SZ.xml +11 -0
- data/vendor/cldr/common/main/ss_ZA.xml +10 -0
- data/vendor/cldr/common/main/st.xml +321 -0
- data/vendor/cldr/common/main/st_LS.xml +17 -0
- data/vendor/cldr/common/main/st_ZA.xml +10 -0
- data/vendor/cldr/common/main/sv.xml +5088 -0
- data/vendor/cldr/common/main/sv_FI.xml +48 -0
- data/vendor/cldr/common/main/sv_SE.xml +10 -0
- data/vendor/cldr/common/main/sw.xml +400 -0
- data/vendor/cldr/common/main/sw_KE.xml +19 -0
- data/vendor/cldr/common/main/sw_TZ.xml +10 -0
- data/vendor/cldr/common/main/syr.xml +129 -0
- data/vendor/cldr/common/main/syr_SY.xml +10 -0
- data/vendor/cldr/common/main/ta.xml +1195 -0
- data/vendor/cldr/common/main/ta_IN.xml +10 -0
- data/vendor/cldr/common/main/te.xml +1159 -0
- data/vendor/cldr/common/main/te_IN.xml +10 -0
- data/vendor/cldr/common/main/tg.xml +224 -0
- data/vendor/cldr/common/main/tg_Cyrl.xml +10 -0
- data/vendor/cldr/common/main/tg_Cyrl_TJ.xml +11 -0
- data/vendor/cldr/common/main/tg_TJ.xml +11 -0
- data/vendor/cldr/common/main/th.xml +4466 -0
- data/vendor/cldr/common/main/th_TH.xml +10 -0
- data/vendor/cldr/common/main/ti.xml +326 -0
- data/vendor/cldr/common/main/ti_ER.xml +124 -0
- data/vendor/cldr/common/main/ti_ET.xml +10 -0
- data/vendor/cldr/common/main/tig.xml +501 -0
- data/vendor/cldr/common/main/tig_ER.xml +10 -0
- data/vendor/cldr/common/main/tl.xml +10 -0
- data/vendor/cldr/common/main/tn.xml +313 -0
- data/vendor/cldr/common/main/tn_ZA.xml +10 -0
- data/vendor/cldr/common/main/to.xml +613 -0
- data/vendor/cldr/common/main/to_TO.xml +10 -0
- data/vendor/cldr/common/main/tr.xml +3782 -0
- data/vendor/cldr/common/main/tr_TR.xml +10 -0
- data/vendor/cldr/common/main/trv.xml +562 -0
- data/vendor/cldr/common/main/trv_TW.xml +10 -0
- data/vendor/cldr/common/main/ts.xml +173 -0
- data/vendor/cldr/common/main/ts_ZA.xml +10 -0
- data/vendor/cldr/common/main/tt.xml +105 -0
- data/vendor/cldr/common/main/tt_RU.xml +10 -0
- data/vendor/cldr/common/main/ug.xml +40 -0
- data/vendor/cldr/common/main/ug_Arab.xml +10 -0
- data/vendor/cldr/common/main/ug_Arab_CN.xml +11 -0
- data/vendor/cldr/common/main/ug_CN.xml +11 -0
- data/vendor/cldr/common/main/uk.xml +3855 -0
- data/vendor/cldr/common/main/uk_UA.xml +10 -0
- data/vendor/cldr/common/main/ur.xml +1027 -0
- data/vendor/cldr/common/main/ur_IN.xml +33 -0
- data/vendor/cldr/common/main/ur_PK.xml +10 -0
- data/vendor/cldr/common/main/uz.xml +235 -0
- data/vendor/cldr/common/main/uz_AF.xml +11 -0
- data/vendor/cldr/common/main/uz_Arab.xml +172 -0
- data/vendor/cldr/common/main/uz_Arab_AF.xml +12 -0
- data/vendor/cldr/common/main/uz_Cyrl.xml +11 -0
- data/vendor/cldr/common/main/uz_Cyrl_UZ.xml +11 -0
- data/vendor/cldr/common/main/uz_Latn.xml +170 -0
- data/vendor/cldr/common/main/uz_Latn_UZ.xml +11 -0
- data/vendor/cldr/common/main/uz_UZ.xml +11 -0
- data/vendor/cldr/common/main/ve.xml +194 -0
- data/vendor/cldr/common/main/ve_ZA.xml +10 -0
- data/vendor/cldr/common/main/vi.xml +1065 -0
- data/vendor/cldr/common/main/vi_VN.xml +10 -0
- data/vendor/cldr/common/main/wal.xml +350 -0
- data/vendor/cldr/common/main/wal_ET.xml +10 -0
- data/vendor/cldr/common/main/wo.xml +42 -0
- data/vendor/cldr/common/main/wo_Latn.xml +10 -0
- data/vendor/cldr/common/main/wo_Latn_SN.xml +11 -0
- data/vendor/cldr/common/main/wo_SN.xml +10 -0
- data/vendor/cldr/common/main/xh.xml +261 -0
- data/vendor/cldr/common/main/xh_ZA.xml +10 -0
- data/vendor/cldr/common/main/yo.xml +240 -0
- data/vendor/cldr/common/main/yo_NG.xml +10 -0
- data/vendor/cldr/common/main/zh.xml +4612 -0
- data/vendor/cldr/common/main/zh_CN.xml +11 -0
- data/vendor/cldr/common/main/zh_HK.xml +11 -0
- data/vendor/cldr/common/main/zh_Hans.xml +10 -0
- data/vendor/cldr/common/main/zh_Hans_CN.xml +11 -0
- data/vendor/cldr/common/main/zh_Hans_HK.xml +18 -0
- data/vendor/cldr/common/main/zh_Hans_MO.xml +11 -0
- data/vendor/cldr/common/main/zh_Hans_SG.xml +88 -0
- data/vendor/cldr/common/main/zh_Hant.xml +3791 -0
- data/vendor/cldr/common/main/zh_Hant_HK.xml +191 -0
- data/vendor/cldr/common/main/zh_Hant_MO.xml +117 -0
- data/vendor/cldr/common/main/zh_Hant_TW.xml +11 -0
- data/vendor/cldr/common/main/zh_MO.xml +11 -0
- data/vendor/cldr/common/main/zh_SG.xml +11 -0
- data/vendor/cldr/common/main/zh_TW.xml +11 -0
- data/vendor/cldr/common/main/zu.xml +334 -0
- data/vendor/cldr/common/main/zu_ZA.xml +10 -0
- data/vendor/cldr/common/rbnf/af.xml +105 -0
- data/vendor/cldr/common/rbnf/am.xml +68 -0
- data/vendor/cldr/common/rbnf/ar.xml +247 -0
- data/vendor/cldr/common/rbnf/az.xml +109 -0
- data/vendor/cldr/common/rbnf/be.xml +159 -0
- data/vendor/cldr/common/rbnf/bg.xml +105 -0
- data/vendor/cldr/common/rbnf/bs.xml +129 -0
- data/vendor/cldr/common/rbnf/ca.xml +278 -0
- data/vendor/cldr/common/rbnf/cs.xml +138 -0
- data/vendor/cldr/common/rbnf/cy.xml +116 -0
- data/vendor/cldr/common/rbnf/da.xml +81 -0
- data/vendor/cldr/common/rbnf/de.xml +130 -0
- data/vendor/cldr/common/rbnf/el.xml +310 -0
- data/vendor/cldr/common/rbnf/en.xml +174 -0
- data/vendor/cldr/common/rbnf/eo.xml +52 -0
- data/vendor/cldr/common/rbnf/es.xml +266 -0
- data/vendor/cldr/common/rbnf/et.xml +51 -0
- data/vendor/cldr/common/rbnf/fa.xml +64 -0
- data/vendor/cldr/common/rbnf/fa_AF.xml +63 -0
- data/vendor/cldr/common/rbnf/fi.xml +53 -0
- data/vendor/cldr/common/rbnf/fil.xml +70 -0
- data/vendor/cldr/common/rbnf/fo.xml +124 -0
- data/vendor/cldr/common/rbnf/fr.xml +147 -0
- data/vendor/cldr/common/rbnf/fr_BE.xml +152 -0
- data/vendor/cldr/common/rbnf/fr_CH.xml +152 -0
- data/vendor/cldr/common/rbnf/ga.xml +240 -0
- data/vendor/cldr/common/rbnf/he.xml +401 -0
- data/vendor/cldr/common/rbnf/hi.xml +137 -0
- data/vendor/cldr/common/rbnf/hr.xml +159 -0
- data/vendor/cldr/common/rbnf/hu.xml +55 -0
- data/vendor/cldr/common/rbnf/hy.xml +50 -0
- data/vendor/cldr/common/rbnf/id.xml +57 -0
- data/vendor/cldr/common/rbnf/is.xml +124 -0
- data/vendor/cldr/common/rbnf/it.xml +237 -0
- data/vendor/cldr/common/rbnf/ja.xml +78 -0
- data/vendor/cldr/common/rbnf/ka.xml +76 -0
- data/vendor/cldr/common/rbnf/kl.xml +82 -0
- data/vendor/cldr/common/rbnf/ko.xml +82 -0
- data/vendor/cldr/common/rbnf/lo.xml +57 -0
- data/vendor/cldr/common/rbnf/lt.xml +89 -0
- data/vendor/cldr/common/rbnf/lv.xml +94 -0
- data/vendor/cldr/common/rbnf/mk.xml +105 -0
- data/vendor/cldr/common/rbnf/ms.xml +60 -0
- data/vendor/cldr/common/rbnf/mt.xml +418 -0
- data/vendor/cldr/common/rbnf/nb.xml +80 -0
- data/vendor/cldr/common/rbnf/nci.xml +109 -0
- data/vendor/cldr/common/rbnf/nl.xml +112 -0
- data/vendor/cldr/common/rbnf/nn.xml +79 -0
- data/vendor/cldr/common/rbnf/pl.xml +131 -0
- data/vendor/cldr/common/rbnf/pt.xml +221 -0
- data/vendor/cldr/common/rbnf/pt_PT.xml +206 -0
- data/vendor/cldr/common/rbnf/ro.xml +101 -0
- data/vendor/cldr/common/rbnf/root.xml +527 -0
- data/vendor/cldr/common/rbnf/ru.xml +144 -0
- data/vendor/cldr/common/rbnf/se.xml +47 -0
- data/vendor/cldr/common/rbnf/sk.xml +117 -0
- data/vendor/cldr/common/rbnf/sl.xml +141 -0
- data/vendor/cldr/common/rbnf/sq.xml +75 -0
- data/vendor/cldr/common/rbnf/sr.xml +161 -0
- data/vendor/cldr/common/rbnf/sr_Latn.xml +160 -0
- data/vendor/cldr/common/rbnf/sv.xml +241 -0
- data/vendor/cldr/common/rbnf/ta.xml +71 -0
- data/vendor/cldr/common/rbnf/th.xml +57 -0
- data/vendor/cldr/common/rbnf/tr.xml +121 -0
- data/vendor/cldr/common/rbnf/uk.xml +159 -0
- data/vendor/cldr/common/rbnf/vi.xml +51 -0
- data/vendor/cldr/common/rbnf/zh.xml +146 -0
- data/vendor/cldr/common/rbnf/zh_Hant.xml +147 -0
- data/vendor/cldr/common/segments/el.xml +18 -0
- data/vendor/cldr/common/segments/en_US_POSIX.xml +22 -0
- data/vendor/cldr/common/segments/ja.xml +23 -0
- data/vendor/cldr/common/segments/root.xml +629 -0
- data/vendor/cldr/common/segments/th.xml +25 -0
- data/vendor/cldr/common/supplemental/characters.xml +491 -0
- data/vendor/cldr/common/supplemental/likelySubtags.xml +463 -0
- data/vendor/cldr/common/supplemental/metazoneInfo.xml +1409 -0
- data/vendor/cldr/common/supplemental/numberingSystems.xml +42 -0
- data/vendor/cldr/common/supplemental/plurals.xml +76 -0
- data/vendor/cldr/common/supplemental/postalCodeData.xml +166 -0
- data/vendor/cldr/common/supplemental/supplementalData.xml +5611 -0
- data/vendor/cldr/common/supplemental/supplementalMetadata.xml +744 -0
- data/vendor/cldr/common/supplemental/telephoneCodeData.xml +846 -0
- data/vendor/cldr/common/transforms/Amharic-Latin-BGN.xml +580 -0
- data/vendor/cldr/common/transforms/Any-Accents.xml +277 -0
- data/vendor/cldr/common/transforms/Any-Publishing.xml +29 -0
- data/vendor/cldr/common/transforms/Arabic-Latin-BGN.xml +234 -0
- data/vendor/cldr/common/transforms/Arabic-Latin.xml +138 -0
- data/vendor/cldr/common/transforms/Armenian-Latin-BGN.xml +285 -0
- data/vendor/cldr/common/transforms/Azerbaijani-Latin-BGN.xml +212 -0
- data/vendor/cldr/common/transforms/Belarusian-Latin-BGN.xml +285 -0
- data/vendor/cldr/common/transforms/Bengali-Devanagari.xml +14 -0
- data/vendor/cldr/common/transforms/Bengali-Gujarati.xml +14 -0
- data/vendor/cldr/common/transforms/Bengali-Gurmukhi.xml +14 -0
- data/vendor/cldr/common/transforms/Bengali-InterIndic.xml +106 -0
- data/vendor/cldr/common/transforms/Bengali-Kannada.xml +14 -0
- data/vendor/cldr/common/transforms/Bengali-Latin.xml +14 -0
- data/vendor/cldr/common/transforms/Bengali-Malayalam.xml +14 -0
- data/vendor/cldr/common/transforms/Bengali-Oriya.xml +14 -0
- data/vendor/cldr/common/transforms/Bengali-Tamil.xml +14 -0
- data/vendor/cldr/common/transforms/Bengali-Telugu.xml +14 -0
- data/vendor/cldr/common/transforms/Bulgarian-Latin-BGN.xml +271 -0
- data/vendor/cldr/common/transforms/CanadianAboriginal-Latin.xml +191 -0
- data/vendor/cldr/common/transforms/Cyrillic-Latin.xml +277 -0
- data/vendor/cldr/common/transforms/Devanagari-Bengali.xml +14 -0
- data/vendor/cldr/common/transforms/Devanagari-Gujarati.xml +14 -0
- data/vendor/cldr/common/transforms/Devanagari-Gurmukhi.xml +14 -0
- data/vendor/cldr/common/transforms/Devanagari-InterIndic.xml +119 -0
- data/vendor/cldr/common/transforms/Devanagari-Kannada.xml +14 -0
- data/vendor/cldr/common/transforms/Devanagari-Latin.xml +14 -0
- data/vendor/cldr/common/transforms/Devanagari-Malayalam.xml +14 -0
- data/vendor/cldr/common/transforms/Devanagari-Oriya.xml +14 -0
- data/vendor/cldr/common/transforms/Devanagari-Tamil.xml +14 -0
- data/vendor/cldr/common/transforms/Devanagari-Telugu.xml +14 -0
- data/vendor/cldr/common/transforms/Fullwidth-Halfwidth.xml +268 -0
- data/vendor/cldr/common/transforms/Georgian-Latin-BGN.xml +96 -0
- data/vendor/cldr/common/transforms/Georgian-Latin.xml +60 -0
- data/vendor/cldr/common/transforms/Greek-Latin-BGN.xml +481 -0
- data/vendor/cldr/common/transforms/Greek-Latin.xml +257 -0
- data/vendor/cldr/common/transforms/Greek_Latin_UNGEGN.xml +186 -0
- data/vendor/cldr/common/transforms/Gujarati-Bengali.xml +14 -0
- data/vendor/cldr/common/transforms/Gujarati-Devanagari.xml +14 -0
- data/vendor/cldr/common/transforms/Gujarati-Gurmukhi.xml +14 -0
- data/vendor/cldr/common/transforms/Gujarati-InterIndic.xml +95 -0
- data/vendor/cldr/common/transforms/Gujarati-Kannada.xml +14 -0
- data/vendor/cldr/common/transforms/Gujarati-Latin.xml +14 -0
- data/vendor/cldr/common/transforms/Gujarati-Malayalam.xml +14 -0
- data/vendor/cldr/common/transforms/Gujarati-Oriya.xml +14 -0
- data/vendor/cldr/common/transforms/Gujarati-Tamil.xml +14 -0
- data/vendor/cldr/common/transforms/Gujarati-Telugu.xml +14 -0
- data/vendor/cldr/common/transforms/Gurmukhi-Bengali.xml +14 -0
- data/vendor/cldr/common/transforms/Gurmukhi-Devanagari.xml +14 -0
- data/vendor/cldr/common/transforms/Gurmukhi-Gujarati.xml +14 -0
- data/vendor/cldr/common/transforms/Gurmukhi-InterIndic.xml +95 -0
- data/vendor/cldr/common/transforms/Gurmukhi-Kannada.xml +14 -0
- data/vendor/cldr/common/transforms/Gurmukhi-Latin.xml +14 -0
- data/vendor/cldr/common/transforms/Gurmukhi-Malayalam.xml +14 -0
- data/vendor/cldr/common/transforms/Gurmukhi-Oriya.xml +14 -0
- data/vendor/cldr/common/transforms/Gurmukhi-Tamil.xml +14 -0
- data/vendor/cldr/common/transforms/Gurmukhi-Telugu.xml +14 -0
- data/vendor/cldr/common/transforms/Han-Latin.xml +1439 -0
- data/vendor/cldr/common/transforms/Han-Spacedhan.xml +21 -0
- data/vendor/cldr/common/transforms/Hangul-Latin.xml +13 -0
- data/vendor/cldr/common/transforms/Hebrew-Latin-BGN.xml +132 -0
- data/vendor/cldr/common/transforms/Hebrew-Latin.xml +95 -0
- data/vendor/cldr/common/transforms/Hiragana-Katakana.xml +186 -0
- data/vendor/cldr/common/transforms/Hiragana-Latin.xml +16 -0
- data/vendor/cldr/common/transforms/InterIndic-Bengali.xml +142 -0
- data/vendor/cldr/common/transforms/InterIndic-Devanagari.xml +159 -0
- data/vendor/cldr/common/transforms/InterIndic-Gujarati.xml +143 -0
- data/vendor/cldr/common/transforms/InterIndic-Gurmukhi.xml +149 -0
- data/vendor/cldr/common/transforms/InterIndic-Kannada.xml +144 -0
- data/vendor/cldr/common/transforms/InterIndic-Latin.xml +497 -0
- data/vendor/cldr/common/transforms/InterIndic-Malayalam.xml +144 -0
- data/vendor/cldr/common/transforms/InterIndic-Oriya.xml +142 -0
- data/vendor/cldr/common/transforms/InterIndic-Tamil.xml +153 -0
- data/vendor/cldr/common/transforms/InterIndic-Telugu.xml +143 -0
- data/vendor/cldr/common/transforms/Jamo-Latin.xml +13 -0
- data/vendor/cldr/common/transforms/Kannada-Bengali.xml +14 -0
- data/vendor/cldr/common/transforms/Kannada-Devanagari.xml +14 -0
- data/vendor/cldr/common/transforms/Kannada-Gujarati.xml +14 -0
- data/vendor/cldr/common/transforms/Kannada-Gurmukhi.xml +14 -0
- data/vendor/cldr/common/transforms/Kannada-InterIndic.xml +94 -0
- data/vendor/cldr/common/transforms/Kannada-Latin.xml +14 -0
- data/vendor/cldr/common/transforms/Kannada-Malayalam.xml +14 -0
- data/vendor/cldr/common/transforms/Kannada-Oriya.xml +14 -0
- data/vendor/cldr/common/transforms/Kannada-Tamil.xml +14 -0
- data/vendor/cldr/common/transforms/Kannada-Telugu.xml +14 -0
- data/vendor/cldr/common/transforms/Katakana-Latin-BGN.xml +443 -0
- data/vendor/cldr/common/transforms/Kazakh-Latin-BGN.xml +366 -0
- data/vendor/cldr/common/transforms/Kirghiz-Latin-BGN.xml +235 -0
- data/vendor/cldr/common/transforms/Korean-Latin-BGN.xml +382 -0
- data/vendor/cldr/common/transforms/Latin-Armenian.xml +91 -0
- data/vendor/cldr/common/transforms/Latin-Bengali.xml +15 -0
- data/vendor/cldr/common/transforms/Latin-ConjoiningJamo.xml +522 -0
- data/vendor/cldr/common/transforms/Latin-Devanagari.xml +15 -0
- data/vendor/cldr/common/transforms/Latin-Ethiopic.xml +358 -0
- data/vendor/cldr/common/transforms/Latin-Gujarati.xml +15 -0
- data/vendor/cldr/common/transforms/Latin-Gurmukhi.xml +15 -0
- data/vendor/cldr/common/transforms/Latin-Hangul.xml +14 -0
- data/vendor/cldr/common/transforms/Latin-InterIndic.xml +384 -0
- data/vendor/cldr/common/transforms/Latin-Jamo.xml +13 -0
- data/vendor/cldr/common/transforms/Latin-Kannada.xml +15 -0
- data/vendor/cldr/common/transforms/Latin-Katakana.xml +389 -0
- data/vendor/cldr/common/transforms/Latin-Malayalam.xml +15 -0
- data/vendor/cldr/common/transforms/Latin-NumericPinyin.xml +36 -0
- data/vendor/cldr/common/transforms/Latin-Oriya.xml +15 -0
- data/vendor/cldr/common/transforms/Latin-Tamil.xml +15 -0
- data/vendor/cldr/common/transforms/Latin-Telugu.xml +15 -0
- data/vendor/cldr/common/transforms/Latin-Thai.xml +14 -0
- data/vendor/cldr/common/transforms/Macedonian-Latin-BGN.xml +198 -0
- data/vendor/cldr/common/transforms/Malayalam-Bengali.xml +14 -0
- data/vendor/cldr/common/transforms/Malayalam-Devanagari.xml +14 -0
- data/vendor/cldr/common/transforms/Malayalam-Gujarati.xml +14 -0
- data/vendor/cldr/common/transforms/Malayalam-Gurmukhi.xml +14 -0
- data/vendor/cldr/common/transforms/Malayalam-InterIndic.xml +88 -0
- data/vendor/cldr/common/transforms/Malayalam-Kannada.xml +14 -0
- data/vendor/cldr/common/transforms/Malayalam-Latin.xml +14 -0
- data/vendor/cldr/common/transforms/Malayalam-Oriya.xml +14 -0
- data/vendor/cldr/common/transforms/Malayalam-Tamil.xml +14 -0
- data/vendor/cldr/common/transforms/Malayalam-Telugu.xml +14 -0
- data/vendor/cldr/common/transforms/Maldivian-Latin-BGN.xml +141 -0
- data/vendor/cldr/common/transforms/Mongolian-Latin-BGN.xml +209 -0
- data/vendor/cldr/common/transforms/Oriya-Bengali.xml +14 -0
- data/vendor/cldr/common/transforms/Oriya-Devanagari.xml +14 -0
- data/vendor/cldr/common/transforms/Oriya-Gujarati.xml +14 -0
- data/vendor/cldr/common/transforms/Oriya-Gurmukhi.xml +14 -0
- data/vendor/cldr/common/transforms/Oriya-InterIndic.xml +98 -0
- data/vendor/cldr/common/transforms/Oriya-Kannada.xml +14 -0
- data/vendor/cldr/common/transforms/Oriya-Latin.xml +14 -0
- data/vendor/cldr/common/transforms/Oriya-Malayalam.xml +14 -0
- data/vendor/cldr/common/transforms/Oriya-Tamil.xml +14 -0
- data/vendor/cldr/common/transforms/Oriya-Telugu.xml +14 -0
- data/vendor/cldr/common/transforms/Pashto-Latin-BGN.xml +262 -0
- data/vendor/cldr/common/transforms/Persian-Latin-BGN.xml +233 -0
- data/vendor/cldr/common/transforms/Pinyin-NumericPinyin.xml +15 -0
- data/vendor/cldr/common/transforms/Russian-Latin-BGN.xml +347 -0
- data/vendor/cldr/common/transforms/Serbian-Latin-BGN.xml +136 -0
- data/vendor/cldr/common/transforms/Simplified-Traditional.xml +3576 -0
- data/vendor/cldr/common/transforms/Syriac-Latin.xml +59 -0
- data/vendor/cldr/common/transforms/Tamil-Bengali.xml +14 -0
- data/vendor/cldr/common/transforms/Tamil-Devanagari.xml +14 -0
- data/vendor/cldr/common/transforms/Tamil-Gujarati.xml +14 -0
- data/vendor/cldr/common/transforms/Tamil-Gurmukhi.xml +14 -0
- data/vendor/cldr/common/transforms/Tamil-InterIndic.xml +77 -0
- data/vendor/cldr/common/transforms/Tamil-Kannada.xml +14 -0
- data/vendor/cldr/common/transforms/Tamil-Latin.xml +14 -0
- data/vendor/cldr/common/transforms/Tamil-Malayalam.xml +14 -0
- data/vendor/cldr/common/transforms/Tamil-Oriya.xml +14 -0
- data/vendor/cldr/common/transforms/Tamil-Telugu.xml +14 -0
- data/vendor/cldr/common/transforms/Telugu-Bengali.xml +14 -0
- data/vendor/cldr/common/transforms/Telugu-Devanagari.xml +14 -0
- data/vendor/cldr/common/transforms/Telugu-Gujarati.xml +14 -0
- data/vendor/cldr/common/transforms/Telugu-Gurmukhi.xml +14 -0
- data/vendor/cldr/common/transforms/Telugu-InterIndic.xml +94 -0
- data/vendor/cldr/common/transforms/Telugu-Kannada.xml +14 -0
- data/vendor/cldr/common/transforms/Telugu-Latin.xml +14 -0
- data/vendor/cldr/common/transforms/Telugu-Malayalam.xml +14 -0
- data/vendor/cldr/common/transforms/Telugu-Oriya.xml +14 -0
- data/vendor/cldr/common/transforms/Telugu-Tamil.xml +14 -0
- data/vendor/cldr/common/transforms/Thaana-Latin.xml +440 -0
- data/vendor/cldr/common/transforms/Thai-Latin.xml +16 -0
- data/vendor/cldr/common/transforms/Thai-ThaiLogical.xml +23 -0
- data/vendor/cldr/common/transforms/Thai-ThaiSemi.xml +13 -0
- data/vendor/cldr/common/transforms/ThaiLogical-Latin.xml +153 -0
- data/vendor/cldr/common/transforms/Turkmen-Latin-BGN.xml +334 -0
- data/vendor/cldr/common/transforms/Ukrainian-Latin-BGN.xml +316 -0
- data/vendor/cldr/common/transforms/Uzbek-Latin-BGN.xml +290 -0
- metadata +906 -88
- data/test/cases/backend/cascade_test.rb +0 -66
- data/test/cases/backend/fallbacks_test.rb +0 -57
@@ -1,7 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
|
3
|
-
require
|
4
|
-
require 'i18n/backend/cache'
|
2
|
+
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../')); $:.uniq!
|
3
|
+
require 'test_helper'
|
5
4
|
|
6
5
|
begin
|
7
6
|
require 'active_support'
|
@@ -25,12 +24,12 @@ class I18nBackendCacheTest < Test::Unit::TestCase
|
|
25
24
|
I18n.cache_store = nil
|
26
25
|
end
|
27
26
|
|
28
|
-
|
27
|
+
test "it uses the cache" do
|
29
28
|
assert I18n.cache_store.is_a?(ActiveSupport::Cache::MemoryStore)
|
30
29
|
end
|
31
30
|
|
32
31
|
with_mocha do
|
33
|
-
|
32
|
+
test "translate hits the backend and caches the response" do
|
34
33
|
I18n.backend.expects(:lookup).returns('Foo')
|
35
34
|
assert_equal 'Foo', I18n.t(:foo)
|
36
35
|
|
@@ -41,20 +40,20 @@ class I18nBackendCacheTest < Test::Unit::TestCase
|
|
41
40
|
assert_equal 'Bar', I18n.t(:bar)
|
42
41
|
end
|
43
42
|
|
44
|
-
|
43
|
+
test "still raises MissingTranslationData but also caches it" do
|
45
44
|
I18n.backend.expects(:lookup).returns(nil)
|
46
|
-
|
45
|
+
assert_raise(I18n::MissingTranslationData) { I18n.t(:missing, :raise => true) }
|
47
46
|
|
48
47
|
I18n.backend.expects(:lookup).never
|
49
|
-
|
48
|
+
assert_raise(I18n::MissingTranslationData) { I18n.t(:missing, :raise => true) }
|
50
49
|
end
|
51
50
|
end
|
52
51
|
|
53
|
-
|
52
|
+
test "uses 'i18n' as a cache key namespace by default" do
|
54
53
|
assert_equal 0, I18n.backend.send(:cache_key, :foo).index('i18n')
|
55
54
|
end
|
56
55
|
|
57
|
-
|
56
|
+
test "adds a custom cache key namespace" do
|
58
57
|
with_cache_namespace('bar') do
|
59
58
|
assert_equal 0, I18n.backend.send(:cache_key, :foo).index('i18n-bar')
|
60
59
|
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../')); $:.uniq!
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class I18nBackendCascadeTest < Test::Unit::TestCase
|
6
|
+
class Backend
|
7
|
+
include I18n::Backend::Base
|
8
|
+
include I18n::Backend::Cascade
|
9
|
+
end
|
10
|
+
|
11
|
+
def setup
|
12
|
+
I18n.backend = Backend.new
|
13
|
+
store_translations(:en,
|
14
|
+
:foo => 'foo',
|
15
|
+
:bar => { :baz => 'baz' }
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
def lookup(key, options = {})
|
20
|
+
I18n.t(key, options.merge(:cascade => { :step => 1, :offset => 1, :skip_root => false }))
|
21
|
+
end
|
22
|
+
|
23
|
+
test "still returns an existing translation as usual" do
|
24
|
+
assert_equal 'foo', lookup(:foo)
|
25
|
+
assert_equal 'baz', lookup(:'bar.baz')
|
26
|
+
end
|
27
|
+
|
28
|
+
test "falls back by cutting keys off the end of the scope" do
|
29
|
+
assert_equal 'foo', lookup(:foo, :scope => :'missing')
|
30
|
+
assert_equal 'foo', lookup(:foo, :scope => :'missing.missing')
|
31
|
+
assert_equal 'baz', lookup(:baz, :scope => :'bar.missing')
|
32
|
+
assert_equal 'baz', lookup(:baz, :scope => :'bar.missing.missing')
|
33
|
+
end
|
34
|
+
|
35
|
+
test "raises I18n::MissingTranslationData exception when no translation was found" do
|
36
|
+
assert_raise(I18n::MissingTranslationData) { lookup(:'foo.missing', :raise => true) }
|
37
|
+
assert_raise(I18n::MissingTranslationData) { lookup(:'bar.baz.missing', :raise => true) }
|
38
|
+
assert_raise(I18n::MissingTranslationData) { lookup(:'missing.bar.baz', :raise => true) }
|
39
|
+
end
|
40
|
+
|
41
|
+
test "cascades before evaluating the default" do
|
42
|
+
assert_equal 'foo', lookup(:foo, :scope => :missing, :default => 'default')
|
43
|
+
end
|
44
|
+
|
45
|
+
test "cascades defaults, too" do
|
46
|
+
assert_equal 'foo', lookup(nil, :default => [:'missing.missing', :'missing.foo'])
|
47
|
+
end
|
48
|
+
|
49
|
+
test "let's us assemble required fallbacks for ActiveRecord validation messages" do
|
50
|
+
store_translations(:en,
|
51
|
+
:errors => {
|
52
|
+
:reply => {
|
53
|
+
:title => {
|
54
|
+
:blank => 'blank on reply title'
|
55
|
+
},
|
56
|
+
:taken => 'taken on reply'
|
57
|
+
},
|
58
|
+
:topic => {
|
59
|
+
:title => {
|
60
|
+
:format => 'format on topic title'
|
61
|
+
},
|
62
|
+
:length => 'length on topic'
|
63
|
+
},
|
64
|
+
:odd => 'odd on errors'
|
65
|
+
}
|
66
|
+
)
|
67
|
+
assert_equal 'blank on reply title', lookup(:'errors.reply.title.blank', :default => :'errors.topic.title.blank')
|
68
|
+
assert_equal 'taken on reply', lookup(:'errors.reply.title.taken', :default => :'errors.topic.title.taken')
|
69
|
+
assert_equal 'format on topic title', lookup(:'errors.reply.title.format', :default => :'errors.topic.title.format')
|
70
|
+
assert_equal 'length on topic', lookup(:'errors.reply.title.length', :default => :'errors.topic.title.length')
|
71
|
+
assert_equal 'odd on errors', lookup(:'errors.reply.title.odd', :default => :'errors.topic.title.odd')
|
72
|
+
end
|
73
|
+
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
|
3
|
-
require
|
4
|
-
require 'i18n/backend/chain'
|
2
|
+
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../')); $:.uniq!
|
3
|
+
require 'test_helper'
|
5
4
|
|
6
5
|
class I18nBackendChainTest < Test::Unit::TestCase
|
7
6
|
def setup
|
@@ -14,43 +13,43 @@ class I18nBackendChainTest < Test::Unit::TestCase
|
|
14
13
|
@chain = I18n.backend = I18n::Backend::Chain.new(@first, @second)
|
15
14
|
end
|
16
15
|
|
17
|
-
|
16
|
+
test "looks up translations from the first chained backend" do
|
18
17
|
assert_equal 'Foo', @first.send(:translations)[:en][:foo]
|
19
18
|
assert_equal 'Foo', I18n.t(:foo)
|
20
19
|
end
|
21
20
|
|
22
|
-
|
21
|
+
test "looks up translations from the second chained backend" do
|
23
22
|
assert_equal 'Bar', @second.send(:translations)[:en][:bar]
|
24
23
|
assert_equal 'Bar', I18n.t(:bar)
|
25
24
|
end
|
26
25
|
|
27
|
-
|
26
|
+
test "defaults only apply to lookups on the last backend in the chain" do
|
28
27
|
assert_equal 'Foo', I18n.t(:foo, :default => 'Bah')
|
29
28
|
assert_equal 'Bar', I18n.t(:bar, :default => 'Bah')
|
30
29
|
assert_equal 'Bah', I18n.t(:bah, :default => 'Bah') # default kicks in only here
|
31
30
|
end
|
32
31
|
|
33
|
-
|
32
|
+
test "default" do
|
34
33
|
assert_equal 'Fuh', I18n.t(:default => 'Fuh')
|
35
34
|
assert_equal 'Zero', I18n.t(:default => { :zero => 'Zero' }, :count => 0)
|
36
35
|
assert_equal({ :zero => 'Zero' }, I18n.t(:default => { :zero => 'Zero' }))
|
37
36
|
assert_equal 'Foo', I18n.t(:default => :foo)
|
38
37
|
end
|
39
38
|
|
40
|
-
|
39
|
+
test "namespace lookup collects results from all backends" do
|
41
40
|
assert_equal({ :short => 'short', :long => 'long' }, I18n.t(:formats))
|
42
41
|
end
|
43
42
|
|
44
|
-
|
43
|
+
test "namespace lookup with only the first backend returning a result" do
|
45
44
|
assert_equal({ :one => '{{count}}' }, I18n.t(:plural_1))
|
46
45
|
end
|
47
46
|
|
48
|
-
|
47
|
+
test "pluralization still works" do
|
49
48
|
assert_equal '1', I18n.t(:plural_1, :count => 1)
|
50
49
|
assert_equal 'one', I18n.t(:plural_2, :count => 1)
|
51
50
|
end
|
52
51
|
|
53
|
-
|
52
|
+
test "bulk lookup collects results from all backends" do
|
54
53
|
assert_equal ['Foo', 'Bar'], I18n.t([:foo, :bar])
|
55
54
|
end
|
56
55
|
|
@@ -0,0 +1,151 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'cldr'
|
5
|
+
rescue LoadError
|
6
|
+
puts "Skipping tests for I18n::Backend::Cldr because the ruby-cldr gem is not installed."
|
7
|
+
end
|
8
|
+
|
9
|
+
if defined?(Cldr)
|
10
|
+
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../')); $:.uniq!
|
11
|
+
require 'test_helper'
|
12
|
+
require 'i18n/backend/cldr'
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
class I18nBackendCldrTest < Test::Unit::TestCase
|
16
|
+
class Backend
|
17
|
+
include I18n::Backend::Base
|
18
|
+
include I18n::Backend::Cldr
|
19
|
+
end
|
20
|
+
|
21
|
+
def setup
|
22
|
+
I18n.backend = Backend.new
|
23
|
+
I18n.locale = :de
|
24
|
+
I18n.load_path += Dir[locales_dir + '/cldr/**/*.{yml,rb}']
|
25
|
+
super
|
26
|
+
end
|
27
|
+
|
28
|
+
# NUMBER
|
29
|
+
|
30
|
+
test "format_number" do
|
31
|
+
assert_equal '123.456,78', I18n.l(123456.78)
|
32
|
+
end
|
33
|
+
|
34
|
+
# CURRENCY
|
35
|
+
|
36
|
+
test "format_currency" do
|
37
|
+
assert_equal '123.456,78 EUR', I18n.l(123456.78, :currency => 'EUR')
|
38
|
+
end
|
39
|
+
|
40
|
+
# hu? does this actually make any sense?
|
41
|
+
test "format_currency translating currency names" do
|
42
|
+
assert_equal '1,00 Irisches Pfund', I18n.l(1, :currency => :IEP)
|
43
|
+
assert_equal '2,00 Irische Pfund', I18n.l(2, :currency => :IEP)
|
44
|
+
end
|
45
|
+
|
46
|
+
# PERCENT
|
47
|
+
|
48
|
+
# this is odd but the cldr percent format does not include a fraction
|
49
|
+
test "format_percent" do
|
50
|
+
assert_equal '123.457 %', I18n.l(123456.78, :as => :percent)
|
51
|
+
end
|
52
|
+
|
53
|
+
# so we can pass a precision manually
|
54
|
+
test "format_percent w/ precision" do
|
55
|
+
assert_equal '123.456,70 %', I18n.l(123456.7, :as => :percent, :precision => 2)
|
56
|
+
end
|
57
|
+
|
58
|
+
# DATE
|
59
|
+
|
60
|
+
def date
|
61
|
+
Date.new(2010, 1, 1)
|
62
|
+
end
|
63
|
+
|
64
|
+
test "format_date :full" do
|
65
|
+
assert_equal 'Freitag, 1. Januar 2010', I18n.l(date, :format => :full)
|
66
|
+
end
|
67
|
+
|
68
|
+
test "format_date :long" do
|
69
|
+
assert_equal '1. Januar 2010', I18n.l(date, :format => :long)
|
70
|
+
end
|
71
|
+
|
72
|
+
test "format_date :medium" do
|
73
|
+
assert_equal '01.01.2010', I18n.l(date)
|
74
|
+
end
|
75
|
+
|
76
|
+
test "format_date :short" do
|
77
|
+
assert_equal '01.01.10', I18n.l(date, :format => :short)
|
78
|
+
end
|
79
|
+
|
80
|
+
# TIME
|
81
|
+
|
82
|
+
def time
|
83
|
+
Time.utc(2010, 1, 1, 13, 15, 17)
|
84
|
+
end
|
85
|
+
|
86
|
+
# TODO cldr export lacks localized timezone data
|
87
|
+
# test "format_time :full" do
|
88
|
+
# assert_equal 'Freitag, 1. Januar 2010', I18n.l(time, :format => :full)
|
89
|
+
# end
|
90
|
+
|
91
|
+
test "format_time :long" do
|
92
|
+
assert_equal '13:15:17 UTC', I18n.l(time, :format => :long)
|
93
|
+
end
|
94
|
+
|
95
|
+
test "format_time :medium" do
|
96
|
+
assert_equal '13:15:17', I18n.l(time)
|
97
|
+
end
|
98
|
+
|
99
|
+
test "format_time :short" do
|
100
|
+
assert_equal '13:15', I18n.l(time, :format => :short)
|
101
|
+
end
|
102
|
+
|
103
|
+
# DATETIME
|
104
|
+
|
105
|
+
def datetime
|
106
|
+
DateTime.new(2010, 11, 12, 13, 14, 15)
|
107
|
+
end
|
108
|
+
|
109
|
+
# TODO cldr export lacks localized timezone data
|
110
|
+
# test "format_datetime :full" do
|
111
|
+
# assert_equal 'Thursday, 12. November 2010 13:14:15', I18n.l(datetime, :format => :full)
|
112
|
+
# end
|
113
|
+
|
114
|
+
test "format_datetime :long" do
|
115
|
+
assert_equal '12. November 2010 13:14:15 +00:00', I18n.l(datetime, :format => :long)
|
116
|
+
end
|
117
|
+
|
118
|
+
test "format_datetime :medium" do
|
119
|
+
assert_equal '12.11.2010 13:14:15', I18n.l(datetime)
|
120
|
+
end
|
121
|
+
|
122
|
+
test "format_datetime :short" do
|
123
|
+
assert_equal '12.11.10 13:14', I18n.l(datetime, :format => :short)
|
124
|
+
end
|
125
|
+
|
126
|
+
test "format_datetime mixed :long + :short" do
|
127
|
+
assert_equal '12. November 2010 13:14', I18n.l(datetime, :date_format => :long, :time_format => :short)
|
128
|
+
end
|
129
|
+
|
130
|
+
test "format_datetime mixed :short + :long" do
|
131
|
+
assert_equal '12.11.10 13:14:15 +00:00', I18n.l(datetime, :date_format => :short, :time_format => :long)
|
132
|
+
end
|
133
|
+
|
134
|
+
# CUSTOM FORMATS
|
135
|
+
|
136
|
+
test "can deal with customized formats data" do
|
137
|
+
store_translations :de, :numbers => {
|
138
|
+
:formats => {
|
139
|
+
:decimal => {
|
140
|
+
:patterns => {
|
141
|
+
:default => "#,##0.###",
|
142
|
+
:stupid => "#"
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
assert_equal '123.456,78', I18n.l(123456.78)
|
148
|
+
assert_equal '123457', I18n.l(123456.78, :format => :stupid)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../')); $:.uniq!
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class I18nBackendExceptionsTest < Test::Unit::TestCase
|
6
|
+
def setup
|
7
|
+
I18n.backend = I18n::Backend::Simple.new
|
8
|
+
end
|
9
|
+
|
10
|
+
test "exceptions: MissingTranslationData message from #translate includes the given scope and full key" do
|
11
|
+
begin
|
12
|
+
I18n.t(:'baz.missing', :scope => :'foo.bar', :raise => true)
|
13
|
+
rescue I18n::MissingTranslationData => exception
|
14
|
+
end
|
15
|
+
assert_equal "translation missing: en, foo, bar, baz, missing", exception.message
|
16
|
+
end
|
17
|
+
|
18
|
+
test "exceptions: MissingTranslationData message from #localize includes the given scope and full key" do
|
19
|
+
begin
|
20
|
+
I18n.l(Time.now, :format => :foo)
|
21
|
+
rescue I18n::MissingTranslationData => exception
|
22
|
+
end
|
23
|
+
assert_equal "translation missing: en, time, formats, foo", exception.message
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../')); $:.uniq!
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class I18nBackendFallbacksTranslateTest < Test::Unit::TestCase
|
6
|
+
class Backend
|
7
|
+
include I18n::Backend::Base
|
8
|
+
include I18n::Backend::Fallbacks
|
9
|
+
end
|
10
|
+
|
11
|
+
def setup
|
12
|
+
I18n.backend = Backend.new
|
13
|
+
store_translations(:en, :foo => 'Foo in :en', :bar => 'Bar in :en', :buz => 'Buz in :en')
|
14
|
+
store_translations(:de, :bar => 'Bar in :de', :baz => 'Baz in :de')
|
15
|
+
store_translations(:'de-DE', :baz => 'Baz in :de-DE')
|
16
|
+
end
|
17
|
+
|
18
|
+
test "still returns an existing translation as usual" do
|
19
|
+
assert_equal 'Foo in :en', I18n.t(:foo, :locale => :en)
|
20
|
+
assert_equal 'Bar in :de', I18n.t(:bar, :locale => :de)
|
21
|
+
assert_equal 'Baz in :de-DE', I18n.t(:baz, :locale => :'de-DE')
|
22
|
+
end
|
23
|
+
|
24
|
+
test "returns the :en translation for a missing :de translation" do
|
25
|
+
assert_equal 'Foo in :en', I18n.t(:foo, :locale => :de)
|
26
|
+
end
|
27
|
+
|
28
|
+
test "returns the :de translation for a missing :'de-DE' translation" do
|
29
|
+
assert_equal 'Bar in :de', I18n.t(:bar, :locale => :'de-DE')
|
30
|
+
end
|
31
|
+
|
32
|
+
test "returns the :en translation for translation missing in both :de and :'de-De'" do
|
33
|
+
assert_equal 'Buz in :en', I18n.t(:buz, :locale => :'de-DE')
|
34
|
+
end
|
35
|
+
|
36
|
+
test "returns the :de translation for a missing :'de-DE' when :default is a String" do
|
37
|
+
assert_equal 'Bar in :de', I18n.t(:bar, :locale => :'de-DE', :default => "Default Bar")
|
38
|
+
assert_equal "Default Bar", I18n.t(:missing_bar, :locale => :'de-DE', :default => "Default Bar")
|
39
|
+
end
|
40
|
+
|
41
|
+
test "returns the :'de-DE' default :baz translation for a missing :'de-DE' when defaults contains Symbol" do
|
42
|
+
assert_equal 'Baz in :de-DE', I18n.t(:missing_foo, :locale => :'de-DE', :default => [:baz, "Default Bar"])
|
43
|
+
end
|
44
|
+
|
45
|
+
test "returns the defaults translation for a missing :'de-DE' when defaults a contains String before Symbol" do
|
46
|
+
assert_equal "Default Bar", I18n.t(:missing_foo, :locale => :'de-DE', :default => [:missing_bar, "Default Bar", :baz])
|
47
|
+
end
|
48
|
+
|
49
|
+
test "returns the default translation for a missing :'de-DE' and existing :de when default is a Hash" do
|
50
|
+
assert_equal 'Default 6 Bars', I18n.t(:missing_foo, :locale => :'de-DE', :default => [:missing_bar, {:other => "Default {{count}} Bars"}, "Default Bar"], :count => 6)
|
51
|
+
end
|
52
|
+
|
53
|
+
test "raises I18n::MissingTranslationData exception when no translation was found" do
|
54
|
+
assert_raise(I18n::MissingTranslationData) { I18n.t(:faa, :locale => :en, :raise => true) }
|
55
|
+
assert_raise(I18n::MissingTranslationData) { I18n.t(:faa, :locale => :de, :raise => true) }
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
class I18nBackendFallbacksLocalizeTest < Test::Unit::TestCase
|
60
|
+
class Backend
|
61
|
+
include I18n::Backend::Base
|
62
|
+
include I18n::Backend::Fallbacks
|
63
|
+
end
|
64
|
+
|
65
|
+
def setup
|
66
|
+
I18n.backend = Backend.new
|
67
|
+
store_translations(:en, :date => { :formats => { :en => 'en' }, :day_names => %w(Sunday) })
|
68
|
+
store_translations(:de, :date => { :formats => { :de => 'de' } })
|
69
|
+
end
|
70
|
+
|
71
|
+
test "still uses an existing format as usual" do
|
72
|
+
assert_equal 'en', I18n.l(Date.today, :format => :en, :locale => :en)
|
73
|
+
end
|
74
|
+
|
75
|
+
test "looks up and uses a fallback locale's format for a key missing in the given locale (1)" do
|
76
|
+
assert_equal 'en', I18n.l(Date.today, :format => :en, :locale => :de)
|
77
|
+
end
|
78
|
+
|
79
|
+
test "looks up and uses a fallback locale's format for a key missing in the given locale (2)" do
|
80
|
+
assert_equal 'de', I18n.l(Date.today, :format => :de, :locale => :'de-DE')
|
81
|
+
end
|
82
|
+
|
83
|
+
test "still uses an existing day name translation as usual" do
|
84
|
+
assert_equal 'Sunday', I18n.l(Date.new(2010, 1, 3), :format => '%A', :locale => :en)
|
85
|
+
end
|
86
|
+
|
87
|
+
test "uses a fallback locale's translation for a key missing in the given locale" do
|
88
|
+
assert_equal 'Sunday', I18n.l(Date.new(2010, 1, 3), :format => '%A', :locale => :de)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
class I18nBackendFallbacksWithChainTest < Test::Unit::TestCase
|
93
|
+
class Backend
|
94
|
+
include I18n::Backend::Base
|
95
|
+
include I18n::Backend::Fallbacks
|
96
|
+
end
|
97
|
+
|
98
|
+
def setup
|
99
|
+
backend = Backend.new
|
100
|
+
backend.store_translations(:de, :foo => 'FOO')
|
101
|
+
I18n.backend = I18n::Backend::Chain.new(I18n::Backend::Simple.new, backend)
|
102
|
+
end
|
103
|
+
|
104
|
+
test "falls back from de-DE to de when there is no translation for de-DE available" do
|
105
|
+
assert_equal 'FOO', I18n.t(:foo, :locale => :'de-DE')
|
106
|
+
end
|
107
|
+
end
|