From f097c0fca770ead406e3b61934e5957659f997ed Mon Sep 17 00:00:00 2001 From: joeybloggs Date: Sun, 31 Jul 2016 12:53:37 -0400 Subject: [PATCH 1/3] some cleanup and add function to return plurals associated with Translator --- cmd/resources/generate_resources.go | 56 ++++++++++++++++--- cmd/resources/translator.tmpl | 19 +++++-- resources/locales/af/af.go | 19 +++++-- resources/locales/af_NA/af_NA.go | 19 +++++-- resources/locales/af_ZA/af_ZA.go | 19 +++++-- resources/locales/agq/agq.go | 19 +++++-- resources/locales/agq_CM/agq_CM.go | 19 +++++-- resources/locales/ak/ak.go | 19 +++++-- resources/locales/ak_GH/ak_GH.go | 19 +++++-- resources/locales/am/am.go | 19 +++++-- resources/locales/am_ET/am_ET.go | 19 +++++-- resources/locales/ar/ar.go | 19 +++++-- resources/locales/ar_001/ar_001.go | 19 +++++-- resources/locales/ar_AE/ar_AE.go | 19 +++++-- resources/locales/ar_BH/ar_BH.go | 19 +++++-- resources/locales/ar_DJ/ar_DJ.go | 19 +++++-- resources/locales/ar_DZ/ar_DZ.go | 19 +++++-- resources/locales/ar_EG/ar_EG.go | 19 +++++-- resources/locales/ar_EH/ar_EH.go | 19 +++++-- resources/locales/ar_ER/ar_ER.go | 19 +++++-- resources/locales/ar_IL/ar_IL.go | 19 +++++-- resources/locales/ar_IQ/ar_IQ.go | 19 +++++-- resources/locales/ar_JO/ar_JO.go | 19 +++++-- resources/locales/ar_KM/ar_KM.go | 19 +++++-- resources/locales/ar_KW/ar_KW.go | 19 +++++-- resources/locales/ar_LB/ar_LB.go | 19 +++++-- resources/locales/ar_LY/ar_LY.go | 19 +++++-- resources/locales/ar_MA/ar_MA.go | 19 +++++-- resources/locales/ar_MR/ar_MR.go | 19 +++++-- resources/locales/ar_OM/ar_OM.go | 19 +++++-- resources/locales/ar_PS/ar_PS.go | 19 +++++-- resources/locales/ar_QA/ar_QA.go | 19 +++++-- resources/locales/ar_SA/ar_SA.go | 19 +++++-- resources/locales/ar_SD/ar_SD.go | 19 +++++-- resources/locales/ar_SO/ar_SO.go | 19 +++++-- resources/locales/ar_SS/ar_SS.go | 19 +++++-- resources/locales/ar_SY/ar_SY.go | 19 +++++-- resources/locales/ar_TD/ar_TD.go | 19 +++++-- resources/locales/ar_TN/ar_TN.go | 19 +++++-- resources/locales/ar_YE/ar_YE.go | 19 +++++-- resources/locales/as/as.go | 19 +++++-- resources/locales/as_IN/as_IN.go | 19 +++++-- resources/locales/asa/asa.go | 19 +++++-- resources/locales/asa_TZ/asa_TZ.go | 19 +++++-- resources/locales/ast/ast.go | 19 +++++-- resources/locales/ast_ES/ast_ES.go | 19 +++++-- resources/locales/az/az.go | 19 +++++-- resources/locales/az_Cyrl/az_Cyrl.go | 19 +++++-- resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go | 19 +++++-- resources/locales/az_Latn/az_Latn.go | 19 +++++-- resources/locales/az_Latn_AZ/az_Latn_AZ.go | 19 +++++-- resources/locales/bas/bas.go | 19 +++++-- resources/locales/bas_CM/bas_CM.go | 19 +++++-- resources/locales/be/be.go | 19 +++++-- resources/locales/be_BY/be_BY.go | 19 +++++-- resources/locales/bem/bem.go | 19 +++++-- resources/locales/bem_ZM/bem_ZM.go | 19 +++++-- resources/locales/bez/bez.go | 19 +++++-- resources/locales/bez_TZ/bez_TZ.go | 19 +++++-- resources/locales/bg/bg.go | 19 +++++-- resources/locales/bg_BG/bg_BG.go | 19 +++++-- resources/locales/bm/bm.go | 19 +++++-- resources/locales/bm_ML/bm_ML.go | 19 +++++-- resources/locales/bn/bn.go | 19 +++++-- resources/locales/bn_BD/bn_BD.go | 19 +++++-- resources/locales/bn_IN/bn_IN.go | 19 +++++-- resources/locales/bo/bo.go | 19 +++++-- resources/locales/bo_CN/bo_CN.go | 19 +++++-- resources/locales/bo_IN/bo_IN.go | 19 +++++-- resources/locales/br/br.go | 19 +++++-- resources/locales/br_FR/br_FR.go | 19 +++++-- resources/locales/brx/brx.go | 19 +++++-- resources/locales/brx_IN/brx_IN.go | 19 +++++-- resources/locales/bs/bs.go | 19 +++++-- resources/locales/bs_Cyrl/bs_Cyrl.go | 25 ++++++--- resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go | 19 +++++-- resources/locales/bs_Latn/bs_Latn.go | 19 +++++-- resources/locales/bs_Latn_BA/bs_Latn_BA.go | 19 +++++-- resources/locales/ca/ca.go | 19 +++++-- resources/locales/ca_AD/ca_AD.go | 23 +++++--- resources/locales/ca_ES/ca_ES.go | 19 +++++-- .../locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go | 19 +++++-- resources/locales/ca_FR/ca_FR.go | 23 +++++--- resources/locales/ca_IT/ca_IT.go | 21 ++++--- resources/locales/ce/ce.go | 19 +++++-- resources/locales/ce_RU/ce_RU.go | 19 +++++-- resources/locales/cgg/cgg.go | 19 +++++-- resources/locales/cgg_UG/cgg_UG.go | 19 +++++-- resources/locales/chr/chr.go | 19 +++++-- resources/locales/chr_US/chr_US.go | 19 +++++-- resources/locales/ckb/ckb.go | 19 +++++-- resources/locales/ckb_IQ/ckb_IQ.go | 19 +++++-- resources/locales/ckb_IR/ckb_IR.go | 19 +++++-- resources/locales/cs/cs.go | 21 ++++--- resources/locales/cs_CZ/cs_CZ.go | 23 +++++--- resources/locales/cu/cu.go | 19 +++++-- resources/locales/cu_RU/cu_RU.go | 19 +++++-- resources/locales/cy/cy.go | 19 +++++-- resources/locales/cy_GB/cy_GB.go | 19 +++++-- resources/locales/da/da.go | 19 +++++-- resources/locales/da_DK/da_DK.go | 25 ++++++--- resources/locales/da_GL/da_GL.go | 19 +++++-- resources/locales/dav/dav.go | 19 +++++-- resources/locales/dav_KE/dav_KE.go | 19 +++++-- resources/locales/de/de.go | 19 +++++-- resources/locales/de_AT/de_AT.go | 21 ++++--- resources/locales/de_BE/de_BE.go | 19 +++++-- resources/locales/de_CH/de_CH.go | 19 +++++-- resources/locales/de_DE/de_DE.go | 19 +++++-- resources/locales/de_LI/de_LI.go | 19 +++++-- resources/locales/de_LU/de_LU.go | 19 +++++-- resources/locales/dje/dje.go | 19 +++++-- resources/locales/dje_NE/dje_NE.go | 19 +++++-- resources/locales/dsb/dsb.go | 27 +++++---- resources/locales/dsb_DE/dsb_DE.go | 19 +++++-- resources/locales/dua/dua.go | 19 +++++-- resources/locales/dua_CM/dua_CM.go | 19 +++++-- resources/locales/dyo/dyo.go | 19 +++++-- resources/locales/dyo_SN/dyo_SN.go | 19 +++++-- resources/locales/dz/dz.go | 19 +++++-- resources/locales/dz_BT/dz_BT.go | 19 +++++-- resources/locales/ebu/ebu.go | 19 +++++-- resources/locales/ebu_KE/ebu_KE.go | 19 +++++-- resources/locales/ee/ee.go | 19 +++++-- resources/locales/ee_GH/ee_GH.go | 19 +++++-- resources/locales/ee_TG/ee_TG.go | 19 +++++-- resources/locales/el/el.go | 19 +++++-- resources/locales/el_CY/el_CY.go | 19 +++++-- resources/locales/el_GR/el_GR.go | 19 +++++-- resources/locales/en/en.go | 19 +++++-- resources/locales/en_001/en_001.go | 19 +++++-- resources/locales/en_150/en_150.go | 19 +++++-- resources/locales/en_AG/en_AG.go | 19 +++++-- resources/locales/en_AI/en_AI.go | 19 +++++-- resources/locales/en_AS/en_AS.go | 19 +++++-- resources/locales/en_AT/en_AT.go | 19 +++++-- resources/locales/en_AU/en_AU.go | 19 +++++-- resources/locales/en_BB/en_BB.go | 19 +++++-- resources/locales/en_BE/en_BE.go | 19 +++++-- resources/locales/en_BI/en_BI.go | 19 +++++-- resources/locales/en_BM/en_BM.go | 19 +++++-- resources/locales/en_BS/en_BS.go | 21 ++++--- resources/locales/en_BW/en_BW.go | 19 +++++-- resources/locales/en_BZ/en_BZ.go | 19 +++++-- resources/locales/en_CA/en_CA.go | 19 +++++-- resources/locales/en_CC/en_CC.go | 19 +++++-- resources/locales/en_CH/en_CH.go | 19 +++++-- resources/locales/en_CK/en_CK.go | 23 +++++--- resources/locales/en_CM/en_CM.go | 19 +++++-- resources/locales/en_CX/en_CX.go | 19 +++++-- resources/locales/en_CY/en_CY.go | 19 +++++-- resources/locales/en_DE/en_DE.go | 19 +++++-- resources/locales/en_DG/en_DG.go | 19 +++++-- resources/locales/en_DK/en_DK.go | 19 +++++-- resources/locales/en_DM/en_DM.go | 19 +++++-- resources/locales/en_ER/en_ER.go | 19 +++++-- resources/locales/en_FI/en_FI.go | 19 +++++-- resources/locales/en_FJ/en_FJ.go | 19 +++++-- resources/locales/en_FK/en_FK.go | 19 +++++-- resources/locales/en_FM/en_FM.go | 23 +++++--- resources/locales/en_GB/en_GB.go | 19 +++++-- resources/locales/en_GD/en_GD.go | 21 ++++--- resources/locales/en_GG/en_GG.go | 19 +++++-- resources/locales/en_GH/en_GH.go | 19 +++++-- resources/locales/en_GI/en_GI.go | 21 ++++--- resources/locales/en_GM/en_GM.go | 23 +++++--- resources/locales/en_GU/en_GU.go | 19 +++++-- resources/locales/en_GY/en_GY.go | 19 +++++-- resources/locales/en_HK/en_HK.go | 19 +++++-- resources/locales/en_IE/en_IE.go | 23 +++++--- resources/locales/en_IL/en_IL.go | 19 +++++-- resources/locales/en_IM/en_IM.go | 19 +++++-- resources/locales/en_IN/en_IN.go | 19 +++++-- resources/locales/en_IO/en_IO.go | 19 +++++-- resources/locales/en_JE/en_JE.go | 19 +++++-- resources/locales/en_JM/en_JM.go | 23 +++++--- resources/locales/en_KE/en_KE.go | 19 +++++-- resources/locales/en_KI/en_KI.go | 19 +++++-- resources/locales/en_KN/en_KN.go | 19 +++++-- resources/locales/en_KY/en_KY.go | 19 +++++-- resources/locales/en_LC/en_LC.go | 19 +++++-- resources/locales/en_LR/en_LR.go | 19 +++++-- resources/locales/en_LS/en_LS.go | 19 +++++-- resources/locales/en_MG/en_MG.go | 19 +++++-- resources/locales/en_MH/en_MH.go | 19 +++++-- resources/locales/en_MO/en_MO.go | 23 +++++--- resources/locales/en_MP/en_MP.go | 19 +++++-- resources/locales/en_MS/en_MS.go | 19 +++++-- resources/locales/en_MT/en_MT.go | 19 +++++-- resources/locales/en_MU/en_MU.go | 23 +++++--- resources/locales/en_MW/en_MW.go | 19 +++++-- resources/locales/en_MY/en_MY.go | 19 +++++-- resources/locales/en_NA/en_NA.go | 19 +++++-- resources/locales/en_NF/en_NF.go | 21 ++++--- resources/locales/en_NG/en_NG.go | 19 +++++-- resources/locales/en_NL/en_NL.go | 19 +++++-- resources/locales/en_NR/en_NR.go | 19 +++++-- resources/locales/en_NU/en_NU.go | 19 +++++-- resources/locales/en_NZ/en_NZ.go | 19 +++++-- resources/locales/en_PG/en_PG.go | 19 +++++-- resources/locales/en_PH/en_PH.go | 19 +++++-- resources/locales/en_PK/en_PK.go | 21 ++++--- resources/locales/en_PN/en_PN.go | 19 +++++-- resources/locales/en_PR/en_PR.go | 19 +++++-- resources/locales/en_PW/en_PW.go | 23 +++++--- resources/locales/en_RW/en_RW.go | 19 +++++-- resources/locales/en_SB/en_SB.go | 23 +++++--- resources/locales/en_SC/en_SC.go | 19 +++++-- resources/locales/en_SD/en_SD.go | 19 +++++-- resources/locales/en_SE/en_SE.go | 21 ++++--- resources/locales/en_SG/en_SG.go | 19 +++++-- resources/locales/en_SH/en_SH.go | 19 +++++-- resources/locales/en_SI/en_SI.go | 19 +++++-- resources/locales/en_SL/en_SL.go | 19 +++++-- resources/locales/en_SS/en_SS.go | 19 +++++-- resources/locales/en_SX/en_SX.go | 19 +++++-- resources/locales/en_SZ/en_SZ.go | 19 +++++-- resources/locales/en_TC/en_TC.go | 19 +++++-- resources/locales/en_TK/en_TK.go | 23 +++++--- resources/locales/en_TO/en_TO.go | 19 +++++-- resources/locales/en_TT/en_TT.go | 19 +++++-- resources/locales/en_TV/en_TV.go | 19 +++++-- resources/locales/en_TZ/en_TZ.go | 21 ++++--- resources/locales/en_UG/en_UG.go | 19 +++++-- resources/locales/en_UM/en_UM.go | 19 +++++-- resources/locales/en_US/en_US.go | 21 ++++--- resources/locales/en_US_POSIX/en_US_POSIX.go | 19 +++++-- resources/locales/en_VC/en_VC.go | 19 +++++-- resources/locales/en_VG/en_VG.go | 19 +++++-- resources/locales/en_VI/en_VI.go | 23 +++++--- resources/locales/en_VU/en_VU.go | 19 +++++-- resources/locales/en_WS/en_WS.go | 19 +++++-- resources/locales/en_ZA/en_ZA.go | 19 +++++-- resources/locales/en_ZM/en_ZM.go | 19 +++++-- resources/locales/en_ZW/en_ZW.go | 19 +++++-- resources/locales/eo/eo.go | 19 +++++-- resources/locales/eo_001/eo_001.go | 19 +++++-- resources/locales/es/es.go | 19 +++++-- resources/locales/es_419/es_419.go | 19 +++++-- resources/locales/es_AR/es_AR.go | 19 +++++-- resources/locales/es_BO/es_BO.go | 19 +++++-- resources/locales/es_BR/es_BR.go | 19 +++++-- resources/locales/es_CL/es_CL.go | 19 +++++-- resources/locales/es_CO/es_CO.go | 19 +++++-- resources/locales/es_CR/es_CR.go | 19 +++++-- resources/locales/es_CU/es_CU.go | 19 +++++-- resources/locales/es_DO/es_DO.go | 19 +++++-- resources/locales/es_EA/es_EA.go | 19 +++++-- resources/locales/es_EC/es_EC.go | 19 +++++-- resources/locales/es_ES/es_ES.go | 19 +++++-- resources/locales/es_GQ/es_GQ.go | 19 +++++-- resources/locales/es_GT/es_GT.go | 19 +++++-- resources/locales/es_HN/es_HN.go | 19 +++++-- resources/locales/es_IC/es_IC.go | 19 +++++-- resources/locales/es_MX/es_MX.go | 19 +++++-- resources/locales/es_NI/es_NI.go | 19 +++++-- resources/locales/es_PA/es_PA.go | 19 +++++-- resources/locales/es_PE/es_PE.go | 19 +++++-- resources/locales/es_PH/es_PH.go | 19 +++++-- resources/locales/es_PR/es_PR.go | 19 +++++-- resources/locales/es_PY/es_PY.go | 19 +++++-- resources/locales/es_SV/es_SV.go | 19 +++++-- resources/locales/es_US/es_US.go | 19 +++++-- resources/locales/es_UY/es_UY.go | 19 +++++-- resources/locales/es_VE/es_VE.go | 19 +++++-- resources/locales/et/et.go | 21 ++++--- resources/locales/et_EE/et_EE.go | 19 +++++-- resources/locales/eu/eu.go | 19 +++++-- resources/locales/eu_ES/eu_ES.go | 19 +++++-- resources/locales/ewo/ewo.go | 19 +++++-- resources/locales/ewo_CM/ewo_CM.go | 19 +++++-- resources/locales/fa/fa.go | 19 +++++-- resources/locales/fa_AF/fa_AF.go | 19 +++++-- resources/locales/fa_IR/fa_IR.go | 19 +++++-- resources/locales/ff/ff.go | 19 +++++-- resources/locales/ff_CM/ff_CM.go | 19 +++++-- resources/locales/ff_GN/ff_GN.go | 19 +++++-- resources/locales/ff_MR/ff_MR.go | 19 +++++-- resources/locales/ff_SN/ff_SN.go | 19 +++++-- resources/locales/fi/fi.go | 19 +++++-- resources/locales/fi_FI/fi_FI.go | 19 +++++-- resources/locales/fil/fil.go | 21 ++++--- resources/locales/fil_PH/fil_PH.go | 27 +++++---- resources/locales/fo/fo.go | 19 +++++-- resources/locales/fo_DK/fo_DK.go | 19 +++++-- resources/locales/fo_FO/fo_FO.go | 19 +++++-- resources/locales/fr/fr.go | 19 +++++-- resources/locales/fr_BE/fr_BE.go | 19 +++++-- resources/locales/fr_BF/fr_BF.go | 19 +++++-- resources/locales/fr_BI/fr_BI.go | 19 +++++-- resources/locales/fr_BJ/fr_BJ.go | 19 +++++-- resources/locales/fr_BL/fr_BL.go | 19 +++++-- resources/locales/fr_CA/fr_CA.go | 19 +++++-- resources/locales/fr_CD/fr_CD.go | 19 +++++-- resources/locales/fr_CF/fr_CF.go | 19 +++++-- resources/locales/fr_CG/fr_CG.go | 19 +++++-- resources/locales/fr_CH/fr_CH.go | 19 +++++-- resources/locales/fr_CI/fr_CI.go | 19 +++++-- resources/locales/fr_CM/fr_CM.go | 19 +++++-- resources/locales/fr_DJ/fr_DJ.go | 19 +++++-- resources/locales/fr_DZ/fr_DZ.go | 19 +++++-- resources/locales/fr_FR/fr_FR.go | 19 +++++-- resources/locales/fr_GA/fr_GA.go | 19 +++++-- resources/locales/fr_GF/fr_GF.go | 19 +++++-- resources/locales/fr_GN/fr_GN.go | 19 +++++-- resources/locales/fr_GP/fr_GP.go | 19 +++++-- resources/locales/fr_GQ/fr_GQ.go | 19 +++++-- resources/locales/fr_HT/fr_HT.go | 19 +++++-- resources/locales/fr_KM/fr_KM.go | 19 +++++-- resources/locales/fr_LU/fr_LU.go | 19 +++++-- resources/locales/fr_MA/fr_MA.go | 19 +++++-- resources/locales/fr_MC/fr_MC.go | 19 +++++-- resources/locales/fr_MF/fr_MF.go | 19 +++++-- resources/locales/fr_MG/fr_MG.go | 19 +++++-- resources/locales/fr_ML/fr_ML.go | 19 +++++-- resources/locales/fr_MQ/fr_MQ.go | 19 +++++-- resources/locales/fr_MR/fr_MR.go | 19 +++++-- resources/locales/fr_MU/fr_MU.go | 19 +++++-- resources/locales/fr_NC/fr_NC.go | 19 +++++-- resources/locales/fr_NE/fr_NE.go | 19 +++++-- resources/locales/fr_PF/fr_PF.go | 19 +++++-- resources/locales/fr_PM/fr_PM.go | 19 +++++-- resources/locales/fr_RE/fr_RE.go | 19 +++++-- resources/locales/fr_RW/fr_RW.go | 19 +++++-- resources/locales/fr_SC/fr_SC.go | 19 +++++-- resources/locales/fr_SN/fr_SN.go | 19 +++++-- resources/locales/fr_SY/fr_SY.go | 19 +++++-- resources/locales/fr_TD/fr_TD.go | 19 +++++-- resources/locales/fr_TG/fr_TG.go | 19 +++++-- resources/locales/fr_TN/fr_TN.go | 19 +++++-- resources/locales/fr_VU/fr_VU.go | 19 +++++-- resources/locales/fr_WF/fr_WF.go | 19 +++++-- resources/locales/fr_YT/fr_YT.go | 19 +++++-- resources/locales/fur/fur.go | 19 +++++-- resources/locales/fur_IT/fur_IT.go | 19 +++++-- resources/locales/fy/fy.go | 19 +++++-- resources/locales/fy_NL/fy_NL.go | 23 +++++--- resources/locales/ga/ga.go | 19 +++++-- resources/locales/ga_IE/ga_IE.go | 19 +++++-- resources/locales/gd/gd.go | 19 +++++-- resources/locales/gd_GB/gd_GB.go | 19 +++++-- resources/locales/gl/gl.go | 19 +++++-- resources/locales/gl_ES/gl_ES.go | 21 ++++--- resources/locales/gsw/gsw.go | 19 +++++-- resources/locales/gsw_CH/gsw_CH.go | 19 +++++-- resources/locales/gsw_FR/gsw_FR.go | 19 +++++-- resources/locales/gsw_LI/gsw_LI.go | 19 +++++-- resources/locales/gu/gu.go | 23 +++++--- resources/locales/gu_IN/gu_IN.go | 19 +++++-- resources/locales/guz/guz.go | 19 +++++-- resources/locales/guz_KE/guz_KE.go | 19 +++++-- resources/locales/gv/gv.go | 19 +++++-- resources/locales/gv_IM/gv_IM.go | 19 +++++-- resources/locales/ha/ha.go | 19 +++++-- resources/locales/ha_GH/ha_GH.go | 19 +++++-- resources/locales/ha_NE/ha_NE.go | 19 +++++-- resources/locales/ha_NG/ha_NG.go | 19 +++++-- resources/locales/haw/haw.go | 19 +++++-- resources/locales/haw_US/haw_US.go | 19 +++++-- resources/locales/he/he.go | 19 +++++-- resources/locales/he_IL/he_IL.go | 27 +++++---- resources/locales/hi/hi.go | 23 +++++--- resources/locales/hi_IN/hi_IN.go | 19 +++++-- resources/locales/hr/hr.go | 19 +++++-- resources/locales/hr_BA/hr_BA.go | 19 +++++-- resources/locales/hr_HR/hr_HR.go | 27 +++++---- resources/locales/hsb/hsb.go | 23 +++++--- resources/locales/hsb_DE/hsb_DE.go | 25 ++++++--- resources/locales/hu/hu.go | 19 +++++-- resources/locales/hu_HU/hu_HU.go | 19 +++++-- resources/locales/hy/hy.go | 19 +++++-- resources/locales/hy_AM/hy_AM.go | 19 +++++-- resources/locales/id/id.go | 19 +++++-- resources/locales/id_ID/id_ID.go | 19 +++++-- resources/locales/ig/ig.go | 19 +++++-- resources/locales/ig_NG/ig_NG.go | 19 +++++-- resources/locales/ii/ii.go | 19 +++++-- resources/locales/ii_CN/ii_CN.go | 19 +++++-- resources/locales/is/is.go | 19 +++++-- resources/locales/is_IS/is_IS.go | 19 +++++-- resources/locales/it/it.go | 19 +++++-- resources/locales/it_CH/it_CH.go | 19 +++++-- resources/locales/it_IT/it_IT.go | 19 +++++-- resources/locales/it_SM/it_SM.go | 19 +++++-- resources/locales/ja/ja.go | 19 +++++-- resources/locales/ja_JP/ja_JP.go | 19 +++++-- resources/locales/jgo/jgo.go | 19 +++++-- resources/locales/jgo_CM/jgo_CM.go | 19 +++++-- resources/locales/jmc/jmc.go | 19 +++++-- resources/locales/jmc_TZ/jmc_TZ.go | 19 +++++-- resources/locales/ka/ka.go | 19 +++++-- resources/locales/ka_GE/ka_GE.go | 19 +++++-- resources/locales/kab/kab.go | 19 +++++-- resources/locales/kab_DZ/kab_DZ.go | 19 +++++-- resources/locales/kam/kam.go | 19 +++++-- resources/locales/kam_KE/kam_KE.go | 19 +++++-- resources/locales/kde/kde.go | 19 +++++-- resources/locales/kde_TZ/kde_TZ.go | 19 +++++-- resources/locales/kea/kea.go | 19 +++++-- resources/locales/kea_CV/kea_CV.go | 19 +++++-- resources/locales/khq/khq.go | 19 +++++-- resources/locales/khq_ML/khq_ML.go | 19 +++++-- resources/locales/ki/ki.go | 19 +++++-- resources/locales/ki_KE/ki_KE.go | 19 +++++-- resources/locales/kk/kk.go | 19 +++++-- resources/locales/kk_KZ/kk_KZ.go | 19 +++++-- resources/locales/kkj/kkj.go | 19 +++++-- resources/locales/kkj_CM/kkj_CM.go | 19 +++++-- resources/locales/kl/kl.go | 19 +++++-- resources/locales/kl_GL/kl_GL.go | 19 +++++-- resources/locales/kln/kln.go | 19 +++++-- resources/locales/kln_KE/kln_KE.go | 19 +++++-- resources/locales/km/km.go | 19 +++++-- resources/locales/km_KH/km_KH.go | 19 +++++-- resources/locales/kn/kn.go | 19 +++++-- resources/locales/kn_IN/kn_IN.go | 23 +++++--- resources/locales/ko/ko.go | 19 +++++-- resources/locales/ko_KP/ko_KP.go | 19 +++++-- resources/locales/ko_KR/ko_KR.go | 19 +++++-- resources/locales/kok/kok.go | 19 +++++-- resources/locales/kok_IN/kok_IN.go | 19 +++++-- resources/locales/ks/ks.go | 19 +++++-- resources/locales/ks_IN/ks_IN.go | 19 +++++-- resources/locales/ksb/ksb.go | 19 +++++-- resources/locales/ksb_TZ/ksb_TZ.go | 19 +++++-- resources/locales/ksf/ksf.go | 19 +++++-- resources/locales/ksf_CM/ksf_CM.go | 19 +++++-- resources/locales/ksh/ksh.go | 19 +++++-- resources/locales/ksh_DE/ksh_DE.go | 19 +++++-- resources/locales/kw/kw.go | 19 +++++-- resources/locales/kw_GB/kw_GB.go | 19 +++++-- resources/locales/ky/ky.go | 19 +++++-- resources/locales/ky_KG/ky_KG.go | 19 +++++-- resources/locales/lag/lag.go | 19 +++++-- resources/locales/lag_TZ/lag_TZ.go | 23 +++++--- resources/locales/lb/lb.go | 19 +++++-- resources/locales/lb_LU/lb_LU.go | 19 +++++-- resources/locales/lg/lg.go | 19 +++++-- resources/locales/lg_UG/lg_UG.go | 19 +++++-- resources/locales/lkt/lkt.go | 19 +++++-- resources/locales/lkt_US/lkt_US.go | 19 +++++-- resources/locales/ln/ln.go | 19 +++++-- resources/locales/ln_AO/ln_AO.go | 19 +++++-- resources/locales/ln_CD/ln_CD.go | 19 +++++-- resources/locales/ln_CF/ln_CF.go | 19 +++++-- resources/locales/ln_CG/ln_CG.go | 19 +++++-- resources/locales/lo/lo.go | 19 +++++-- resources/locales/lo_LA/lo_LA.go | 19 +++++-- resources/locales/locale_info.go | 48 ++++++++++------ resources/locales/lrc/lrc.go | 19 +++++-- resources/locales/lrc_IQ/lrc_IQ.go | 19 +++++-- resources/locales/lrc_IR/lrc_IR.go | 19 +++++-- resources/locales/lt/lt.go | 19 +++++-- resources/locales/lt_LT/lt_LT.go | 19 +++++-- resources/locales/lu/lu.go | 19 +++++-- resources/locales/lu_CD/lu_CD.go | 19 +++++-- resources/locales/luo/luo.go | 19 +++++-- resources/locales/luo_KE/luo_KE.go | 19 +++++-- resources/locales/luy/luy.go | 19 +++++-- resources/locales/luy_KE/luy_KE.go | 19 +++++-- resources/locales/lv/lv.go | 19 +++++-- resources/locales/lv_LV/lv_LV.go | 19 +++++-- resources/locales/mas/mas.go | 19 +++++-- resources/locales/mas_KE/mas_KE.go | 19 +++++-- resources/locales/mas_TZ/mas_TZ.go | 19 +++++-- resources/locales/mer/mer.go | 19 +++++-- resources/locales/mer_KE/mer_KE.go | 19 +++++-- resources/locales/mfe/mfe.go | 19 +++++-- resources/locales/mfe_MU/mfe_MU.go | 19 +++++-- resources/locales/mg/mg.go | 19 +++++-- resources/locales/mg_MG/mg_MG.go | 19 +++++-- resources/locales/mgh/mgh.go | 19 +++++-- resources/locales/mgh_MZ/mgh_MZ.go | 19 +++++-- resources/locales/mgo/mgo.go | 19 +++++-- resources/locales/mgo_CM/mgo_CM.go | 19 +++++-- resources/locales/mk/mk.go | 27 +++++---- resources/locales/mk_MK/mk_MK.go | 19 +++++-- resources/locales/ml/ml.go | 19 +++++-- resources/locales/ml_IN/ml_IN.go | 19 +++++-- resources/locales/mn/mn.go | 19 +++++-- resources/locales/mn_MN/mn_MN.go | 19 +++++-- resources/locales/mr/mr.go | 19 +++++-- resources/locales/mr_IN/mr_IN.go | 19 +++++-- resources/locales/ms/ms.go | 19 +++++-- resources/locales/ms_BN/ms_BN.go | 19 +++++-- resources/locales/ms_MY/ms_MY.go | 19 +++++-- resources/locales/ms_SG/ms_SG.go | 19 +++++-- resources/locales/mt/mt.go | 19 +++++-- resources/locales/mt_MT/mt_MT.go | 19 +++++-- resources/locales/mua/mua.go | 19 +++++-- resources/locales/mua_CM/mua_CM.go | 19 +++++-- resources/locales/my/my.go | 19 +++++-- resources/locales/my_MM/my_MM.go | 19 +++++-- resources/locales/mzn/mzn.go | 19 +++++-- resources/locales/mzn_IR/mzn_IR.go | 19 +++++-- resources/locales/naq/naq.go | 19 +++++-- resources/locales/naq_NA/naq_NA.go | 19 +++++-- resources/locales/nb/nb.go | 19 +++++-- resources/locales/nb_NO/nb_NO.go | 19 +++++-- resources/locales/nb_SJ/nb_SJ.go | 19 +++++-- resources/locales/nd/nd.go | 19 +++++-- resources/locales/nd_ZW/nd_ZW.go | 19 +++++-- resources/locales/ne/ne.go | 19 +++++-- resources/locales/ne_IN/ne_IN.go | 19 +++++-- resources/locales/ne_NP/ne_NP.go | 19 +++++-- resources/locales/nl/nl.go | 19 +++++-- resources/locales/nl_AW/nl_AW.go | 19 +++++-- resources/locales/nl_BE/nl_BE.go | 21 ++++--- resources/locales/nl_BQ/nl_BQ.go | 19 +++++-- resources/locales/nl_CW/nl_CW.go | 23 +++++--- resources/locales/nl_NL/nl_NL.go | 19 +++++-- resources/locales/nl_SR/nl_SR.go | 19 +++++-- resources/locales/nl_SX/nl_SX.go | 19 +++++-- resources/locales/nmg/nmg.go | 19 +++++-- resources/locales/nmg_CM/nmg_CM.go | 19 +++++-- resources/locales/nn/nn.go | 19 +++++-- resources/locales/nn_NO/nn_NO.go | 19 +++++-- resources/locales/nnh/nnh.go | 19 +++++-- resources/locales/nnh_CM/nnh_CM.go | 19 +++++-- resources/locales/nus/nus.go | 19 +++++-- resources/locales/nus_SS/nus_SS.go | 19 +++++-- resources/locales/nyn/nyn.go | 19 +++++-- resources/locales/nyn_UG/nyn_UG.go | 19 +++++-- resources/locales/om/om.go | 19 +++++-- resources/locales/om_ET/om_ET.go | 19 +++++-- resources/locales/om_KE/om_KE.go | 19 +++++-- resources/locales/or/or.go | 19 +++++-- resources/locales/or_IN/or_IN.go | 19 +++++-- resources/locales/os/os.go | 19 +++++-- resources/locales/os_GE/os_GE.go | 19 +++++-- resources/locales/os_RU/os_RU.go | 19 +++++-- resources/locales/pa/pa.go | 19 +++++-- resources/locales/pa_Arab/pa_Arab.go | 19 +++++-- resources/locales/pa_Arab_PK/pa_Arab_PK.go | 19 +++++-- resources/locales/pa_Guru/pa_Guru.go | 19 +++++-- resources/locales/pa_Guru_IN/pa_Guru_IN.go | 19 +++++-- resources/locales/pl/pl.go | 19 +++++-- resources/locales/pl_PL/pl_PL.go | 19 +++++-- resources/locales/prg/prg.go | 21 ++++--- resources/locales/prg_001/prg_001.go | 19 +++++-- resources/locales/ps/ps.go | 19 +++++-- resources/locales/ps_AF/ps_AF.go | 19 +++++-- resources/locales/pt/pt.go | 19 +++++-- resources/locales/pt_AO/pt_AO.go | 19 +++++-- resources/locales/pt_BR/pt_BR.go | 19 +++++-- resources/locales/pt_CH/pt_CH.go | 19 +++++-- resources/locales/pt_CV/pt_CV.go | 19 +++++-- resources/locales/pt_GQ/pt_GQ.go | 19 +++++-- resources/locales/pt_GW/pt_GW.go | 19 +++++-- resources/locales/pt_LU/pt_LU.go | 19 +++++-- resources/locales/pt_MO/pt_MO.go | 19 +++++-- resources/locales/pt_MZ/pt_MZ.go | 19 +++++-- resources/locales/pt_PT/pt_PT.go | 19 +++++-- resources/locales/pt_ST/pt_ST.go | 19 +++++-- resources/locales/pt_TL/pt_TL.go | 19 +++++-- resources/locales/qu/qu.go | 19 +++++-- resources/locales/qu_BO/qu_BO.go | 19 +++++-- resources/locales/qu_EC/qu_EC.go | 19 +++++-- resources/locales/qu_PE/qu_PE.go | 19 +++++-- resources/locales/rm/rm.go | 19 +++++-- resources/locales/rm_CH/rm_CH.go | 19 +++++-- resources/locales/rn/rn.go | 19 +++++-- resources/locales/rn_BI/rn_BI.go | 19 +++++-- resources/locales/ro/ro.go | 19 +++++-- resources/locales/ro_MD/ro_MD.go | 19 +++++-- resources/locales/ro_RO/ro_RO.go | 27 +++++---- resources/locales/rof/rof.go | 19 +++++-- resources/locales/rof_TZ/rof_TZ.go | 19 +++++-- resources/locales/root/root.go | 19 +++++-- resources/locales/ru/ru.go | 19 +++++-- resources/locales/ru_BY/ru_BY.go | 19 +++++-- resources/locales/ru_KG/ru_KG.go | 19 +++++-- resources/locales/ru_KZ/ru_KZ.go | 23 +++++--- resources/locales/ru_MD/ru_MD.go | 19 +++++-- resources/locales/ru_RU/ru_RU.go | 19 +++++-- resources/locales/ru_UA/ru_UA.go | 19 +++++-- resources/locales/rw/rw.go | 19 +++++-- resources/locales/rw_RW/rw_RW.go | 19 +++++-- resources/locales/rwk/rwk.go | 19 +++++-- resources/locales/rwk_TZ/rwk_TZ.go | 19 +++++-- resources/locales/sah/sah.go | 19 +++++-- resources/locales/sah_RU/sah_RU.go | 19 +++++-- resources/locales/saq/saq.go | 19 +++++-- resources/locales/saq_KE/saq_KE.go | 19 +++++-- resources/locales/sbp/sbp.go | 19 +++++-- resources/locales/sbp_TZ/sbp_TZ.go | 19 +++++-- resources/locales/se/se.go | 19 +++++-- resources/locales/se_FI/se_FI.go | 19 +++++-- resources/locales/se_NO/se_NO.go | 19 +++++-- resources/locales/se_SE/se_SE.go | 19 +++++-- resources/locales/seh/seh.go | 19 +++++-- resources/locales/seh_MZ/seh_MZ.go | 19 +++++-- resources/locales/ses/ses.go | 19 +++++-- resources/locales/ses_ML/ses_ML.go | 19 +++++-- resources/locales/sg/sg.go | 19 +++++-- resources/locales/sg_CF/sg_CF.go | 19 +++++-- resources/locales/shi/shi.go | 19 +++++-- resources/locales/shi_Latn/shi_Latn.go | 19 +++++-- resources/locales/shi_Latn_MA/shi_Latn_MA.go | 19 +++++-- resources/locales/shi_Tfng/shi_Tfng.go | 19 +++++-- resources/locales/shi_Tfng_MA/shi_Tfng_MA.go | 23 +++++--- resources/locales/si/si.go | 19 +++++-- resources/locales/si_LK/si_LK.go | 25 ++++++--- resources/locales/sk/sk.go | 19 +++++-- resources/locales/sk_SK/sk_SK.go | 23 +++++--- resources/locales/sl/sl.go | 19 +++++-- resources/locales/sl_SI/sl_SI.go | 19 +++++-- resources/locales/smn/smn.go | 19 +++++-- resources/locales/smn_FI/smn_FI.go | 19 +++++-- resources/locales/sn/sn.go | 19 +++++-- resources/locales/sn_ZW/sn_ZW.go | 19 +++++-- resources/locales/so/so.go | 19 +++++-- resources/locales/so_DJ/so_DJ.go | 19 +++++-- resources/locales/so_ET/so_ET.go | 19 +++++-- resources/locales/so_KE/so_KE.go | 19 +++++-- resources/locales/so_SO/so_SO.go | 19 +++++-- resources/locales/sq/sq.go | 19 +++++-- resources/locales/sq_AL/sq_AL.go | 19 +++++-- resources/locales/sq_MK/sq_MK.go | 19 +++++-- resources/locales/sq_XK/sq_XK.go | 19 +++++-- resources/locales/sr/sr.go | 19 +++++-- resources/locales/sr_Cyrl/sr_Cyrl.go | 19 +++++-- resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go | 19 +++++-- resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go | 27 +++++---- resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go | 25 ++++++--- resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go | 27 +++++---- resources/locales/sr_Latn/sr_Latn.go | 27 +++++---- resources/locales/sr_Latn_BA/sr_Latn_BA.go | 19 +++++-- resources/locales/sr_Latn_ME/sr_Latn_ME.go | 19 +++++-- resources/locales/sr_Latn_RS/sr_Latn_RS.go | 19 +++++-- resources/locales/sr_Latn_XK/sr_Latn_XK.go | 19 +++++-- resources/locales/sv/sv.go | 23 +++++--- resources/locales/sv_AX/sv_AX.go | 19 +++++-- resources/locales/sv_FI/sv_FI.go | 23 +++++--- resources/locales/sv_SE/sv_SE.go | 19 +++++-- resources/locales/sw/sw.go | 21 ++++--- resources/locales/sw_CD/sw_CD.go | 19 +++++-- resources/locales/sw_KE/sw_KE.go | 19 +++++-- resources/locales/sw_TZ/sw_TZ.go | 19 +++++-- resources/locales/sw_UG/sw_UG.go | 19 +++++-- resources/locales/ta/ta.go | 19 +++++-- resources/locales/ta_IN/ta_IN.go | 19 +++++-- resources/locales/ta_LK/ta_LK.go | 19 +++++-- resources/locales/ta_MY/ta_MY.go | 19 +++++-- resources/locales/ta_SG/ta_SG.go | 19 +++++-- resources/locales/te/te.go | 19 +++++-- resources/locales/te_IN/te_IN.go | 19 +++++-- resources/locales/teo/teo.go | 19 +++++-- resources/locales/teo_KE/teo_KE.go | 19 +++++-- resources/locales/teo_UG/teo_UG.go | 19 +++++-- resources/locales/th/th.go | 19 +++++-- resources/locales/th_TH/th_TH.go | 19 +++++-- resources/locales/ti/ti.go | 19 +++++-- resources/locales/ti_ER/ti_ER.go | 19 +++++-- resources/locales/ti_ET/ti_ET.go | 19 +++++-- resources/locales/tk/tk.go | 19 +++++-- resources/locales/tk_TM/tk_TM.go | 19 +++++-- resources/locales/to/to.go | 19 +++++-- resources/locales/to_TO/to_TO.go | 19 +++++-- resources/locales/tr/tr.go | 19 +++++-- resources/locales/tr_CY/tr_CY.go | 19 +++++-- resources/locales/tr_TR/tr_TR.go | 19 +++++-- resources/locales/twq/twq.go | 19 +++++-- resources/locales/twq_NE/twq_NE.go | 19 +++++-- resources/locales/tzm/tzm.go | 19 +++++-- resources/locales/tzm_MA/tzm_MA.go | 19 +++++-- resources/locales/ug/ug.go | 19 +++++-- resources/locales/ug_CN/ug_CN.go | 19 +++++-- resources/locales/uk/uk.go | 23 +++++--- resources/locales/uk_UA/uk_UA.go | 19 +++++-- resources/locales/ur/ur.go | 19 +++++-- resources/locales/ur_IN/ur_IN.go | 19 +++++-- resources/locales/ur_PK/ur_PK.go | 19 +++++-- resources/locales/uz/uz.go | 19 +++++-- resources/locales/uz_Arab/uz_Arab.go | 19 +++++-- resources/locales/uz_Arab_AF/uz_Arab_AF.go | 19 +++++-- resources/locales/uz_Cyrl/uz_Cyrl.go | 19 +++++-- resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go | 19 +++++-- resources/locales/uz_Latn/uz_Latn.go | 19 +++++-- resources/locales/uz_Latn_UZ/uz_Latn_UZ.go | 19 +++++-- resources/locales/vai/vai.go | 19 +++++-- resources/locales/vai_Latn/vai_Latn.go | 19 +++++-- resources/locales/vai_Latn_LR/vai_Latn_LR.go | 19 +++++-- resources/locales/vai_Vaii/vai_Vaii.go | 19 +++++-- resources/locales/vai_Vaii_LR/vai_Vaii_LR.go | 19 +++++-- resources/locales/vi/vi.go | 19 +++++-- resources/locales/vi_VN/vi_VN.go | 19 +++++-- resources/locales/vo/vo.go | 19 +++++-- resources/locales/vo_001/vo_001.go | 19 +++++-- resources/locales/vun/vun.go | 19 +++++-- resources/locales/vun_TZ/vun_TZ.go | 19 +++++-- resources/locales/wae/wae.go | 19 +++++-- resources/locales/wae_CH/wae_CH.go | 19 +++++-- resources/locales/xog/xog.go | 19 +++++-- resources/locales/xog_UG/xog_UG.go | 19 +++++-- resources/locales/yav/yav.go | 19 +++++-- resources/locales/yav_CM/yav_CM.go | 19 +++++-- resources/locales/yi/yi.go | 19 +++++-- resources/locales/yi_001/yi_001.go | 19 +++++-- resources/locales/yo/yo.go | 19 +++++-- resources/locales/yo_BJ/yo_BJ.go | 19 +++++-- resources/locales/yo_NG/yo_NG.go | 19 +++++-- resources/locales/yue/yue.go | 19 +++++-- resources/locales/yue_HK/yue_HK.go | 19 +++++-- resources/locales/zgh/zgh.go | 19 +++++-- resources/locales/zgh_MA/zgh_MA.go | 19 +++++-- resources/locales/zh/zh.go | 19 +++++-- resources/locales/zh_Hans/zh_Hans.go | 19 +++++-- resources/locales/zh_Hans_CN/zh_Hans_CN.go | 19 +++++-- resources/locales/zh_Hans_HK/zh_Hans_HK.go | 19 +++++-- resources/locales/zh_Hans_MO/zh_Hans_MO.go | 19 +++++-- resources/locales/zh_Hans_SG/zh_Hans_SG.go | 19 +++++-- resources/locales/zh_Hant/zh_Hant.go | 19 +++++-- resources/locales/zh_Hant_HK/zh_Hant_HK.go | 19 +++++-- resources/locales/zh_Hant_MO/zh_Hant_MO.go | 19 +++++-- resources/locales/zh_Hant_TW/zh_Hant_TW.go | 19 +++++-- resources/locales/zu/zu.go | 19 +++++-- resources/locales/zu_ZA/zu_ZA.go | 19 +++++-- 718 files changed, 9509 insertions(+), 4443 deletions(-) diff --git a/cmd/resources/generate_resources.go b/cmd/resources/generate_resources.go index c583f6f..2bb256c 100644 --- a/cmd/resources/generate_resources.go +++ b/cmd/resources/generate_resources.go @@ -7,6 +7,8 @@ import ( "os/exec" "strings" + "github.com/go-playground/universal-translator/resources/locales" + "golang.org/x/text/unicode/cldr" "text/template" @@ -84,6 +86,7 @@ var ( type translator struct { Locale string + Plurals string CardinalFunc string } @@ -132,10 +135,12 @@ func main() { baseLocale := strings.SplitN(l, "_", 2)[0] trans := &translator{ - Locale: l, - CardinalFunc: parseCardinalPluralRuleFunc(cldr, baseLocale), + Locale: l, } + trans.CardinalFunc, trans.Plurals = parseCardinalPluralRuleFunc(cldr, baseLocale) + + // fmt.Println(trans.CardinalFunc, trans.Plurals) // cardinalRules := getLocaleCardinalPluralRules(cldr, baseLocale) // fmt.Println("CardinalRules:", l, cardinalRules) // Start Plural Rules @@ -192,7 +197,7 @@ func main() { // TODO: cleanup function logic perhaps write a lexer... but it's working right now, and // I'm already farther down the rabbit hole than I'd like and so pulling the chute here. -func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results string) { +func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results string, plurals string) { var prCardinal *struct { cldr.Common @@ -203,6 +208,8 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results } "xml:\"pluralRule\"" } + var pluralArr []locales.PluralRule + for _, p := range current.Supplemental().Plurals { for _, pr := range p.PluralRules { @@ -220,6 +227,8 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results // no plural rules for locale if prCardinal == nil { + plurals = "nil" + results = "return locales.PluralRuleUnknown,nil" return } @@ -229,16 +238,22 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results // pre parse for variables for _, rule := range prCardinal.PluralRule { + ps1 := pluralStringToString(rule.Count) + psI := pluralStringToInt(rule.Count) + pluralArr = append(pluralArr, psI) + + // fmt.Println(rule.Count, ps1) + data := strings.Replace(strings.Replace(strings.Replace(strings.TrimSpace(strings.SplitN(rule.Common.Data(), "@", 2)[0]), " = ", " == ", -1), " or ", " || ", -1), " and ", " && ", -1) if len(data) == 0 { if len(prCardinal.PluralRule) == 1 { - results = "return locales." + pluralStringToString(rule.Count) + ", nil" + results = "return locales." + ps1 + ", nil" } else { - results += "\n\nreturn locales." + pluralStringToString(rule.Count) + ", nil" + results += "\n\nreturn locales." + ps1 + ", nil" // results += "else {\nreturn locales." + locales.PluralStringToString(rule.Count) + ", nil\n}" } @@ -269,8 +284,6 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results vals[prVarFuncs["t"]] = struct{}{} } - // fmt.Println(rule.Count, data) - if first { results += "if " first = false @@ -393,7 +406,7 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results results += " {\n" // return plural rule here - results += "return locales." + pluralStringToString(rule.Count) + ", nil\n" + results += "return locales." + ps1 + ", nil\n" results += "}" } @@ -412,9 +425,36 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results results = pre + results + if len(pluralArr) == 0 { + plurals = "nil" + } else { + plurals = fmt.Sprintf("%#v", pluralArr) + } + return } +// pluralStringToInt returns the enum value of 'plural' provided +func pluralStringToInt(plural string) locales.PluralRule { + + switch plural { + case "zero": + return locales.PluralRuleZero + case "one": + return locales.PluralRuleOne + case "two": + return locales.PluralRuleTwo + case "few": + return locales.PluralRuleFew + case "many": + return locales.PluralRuleMany + case "other": + return locales.PluralRuleOther + default: + return locales.PluralRuleUnknown + } +} + func pluralStringToString(pr string) string { pr = strings.TrimSpace(pr) diff --git a/cmd/resources/translator.tmpl b/cmd/resources/translator.tmpl index 936cd76..9294cd0 100644 --- a/cmd/resources/translator.tmpl +++ b/cmd/resources/translator.tmpl @@ -6,23 +6,30 @@ import ( ) type {{ .Locale }} struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the '{{ .Locale }}' locale func New() locales.Translator { return &{{ .Locale }}{ - locale: "{{ .Locale }}", + locale: "{{ .Locale }}", + plurals: {{ .Plurals }}, } } // Locale returns the current translators string locale -func(l *{{ .Locale }}) Locale() string { - return l.locale +func(t *{{ .Locale }}) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func(l *{{ .Locale }}) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with '{{ .Locale }}' +func(t *{{ .Locale }}) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for '{{ .Locale }}' +func(t *{{ .Locale }}) CardinalPluralRule(num string) (locales.PluralRule, error) { {{ .CardinalFunc }} } diff --git a/resources/locales/af/af.go b/resources/locales/af/af.go index a0006f6..a509a66 100644 --- a/resources/locales/af/af.go +++ b/resources/locales/af/af.go @@ -5,23 +5,30 @@ import ( ) type af struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'af' locale func New() locales.Translator { return &af{ - locale: "af", + locale: "af", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *af) Locale() string { - return l.locale +func (t *af) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *af) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'af' +func (t *af) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'af' +func (t *af) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/af_NA/af_NA.go b/resources/locales/af_NA/af_NA.go index 6e96562..0373828 100644 --- a/resources/locales/af_NA/af_NA.go +++ b/resources/locales/af_NA/af_NA.go @@ -5,23 +5,30 @@ import ( ) type af_NA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'af_NA' locale func New() locales.Translator { return &af_NA{ - locale: "af_NA", + locale: "af_NA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *af_NA) Locale() string { - return l.locale +func (t *af_NA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *af_NA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'af_NA' +func (t *af_NA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'af_NA' +func (t *af_NA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/af_ZA/af_ZA.go b/resources/locales/af_ZA/af_ZA.go index ba4de27..6004e75 100644 --- a/resources/locales/af_ZA/af_ZA.go +++ b/resources/locales/af_ZA/af_ZA.go @@ -5,23 +5,30 @@ import ( ) type af_ZA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'af_ZA' locale func New() locales.Translator { return &af_ZA{ - locale: "af_ZA", + locale: "af_ZA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *af_ZA) Locale() string { - return l.locale +func (t *af_ZA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *af_ZA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'af_ZA' +func (t *af_ZA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'af_ZA' +func (t *af_ZA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/agq/agq.go b/resources/locales/agq/agq.go index f7a2346..0c16e1a 100644 --- a/resources/locales/agq/agq.go +++ b/resources/locales/agq/agq.go @@ -5,22 +5,29 @@ import ( ) type agq struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'agq' locale func New() locales.Translator { return &agq{ - locale: "agq", + locale: "agq", + plurals: nil, } } // Locale returns the current translators string locale -func (l *agq) Locale() string { - return l.locale +func (t *agq) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *agq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'agq' +func (t *agq) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'agq' +func (t *agq) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/agq_CM/agq_CM.go b/resources/locales/agq_CM/agq_CM.go index 8389310..d89bf56 100644 --- a/resources/locales/agq_CM/agq_CM.go +++ b/resources/locales/agq_CM/agq_CM.go @@ -5,22 +5,29 @@ import ( ) type agq_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'agq_CM' locale func New() locales.Translator { return &agq_CM{ - locale: "agq_CM", + locale: "agq_CM", + plurals: nil, } } // Locale returns the current translators string locale -func (l *agq_CM) Locale() string { - return l.locale +func (t *agq_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *agq_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'agq_CM' +func (t *agq_CM) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'agq_CM' +func (t *agq_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ak/ak.go b/resources/locales/ak/ak.go index c1b4138..9fcd8cb 100644 --- a/resources/locales/ak/ak.go +++ b/resources/locales/ak/ak.go @@ -5,23 +5,30 @@ import ( ) type ak struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ak' locale func New() locales.Translator { return &ak{ - locale: "ak", + locale: "ak", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ak) Locale() string { - return l.locale +func (t *ak) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ak) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ak' +func (t *ak) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ak' +func (t *ak) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ak_GH/ak_GH.go b/resources/locales/ak_GH/ak_GH.go index 458c02b..d48818e 100644 --- a/resources/locales/ak_GH/ak_GH.go +++ b/resources/locales/ak_GH/ak_GH.go @@ -5,23 +5,30 @@ import ( ) type ak_GH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ak_GH' locale func New() locales.Translator { return &ak_GH{ - locale: "ak_GH", + locale: "ak_GH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ak_GH) Locale() string { - return l.locale +func (t *ak_GH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ak_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ak_GH' +func (t *ak_GH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ak_GH' +func (t *ak_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/am/am.go b/resources/locales/am/am.go index 811c47d..c1c014c 100644 --- a/resources/locales/am/am.go +++ b/resources/locales/am/am.go @@ -5,23 +5,30 @@ import ( ) type am struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'am' locale func New() locales.Translator { return &am{ - locale: "am", + locale: "am", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *am) Locale() string { - return l.locale +func (t *am) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *am) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'am' +func (t *am) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'am' +func (t *am) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/am_ET/am_ET.go b/resources/locales/am_ET/am_ET.go index 4dbe0a7..ef7699f 100644 --- a/resources/locales/am_ET/am_ET.go +++ b/resources/locales/am_ET/am_ET.go @@ -5,23 +5,30 @@ import ( ) type am_ET struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'am_ET' locale func New() locales.Translator { return &am_ET{ - locale: "am_ET", + locale: "am_ET", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *am_ET) Locale() string { - return l.locale +func (t *am_ET) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *am_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'am_ET' +func (t *am_ET) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'am_ET' +func (t *am_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar/ar.go b/resources/locales/ar/ar.go index 345b265..dbee053 100644 --- a/resources/locales/ar/ar.go +++ b/resources/locales/ar/ar.go @@ -5,23 +5,30 @@ import ( ) type ar struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar' locale func New() locales.Translator { return &ar{ - locale: "ar", + locale: "ar", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar) Locale() string { - return l.locale +func (t *ar) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar' +func (t *ar) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar' +func (t *ar) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_001/ar_001.go b/resources/locales/ar_001/ar_001.go index 23318a7..b14a7b7 100644 --- a/resources/locales/ar_001/ar_001.go +++ b/resources/locales/ar_001/ar_001.go @@ -5,23 +5,30 @@ import ( ) type ar_001 struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_001' locale func New() locales.Translator { return &ar_001{ - locale: "ar_001", + locale: "ar_001", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_001) Locale() string { - return l.locale +func (t *ar_001) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_001) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_001' +func (t *ar_001) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_001' +func (t *ar_001) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_AE/ar_AE.go b/resources/locales/ar_AE/ar_AE.go index c786b11..b5efcec 100644 --- a/resources/locales/ar_AE/ar_AE.go +++ b/resources/locales/ar_AE/ar_AE.go @@ -5,23 +5,30 @@ import ( ) type ar_AE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_AE' locale func New() locales.Translator { return &ar_AE{ - locale: "ar_AE", + locale: "ar_AE", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_AE) Locale() string { - return l.locale +func (t *ar_AE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_AE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_AE' +func (t *ar_AE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_AE' +func (t *ar_AE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_BH/ar_BH.go b/resources/locales/ar_BH/ar_BH.go index 290d011..c5b3e9c 100644 --- a/resources/locales/ar_BH/ar_BH.go +++ b/resources/locales/ar_BH/ar_BH.go @@ -5,23 +5,30 @@ import ( ) type ar_BH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_BH' locale func New() locales.Translator { return &ar_BH{ - locale: "ar_BH", + locale: "ar_BH", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_BH) Locale() string { - return l.locale +func (t *ar_BH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_BH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_BH' +func (t *ar_BH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_BH' +func (t *ar_BH) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_DJ/ar_DJ.go b/resources/locales/ar_DJ/ar_DJ.go index c76e631..0368876 100644 --- a/resources/locales/ar_DJ/ar_DJ.go +++ b/resources/locales/ar_DJ/ar_DJ.go @@ -5,23 +5,30 @@ import ( ) type ar_DJ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_DJ' locale func New() locales.Translator { return &ar_DJ{ - locale: "ar_DJ", + locale: "ar_DJ", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_DJ) Locale() string { - return l.locale +func (t *ar_DJ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_DJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_DJ' +func (t *ar_DJ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_DJ' +func (t *ar_DJ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_DZ/ar_DZ.go b/resources/locales/ar_DZ/ar_DZ.go index 9440142..862c82a 100644 --- a/resources/locales/ar_DZ/ar_DZ.go +++ b/resources/locales/ar_DZ/ar_DZ.go @@ -5,23 +5,30 @@ import ( ) type ar_DZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_DZ' locale func New() locales.Translator { return &ar_DZ{ - locale: "ar_DZ", + locale: "ar_DZ", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_DZ) Locale() string { - return l.locale +func (t *ar_DZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_DZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_DZ' +func (t *ar_DZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_DZ' +func (t *ar_DZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_EG/ar_EG.go b/resources/locales/ar_EG/ar_EG.go index b97f68c..2bf4992 100644 --- a/resources/locales/ar_EG/ar_EG.go +++ b/resources/locales/ar_EG/ar_EG.go @@ -5,23 +5,30 @@ import ( ) type ar_EG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_EG' locale func New() locales.Translator { return &ar_EG{ - locale: "ar_EG", + locale: "ar_EG", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_EG) Locale() string { - return l.locale +func (t *ar_EG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_EG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_EG' +func (t *ar_EG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_EG' +func (t *ar_EG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_EH/ar_EH.go b/resources/locales/ar_EH/ar_EH.go index d2454b1..1b198e7 100644 --- a/resources/locales/ar_EH/ar_EH.go +++ b/resources/locales/ar_EH/ar_EH.go @@ -5,23 +5,30 @@ import ( ) type ar_EH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_EH' locale func New() locales.Translator { return &ar_EH{ - locale: "ar_EH", + locale: "ar_EH", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_EH) Locale() string { - return l.locale +func (t *ar_EH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_EH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_EH' +func (t *ar_EH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_EH' +func (t *ar_EH) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_ER/ar_ER.go b/resources/locales/ar_ER/ar_ER.go index 09f09a2..55e140f 100644 --- a/resources/locales/ar_ER/ar_ER.go +++ b/resources/locales/ar_ER/ar_ER.go @@ -5,23 +5,30 @@ import ( ) type ar_ER struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_ER' locale func New() locales.Translator { return &ar_ER{ - locale: "ar_ER", + locale: "ar_ER", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_ER) Locale() string { - return l.locale +func (t *ar_ER) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_ER) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_ER' +func (t *ar_ER) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_ER' +func (t *ar_ER) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_IL/ar_IL.go b/resources/locales/ar_IL/ar_IL.go index a6fd007..9d52fc8 100644 --- a/resources/locales/ar_IL/ar_IL.go +++ b/resources/locales/ar_IL/ar_IL.go @@ -5,23 +5,30 @@ import ( ) type ar_IL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_IL' locale func New() locales.Translator { return &ar_IL{ - locale: "ar_IL", + locale: "ar_IL", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_IL) Locale() string { - return l.locale +func (t *ar_IL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_IL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_IL' +func (t *ar_IL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_IL' +func (t *ar_IL) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_IQ/ar_IQ.go b/resources/locales/ar_IQ/ar_IQ.go index 18f610f..29ce5d9 100644 --- a/resources/locales/ar_IQ/ar_IQ.go +++ b/resources/locales/ar_IQ/ar_IQ.go @@ -5,23 +5,30 @@ import ( ) type ar_IQ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_IQ' locale func New() locales.Translator { return &ar_IQ{ - locale: "ar_IQ", + locale: "ar_IQ", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_IQ) Locale() string { - return l.locale +func (t *ar_IQ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_IQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_IQ' +func (t *ar_IQ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_IQ' +func (t *ar_IQ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_JO/ar_JO.go b/resources/locales/ar_JO/ar_JO.go index 2fb674f..a19616d 100644 --- a/resources/locales/ar_JO/ar_JO.go +++ b/resources/locales/ar_JO/ar_JO.go @@ -5,23 +5,30 @@ import ( ) type ar_JO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_JO' locale func New() locales.Translator { return &ar_JO{ - locale: "ar_JO", + locale: "ar_JO", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_JO) Locale() string { - return l.locale +func (t *ar_JO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_JO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_JO' +func (t *ar_JO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_JO' +func (t *ar_JO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_KM/ar_KM.go b/resources/locales/ar_KM/ar_KM.go index 0e88da5..4fd86fd 100644 --- a/resources/locales/ar_KM/ar_KM.go +++ b/resources/locales/ar_KM/ar_KM.go @@ -5,23 +5,30 @@ import ( ) type ar_KM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_KM' locale func New() locales.Translator { return &ar_KM{ - locale: "ar_KM", + locale: "ar_KM", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_KM) Locale() string { - return l.locale +func (t *ar_KM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_KM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_KM' +func (t *ar_KM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_KM' +func (t *ar_KM) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_KW/ar_KW.go b/resources/locales/ar_KW/ar_KW.go index b3f2ca3..06e3f5a 100644 --- a/resources/locales/ar_KW/ar_KW.go +++ b/resources/locales/ar_KW/ar_KW.go @@ -5,23 +5,30 @@ import ( ) type ar_KW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_KW' locale func New() locales.Translator { return &ar_KW{ - locale: "ar_KW", + locale: "ar_KW", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_KW) Locale() string { - return l.locale +func (t *ar_KW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_KW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_KW' +func (t *ar_KW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_KW' +func (t *ar_KW) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_LB/ar_LB.go b/resources/locales/ar_LB/ar_LB.go index b63769d..bc34f80 100644 --- a/resources/locales/ar_LB/ar_LB.go +++ b/resources/locales/ar_LB/ar_LB.go @@ -5,23 +5,30 @@ import ( ) type ar_LB struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_LB' locale func New() locales.Translator { return &ar_LB{ - locale: "ar_LB", + locale: "ar_LB", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_LB) Locale() string { - return l.locale +func (t *ar_LB) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_LB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_LB' +func (t *ar_LB) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_LB' +func (t *ar_LB) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_LY/ar_LY.go b/resources/locales/ar_LY/ar_LY.go index 8d19c61..dd5b602 100644 --- a/resources/locales/ar_LY/ar_LY.go +++ b/resources/locales/ar_LY/ar_LY.go @@ -5,23 +5,30 @@ import ( ) type ar_LY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_LY' locale func New() locales.Translator { return &ar_LY{ - locale: "ar_LY", + locale: "ar_LY", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_LY) Locale() string { - return l.locale +func (t *ar_LY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_LY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_LY' +func (t *ar_LY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_LY' +func (t *ar_LY) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_MA/ar_MA.go b/resources/locales/ar_MA/ar_MA.go index 3e16870..c172bfc 100644 --- a/resources/locales/ar_MA/ar_MA.go +++ b/resources/locales/ar_MA/ar_MA.go @@ -5,23 +5,30 @@ import ( ) type ar_MA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_MA' locale func New() locales.Translator { return &ar_MA{ - locale: "ar_MA", + locale: "ar_MA", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_MA) Locale() string { - return l.locale +func (t *ar_MA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_MA' +func (t *ar_MA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_MA' +func (t *ar_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_MR/ar_MR.go b/resources/locales/ar_MR/ar_MR.go index 1e09a3c..ee70522 100644 --- a/resources/locales/ar_MR/ar_MR.go +++ b/resources/locales/ar_MR/ar_MR.go @@ -5,23 +5,30 @@ import ( ) type ar_MR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_MR' locale func New() locales.Translator { return &ar_MR{ - locale: "ar_MR", + locale: "ar_MR", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_MR) Locale() string { - return l.locale +func (t *ar_MR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_MR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_MR' +func (t *ar_MR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_MR' +func (t *ar_MR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_OM/ar_OM.go b/resources/locales/ar_OM/ar_OM.go index 20c1999..661096d 100644 --- a/resources/locales/ar_OM/ar_OM.go +++ b/resources/locales/ar_OM/ar_OM.go @@ -5,23 +5,30 @@ import ( ) type ar_OM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_OM' locale func New() locales.Translator { return &ar_OM{ - locale: "ar_OM", + locale: "ar_OM", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_OM) Locale() string { - return l.locale +func (t *ar_OM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_OM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_OM' +func (t *ar_OM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_OM' +func (t *ar_OM) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_PS/ar_PS.go b/resources/locales/ar_PS/ar_PS.go index 1636aaa..7b259be 100644 --- a/resources/locales/ar_PS/ar_PS.go +++ b/resources/locales/ar_PS/ar_PS.go @@ -5,23 +5,30 @@ import ( ) type ar_PS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_PS' locale func New() locales.Translator { return &ar_PS{ - locale: "ar_PS", + locale: "ar_PS", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_PS) Locale() string { - return l.locale +func (t *ar_PS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_PS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_PS' +func (t *ar_PS) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_PS' +func (t *ar_PS) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_QA/ar_QA.go b/resources/locales/ar_QA/ar_QA.go index fd7560b..1150e4a 100644 --- a/resources/locales/ar_QA/ar_QA.go +++ b/resources/locales/ar_QA/ar_QA.go @@ -5,23 +5,30 @@ import ( ) type ar_QA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_QA' locale func New() locales.Translator { return &ar_QA{ - locale: "ar_QA", + locale: "ar_QA", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_QA) Locale() string { - return l.locale +func (t *ar_QA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_QA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_QA' +func (t *ar_QA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_QA' +func (t *ar_QA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_SA/ar_SA.go b/resources/locales/ar_SA/ar_SA.go index 3ebadea..08451a7 100644 --- a/resources/locales/ar_SA/ar_SA.go +++ b/resources/locales/ar_SA/ar_SA.go @@ -5,23 +5,30 @@ import ( ) type ar_SA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_SA' locale func New() locales.Translator { return &ar_SA{ - locale: "ar_SA", + locale: "ar_SA", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_SA) Locale() string { - return l.locale +func (t *ar_SA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_SA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_SA' +func (t *ar_SA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_SA' +func (t *ar_SA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_SD/ar_SD.go b/resources/locales/ar_SD/ar_SD.go index b191eb3..d0ae7e9 100644 --- a/resources/locales/ar_SD/ar_SD.go +++ b/resources/locales/ar_SD/ar_SD.go @@ -5,23 +5,30 @@ import ( ) type ar_SD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_SD' locale func New() locales.Translator { return &ar_SD{ - locale: "ar_SD", + locale: "ar_SD", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_SD) Locale() string { - return l.locale +func (t *ar_SD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_SD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_SD' +func (t *ar_SD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_SD' +func (t *ar_SD) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_SO/ar_SO.go b/resources/locales/ar_SO/ar_SO.go index 06468be..54cff0c 100644 --- a/resources/locales/ar_SO/ar_SO.go +++ b/resources/locales/ar_SO/ar_SO.go @@ -5,23 +5,30 @@ import ( ) type ar_SO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_SO' locale func New() locales.Translator { return &ar_SO{ - locale: "ar_SO", + locale: "ar_SO", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_SO) Locale() string { - return l.locale +func (t *ar_SO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_SO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_SO' +func (t *ar_SO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_SO' +func (t *ar_SO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_SS/ar_SS.go b/resources/locales/ar_SS/ar_SS.go index dfad159..cc5ae5e 100644 --- a/resources/locales/ar_SS/ar_SS.go +++ b/resources/locales/ar_SS/ar_SS.go @@ -5,23 +5,30 @@ import ( ) type ar_SS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_SS' locale func New() locales.Translator { return &ar_SS{ - locale: "ar_SS", + locale: "ar_SS", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_SS) Locale() string { - return l.locale +func (t *ar_SS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_SS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_SS' +func (t *ar_SS) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_SS' +func (t *ar_SS) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_SY/ar_SY.go b/resources/locales/ar_SY/ar_SY.go index 87f8105..0edda5f 100644 --- a/resources/locales/ar_SY/ar_SY.go +++ b/resources/locales/ar_SY/ar_SY.go @@ -5,23 +5,30 @@ import ( ) type ar_SY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_SY' locale func New() locales.Translator { return &ar_SY{ - locale: "ar_SY", + locale: "ar_SY", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_SY) Locale() string { - return l.locale +func (t *ar_SY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_SY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_SY' +func (t *ar_SY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_SY' +func (t *ar_SY) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_TD/ar_TD.go b/resources/locales/ar_TD/ar_TD.go index 39505af..388657f 100644 --- a/resources/locales/ar_TD/ar_TD.go +++ b/resources/locales/ar_TD/ar_TD.go @@ -5,23 +5,30 @@ import ( ) type ar_TD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_TD' locale func New() locales.Translator { return &ar_TD{ - locale: "ar_TD", + locale: "ar_TD", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_TD) Locale() string { - return l.locale +func (t *ar_TD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_TD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_TD' +func (t *ar_TD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_TD' +func (t *ar_TD) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_TN/ar_TN.go b/resources/locales/ar_TN/ar_TN.go index e2443d5..314cf46 100644 --- a/resources/locales/ar_TN/ar_TN.go +++ b/resources/locales/ar_TN/ar_TN.go @@ -5,23 +5,30 @@ import ( ) type ar_TN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_TN' locale func New() locales.Translator { return &ar_TN{ - locale: "ar_TN", + locale: "ar_TN", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_TN) Locale() string { - return l.locale +func (t *ar_TN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_TN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_TN' +func (t *ar_TN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_TN' +func (t *ar_TN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ar_YE/ar_YE.go b/resources/locales/ar_YE/ar_YE.go index f5728a3..79a9ac6 100644 --- a/resources/locales/ar_YE/ar_YE.go +++ b/resources/locales/ar_YE/ar_YE.go @@ -5,23 +5,30 @@ import ( ) type ar_YE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ar_YE' locale func New() locales.Translator { return &ar_YE{ - locale: "ar_YE", + locale: "ar_YE", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ar_YE) Locale() string { - return l.locale +func (t *ar_YE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ar_YE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ar_YE' +func (t *ar_YE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ar_YE' +func (t *ar_YE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/as/as.go b/resources/locales/as/as.go index 2e173d5..faed2a5 100644 --- a/resources/locales/as/as.go +++ b/resources/locales/as/as.go @@ -5,23 +5,30 @@ import ( ) type as struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'as' locale func New() locales.Translator { return &as{ - locale: "as", + locale: "as", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *as) Locale() string { - return l.locale +func (t *as) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *as) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'as' +func (t *as) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'as' +func (t *as) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/as_IN/as_IN.go b/resources/locales/as_IN/as_IN.go index a9bc185..58127b9 100644 --- a/resources/locales/as_IN/as_IN.go +++ b/resources/locales/as_IN/as_IN.go @@ -5,23 +5,30 @@ import ( ) type as_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'as_IN' locale func New() locales.Translator { return &as_IN{ - locale: "as_IN", + locale: "as_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *as_IN) Locale() string { - return l.locale +func (t *as_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *as_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'as_IN' +func (t *as_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'as_IN' +func (t *as_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/asa/asa.go b/resources/locales/asa/asa.go index 72e657c..5fb04f2 100644 --- a/resources/locales/asa/asa.go +++ b/resources/locales/asa/asa.go @@ -5,23 +5,30 @@ import ( ) type asa struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'asa' locale func New() locales.Translator { return &asa{ - locale: "asa", + locale: "asa", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *asa) Locale() string { - return l.locale +func (t *asa) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *asa) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'asa' +func (t *asa) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'asa' +func (t *asa) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/asa_TZ/asa_TZ.go b/resources/locales/asa_TZ/asa_TZ.go index 5dd65b3..625a8cf 100644 --- a/resources/locales/asa_TZ/asa_TZ.go +++ b/resources/locales/asa_TZ/asa_TZ.go @@ -5,23 +5,30 @@ import ( ) type asa_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'asa_TZ' locale func New() locales.Translator { return &asa_TZ{ - locale: "asa_TZ", + locale: "asa_TZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *asa_TZ) Locale() string { - return l.locale +func (t *asa_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *asa_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'asa_TZ' +func (t *asa_TZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'asa_TZ' +func (t *asa_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ast/ast.go b/resources/locales/ast/ast.go index cf76b2d..c3d462f 100644 --- a/resources/locales/ast/ast.go +++ b/resources/locales/ast/ast.go @@ -5,23 +5,30 @@ import ( ) type ast struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ast' locale func New() locales.Translator { return &ast{ - locale: "ast", + locale: "ast", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ast) Locale() string { - return l.locale +func (t *ast) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ast) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ast' +func (t *ast) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ast' +func (t *ast) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ast_ES/ast_ES.go b/resources/locales/ast_ES/ast_ES.go index 22c06a2..e07fd99 100644 --- a/resources/locales/ast_ES/ast_ES.go +++ b/resources/locales/ast_ES/ast_ES.go @@ -5,23 +5,30 @@ import ( ) type ast_ES struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ast_ES' locale func New() locales.Translator { return &ast_ES{ - locale: "ast_ES", + locale: "ast_ES", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ast_ES) Locale() string { - return l.locale +func (t *ast_ES) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ast_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ast_ES' +func (t *ast_ES) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ast_ES' +func (t *ast_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/az/az.go b/resources/locales/az/az.go index 4ace91f..1dfb3c0 100644 --- a/resources/locales/az/az.go +++ b/resources/locales/az/az.go @@ -5,23 +5,30 @@ import ( ) type az struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'az' locale func New() locales.Translator { return &az{ - locale: "az", + locale: "az", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *az) Locale() string { - return l.locale +func (t *az) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *az) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'az' +func (t *az) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'az' +func (t *az) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/az_Cyrl/az_Cyrl.go b/resources/locales/az_Cyrl/az_Cyrl.go index 10f29ac..8f21a9e 100644 --- a/resources/locales/az_Cyrl/az_Cyrl.go +++ b/resources/locales/az_Cyrl/az_Cyrl.go @@ -5,23 +5,30 @@ import ( ) type az_Cyrl struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'az_Cyrl' locale func New() locales.Translator { return &az_Cyrl{ - locale: "az_Cyrl", + locale: "az_Cyrl", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *az_Cyrl) Locale() string { - return l.locale +func (t *az_Cyrl) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *az_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'az_Cyrl' +func (t *az_Cyrl) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'az_Cyrl' +func (t *az_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go b/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go index b65a1d1..5ba46f2 100644 --- a/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go +++ b/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go @@ -5,23 +5,30 @@ import ( ) type az_Cyrl_AZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'az_Cyrl_AZ' locale func New() locales.Translator { return &az_Cyrl_AZ{ - locale: "az_Cyrl_AZ", + locale: "az_Cyrl_AZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *az_Cyrl_AZ) Locale() string { - return l.locale +func (t *az_Cyrl_AZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *az_Cyrl_AZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'az_Cyrl_AZ' +func (t *az_Cyrl_AZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'az_Cyrl_AZ' +func (t *az_Cyrl_AZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/az_Latn/az_Latn.go b/resources/locales/az_Latn/az_Latn.go index 1b85052..64ae4c6 100644 --- a/resources/locales/az_Latn/az_Latn.go +++ b/resources/locales/az_Latn/az_Latn.go @@ -5,23 +5,30 @@ import ( ) type az_Latn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'az_Latn' locale func New() locales.Translator { return &az_Latn{ - locale: "az_Latn", + locale: "az_Latn", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *az_Latn) Locale() string { - return l.locale +func (t *az_Latn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *az_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'az_Latn' +func (t *az_Latn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'az_Latn' +func (t *az_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/az_Latn_AZ/az_Latn_AZ.go b/resources/locales/az_Latn_AZ/az_Latn_AZ.go index b1a9702..5a52499 100644 --- a/resources/locales/az_Latn_AZ/az_Latn_AZ.go +++ b/resources/locales/az_Latn_AZ/az_Latn_AZ.go @@ -5,23 +5,30 @@ import ( ) type az_Latn_AZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'az_Latn_AZ' locale func New() locales.Translator { return &az_Latn_AZ{ - locale: "az_Latn_AZ", + locale: "az_Latn_AZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *az_Latn_AZ) Locale() string { - return l.locale +func (t *az_Latn_AZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *az_Latn_AZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'az_Latn_AZ' +func (t *az_Latn_AZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'az_Latn_AZ' +func (t *az_Latn_AZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bas/bas.go b/resources/locales/bas/bas.go index 3e9ba43..38bcd53 100644 --- a/resources/locales/bas/bas.go +++ b/resources/locales/bas/bas.go @@ -5,22 +5,29 @@ import ( ) type bas struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bas' locale func New() locales.Translator { return &bas{ - locale: "bas", + locale: "bas", + plurals: nil, } } // Locale returns the current translators string locale -func (l *bas) Locale() string { - return l.locale +func (t *bas) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bas) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bas' +func (t *bas) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'bas' +func (t *bas) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/bas_CM/bas_CM.go b/resources/locales/bas_CM/bas_CM.go index 3925521..1960cfc 100644 --- a/resources/locales/bas_CM/bas_CM.go +++ b/resources/locales/bas_CM/bas_CM.go @@ -5,22 +5,29 @@ import ( ) type bas_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bas_CM' locale func New() locales.Translator { return &bas_CM{ - locale: "bas_CM", + locale: "bas_CM", + plurals: nil, } } // Locale returns the current translators string locale -func (l *bas_CM) Locale() string { - return l.locale +func (t *bas_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bas_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bas_CM' +func (t *bas_CM) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'bas_CM' +func (t *bas_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/be/be.go b/resources/locales/be/be.go index bcc43ee..60cb08b 100644 --- a/resources/locales/be/be.go +++ b/resources/locales/be/be.go @@ -5,23 +5,30 @@ import ( ) type be struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'be' locale func New() locales.Translator { return &be{ - locale: "be", + locale: "be", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *be) Locale() string { - return l.locale +func (t *be) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *be) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'be' +func (t *be) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'be' +func (t *be) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/be_BY/be_BY.go b/resources/locales/be_BY/be_BY.go index f9fbed5..78a4f9c 100644 --- a/resources/locales/be_BY/be_BY.go +++ b/resources/locales/be_BY/be_BY.go @@ -5,23 +5,30 @@ import ( ) type be_BY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'be_BY' locale func New() locales.Translator { return &be_BY{ - locale: "be_BY", + locale: "be_BY", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *be_BY) Locale() string { - return l.locale +func (t *be_BY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *be_BY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'be_BY' +func (t *be_BY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'be_BY' +func (t *be_BY) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bem/bem.go b/resources/locales/bem/bem.go index ce390bf..4ea0072 100644 --- a/resources/locales/bem/bem.go +++ b/resources/locales/bem/bem.go @@ -5,23 +5,30 @@ import ( ) type bem struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bem' locale func New() locales.Translator { return &bem{ - locale: "bem", + locale: "bem", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *bem) Locale() string { - return l.locale +func (t *bem) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bem) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bem' +func (t *bem) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bem' +func (t *bem) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bem_ZM/bem_ZM.go b/resources/locales/bem_ZM/bem_ZM.go index 75b8595..61d70dc 100644 --- a/resources/locales/bem_ZM/bem_ZM.go +++ b/resources/locales/bem_ZM/bem_ZM.go @@ -5,23 +5,30 @@ import ( ) type bem_ZM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bem_ZM' locale func New() locales.Translator { return &bem_ZM{ - locale: "bem_ZM", + locale: "bem_ZM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *bem_ZM) Locale() string { - return l.locale +func (t *bem_ZM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bem_ZM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bem_ZM' +func (t *bem_ZM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bem_ZM' +func (t *bem_ZM) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bez/bez.go b/resources/locales/bez/bez.go index 81ffcd5..8312e19 100644 --- a/resources/locales/bez/bez.go +++ b/resources/locales/bez/bez.go @@ -5,23 +5,30 @@ import ( ) type bez struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bez' locale func New() locales.Translator { return &bez{ - locale: "bez", + locale: "bez", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *bez) Locale() string { - return l.locale +func (t *bez) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bez) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bez' +func (t *bez) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bez' +func (t *bez) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bez_TZ/bez_TZ.go b/resources/locales/bez_TZ/bez_TZ.go index 0423062..4bcde6e 100644 --- a/resources/locales/bez_TZ/bez_TZ.go +++ b/resources/locales/bez_TZ/bez_TZ.go @@ -5,23 +5,30 @@ import ( ) type bez_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bez_TZ' locale func New() locales.Translator { return &bez_TZ{ - locale: "bez_TZ", + locale: "bez_TZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *bez_TZ) Locale() string { - return l.locale +func (t *bez_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bez_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bez_TZ' +func (t *bez_TZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bez_TZ' +func (t *bez_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bg/bg.go b/resources/locales/bg/bg.go index f1486aa..8a063a4 100644 --- a/resources/locales/bg/bg.go +++ b/resources/locales/bg/bg.go @@ -5,23 +5,30 @@ import ( ) type bg struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bg' locale func New() locales.Translator { return &bg{ - locale: "bg", + locale: "bg", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *bg) Locale() string { - return l.locale +func (t *bg) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bg' +func (t *bg) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bg' +func (t *bg) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bg_BG/bg_BG.go b/resources/locales/bg_BG/bg_BG.go index 2bf6d01..fd7474e 100644 --- a/resources/locales/bg_BG/bg_BG.go +++ b/resources/locales/bg_BG/bg_BG.go @@ -5,23 +5,30 @@ import ( ) type bg_BG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bg_BG' locale func New() locales.Translator { return &bg_BG{ - locale: "bg_BG", + locale: "bg_BG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *bg_BG) Locale() string { - return l.locale +func (t *bg_BG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bg_BG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bg_BG' +func (t *bg_BG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bg_BG' +func (t *bg_BG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bm/bm.go b/resources/locales/bm/bm.go index f07b3d2..5ded7c9 100644 --- a/resources/locales/bm/bm.go +++ b/resources/locales/bm/bm.go @@ -5,23 +5,30 @@ import ( ) type bm struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bm' locale func New() locales.Translator { return &bm{ - locale: "bm", + locale: "bm", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *bm) Locale() string { - return l.locale +func (t *bm) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bm) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bm' +func (t *bm) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bm' +func (t *bm) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/bm_ML/bm_ML.go b/resources/locales/bm_ML/bm_ML.go index 61a8919..db9c7bb 100644 --- a/resources/locales/bm_ML/bm_ML.go +++ b/resources/locales/bm_ML/bm_ML.go @@ -5,23 +5,30 @@ import ( ) type bm_ML struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bm_ML' locale func New() locales.Translator { return &bm_ML{ - locale: "bm_ML", + locale: "bm_ML", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *bm_ML) Locale() string { - return l.locale +func (t *bm_ML) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bm_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bm_ML' +func (t *bm_ML) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bm_ML' +func (t *bm_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/bn/bn.go b/resources/locales/bn/bn.go index bdb9768..5badb41 100644 --- a/resources/locales/bn/bn.go +++ b/resources/locales/bn/bn.go @@ -5,23 +5,30 @@ import ( ) type bn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bn' locale func New() locales.Translator { return &bn{ - locale: "bn", + locale: "bn", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *bn) Locale() string { - return l.locale +func (t *bn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bn' +func (t *bn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bn' +func (t *bn) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bn_BD/bn_BD.go b/resources/locales/bn_BD/bn_BD.go index bbdb068..3206d8d 100644 --- a/resources/locales/bn_BD/bn_BD.go +++ b/resources/locales/bn_BD/bn_BD.go @@ -5,23 +5,30 @@ import ( ) type bn_BD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bn_BD' locale func New() locales.Translator { return &bn_BD{ - locale: "bn_BD", + locale: "bn_BD", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *bn_BD) Locale() string { - return l.locale +func (t *bn_BD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bn_BD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bn_BD' +func (t *bn_BD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bn_BD' +func (t *bn_BD) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bn_IN/bn_IN.go b/resources/locales/bn_IN/bn_IN.go index 2374995..e4f69c5 100644 --- a/resources/locales/bn_IN/bn_IN.go +++ b/resources/locales/bn_IN/bn_IN.go @@ -5,23 +5,30 @@ import ( ) type bn_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bn_IN' locale func New() locales.Translator { return &bn_IN{ - locale: "bn_IN", + locale: "bn_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *bn_IN) Locale() string { - return l.locale +func (t *bn_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bn_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bn_IN' +func (t *bn_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bn_IN' +func (t *bn_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bo/bo.go b/resources/locales/bo/bo.go index 75ce901..d8927d2 100644 --- a/resources/locales/bo/bo.go +++ b/resources/locales/bo/bo.go @@ -5,23 +5,30 @@ import ( ) type bo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bo' locale func New() locales.Translator { return &bo{ - locale: "bo", + locale: "bo", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *bo) Locale() string { - return l.locale +func (t *bo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bo' +func (t *bo) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bo' +func (t *bo) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/bo_CN/bo_CN.go b/resources/locales/bo_CN/bo_CN.go index 27da956..fe042e6 100644 --- a/resources/locales/bo_CN/bo_CN.go +++ b/resources/locales/bo_CN/bo_CN.go @@ -5,23 +5,30 @@ import ( ) type bo_CN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bo_CN' locale func New() locales.Translator { return &bo_CN{ - locale: "bo_CN", + locale: "bo_CN", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *bo_CN) Locale() string { - return l.locale +func (t *bo_CN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bo_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bo_CN' +func (t *bo_CN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bo_CN' +func (t *bo_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/bo_IN/bo_IN.go b/resources/locales/bo_IN/bo_IN.go index 7c0f76e..c2f3e7d 100644 --- a/resources/locales/bo_IN/bo_IN.go +++ b/resources/locales/bo_IN/bo_IN.go @@ -5,23 +5,30 @@ import ( ) type bo_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bo_IN' locale func New() locales.Translator { return &bo_IN{ - locale: "bo_IN", + locale: "bo_IN", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *bo_IN) Locale() string { - return l.locale +func (t *bo_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bo_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bo_IN' +func (t *bo_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bo_IN' +func (t *bo_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/br/br.go b/resources/locales/br/br.go index 6f884a8..13a83e8 100644 --- a/resources/locales/br/br.go +++ b/resources/locales/br/br.go @@ -5,23 +5,30 @@ import ( ) type br struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'br' locale func New() locales.Translator { return &br{ - locale: "br", + locale: "br", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *br) Locale() string { - return l.locale +func (t *br) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *br) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'br' +func (t *br) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'br' +func (t *br) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/br_FR/br_FR.go b/resources/locales/br_FR/br_FR.go index 43fe3c0..17878e7 100644 --- a/resources/locales/br_FR/br_FR.go +++ b/resources/locales/br_FR/br_FR.go @@ -5,23 +5,30 @@ import ( ) type br_FR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'br_FR' locale func New() locales.Translator { return &br_FR{ - locale: "br_FR", + locale: "br_FR", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *br_FR) Locale() string { - return l.locale +func (t *br_FR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *br_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'br_FR' +func (t *br_FR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'br_FR' +func (t *br_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/brx/brx.go b/resources/locales/brx/brx.go index 3d46227..e87fddc 100644 --- a/resources/locales/brx/brx.go +++ b/resources/locales/brx/brx.go @@ -5,23 +5,30 @@ import ( ) type brx struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'brx' locale func New() locales.Translator { return &brx{ - locale: "brx", + locale: "brx", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *brx) Locale() string { - return l.locale +func (t *brx) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *brx) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'brx' +func (t *brx) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'brx' +func (t *brx) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/brx_IN/brx_IN.go b/resources/locales/brx_IN/brx_IN.go index 256418c..333353d 100644 --- a/resources/locales/brx_IN/brx_IN.go +++ b/resources/locales/brx_IN/brx_IN.go @@ -5,23 +5,30 @@ import ( ) type brx_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'brx_IN' locale func New() locales.Translator { return &brx_IN{ - locale: "brx_IN", + locale: "brx_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *brx_IN) Locale() string { - return l.locale +func (t *brx_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *brx_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'brx_IN' +func (t *brx_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'brx_IN' +func (t *brx_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/bs/bs.go b/resources/locales/bs/bs.go index adc1813..f6ccd3c 100644 --- a/resources/locales/bs/bs.go +++ b/resources/locales/bs/bs.go @@ -5,23 +5,30 @@ import ( ) type bs struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bs' locale func New() locales.Translator { return &bs{ - locale: "bs", + locale: "bs", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *bs) Locale() string { - return l.locale +func (t *bs) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bs) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bs' +func (t *bs) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bs' +func (t *bs) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/bs_Cyrl/bs_Cyrl.go b/resources/locales/bs_Cyrl/bs_Cyrl.go index df6cfae..6161122 100644 --- a/resources/locales/bs_Cyrl/bs_Cyrl.go +++ b/resources/locales/bs_Cyrl/bs_Cyrl.go @@ -5,32 +5,39 @@ import ( ) type bs_Cyrl struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bs_Cyrl' locale func New() locales.Translator { return &bs_Cyrl{ - locale: "bs_Cyrl", + locale: "bs_Cyrl", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *bs_Cyrl) Locale() string { - return l.locale +func (t *bs_Cyrl) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bs_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bs_Cyrl' +func (t *bs_Cyrl) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'bs_Cyrl' +func (t *bs_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { - f, err := locales.F(num) + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - i, err := locales.I(num) + v := locales.V(num) + + f, err := locales.F(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } diff --git a/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go b/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go index 450614e..1a34e0b 100644 --- a/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go +++ b/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go @@ -5,23 +5,30 @@ import ( ) type bs_Cyrl_BA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bs_Cyrl_BA' locale func New() locales.Translator { return &bs_Cyrl_BA{ - locale: "bs_Cyrl_BA", + locale: "bs_Cyrl_BA", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *bs_Cyrl_BA) Locale() string { - return l.locale +func (t *bs_Cyrl_BA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bs_Cyrl_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bs_Cyrl_BA' +func (t *bs_Cyrl_BA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bs_Cyrl_BA' +func (t *bs_Cyrl_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/bs_Latn/bs_Latn.go b/resources/locales/bs_Latn/bs_Latn.go index c8444dd..e8d383e 100644 --- a/resources/locales/bs_Latn/bs_Latn.go +++ b/resources/locales/bs_Latn/bs_Latn.go @@ -5,23 +5,30 @@ import ( ) type bs_Latn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bs_Latn' locale func New() locales.Translator { return &bs_Latn{ - locale: "bs_Latn", + locale: "bs_Latn", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *bs_Latn) Locale() string { - return l.locale +func (t *bs_Latn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bs_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bs_Latn' +func (t *bs_Latn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bs_Latn' +func (t *bs_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/bs_Latn_BA/bs_Latn_BA.go b/resources/locales/bs_Latn_BA/bs_Latn_BA.go index 76e455e..43b336e 100644 --- a/resources/locales/bs_Latn_BA/bs_Latn_BA.go +++ b/resources/locales/bs_Latn_BA/bs_Latn_BA.go @@ -5,23 +5,30 @@ import ( ) type bs_Latn_BA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'bs_Latn_BA' locale func New() locales.Translator { return &bs_Latn_BA{ - locale: "bs_Latn_BA", + locale: "bs_Latn_BA", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *bs_Latn_BA) Locale() string { - return l.locale +func (t *bs_Latn_BA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *bs_Latn_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'bs_Latn_BA' +func (t *bs_Latn_BA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'bs_Latn_BA' +func (t *bs_Latn_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ca/ca.go b/resources/locales/ca/ca.go index 16f7050..5ab84a0 100644 --- a/resources/locales/ca/ca.go +++ b/resources/locales/ca/ca.go @@ -5,23 +5,30 @@ import ( ) type ca struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ca' locale func New() locales.Translator { return &ca{ - locale: "ca", + locale: "ca", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ca) Locale() string { - return l.locale +func (t *ca) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ca) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ca' +func (t *ca) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ca' +func (t *ca) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ca_AD/ca_AD.go b/resources/locales/ca_AD/ca_AD.go index 6b9bdd1..115f985 100644 --- a/resources/locales/ca_AD/ca_AD.go +++ b/resources/locales/ca_AD/ca_AD.go @@ -5,31 +5,38 @@ import ( ) type ca_AD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ca_AD' locale func New() locales.Translator { return &ca_AD{ - locale: "ca_AD", + locale: "ca_AD", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ca_AD) Locale() string { - return l.locale +func (t *ca_AD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ca_AD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ca_AD' +func (t *ca_AD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ca_AD' +func (t *ca_AD) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/ca_ES/ca_ES.go b/resources/locales/ca_ES/ca_ES.go index 8e0d486..64c2fc6 100644 --- a/resources/locales/ca_ES/ca_ES.go +++ b/resources/locales/ca_ES/ca_ES.go @@ -5,23 +5,30 @@ import ( ) type ca_ES struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ca_ES' locale func New() locales.Translator { return &ca_ES{ - locale: "ca_ES", + locale: "ca_ES", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ca_ES) Locale() string { - return l.locale +func (t *ca_ES) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ca_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ca_ES' +func (t *ca_ES) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ca_ES' +func (t *ca_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go b/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go index 6d4a37c..1922f97 100644 --- a/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go +++ b/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go @@ -5,23 +5,30 @@ import ( ) type ca_ES_VALENCIA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ca_ES_VALENCIA' locale func New() locales.Translator { return &ca_ES_VALENCIA{ - locale: "ca_ES_VALENCIA", + locale: "ca_ES_VALENCIA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ca_ES_VALENCIA) Locale() string { - return l.locale +func (t *ca_ES_VALENCIA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ca_ES_VALENCIA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ca_ES_VALENCIA' +func (t *ca_ES_VALENCIA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ca_ES_VALENCIA' +func (t *ca_ES_VALENCIA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ca_FR/ca_FR.go b/resources/locales/ca_FR/ca_FR.go index 8a76b45..ac77e37 100644 --- a/resources/locales/ca_FR/ca_FR.go +++ b/resources/locales/ca_FR/ca_FR.go @@ -5,31 +5,38 @@ import ( ) type ca_FR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ca_FR' locale func New() locales.Translator { return &ca_FR{ - locale: "ca_FR", + locale: "ca_FR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ca_FR) Locale() string { - return l.locale +func (t *ca_FR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ca_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ca_FR' +func (t *ca_FR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ca_FR' +func (t *ca_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/ca_IT/ca_IT.go b/resources/locales/ca_IT/ca_IT.go index 7f05f5b..733dffb 100644 --- a/resources/locales/ca_IT/ca_IT.go +++ b/resources/locales/ca_IT/ca_IT.go @@ -5,31 +5,38 @@ import ( ) type ca_IT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ca_IT' locale func New() locales.Translator { return &ca_IT{ - locale: "ca_IT", + locale: "ca_IT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ca_IT) Locale() string { - return l.locale +func (t *ca_IT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ca_IT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ca_IT' +func (t *ca_IT) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'ca_IT' +func (t *ca_IT) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/ce/ce.go b/resources/locales/ce/ce.go index 7ba6270..682ef48 100644 --- a/resources/locales/ce/ce.go +++ b/resources/locales/ce/ce.go @@ -5,23 +5,30 @@ import ( ) type ce struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ce' locale func New() locales.Translator { return &ce{ - locale: "ce", + locale: "ce", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ce) Locale() string { - return l.locale +func (t *ce) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ce) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ce' +func (t *ce) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ce' +func (t *ce) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ce_RU/ce_RU.go b/resources/locales/ce_RU/ce_RU.go index 43c6fe2..d4443b0 100644 --- a/resources/locales/ce_RU/ce_RU.go +++ b/resources/locales/ce_RU/ce_RU.go @@ -5,23 +5,30 @@ import ( ) type ce_RU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ce_RU' locale func New() locales.Translator { return &ce_RU{ - locale: "ce_RU", + locale: "ce_RU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ce_RU) Locale() string { - return l.locale +func (t *ce_RU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ce_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ce_RU' +func (t *ce_RU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ce_RU' +func (t *ce_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/cgg/cgg.go b/resources/locales/cgg/cgg.go index 24b085d..389dbbb 100644 --- a/resources/locales/cgg/cgg.go +++ b/resources/locales/cgg/cgg.go @@ -5,23 +5,30 @@ import ( ) type cgg struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'cgg' locale func New() locales.Translator { return &cgg{ - locale: "cgg", + locale: "cgg", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *cgg) Locale() string { - return l.locale +func (t *cgg) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *cgg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'cgg' +func (t *cgg) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'cgg' +func (t *cgg) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/cgg_UG/cgg_UG.go b/resources/locales/cgg_UG/cgg_UG.go index 4fb7839..6cbf6ad 100644 --- a/resources/locales/cgg_UG/cgg_UG.go +++ b/resources/locales/cgg_UG/cgg_UG.go @@ -5,23 +5,30 @@ import ( ) type cgg_UG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'cgg_UG' locale func New() locales.Translator { return &cgg_UG{ - locale: "cgg_UG", + locale: "cgg_UG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *cgg_UG) Locale() string { - return l.locale +func (t *cgg_UG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *cgg_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'cgg_UG' +func (t *cgg_UG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'cgg_UG' +func (t *cgg_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/chr/chr.go b/resources/locales/chr/chr.go index 48aa26c..eff710b 100644 --- a/resources/locales/chr/chr.go +++ b/resources/locales/chr/chr.go @@ -5,23 +5,30 @@ import ( ) type chr struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'chr' locale func New() locales.Translator { return &chr{ - locale: "chr", + locale: "chr", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *chr) Locale() string { - return l.locale +func (t *chr) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *chr) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'chr' +func (t *chr) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'chr' +func (t *chr) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/chr_US/chr_US.go b/resources/locales/chr_US/chr_US.go index 01fab60..9826102 100644 --- a/resources/locales/chr_US/chr_US.go +++ b/resources/locales/chr_US/chr_US.go @@ -5,23 +5,30 @@ import ( ) type chr_US struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'chr_US' locale func New() locales.Translator { return &chr_US{ - locale: "chr_US", + locale: "chr_US", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *chr_US) Locale() string { - return l.locale +func (t *chr_US) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *chr_US) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'chr_US' +func (t *chr_US) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'chr_US' +func (t *chr_US) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ckb/ckb.go b/resources/locales/ckb/ckb.go index 4565158..9c7bafb 100644 --- a/resources/locales/ckb/ckb.go +++ b/resources/locales/ckb/ckb.go @@ -5,23 +5,30 @@ import ( ) type ckb struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ckb' locale func New() locales.Translator { return &ckb{ - locale: "ckb", + locale: "ckb", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ckb) Locale() string { - return l.locale +func (t *ckb) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ckb) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ckb' +func (t *ckb) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ckb' +func (t *ckb) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ckb_IQ/ckb_IQ.go b/resources/locales/ckb_IQ/ckb_IQ.go index 63d05e5..852ee4f 100644 --- a/resources/locales/ckb_IQ/ckb_IQ.go +++ b/resources/locales/ckb_IQ/ckb_IQ.go @@ -5,23 +5,30 @@ import ( ) type ckb_IQ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ckb_IQ' locale func New() locales.Translator { return &ckb_IQ{ - locale: "ckb_IQ", + locale: "ckb_IQ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ckb_IQ) Locale() string { - return l.locale +func (t *ckb_IQ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ckb_IQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ckb_IQ' +func (t *ckb_IQ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ckb_IQ' +func (t *ckb_IQ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ckb_IR/ckb_IR.go b/resources/locales/ckb_IR/ckb_IR.go index 990dca3..60d7a55 100644 --- a/resources/locales/ckb_IR/ckb_IR.go +++ b/resources/locales/ckb_IR/ckb_IR.go @@ -5,23 +5,30 @@ import ( ) type ckb_IR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ckb_IR' locale func New() locales.Translator { return &ckb_IR{ - locale: "ckb_IR", + locale: "ckb_IR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ckb_IR) Locale() string { - return l.locale +func (t *ckb_IR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ckb_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ckb_IR' +func (t *ckb_IR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ckb_IR' +func (t *ckb_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/cs/cs.go b/resources/locales/cs/cs.go index b923b92..1d86535 100644 --- a/resources/locales/cs/cs.go +++ b/resources/locales/cs/cs.go @@ -5,31 +5,38 @@ import ( ) type cs struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'cs' locale func New() locales.Translator { return &cs{ - locale: "cs", + locale: "cs", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *cs) Locale() string { - return l.locale +func (t *cs) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *cs) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'cs' +func (t *cs) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'cs' +func (t *cs) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } else if i >= 2 && i <= 4 && v == 0 { diff --git a/resources/locales/cs_CZ/cs_CZ.go b/resources/locales/cs_CZ/cs_CZ.go index 2e19e7c..b2425ab 100644 --- a/resources/locales/cs_CZ/cs_CZ.go +++ b/resources/locales/cs_CZ/cs_CZ.go @@ -5,31 +5,38 @@ import ( ) type cs_CZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'cs_CZ' locale func New() locales.Translator { return &cs_CZ{ - locale: "cs_CZ", + locale: "cs_CZ", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *cs_CZ) Locale() string { - return l.locale +func (t *cs_CZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *cs_CZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'cs_CZ' +func (t *cs_CZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'cs_CZ' +func (t *cs_CZ) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } else if i >= 2 && i <= 4 && v == 0 { diff --git a/resources/locales/cu/cu.go b/resources/locales/cu/cu.go index ae06998..65f56d1 100644 --- a/resources/locales/cu/cu.go +++ b/resources/locales/cu/cu.go @@ -5,22 +5,29 @@ import ( ) type cu struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'cu' locale func New() locales.Translator { return &cu{ - locale: "cu", + locale: "cu", + plurals: nil, } } // Locale returns the current translators string locale -func (l *cu) Locale() string { - return l.locale +func (t *cu) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *cu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'cu' +func (t *cu) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'cu' +func (t *cu) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/cu_RU/cu_RU.go b/resources/locales/cu_RU/cu_RU.go index af99aa1..fa4ab6a 100644 --- a/resources/locales/cu_RU/cu_RU.go +++ b/resources/locales/cu_RU/cu_RU.go @@ -5,22 +5,29 @@ import ( ) type cu_RU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'cu_RU' locale func New() locales.Translator { return &cu_RU{ - locale: "cu_RU", + locale: "cu_RU", + plurals: nil, } } // Locale returns the current translators string locale -func (l *cu_RU) Locale() string { - return l.locale +func (t *cu_RU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *cu_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'cu_RU' +func (t *cu_RU) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'cu_RU' +func (t *cu_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/cy/cy.go b/resources/locales/cy/cy.go index ffac3a2..043a6aa 100644 --- a/resources/locales/cy/cy.go +++ b/resources/locales/cy/cy.go @@ -5,23 +5,30 @@ import ( ) type cy struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'cy' locale func New() locales.Translator { return &cy{ - locale: "cy", + locale: "cy", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *cy) Locale() string { - return l.locale +func (t *cy) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *cy) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'cy' +func (t *cy) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'cy' +func (t *cy) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/cy_GB/cy_GB.go b/resources/locales/cy_GB/cy_GB.go index b357387..4baaed8 100644 --- a/resources/locales/cy_GB/cy_GB.go +++ b/resources/locales/cy_GB/cy_GB.go @@ -5,23 +5,30 @@ import ( ) type cy_GB struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'cy_GB' locale func New() locales.Translator { return &cy_GB{ - locale: "cy_GB", + locale: "cy_GB", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *cy_GB) Locale() string { - return l.locale +func (t *cy_GB) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *cy_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'cy_GB' +func (t *cy_GB) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'cy_GB' +func (t *cy_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/da/da.go b/resources/locales/da/da.go index 907b778..2bd8ac5 100644 --- a/resources/locales/da/da.go +++ b/resources/locales/da/da.go @@ -5,23 +5,30 @@ import ( ) type da struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'da' locale func New() locales.Translator { return &da{ - locale: "da", + locale: "da", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *da) Locale() string { - return l.locale +func (t *da) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *da) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'da' +func (t *da) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'da' +func (t *da) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/da_DK/da_DK.go b/resources/locales/da_DK/da_DK.go index 3a8e838..cc3ea8a 100644 --- a/resources/locales/da_DK/da_DK.go +++ b/resources/locales/da_DK/da_DK.go @@ -5,35 +5,42 @@ import ( ) type da_DK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'da_DK' locale func New() locales.Translator { return &da_DK{ - locale: "da_DK", + locale: "da_DK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *da_DK) Locale() string { - return l.locale +func (t *da_DK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *da_DK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'da_DK' +func (t *da_DK) Plurals() []locales.PluralRule { + return t.plurals +} - t, err := locales.T(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'da_DK' +func (t *da_DK) CardinalPluralRule(num string) (locales.PluralRule, error) { + + n, err := locales.N(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - n, err := locales.N(num) + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - i, err := locales.I(num) + t, err := locales.T(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } diff --git a/resources/locales/da_GL/da_GL.go b/resources/locales/da_GL/da_GL.go index 7c07341..70b3da0 100644 --- a/resources/locales/da_GL/da_GL.go +++ b/resources/locales/da_GL/da_GL.go @@ -5,23 +5,30 @@ import ( ) type da_GL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'da_GL' locale func New() locales.Translator { return &da_GL{ - locale: "da_GL", + locale: "da_GL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *da_GL) Locale() string { - return l.locale +func (t *da_GL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *da_GL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'da_GL' +func (t *da_GL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'da_GL' +func (t *da_GL) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/dav/dav.go b/resources/locales/dav/dav.go index b99e1b9..dad14da 100644 --- a/resources/locales/dav/dav.go +++ b/resources/locales/dav/dav.go @@ -5,22 +5,29 @@ import ( ) type dav struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dav' locale func New() locales.Translator { return &dav{ - locale: "dav", + locale: "dav", + plurals: nil, } } // Locale returns the current translators string locale -func (l *dav) Locale() string { - return l.locale +func (t *dav) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dav) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dav' +func (t *dav) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'dav' +func (t *dav) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dav_KE/dav_KE.go b/resources/locales/dav_KE/dav_KE.go index 80b7454..730f8a7 100644 --- a/resources/locales/dav_KE/dav_KE.go +++ b/resources/locales/dav_KE/dav_KE.go @@ -5,22 +5,29 @@ import ( ) type dav_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dav_KE' locale func New() locales.Translator { return &dav_KE{ - locale: "dav_KE", + locale: "dav_KE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *dav_KE) Locale() string { - return l.locale +func (t *dav_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dav_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dav_KE' +func (t *dav_KE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'dav_KE' +func (t *dav_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/de/de.go b/resources/locales/de/de.go index ea1ed67..abb1aae 100644 --- a/resources/locales/de/de.go +++ b/resources/locales/de/de.go @@ -5,23 +5,30 @@ import ( ) type de struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'de' locale func New() locales.Translator { return &de{ - locale: "de", + locale: "de", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *de) Locale() string { - return l.locale +func (t *de) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *de) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'de' +func (t *de) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'de' +func (t *de) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/de_AT/de_AT.go b/resources/locales/de_AT/de_AT.go index e1ee07f..71a9132 100644 --- a/resources/locales/de_AT/de_AT.go +++ b/resources/locales/de_AT/de_AT.go @@ -5,31 +5,38 @@ import ( ) type de_AT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'de_AT' locale func New() locales.Translator { return &de_AT{ - locale: "de_AT", + locale: "de_AT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *de_AT) Locale() string { - return l.locale +func (t *de_AT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *de_AT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'de_AT' +func (t *de_AT) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'de_AT' +func (t *de_AT) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/de_BE/de_BE.go b/resources/locales/de_BE/de_BE.go index 09b2315..ac41f7d 100644 --- a/resources/locales/de_BE/de_BE.go +++ b/resources/locales/de_BE/de_BE.go @@ -5,23 +5,30 @@ import ( ) type de_BE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'de_BE' locale func New() locales.Translator { return &de_BE{ - locale: "de_BE", + locale: "de_BE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *de_BE) Locale() string { - return l.locale +func (t *de_BE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *de_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'de_BE' +func (t *de_BE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'de_BE' +func (t *de_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/de_CH/de_CH.go b/resources/locales/de_CH/de_CH.go index a7692fa..e773f12 100644 --- a/resources/locales/de_CH/de_CH.go +++ b/resources/locales/de_CH/de_CH.go @@ -5,23 +5,30 @@ import ( ) type de_CH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'de_CH' locale func New() locales.Translator { return &de_CH{ - locale: "de_CH", + locale: "de_CH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *de_CH) Locale() string { - return l.locale +func (t *de_CH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *de_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'de_CH' +func (t *de_CH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'de_CH' +func (t *de_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/de_DE/de_DE.go b/resources/locales/de_DE/de_DE.go index 99a427b..08a5139 100644 --- a/resources/locales/de_DE/de_DE.go +++ b/resources/locales/de_DE/de_DE.go @@ -5,23 +5,30 @@ import ( ) type de_DE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'de_DE' locale func New() locales.Translator { return &de_DE{ - locale: "de_DE", + locale: "de_DE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *de_DE) Locale() string { - return l.locale +func (t *de_DE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *de_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'de_DE' +func (t *de_DE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'de_DE' +func (t *de_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/de_LI/de_LI.go b/resources/locales/de_LI/de_LI.go index aed1ed5..0edbc89 100644 --- a/resources/locales/de_LI/de_LI.go +++ b/resources/locales/de_LI/de_LI.go @@ -5,23 +5,30 @@ import ( ) type de_LI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'de_LI' locale func New() locales.Translator { return &de_LI{ - locale: "de_LI", + locale: "de_LI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *de_LI) Locale() string { - return l.locale +func (t *de_LI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *de_LI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'de_LI' +func (t *de_LI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'de_LI' +func (t *de_LI) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/de_LU/de_LU.go b/resources/locales/de_LU/de_LU.go index e799559..a442b33 100644 --- a/resources/locales/de_LU/de_LU.go +++ b/resources/locales/de_LU/de_LU.go @@ -5,23 +5,30 @@ import ( ) type de_LU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'de_LU' locale func New() locales.Translator { return &de_LU{ - locale: "de_LU", + locale: "de_LU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *de_LU) Locale() string { - return l.locale +func (t *de_LU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *de_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'de_LU' +func (t *de_LU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'de_LU' +func (t *de_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/dje/dje.go b/resources/locales/dje/dje.go index d8d6279..cb2ce54 100644 --- a/resources/locales/dje/dje.go +++ b/resources/locales/dje/dje.go @@ -5,22 +5,29 @@ import ( ) type dje struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dje' locale func New() locales.Translator { return &dje{ - locale: "dje", + locale: "dje", + plurals: nil, } } // Locale returns the current translators string locale -func (l *dje) Locale() string { - return l.locale +func (t *dje) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dje) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dje' +func (t *dje) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'dje' +func (t *dje) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dje_NE/dje_NE.go b/resources/locales/dje_NE/dje_NE.go index 8c22e8f..907ca1b 100644 --- a/resources/locales/dje_NE/dje_NE.go +++ b/resources/locales/dje_NE/dje_NE.go @@ -5,22 +5,29 @@ import ( ) type dje_NE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dje_NE' locale func New() locales.Translator { return &dje_NE{ - locale: "dje_NE", + locale: "dje_NE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *dje_NE) Locale() string { - return l.locale +func (t *dje_NE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dje_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dje_NE' +func (t *dje_NE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'dje_NE' +func (t *dje_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dsb/dsb.go b/resources/locales/dsb/dsb.go index 6f31f24..eddbc4a 100644 --- a/resources/locales/dsb/dsb.go +++ b/resources/locales/dsb/dsb.go @@ -5,28 +5,30 @@ import ( ) type dsb struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dsb' locale func New() locales.Translator { return &dsb{ - locale: "dsb", + locale: "dsb", + plurals: []locales.PluralRule{2, 3, 4, 6}, } } // Locale returns the current translators string locale -func (l *dsb) Locale() string { - return l.locale +func (t *dsb) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dsb) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dsb' +func (t *dsb) Plurals() []locales.PluralRule { + return t.plurals +} - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// CardinalPluralRule returns the PluralRule given 'num' for 'dsb' +func (t *dsb) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) @@ -35,6 +37,11 @@ func (l *dsb) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + i, err := locales.I(num) + if err != nil { + return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} + } + if (v == 0 && i%100 == 1) || (f%100 == 1) { return locales.PluralRuleOne, nil } else if (v == 0 && i%100 == 2) || (f%100 == 2) { diff --git a/resources/locales/dsb_DE/dsb_DE.go b/resources/locales/dsb_DE/dsb_DE.go index f5f0d16..9b6fd9d 100644 --- a/resources/locales/dsb_DE/dsb_DE.go +++ b/resources/locales/dsb_DE/dsb_DE.go @@ -5,23 +5,30 @@ import ( ) type dsb_DE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dsb_DE' locale func New() locales.Translator { return &dsb_DE{ - locale: "dsb_DE", + locale: "dsb_DE", + plurals: []locales.PluralRule{2, 3, 4, 6}, } } // Locale returns the current translators string locale -func (l *dsb_DE) Locale() string { - return l.locale +func (t *dsb_DE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dsb_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dsb_DE' +func (t *dsb_DE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'dsb_DE' +func (t *dsb_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/dua/dua.go b/resources/locales/dua/dua.go index c076788..0aec984 100644 --- a/resources/locales/dua/dua.go +++ b/resources/locales/dua/dua.go @@ -5,22 +5,29 @@ import ( ) type dua struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dua' locale func New() locales.Translator { return &dua{ - locale: "dua", + locale: "dua", + plurals: nil, } } // Locale returns the current translators string locale -func (l *dua) Locale() string { - return l.locale +func (t *dua) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dua) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dua' +func (t *dua) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'dua' +func (t *dua) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dua_CM/dua_CM.go b/resources/locales/dua_CM/dua_CM.go index 14a9a21..c1b4929 100644 --- a/resources/locales/dua_CM/dua_CM.go +++ b/resources/locales/dua_CM/dua_CM.go @@ -5,22 +5,29 @@ import ( ) type dua_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dua_CM' locale func New() locales.Translator { return &dua_CM{ - locale: "dua_CM", + locale: "dua_CM", + plurals: nil, } } // Locale returns the current translators string locale -func (l *dua_CM) Locale() string { - return l.locale +func (t *dua_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dua_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dua_CM' +func (t *dua_CM) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'dua_CM' +func (t *dua_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dyo/dyo.go b/resources/locales/dyo/dyo.go index c3d4fe3..6370669 100644 --- a/resources/locales/dyo/dyo.go +++ b/resources/locales/dyo/dyo.go @@ -5,22 +5,29 @@ import ( ) type dyo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dyo' locale func New() locales.Translator { return &dyo{ - locale: "dyo", + locale: "dyo", + plurals: nil, } } // Locale returns the current translators string locale -func (l *dyo) Locale() string { - return l.locale +func (t *dyo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dyo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dyo' +func (t *dyo) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'dyo' +func (t *dyo) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dyo_SN/dyo_SN.go b/resources/locales/dyo_SN/dyo_SN.go index 52e85b8..b90e944 100644 --- a/resources/locales/dyo_SN/dyo_SN.go +++ b/resources/locales/dyo_SN/dyo_SN.go @@ -5,22 +5,29 @@ import ( ) type dyo_SN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dyo_SN' locale func New() locales.Translator { return &dyo_SN{ - locale: "dyo_SN", + locale: "dyo_SN", + plurals: nil, } } // Locale returns the current translators string locale -func (l *dyo_SN) Locale() string { - return l.locale +func (t *dyo_SN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dyo_SN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dyo_SN' +func (t *dyo_SN) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'dyo_SN' +func (t *dyo_SN) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dz/dz.go b/resources/locales/dz/dz.go index e6f64f2..6c024a1 100644 --- a/resources/locales/dz/dz.go +++ b/resources/locales/dz/dz.go @@ -5,23 +5,30 @@ import ( ) type dz struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dz' locale func New() locales.Translator { return &dz{ - locale: "dz", + locale: "dz", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *dz) Locale() string { - return l.locale +func (t *dz) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dz) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dz' +func (t *dz) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'dz' +func (t *dz) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/dz_BT/dz_BT.go b/resources/locales/dz_BT/dz_BT.go index e55a53f..9b9d906 100644 --- a/resources/locales/dz_BT/dz_BT.go +++ b/resources/locales/dz_BT/dz_BT.go @@ -5,23 +5,30 @@ import ( ) type dz_BT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'dz_BT' locale func New() locales.Translator { return &dz_BT{ - locale: "dz_BT", + locale: "dz_BT", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *dz_BT) Locale() string { - return l.locale +func (t *dz_BT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *dz_BT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'dz_BT' +func (t *dz_BT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'dz_BT' +func (t *dz_BT) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ebu/ebu.go b/resources/locales/ebu/ebu.go index ff479fd..1076d81 100644 --- a/resources/locales/ebu/ebu.go +++ b/resources/locales/ebu/ebu.go @@ -5,22 +5,29 @@ import ( ) type ebu struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ebu' locale func New() locales.Translator { return &ebu{ - locale: "ebu", + locale: "ebu", + plurals: nil, } } // Locale returns the current translators string locale -func (l *ebu) Locale() string { - return l.locale +func (t *ebu) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ebu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ebu' +func (t *ebu) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'ebu' +func (t *ebu) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ebu_KE/ebu_KE.go b/resources/locales/ebu_KE/ebu_KE.go index a85b52a..ddb34b8 100644 --- a/resources/locales/ebu_KE/ebu_KE.go +++ b/resources/locales/ebu_KE/ebu_KE.go @@ -5,22 +5,29 @@ import ( ) type ebu_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ebu_KE' locale func New() locales.Translator { return &ebu_KE{ - locale: "ebu_KE", + locale: "ebu_KE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *ebu_KE) Locale() string { - return l.locale +func (t *ebu_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ebu_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ebu_KE' +func (t *ebu_KE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'ebu_KE' +func (t *ebu_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ee/ee.go b/resources/locales/ee/ee.go index 9542e3a..c41b6c7 100644 --- a/resources/locales/ee/ee.go +++ b/resources/locales/ee/ee.go @@ -5,23 +5,30 @@ import ( ) type ee struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ee' locale func New() locales.Translator { return &ee{ - locale: "ee", + locale: "ee", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ee) Locale() string { - return l.locale +func (t *ee) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ee) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ee' +func (t *ee) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ee' +func (t *ee) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ee_GH/ee_GH.go b/resources/locales/ee_GH/ee_GH.go index 229d298..75fe92f 100644 --- a/resources/locales/ee_GH/ee_GH.go +++ b/resources/locales/ee_GH/ee_GH.go @@ -5,23 +5,30 @@ import ( ) type ee_GH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ee_GH' locale func New() locales.Translator { return &ee_GH{ - locale: "ee_GH", + locale: "ee_GH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ee_GH) Locale() string { - return l.locale +func (t *ee_GH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ee_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ee_GH' +func (t *ee_GH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ee_GH' +func (t *ee_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ee_TG/ee_TG.go b/resources/locales/ee_TG/ee_TG.go index a65c6ce..624b476 100644 --- a/resources/locales/ee_TG/ee_TG.go +++ b/resources/locales/ee_TG/ee_TG.go @@ -5,23 +5,30 @@ import ( ) type ee_TG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ee_TG' locale func New() locales.Translator { return &ee_TG{ - locale: "ee_TG", + locale: "ee_TG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ee_TG) Locale() string { - return l.locale +func (t *ee_TG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ee_TG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ee_TG' +func (t *ee_TG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ee_TG' +func (t *ee_TG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/el/el.go b/resources/locales/el/el.go index 262a2bf..4410370 100644 --- a/resources/locales/el/el.go +++ b/resources/locales/el/el.go @@ -5,23 +5,30 @@ import ( ) type el struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'el' locale func New() locales.Translator { return &el{ - locale: "el", + locale: "el", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *el) Locale() string { - return l.locale +func (t *el) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *el) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'el' +func (t *el) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'el' +func (t *el) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/el_CY/el_CY.go b/resources/locales/el_CY/el_CY.go index f3b576a..e56f7b7 100644 --- a/resources/locales/el_CY/el_CY.go +++ b/resources/locales/el_CY/el_CY.go @@ -5,23 +5,30 @@ import ( ) type el_CY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'el_CY' locale func New() locales.Translator { return &el_CY{ - locale: "el_CY", + locale: "el_CY", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *el_CY) Locale() string { - return l.locale +func (t *el_CY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *el_CY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'el_CY' +func (t *el_CY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'el_CY' +func (t *el_CY) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/el_GR/el_GR.go b/resources/locales/el_GR/el_GR.go index 011d5fd..1d28431 100644 --- a/resources/locales/el_GR/el_GR.go +++ b/resources/locales/el_GR/el_GR.go @@ -5,23 +5,30 @@ import ( ) type el_GR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'el_GR' locale func New() locales.Translator { return &el_GR{ - locale: "el_GR", + locale: "el_GR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *el_GR) Locale() string { - return l.locale +func (t *el_GR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *el_GR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'el_GR' +func (t *el_GR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'el_GR' +func (t *el_GR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/en/en.go b/resources/locales/en/en.go index 9c2ce85..9c968d4 100644 --- a/resources/locales/en/en.go +++ b/resources/locales/en/en.go @@ -5,23 +5,30 @@ import ( ) type en struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en' locale func New() locales.Translator { return &en{ - locale: "en", + locale: "en", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en) Locale() string { - return l.locale +func (t *en) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en' +func (t *en) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en' +func (t *en) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_001/en_001.go b/resources/locales/en_001/en_001.go index 2b1a8be..0bc313b 100644 --- a/resources/locales/en_001/en_001.go +++ b/resources/locales/en_001/en_001.go @@ -5,23 +5,30 @@ import ( ) type en_001 struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_001' locale func New() locales.Translator { return &en_001{ - locale: "en_001", + locale: "en_001", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_001) Locale() string { - return l.locale +func (t *en_001) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_001) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_001' +func (t *en_001) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_001' +func (t *en_001) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_150/en_150.go b/resources/locales/en_150/en_150.go index 575e37a..a8f9863 100644 --- a/resources/locales/en_150/en_150.go +++ b/resources/locales/en_150/en_150.go @@ -5,23 +5,30 @@ import ( ) type en_150 struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_150' locale func New() locales.Translator { return &en_150{ - locale: "en_150", + locale: "en_150", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_150) Locale() string { - return l.locale +func (t *en_150) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_150) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_150' +func (t *en_150) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_150' +func (t *en_150) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_AG/en_AG.go b/resources/locales/en_AG/en_AG.go index 404f6a6..6900980 100644 --- a/resources/locales/en_AG/en_AG.go +++ b/resources/locales/en_AG/en_AG.go @@ -5,23 +5,30 @@ import ( ) type en_AG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_AG' locale func New() locales.Translator { return &en_AG{ - locale: "en_AG", + locale: "en_AG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_AG) Locale() string { - return l.locale +func (t *en_AG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_AG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_AG' +func (t *en_AG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_AG' +func (t *en_AG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_AI/en_AI.go b/resources/locales/en_AI/en_AI.go index 5d93973..31d322c 100644 --- a/resources/locales/en_AI/en_AI.go +++ b/resources/locales/en_AI/en_AI.go @@ -5,23 +5,30 @@ import ( ) type en_AI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_AI' locale func New() locales.Translator { return &en_AI{ - locale: "en_AI", + locale: "en_AI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_AI) Locale() string { - return l.locale +func (t *en_AI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_AI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_AI' +func (t *en_AI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_AI' +func (t *en_AI) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_AS/en_AS.go b/resources/locales/en_AS/en_AS.go index 4b954bd..3746cec 100644 --- a/resources/locales/en_AS/en_AS.go +++ b/resources/locales/en_AS/en_AS.go @@ -5,23 +5,30 @@ import ( ) type en_AS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_AS' locale func New() locales.Translator { return &en_AS{ - locale: "en_AS", + locale: "en_AS", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_AS) Locale() string { - return l.locale +func (t *en_AS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_AS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_AS' +func (t *en_AS) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_AS' +func (t *en_AS) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_AT/en_AT.go b/resources/locales/en_AT/en_AT.go index 7eaf7bb..8cfee72 100644 --- a/resources/locales/en_AT/en_AT.go +++ b/resources/locales/en_AT/en_AT.go @@ -5,23 +5,30 @@ import ( ) type en_AT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_AT' locale func New() locales.Translator { return &en_AT{ - locale: "en_AT", + locale: "en_AT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_AT) Locale() string { - return l.locale +func (t *en_AT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_AT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_AT' +func (t *en_AT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_AT' +func (t *en_AT) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_AU/en_AU.go b/resources/locales/en_AU/en_AU.go index 1de54cb..20f6e24 100644 --- a/resources/locales/en_AU/en_AU.go +++ b/resources/locales/en_AU/en_AU.go @@ -5,23 +5,30 @@ import ( ) type en_AU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_AU' locale func New() locales.Translator { return &en_AU{ - locale: "en_AU", + locale: "en_AU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_AU) Locale() string { - return l.locale +func (t *en_AU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_AU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_AU' +func (t *en_AU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_AU' +func (t *en_AU) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_BB/en_BB.go b/resources/locales/en_BB/en_BB.go index 9179265..f691284 100644 --- a/resources/locales/en_BB/en_BB.go +++ b/resources/locales/en_BB/en_BB.go @@ -5,23 +5,30 @@ import ( ) type en_BB struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_BB' locale func New() locales.Translator { return &en_BB{ - locale: "en_BB", + locale: "en_BB", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_BB) Locale() string { - return l.locale +func (t *en_BB) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_BB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_BB' +func (t *en_BB) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_BB' +func (t *en_BB) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_BE/en_BE.go b/resources/locales/en_BE/en_BE.go index 9b691c5..a10ad63 100644 --- a/resources/locales/en_BE/en_BE.go +++ b/resources/locales/en_BE/en_BE.go @@ -5,23 +5,30 @@ import ( ) type en_BE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_BE' locale func New() locales.Translator { return &en_BE{ - locale: "en_BE", + locale: "en_BE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_BE) Locale() string { - return l.locale +func (t *en_BE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_BE' +func (t *en_BE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_BE' +func (t *en_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) diff --git a/resources/locales/en_BI/en_BI.go b/resources/locales/en_BI/en_BI.go index 9e9fd1e..867d7d2 100644 --- a/resources/locales/en_BI/en_BI.go +++ b/resources/locales/en_BI/en_BI.go @@ -5,23 +5,30 @@ import ( ) type en_BI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_BI' locale func New() locales.Translator { return &en_BI{ - locale: "en_BI", + locale: "en_BI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_BI) Locale() string { - return l.locale +func (t *en_BI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_BI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_BI' +func (t *en_BI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_BI' +func (t *en_BI) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_BM/en_BM.go b/resources/locales/en_BM/en_BM.go index 4405e56..e5c166a 100644 --- a/resources/locales/en_BM/en_BM.go +++ b/resources/locales/en_BM/en_BM.go @@ -5,23 +5,30 @@ import ( ) type en_BM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_BM' locale func New() locales.Translator { return &en_BM{ - locale: "en_BM", + locale: "en_BM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_BM) Locale() string { - return l.locale +func (t *en_BM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_BM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_BM' +func (t *en_BM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_BM' +func (t *en_BM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_BS/en_BS.go b/resources/locales/en_BS/en_BS.go index 623484e..06c991b 100644 --- a/resources/locales/en_BS/en_BS.go +++ b/resources/locales/en_BS/en_BS.go @@ -5,31 +5,38 @@ import ( ) type en_BS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_BS' locale func New() locales.Translator { return &en_BS{ - locale: "en_BS", + locale: "en_BS", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_BS) Locale() string { - return l.locale +func (t *en_BS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_BS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_BS' +func (t *en_BS) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'en_BS' +func (t *en_BS) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_BW/en_BW.go b/resources/locales/en_BW/en_BW.go index 9ab6280..cbc68c6 100644 --- a/resources/locales/en_BW/en_BW.go +++ b/resources/locales/en_BW/en_BW.go @@ -5,23 +5,30 @@ import ( ) type en_BW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_BW' locale func New() locales.Translator { return &en_BW{ - locale: "en_BW", + locale: "en_BW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_BW) Locale() string { - return l.locale +func (t *en_BW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_BW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_BW' +func (t *en_BW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_BW' +func (t *en_BW) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_BZ/en_BZ.go b/resources/locales/en_BZ/en_BZ.go index 99fee21..7caa529 100644 --- a/resources/locales/en_BZ/en_BZ.go +++ b/resources/locales/en_BZ/en_BZ.go @@ -5,23 +5,30 @@ import ( ) type en_BZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_BZ' locale func New() locales.Translator { return &en_BZ{ - locale: "en_BZ", + locale: "en_BZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_BZ) Locale() string { - return l.locale +func (t *en_BZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_BZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_BZ' +func (t *en_BZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_BZ' +func (t *en_BZ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_CA/en_CA.go b/resources/locales/en_CA/en_CA.go index c619504..a99be50 100644 --- a/resources/locales/en_CA/en_CA.go +++ b/resources/locales/en_CA/en_CA.go @@ -5,23 +5,30 @@ import ( ) type en_CA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_CA' locale func New() locales.Translator { return &en_CA{ - locale: "en_CA", + locale: "en_CA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_CA) Locale() string { - return l.locale +func (t *en_CA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_CA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_CA' +func (t *en_CA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_CA' +func (t *en_CA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_CC/en_CC.go b/resources/locales/en_CC/en_CC.go index 71158a5..934d3c1 100644 --- a/resources/locales/en_CC/en_CC.go +++ b/resources/locales/en_CC/en_CC.go @@ -5,23 +5,30 @@ import ( ) type en_CC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_CC' locale func New() locales.Translator { return &en_CC{ - locale: "en_CC", + locale: "en_CC", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_CC) Locale() string { - return l.locale +func (t *en_CC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_CC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_CC' +func (t *en_CC) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_CC' +func (t *en_CC) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_CH/en_CH.go b/resources/locales/en_CH/en_CH.go index 73bf763..5472bd5 100644 --- a/resources/locales/en_CH/en_CH.go +++ b/resources/locales/en_CH/en_CH.go @@ -5,23 +5,30 @@ import ( ) type en_CH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_CH' locale func New() locales.Translator { return &en_CH{ - locale: "en_CH", + locale: "en_CH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_CH) Locale() string { - return l.locale +func (t *en_CH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_CH' +func (t *en_CH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_CH' +func (t *en_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_CK/en_CK.go b/resources/locales/en_CK/en_CK.go index 1ca2869..733ea5d 100644 --- a/resources/locales/en_CK/en_CK.go +++ b/resources/locales/en_CK/en_CK.go @@ -5,31 +5,38 @@ import ( ) type en_CK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_CK' locale func New() locales.Translator { return &en_CK{ - locale: "en_CK", + locale: "en_CK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_CK) Locale() string { - return l.locale +func (t *en_CK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_CK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_CK' +func (t *en_CK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_CK' +func (t *en_CK) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_CM/en_CM.go b/resources/locales/en_CM/en_CM.go index 0d8dc30..513a0c9 100644 --- a/resources/locales/en_CM/en_CM.go +++ b/resources/locales/en_CM/en_CM.go @@ -5,23 +5,30 @@ import ( ) type en_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_CM' locale func New() locales.Translator { return &en_CM{ - locale: "en_CM", + locale: "en_CM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_CM) Locale() string { - return l.locale +func (t *en_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_CM' +func (t *en_CM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_CM' +func (t *en_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_CX/en_CX.go b/resources/locales/en_CX/en_CX.go index 96fbaab..fd9dffa 100644 --- a/resources/locales/en_CX/en_CX.go +++ b/resources/locales/en_CX/en_CX.go @@ -5,23 +5,30 @@ import ( ) type en_CX struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_CX' locale func New() locales.Translator { return &en_CX{ - locale: "en_CX", + locale: "en_CX", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_CX) Locale() string { - return l.locale +func (t *en_CX) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_CX) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_CX' +func (t *en_CX) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_CX' +func (t *en_CX) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_CY/en_CY.go b/resources/locales/en_CY/en_CY.go index c3cf132..098e1f2 100644 --- a/resources/locales/en_CY/en_CY.go +++ b/resources/locales/en_CY/en_CY.go @@ -5,23 +5,30 @@ import ( ) type en_CY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_CY' locale func New() locales.Translator { return &en_CY{ - locale: "en_CY", + locale: "en_CY", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_CY) Locale() string { - return l.locale +func (t *en_CY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_CY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_CY' +func (t *en_CY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_CY' +func (t *en_CY) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_DE/en_DE.go b/resources/locales/en_DE/en_DE.go index 1781926..a7047a4 100644 --- a/resources/locales/en_DE/en_DE.go +++ b/resources/locales/en_DE/en_DE.go @@ -5,23 +5,30 @@ import ( ) type en_DE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_DE' locale func New() locales.Translator { return &en_DE{ - locale: "en_DE", + locale: "en_DE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_DE) Locale() string { - return l.locale +func (t *en_DE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_DE' +func (t *en_DE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_DE' +func (t *en_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_DG/en_DG.go b/resources/locales/en_DG/en_DG.go index 76ad178..86b57d9 100644 --- a/resources/locales/en_DG/en_DG.go +++ b/resources/locales/en_DG/en_DG.go @@ -5,23 +5,30 @@ import ( ) type en_DG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_DG' locale func New() locales.Translator { return &en_DG{ - locale: "en_DG", + locale: "en_DG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_DG) Locale() string { - return l.locale +func (t *en_DG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_DG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_DG' +func (t *en_DG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_DG' +func (t *en_DG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_DK/en_DK.go b/resources/locales/en_DK/en_DK.go index 41d37c8..b86638c 100644 --- a/resources/locales/en_DK/en_DK.go +++ b/resources/locales/en_DK/en_DK.go @@ -5,23 +5,30 @@ import ( ) type en_DK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_DK' locale func New() locales.Translator { return &en_DK{ - locale: "en_DK", + locale: "en_DK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_DK) Locale() string { - return l.locale +func (t *en_DK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_DK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_DK' +func (t *en_DK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_DK' +func (t *en_DK) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_DM/en_DM.go b/resources/locales/en_DM/en_DM.go index fed59ed..4c734b1 100644 --- a/resources/locales/en_DM/en_DM.go +++ b/resources/locales/en_DM/en_DM.go @@ -5,23 +5,30 @@ import ( ) type en_DM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_DM' locale func New() locales.Translator { return &en_DM{ - locale: "en_DM", + locale: "en_DM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_DM) Locale() string { - return l.locale +func (t *en_DM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_DM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_DM' +func (t *en_DM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_DM' +func (t *en_DM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_ER/en_ER.go b/resources/locales/en_ER/en_ER.go index 94ce6f4..2ab97e5 100644 --- a/resources/locales/en_ER/en_ER.go +++ b/resources/locales/en_ER/en_ER.go @@ -5,23 +5,30 @@ import ( ) type en_ER struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_ER' locale func New() locales.Translator { return &en_ER{ - locale: "en_ER", + locale: "en_ER", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_ER) Locale() string { - return l.locale +func (t *en_ER) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_ER) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_ER' +func (t *en_ER) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_ER' +func (t *en_ER) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_FI/en_FI.go b/resources/locales/en_FI/en_FI.go index 5d0bb24..bea0912 100644 --- a/resources/locales/en_FI/en_FI.go +++ b/resources/locales/en_FI/en_FI.go @@ -5,23 +5,30 @@ import ( ) type en_FI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_FI' locale func New() locales.Translator { return &en_FI{ - locale: "en_FI", + locale: "en_FI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_FI) Locale() string { - return l.locale +func (t *en_FI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_FI' +func (t *en_FI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_FI' +func (t *en_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) diff --git a/resources/locales/en_FJ/en_FJ.go b/resources/locales/en_FJ/en_FJ.go index fab8f81..b0e4a7a 100644 --- a/resources/locales/en_FJ/en_FJ.go +++ b/resources/locales/en_FJ/en_FJ.go @@ -5,23 +5,30 @@ import ( ) type en_FJ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_FJ' locale func New() locales.Translator { return &en_FJ{ - locale: "en_FJ", + locale: "en_FJ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_FJ) Locale() string { - return l.locale +func (t *en_FJ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_FJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_FJ' +func (t *en_FJ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_FJ' +func (t *en_FJ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_FK/en_FK.go b/resources/locales/en_FK/en_FK.go index e1ccea1..6756f0f 100644 --- a/resources/locales/en_FK/en_FK.go +++ b/resources/locales/en_FK/en_FK.go @@ -5,23 +5,30 @@ import ( ) type en_FK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_FK' locale func New() locales.Translator { return &en_FK{ - locale: "en_FK", + locale: "en_FK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_FK) Locale() string { - return l.locale +func (t *en_FK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_FK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_FK' +func (t *en_FK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_FK' +func (t *en_FK) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_FM/en_FM.go b/resources/locales/en_FM/en_FM.go index 62ab5d9..de49ce0 100644 --- a/resources/locales/en_FM/en_FM.go +++ b/resources/locales/en_FM/en_FM.go @@ -5,31 +5,38 @@ import ( ) type en_FM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_FM' locale func New() locales.Translator { return &en_FM{ - locale: "en_FM", + locale: "en_FM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_FM) Locale() string { - return l.locale +func (t *en_FM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_FM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_FM' +func (t *en_FM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_FM' +func (t *en_FM) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_GB/en_GB.go b/resources/locales/en_GB/en_GB.go index 239003d..a2b9985 100644 --- a/resources/locales/en_GB/en_GB.go +++ b/resources/locales/en_GB/en_GB.go @@ -5,23 +5,30 @@ import ( ) type en_GB struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_GB' locale func New() locales.Translator { return &en_GB{ - locale: "en_GB", + locale: "en_GB", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_GB) Locale() string { - return l.locale +func (t *en_GB) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_GB' +func (t *en_GB) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_GB' +func (t *en_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_GD/en_GD.go b/resources/locales/en_GD/en_GD.go index 4756102..17ce7b9 100644 --- a/resources/locales/en_GD/en_GD.go +++ b/resources/locales/en_GD/en_GD.go @@ -5,31 +5,38 @@ import ( ) type en_GD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_GD' locale func New() locales.Translator { return &en_GD{ - locale: "en_GD", + locale: "en_GD", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_GD) Locale() string { - return l.locale +func (t *en_GD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_GD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_GD' +func (t *en_GD) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'en_GD' +func (t *en_GD) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_GG/en_GG.go b/resources/locales/en_GG/en_GG.go index f50a342..b1a93c3 100644 --- a/resources/locales/en_GG/en_GG.go +++ b/resources/locales/en_GG/en_GG.go @@ -5,23 +5,30 @@ import ( ) type en_GG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_GG' locale func New() locales.Translator { return &en_GG{ - locale: "en_GG", + locale: "en_GG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_GG) Locale() string { - return l.locale +func (t *en_GG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_GG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_GG' +func (t *en_GG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_GG' +func (t *en_GG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_GH/en_GH.go b/resources/locales/en_GH/en_GH.go index 630e4c6..24c1a11 100644 --- a/resources/locales/en_GH/en_GH.go +++ b/resources/locales/en_GH/en_GH.go @@ -5,23 +5,30 @@ import ( ) type en_GH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_GH' locale func New() locales.Translator { return &en_GH{ - locale: "en_GH", + locale: "en_GH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_GH) Locale() string { - return l.locale +func (t *en_GH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_GH' +func (t *en_GH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_GH' +func (t *en_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_GI/en_GI.go b/resources/locales/en_GI/en_GI.go index 6b947d2..9bd025e 100644 --- a/resources/locales/en_GI/en_GI.go +++ b/resources/locales/en_GI/en_GI.go @@ -5,31 +5,38 @@ import ( ) type en_GI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_GI' locale func New() locales.Translator { return &en_GI{ - locale: "en_GI", + locale: "en_GI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_GI) Locale() string { - return l.locale +func (t *en_GI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_GI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_GI' +func (t *en_GI) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'en_GI' +func (t *en_GI) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_GM/en_GM.go b/resources/locales/en_GM/en_GM.go index bfb4d47..3818583 100644 --- a/resources/locales/en_GM/en_GM.go +++ b/resources/locales/en_GM/en_GM.go @@ -5,31 +5,38 @@ import ( ) type en_GM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_GM' locale func New() locales.Translator { return &en_GM{ - locale: "en_GM", + locale: "en_GM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_GM) Locale() string { - return l.locale +func (t *en_GM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_GM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_GM' +func (t *en_GM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_GM' +func (t *en_GM) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_GU/en_GU.go b/resources/locales/en_GU/en_GU.go index 2acb8b1..67bd9b5 100644 --- a/resources/locales/en_GU/en_GU.go +++ b/resources/locales/en_GU/en_GU.go @@ -5,23 +5,30 @@ import ( ) type en_GU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_GU' locale func New() locales.Translator { return &en_GU{ - locale: "en_GU", + locale: "en_GU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_GU) Locale() string { - return l.locale +func (t *en_GU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_GU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_GU' +func (t *en_GU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_GU' +func (t *en_GU) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_GY/en_GY.go b/resources/locales/en_GY/en_GY.go index b96d2c0..5227f2e 100644 --- a/resources/locales/en_GY/en_GY.go +++ b/resources/locales/en_GY/en_GY.go @@ -5,23 +5,30 @@ import ( ) type en_GY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_GY' locale func New() locales.Translator { return &en_GY{ - locale: "en_GY", + locale: "en_GY", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_GY) Locale() string { - return l.locale +func (t *en_GY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_GY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_GY' +func (t *en_GY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_GY' +func (t *en_GY) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_HK/en_HK.go b/resources/locales/en_HK/en_HK.go index 1015359..4b2209f 100644 --- a/resources/locales/en_HK/en_HK.go +++ b/resources/locales/en_HK/en_HK.go @@ -5,23 +5,30 @@ import ( ) type en_HK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_HK' locale func New() locales.Translator { return &en_HK{ - locale: "en_HK", + locale: "en_HK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_HK) Locale() string { - return l.locale +func (t *en_HK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_HK' +func (t *en_HK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_HK' +func (t *en_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_IE/en_IE.go b/resources/locales/en_IE/en_IE.go index d5d4f3a..56a918b 100644 --- a/resources/locales/en_IE/en_IE.go +++ b/resources/locales/en_IE/en_IE.go @@ -5,31 +5,38 @@ import ( ) type en_IE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_IE' locale func New() locales.Translator { return &en_IE{ - locale: "en_IE", + locale: "en_IE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_IE) Locale() string { - return l.locale +func (t *en_IE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_IE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_IE' +func (t *en_IE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_IE' +func (t *en_IE) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_IL/en_IL.go b/resources/locales/en_IL/en_IL.go index 687b09a..4190a24 100644 --- a/resources/locales/en_IL/en_IL.go +++ b/resources/locales/en_IL/en_IL.go @@ -5,23 +5,30 @@ import ( ) type en_IL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_IL' locale func New() locales.Translator { return &en_IL{ - locale: "en_IL", + locale: "en_IL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_IL) Locale() string { - return l.locale +func (t *en_IL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_IL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_IL' +func (t *en_IL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_IL' +func (t *en_IL) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_IM/en_IM.go b/resources/locales/en_IM/en_IM.go index 42ef41c..e6c518c 100644 --- a/resources/locales/en_IM/en_IM.go +++ b/resources/locales/en_IM/en_IM.go @@ -5,23 +5,30 @@ import ( ) type en_IM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_IM' locale func New() locales.Translator { return &en_IM{ - locale: "en_IM", + locale: "en_IM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_IM) Locale() string { - return l.locale +func (t *en_IM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_IM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_IM' +func (t *en_IM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_IM' +func (t *en_IM) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) diff --git a/resources/locales/en_IN/en_IN.go b/resources/locales/en_IN/en_IN.go index 2f21d16..b70c621 100644 --- a/resources/locales/en_IN/en_IN.go +++ b/resources/locales/en_IN/en_IN.go @@ -5,23 +5,30 @@ import ( ) type en_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_IN' locale func New() locales.Translator { return &en_IN{ - locale: "en_IN", + locale: "en_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_IN) Locale() string { - return l.locale +func (t *en_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_IN' +func (t *en_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_IN' +func (t *en_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_IO/en_IO.go b/resources/locales/en_IO/en_IO.go index 46a6036..6d26afc 100644 --- a/resources/locales/en_IO/en_IO.go +++ b/resources/locales/en_IO/en_IO.go @@ -5,23 +5,30 @@ import ( ) type en_IO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_IO' locale func New() locales.Translator { return &en_IO{ - locale: "en_IO", + locale: "en_IO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_IO) Locale() string { - return l.locale +func (t *en_IO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_IO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_IO' +func (t *en_IO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_IO' +func (t *en_IO) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_JE/en_JE.go b/resources/locales/en_JE/en_JE.go index b2510de..547ae0e 100644 --- a/resources/locales/en_JE/en_JE.go +++ b/resources/locales/en_JE/en_JE.go @@ -5,23 +5,30 @@ import ( ) type en_JE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_JE' locale func New() locales.Translator { return &en_JE{ - locale: "en_JE", + locale: "en_JE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_JE) Locale() string { - return l.locale +func (t *en_JE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_JE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_JE' +func (t *en_JE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_JE' +func (t *en_JE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_JM/en_JM.go b/resources/locales/en_JM/en_JM.go index 9403527..e02ebfa 100644 --- a/resources/locales/en_JM/en_JM.go +++ b/resources/locales/en_JM/en_JM.go @@ -5,31 +5,38 @@ import ( ) type en_JM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_JM' locale func New() locales.Translator { return &en_JM{ - locale: "en_JM", + locale: "en_JM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_JM) Locale() string { - return l.locale +func (t *en_JM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_JM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_JM' +func (t *en_JM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_JM' +func (t *en_JM) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_KE/en_KE.go b/resources/locales/en_KE/en_KE.go index a85bf75..5a9f990 100644 --- a/resources/locales/en_KE/en_KE.go +++ b/resources/locales/en_KE/en_KE.go @@ -5,23 +5,30 @@ import ( ) type en_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_KE' locale func New() locales.Translator { return &en_KE{ - locale: "en_KE", + locale: "en_KE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_KE) Locale() string { - return l.locale +func (t *en_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_KE' +func (t *en_KE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_KE' +func (t *en_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_KI/en_KI.go b/resources/locales/en_KI/en_KI.go index ab8c01f..48e71fe 100644 --- a/resources/locales/en_KI/en_KI.go +++ b/resources/locales/en_KI/en_KI.go @@ -5,23 +5,30 @@ import ( ) type en_KI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_KI' locale func New() locales.Translator { return &en_KI{ - locale: "en_KI", + locale: "en_KI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_KI) Locale() string { - return l.locale +func (t *en_KI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_KI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_KI' +func (t *en_KI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_KI' +func (t *en_KI) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_KN/en_KN.go b/resources/locales/en_KN/en_KN.go index 796f4ed..1908f4f 100644 --- a/resources/locales/en_KN/en_KN.go +++ b/resources/locales/en_KN/en_KN.go @@ -5,23 +5,30 @@ import ( ) type en_KN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_KN' locale func New() locales.Translator { return &en_KN{ - locale: "en_KN", + locale: "en_KN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_KN) Locale() string { - return l.locale +func (t *en_KN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_KN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_KN' +func (t *en_KN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_KN' +func (t *en_KN) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_KY/en_KY.go b/resources/locales/en_KY/en_KY.go index f4c490d..5186804 100644 --- a/resources/locales/en_KY/en_KY.go +++ b/resources/locales/en_KY/en_KY.go @@ -5,23 +5,30 @@ import ( ) type en_KY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_KY' locale func New() locales.Translator { return &en_KY{ - locale: "en_KY", + locale: "en_KY", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_KY) Locale() string { - return l.locale +func (t *en_KY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_KY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_KY' +func (t *en_KY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_KY' +func (t *en_KY) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_LC/en_LC.go b/resources/locales/en_LC/en_LC.go index e375c79..bdcb189 100644 --- a/resources/locales/en_LC/en_LC.go +++ b/resources/locales/en_LC/en_LC.go @@ -5,23 +5,30 @@ import ( ) type en_LC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_LC' locale func New() locales.Translator { return &en_LC{ - locale: "en_LC", + locale: "en_LC", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_LC) Locale() string { - return l.locale +func (t *en_LC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_LC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_LC' +func (t *en_LC) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_LC' +func (t *en_LC) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_LR/en_LR.go b/resources/locales/en_LR/en_LR.go index b7287d8..2ac7f92 100644 --- a/resources/locales/en_LR/en_LR.go +++ b/resources/locales/en_LR/en_LR.go @@ -5,23 +5,30 @@ import ( ) type en_LR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_LR' locale func New() locales.Translator { return &en_LR{ - locale: "en_LR", + locale: "en_LR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_LR) Locale() string { - return l.locale +func (t *en_LR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_LR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_LR' +func (t *en_LR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_LR' +func (t *en_LR) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_LS/en_LS.go b/resources/locales/en_LS/en_LS.go index 48a0dc5..eab8094 100644 --- a/resources/locales/en_LS/en_LS.go +++ b/resources/locales/en_LS/en_LS.go @@ -5,23 +5,30 @@ import ( ) type en_LS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_LS' locale func New() locales.Translator { return &en_LS{ - locale: "en_LS", + locale: "en_LS", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_LS) Locale() string { - return l.locale +func (t *en_LS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_LS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_LS' +func (t *en_LS) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_LS' +func (t *en_LS) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_MG/en_MG.go b/resources/locales/en_MG/en_MG.go index aaba545..3f4b3f3 100644 --- a/resources/locales/en_MG/en_MG.go +++ b/resources/locales/en_MG/en_MG.go @@ -5,23 +5,30 @@ import ( ) type en_MG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_MG' locale func New() locales.Translator { return &en_MG{ - locale: "en_MG", + locale: "en_MG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_MG) Locale() string { - return l.locale +func (t *en_MG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_MG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_MG' +func (t *en_MG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_MG' +func (t *en_MG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_MH/en_MH.go b/resources/locales/en_MH/en_MH.go index 7ce96a2..a5c004a 100644 --- a/resources/locales/en_MH/en_MH.go +++ b/resources/locales/en_MH/en_MH.go @@ -5,23 +5,30 @@ import ( ) type en_MH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_MH' locale func New() locales.Translator { return &en_MH{ - locale: "en_MH", + locale: "en_MH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_MH) Locale() string { - return l.locale +func (t *en_MH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_MH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_MH' +func (t *en_MH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_MH' +func (t *en_MH) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_MO/en_MO.go b/resources/locales/en_MO/en_MO.go index 2d176aa..490dad9 100644 --- a/resources/locales/en_MO/en_MO.go +++ b/resources/locales/en_MO/en_MO.go @@ -5,31 +5,38 @@ import ( ) type en_MO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_MO' locale func New() locales.Translator { return &en_MO{ - locale: "en_MO", + locale: "en_MO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_MO) Locale() string { - return l.locale +func (t *en_MO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_MO' +func (t *en_MO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_MO' +func (t *en_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_MP/en_MP.go b/resources/locales/en_MP/en_MP.go index a8b7cfc..b6de1bc 100644 --- a/resources/locales/en_MP/en_MP.go +++ b/resources/locales/en_MP/en_MP.go @@ -5,23 +5,30 @@ import ( ) type en_MP struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_MP' locale func New() locales.Translator { return &en_MP{ - locale: "en_MP", + locale: "en_MP", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_MP) Locale() string { - return l.locale +func (t *en_MP) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_MP) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_MP' +func (t *en_MP) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_MP' +func (t *en_MP) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_MS/en_MS.go b/resources/locales/en_MS/en_MS.go index cee715f..01a4118 100644 --- a/resources/locales/en_MS/en_MS.go +++ b/resources/locales/en_MS/en_MS.go @@ -5,23 +5,30 @@ import ( ) type en_MS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_MS' locale func New() locales.Translator { return &en_MS{ - locale: "en_MS", + locale: "en_MS", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_MS) Locale() string { - return l.locale +func (t *en_MS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_MS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_MS' +func (t *en_MS) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_MS' +func (t *en_MS) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_MT/en_MT.go b/resources/locales/en_MT/en_MT.go index 0009a57..8536253 100644 --- a/resources/locales/en_MT/en_MT.go +++ b/resources/locales/en_MT/en_MT.go @@ -5,23 +5,30 @@ import ( ) type en_MT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_MT' locale func New() locales.Translator { return &en_MT{ - locale: "en_MT", + locale: "en_MT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_MT) Locale() string { - return l.locale +func (t *en_MT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_MT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_MT' +func (t *en_MT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_MT' +func (t *en_MT) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_MU/en_MU.go b/resources/locales/en_MU/en_MU.go index 79c958c..fd67225 100644 --- a/resources/locales/en_MU/en_MU.go +++ b/resources/locales/en_MU/en_MU.go @@ -5,31 +5,38 @@ import ( ) type en_MU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_MU' locale func New() locales.Translator { return &en_MU{ - locale: "en_MU", + locale: "en_MU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_MU) Locale() string { - return l.locale +func (t *en_MU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_MU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_MU' +func (t *en_MU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_MU' +func (t *en_MU) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_MW/en_MW.go b/resources/locales/en_MW/en_MW.go index 30e2146..d36c165 100644 --- a/resources/locales/en_MW/en_MW.go +++ b/resources/locales/en_MW/en_MW.go @@ -5,23 +5,30 @@ import ( ) type en_MW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_MW' locale func New() locales.Translator { return &en_MW{ - locale: "en_MW", + locale: "en_MW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_MW) Locale() string { - return l.locale +func (t *en_MW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_MW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_MW' +func (t *en_MW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_MW' +func (t *en_MW) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_MY/en_MY.go b/resources/locales/en_MY/en_MY.go index 3a3578b..ae05893 100644 --- a/resources/locales/en_MY/en_MY.go +++ b/resources/locales/en_MY/en_MY.go @@ -5,23 +5,30 @@ import ( ) type en_MY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_MY' locale func New() locales.Translator { return &en_MY{ - locale: "en_MY", + locale: "en_MY", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_MY) Locale() string { - return l.locale +func (t *en_MY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_MY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_MY' +func (t *en_MY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_MY' +func (t *en_MY) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_NA/en_NA.go b/resources/locales/en_NA/en_NA.go index 52bf532..4dcea3a 100644 --- a/resources/locales/en_NA/en_NA.go +++ b/resources/locales/en_NA/en_NA.go @@ -5,23 +5,30 @@ import ( ) type en_NA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_NA' locale func New() locales.Translator { return &en_NA{ - locale: "en_NA", + locale: "en_NA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_NA) Locale() string { - return l.locale +func (t *en_NA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_NA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_NA' +func (t *en_NA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_NA' +func (t *en_NA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_NF/en_NF.go b/resources/locales/en_NF/en_NF.go index 01163ec..488bf51 100644 --- a/resources/locales/en_NF/en_NF.go +++ b/resources/locales/en_NF/en_NF.go @@ -5,31 +5,38 @@ import ( ) type en_NF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_NF' locale func New() locales.Translator { return &en_NF{ - locale: "en_NF", + locale: "en_NF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_NF) Locale() string { - return l.locale +func (t *en_NF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_NF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_NF' +func (t *en_NF) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'en_NF' +func (t *en_NF) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_NG/en_NG.go b/resources/locales/en_NG/en_NG.go index 6355b69..944d835 100644 --- a/resources/locales/en_NG/en_NG.go +++ b/resources/locales/en_NG/en_NG.go @@ -5,23 +5,30 @@ import ( ) type en_NG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_NG' locale func New() locales.Translator { return &en_NG{ - locale: "en_NG", + locale: "en_NG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_NG) Locale() string { - return l.locale +func (t *en_NG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_NG' +func (t *en_NG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_NG' +func (t *en_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_NL/en_NL.go b/resources/locales/en_NL/en_NL.go index 9822e72..00a3b22 100644 --- a/resources/locales/en_NL/en_NL.go +++ b/resources/locales/en_NL/en_NL.go @@ -5,23 +5,30 @@ import ( ) type en_NL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_NL' locale func New() locales.Translator { return &en_NL{ - locale: "en_NL", + locale: "en_NL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_NL) Locale() string { - return l.locale +func (t *en_NL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_NL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_NL' +func (t *en_NL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_NL' +func (t *en_NL) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_NR/en_NR.go b/resources/locales/en_NR/en_NR.go index d899497..23c4d05 100644 --- a/resources/locales/en_NR/en_NR.go +++ b/resources/locales/en_NR/en_NR.go @@ -5,23 +5,30 @@ import ( ) type en_NR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_NR' locale func New() locales.Translator { return &en_NR{ - locale: "en_NR", + locale: "en_NR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_NR) Locale() string { - return l.locale +func (t *en_NR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_NR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_NR' +func (t *en_NR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_NR' +func (t *en_NR) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_NU/en_NU.go b/resources/locales/en_NU/en_NU.go index a82fe21..0bba152 100644 --- a/resources/locales/en_NU/en_NU.go +++ b/resources/locales/en_NU/en_NU.go @@ -5,23 +5,30 @@ import ( ) type en_NU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_NU' locale func New() locales.Translator { return &en_NU{ - locale: "en_NU", + locale: "en_NU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_NU) Locale() string { - return l.locale +func (t *en_NU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_NU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_NU' +func (t *en_NU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_NU' +func (t *en_NU) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_NZ/en_NZ.go b/resources/locales/en_NZ/en_NZ.go index 743ecab..d29e316 100644 --- a/resources/locales/en_NZ/en_NZ.go +++ b/resources/locales/en_NZ/en_NZ.go @@ -5,23 +5,30 @@ import ( ) type en_NZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_NZ' locale func New() locales.Translator { return &en_NZ{ - locale: "en_NZ", + locale: "en_NZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_NZ) Locale() string { - return l.locale +func (t *en_NZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_NZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_NZ' +func (t *en_NZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_NZ' +func (t *en_NZ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_PG/en_PG.go b/resources/locales/en_PG/en_PG.go index d82ecb1..8e2f68c 100644 --- a/resources/locales/en_PG/en_PG.go +++ b/resources/locales/en_PG/en_PG.go @@ -5,23 +5,30 @@ import ( ) type en_PG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_PG' locale func New() locales.Translator { return &en_PG{ - locale: "en_PG", + locale: "en_PG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_PG) Locale() string { - return l.locale +func (t *en_PG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_PG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_PG' +func (t *en_PG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_PG' +func (t *en_PG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_PH/en_PH.go b/resources/locales/en_PH/en_PH.go index 20d87df..5070a57 100644 --- a/resources/locales/en_PH/en_PH.go +++ b/resources/locales/en_PH/en_PH.go @@ -5,23 +5,30 @@ import ( ) type en_PH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_PH' locale func New() locales.Translator { return &en_PH{ - locale: "en_PH", + locale: "en_PH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_PH) Locale() string { - return l.locale +func (t *en_PH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_PH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_PH' +func (t *en_PH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_PH' +func (t *en_PH) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_PK/en_PK.go b/resources/locales/en_PK/en_PK.go index aac7422..07a43c1 100644 --- a/resources/locales/en_PK/en_PK.go +++ b/resources/locales/en_PK/en_PK.go @@ -5,31 +5,38 @@ import ( ) type en_PK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_PK' locale func New() locales.Translator { return &en_PK{ - locale: "en_PK", + locale: "en_PK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_PK) Locale() string { - return l.locale +func (t *en_PK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_PK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_PK' +func (t *en_PK) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'en_PK' +func (t *en_PK) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_PN/en_PN.go b/resources/locales/en_PN/en_PN.go index a51e903..4b2fc47 100644 --- a/resources/locales/en_PN/en_PN.go +++ b/resources/locales/en_PN/en_PN.go @@ -5,23 +5,30 @@ import ( ) type en_PN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_PN' locale func New() locales.Translator { return &en_PN{ - locale: "en_PN", + locale: "en_PN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_PN) Locale() string { - return l.locale +func (t *en_PN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_PN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_PN' +func (t *en_PN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_PN' +func (t *en_PN) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_PR/en_PR.go b/resources/locales/en_PR/en_PR.go index 498f9ce..9d55d10 100644 --- a/resources/locales/en_PR/en_PR.go +++ b/resources/locales/en_PR/en_PR.go @@ -5,23 +5,30 @@ import ( ) type en_PR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_PR' locale func New() locales.Translator { return &en_PR{ - locale: "en_PR", + locale: "en_PR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_PR) Locale() string { - return l.locale +func (t *en_PR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_PR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_PR' +func (t *en_PR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_PR' +func (t *en_PR) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_PW/en_PW.go b/resources/locales/en_PW/en_PW.go index 7097ae7..f3068ee 100644 --- a/resources/locales/en_PW/en_PW.go +++ b/resources/locales/en_PW/en_PW.go @@ -5,31 +5,38 @@ import ( ) type en_PW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_PW' locale func New() locales.Translator { return &en_PW{ - locale: "en_PW", + locale: "en_PW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_PW) Locale() string { - return l.locale +func (t *en_PW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_PW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_PW' +func (t *en_PW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_PW' +func (t *en_PW) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_RW/en_RW.go b/resources/locales/en_RW/en_RW.go index 12e75e7..416a01d 100644 --- a/resources/locales/en_RW/en_RW.go +++ b/resources/locales/en_RW/en_RW.go @@ -5,23 +5,30 @@ import ( ) type en_RW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_RW' locale func New() locales.Translator { return &en_RW{ - locale: "en_RW", + locale: "en_RW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_RW) Locale() string { - return l.locale +func (t *en_RW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_RW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_RW' +func (t *en_RW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_RW' +func (t *en_RW) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_SB/en_SB.go b/resources/locales/en_SB/en_SB.go index e80328d..db526c4 100644 --- a/resources/locales/en_SB/en_SB.go +++ b/resources/locales/en_SB/en_SB.go @@ -5,31 +5,38 @@ import ( ) type en_SB struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SB' locale func New() locales.Translator { return &en_SB{ - locale: "en_SB", + locale: "en_SB", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SB) Locale() string { - return l.locale +func (t *en_SB) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SB' +func (t *en_SB) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SB' +func (t *en_SB) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_SC/en_SC.go b/resources/locales/en_SC/en_SC.go index 12bb4c9..e4b25e7 100644 --- a/resources/locales/en_SC/en_SC.go +++ b/resources/locales/en_SC/en_SC.go @@ -5,23 +5,30 @@ import ( ) type en_SC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SC' locale func New() locales.Translator { return &en_SC{ - locale: "en_SC", + locale: "en_SC", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SC) Locale() string { - return l.locale +func (t *en_SC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SC' +func (t *en_SC) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SC' +func (t *en_SC) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_SD/en_SD.go b/resources/locales/en_SD/en_SD.go index fa724be..305e52b 100644 --- a/resources/locales/en_SD/en_SD.go +++ b/resources/locales/en_SD/en_SD.go @@ -5,23 +5,30 @@ import ( ) type en_SD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SD' locale func New() locales.Translator { return &en_SD{ - locale: "en_SD", + locale: "en_SD", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SD) Locale() string { - return l.locale +func (t *en_SD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SD' +func (t *en_SD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SD' +func (t *en_SD) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_SE/en_SE.go b/resources/locales/en_SE/en_SE.go index be21925..c026c0c 100644 --- a/resources/locales/en_SE/en_SE.go +++ b/resources/locales/en_SE/en_SE.go @@ -5,31 +5,38 @@ import ( ) type en_SE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SE' locale func New() locales.Translator { return &en_SE{ - locale: "en_SE", + locale: "en_SE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SE) Locale() string { - return l.locale +func (t *en_SE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SE' +func (t *en_SE) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SE' +func (t *en_SE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_SG/en_SG.go b/resources/locales/en_SG/en_SG.go index d7f1689..d7ec9db 100644 --- a/resources/locales/en_SG/en_SG.go +++ b/resources/locales/en_SG/en_SG.go @@ -5,23 +5,30 @@ import ( ) type en_SG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SG' locale func New() locales.Translator { return &en_SG{ - locale: "en_SG", + locale: "en_SG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SG) Locale() string { - return l.locale +func (t *en_SG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SG' +func (t *en_SG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SG' +func (t *en_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_SH/en_SH.go b/resources/locales/en_SH/en_SH.go index d88d39e..e1000b7 100644 --- a/resources/locales/en_SH/en_SH.go +++ b/resources/locales/en_SH/en_SH.go @@ -5,23 +5,30 @@ import ( ) type en_SH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SH' locale func New() locales.Translator { return &en_SH{ - locale: "en_SH", + locale: "en_SH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SH) Locale() string { - return l.locale +func (t *en_SH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SH' +func (t *en_SH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SH' +func (t *en_SH) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_SI/en_SI.go b/resources/locales/en_SI/en_SI.go index aa04a2a..81e3447 100644 --- a/resources/locales/en_SI/en_SI.go +++ b/resources/locales/en_SI/en_SI.go @@ -5,23 +5,30 @@ import ( ) type en_SI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SI' locale func New() locales.Translator { return &en_SI{ - locale: "en_SI", + locale: "en_SI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SI) Locale() string { - return l.locale +func (t *en_SI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SI' +func (t *en_SI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SI' +func (t *en_SI) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_SL/en_SL.go b/resources/locales/en_SL/en_SL.go index 90efb85..bfd7758 100644 --- a/resources/locales/en_SL/en_SL.go +++ b/resources/locales/en_SL/en_SL.go @@ -5,23 +5,30 @@ import ( ) type en_SL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SL' locale func New() locales.Translator { return &en_SL{ - locale: "en_SL", + locale: "en_SL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SL) Locale() string { - return l.locale +func (t *en_SL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SL' +func (t *en_SL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SL' +func (t *en_SL) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_SS/en_SS.go b/resources/locales/en_SS/en_SS.go index 0ef05a4..75603d6 100644 --- a/resources/locales/en_SS/en_SS.go +++ b/resources/locales/en_SS/en_SS.go @@ -5,23 +5,30 @@ import ( ) type en_SS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SS' locale func New() locales.Translator { return &en_SS{ - locale: "en_SS", + locale: "en_SS", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SS) Locale() string { - return l.locale +func (t *en_SS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SS' +func (t *en_SS) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SS' +func (t *en_SS) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_SX/en_SX.go b/resources/locales/en_SX/en_SX.go index f9e413a..85ab774 100644 --- a/resources/locales/en_SX/en_SX.go +++ b/resources/locales/en_SX/en_SX.go @@ -5,23 +5,30 @@ import ( ) type en_SX struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SX' locale func New() locales.Translator { return &en_SX{ - locale: "en_SX", + locale: "en_SX", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SX) Locale() string { - return l.locale +func (t *en_SX) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SX) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SX' +func (t *en_SX) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SX' +func (t *en_SX) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_SZ/en_SZ.go b/resources/locales/en_SZ/en_SZ.go index fef4bf6..08cd495 100644 --- a/resources/locales/en_SZ/en_SZ.go +++ b/resources/locales/en_SZ/en_SZ.go @@ -5,23 +5,30 @@ import ( ) type en_SZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_SZ' locale func New() locales.Translator { return &en_SZ{ - locale: "en_SZ", + locale: "en_SZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_SZ) Locale() string { - return l.locale +func (t *en_SZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_SZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_SZ' +func (t *en_SZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_SZ' +func (t *en_SZ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_TC/en_TC.go b/resources/locales/en_TC/en_TC.go index 49a47b6..3f67822 100644 --- a/resources/locales/en_TC/en_TC.go +++ b/resources/locales/en_TC/en_TC.go @@ -5,23 +5,30 @@ import ( ) type en_TC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_TC' locale func New() locales.Translator { return &en_TC{ - locale: "en_TC", + locale: "en_TC", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_TC) Locale() string { - return l.locale +func (t *en_TC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_TC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_TC' +func (t *en_TC) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_TC' +func (t *en_TC) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_TK/en_TK.go b/resources/locales/en_TK/en_TK.go index 48564e8..9dba507 100644 --- a/resources/locales/en_TK/en_TK.go +++ b/resources/locales/en_TK/en_TK.go @@ -5,31 +5,38 @@ import ( ) type en_TK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_TK' locale func New() locales.Translator { return &en_TK{ - locale: "en_TK", + locale: "en_TK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_TK) Locale() string { - return l.locale +func (t *en_TK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_TK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_TK' +func (t *en_TK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_TK' +func (t *en_TK) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_TO/en_TO.go b/resources/locales/en_TO/en_TO.go index 94aa6d6..677856b 100644 --- a/resources/locales/en_TO/en_TO.go +++ b/resources/locales/en_TO/en_TO.go @@ -5,23 +5,30 @@ import ( ) type en_TO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_TO' locale func New() locales.Translator { return &en_TO{ - locale: "en_TO", + locale: "en_TO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_TO) Locale() string { - return l.locale +func (t *en_TO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_TO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_TO' +func (t *en_TO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_TO' +func (t *en_TO) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_TT/en_TT.go b/resources/locales/en_TT/en_TT.go index 8a1f076..ade4eaf 100644 --- a/resources/locales/en_TT/en_TT.go +++ b/resources/locales/en_TT/en_TT.go @@ -5,23 +5,30 @@ import ( ) type en_TT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_TT' locale func New() locales.Translator { return &en_TT{ - locale: "en_TT", + locale: "en_TT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_TT) Locale() string { - return l.locale +func (t *en_TT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_TT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_TT' +func (t *en_TT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_TT' +func (t *en_TT) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_TV/en_TV.go b/resources/locales/en_TV/en_TV.go index b966376..629f153 100644 --- a/resources/locales/en_TV/en_TV.go +++ b/resources/locales/en_TV/en_TV.go @@ -5,23 +5,30 @@ import ( ) type en_TV struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_TV' locale func New() locales.Translator { return &en_TV{ - locale: "en_TV", + locale: "en_TV", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_TV) Locale() string { - return l.locale +func (t *en_TV) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_TV) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_TV' +func (t *en_TV) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_TV' +func (t *en_TV) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_TZ/en_TZ.go b/resources/locales/en_TZ/en_TZ.go index 54ee129..9488114 100644 --- a/resources/locales/en_TZ/en_TZ.go +++ b/resources/locales/en_TZ/en_TZ.go @@ -5,31 +5,38 @@ import ( ) type en_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_TZ' locale func New() locales.Translator { return &en_TZ{ - locale: "en_TZ", + locale: "en_TZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_TZ) Locale() string { - return l.locale +func (t *en_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_TZ' +func (t *en_TZ) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'en_TZ' +func (t *en_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_UG/en_UG.go b/resources/locales/en_UG/en_UG.go index b5e10d3..a7196e7 100644 --- a/resources/locales/en_UG/en_UG.go +++ b/resources/locales/en_UG/en_UG.go @@ -5,23 +5,30 @@ import ( ) type en_UG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_UG' locale func New() locales.Translator { return &en_UG{ - locale: "en_UG", + locale: "en_UG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_UG) Locale() string { - return l.locale +func (t *en_UG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_UG' +func (t *en_UG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_UG' +func (t *en_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_UM/en_UM.go b/resources/locales/en_UM/en_UM.go index 5194441..736a82c 100644 --- a/resources/locales/en_UM/en_UM.go +++ b/resources/locales/en_UM/en_UM.go @@ -5,23 +5,30 @@ import ( ) type en_UM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_UM' locale func New() locales.Translator { return &en_UM{ - locale: "en_UM", + locale: "en_UM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_UM) Locale() string { - return l.locale +func (t *en_UM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_UM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_UM' +func (t *en_UM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_UM' +func (t *en_UM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_US/en_US.go b/resources/locales/en_US/en_US.go index fea463f..84f0396 100644 --- a/resources/locales/en_US/en_US.go +++ b/resources/locales/en_US/en_US.go @@ -5,31 +5,38 @@ import ( ) type en_US struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_US' locale func New() locales.Translator { return &en_US{ - locale: "en_US", + locale: "en_US", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_US) Locale() string { - return l.locale +func (t *en_US) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_US) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_US' +func (t *en_US) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'en_US' +func (t *en_US) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_US_POSIX/en_US_POSIX.go b/resources/locales/en_US_POSIX/en_US_POSIX.go index 083a85f..258db36 100644 --- a/resources/locales/en_US_POSIX/en_US_POSIX.go +++ b/resources/locales/en_US_POSIX/en_US_POSIX.go @@ -5,23 +5,30 @@ import ( ) type en_US_POSIX struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_US_POSIX' locale func New() locales.Translator { return &en_US_POSIX{ - locale: "en_US_POSIX", + locale: "en_US_POSIX", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_US_POSIX) Locale() string { - return l.locale +func (t *en_US_POSIX) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_US_POSIX) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_US_POSIX' +func (t *en_US_POSIX) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_US_POSIX' +func (t *en_US_POSIX) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_VC/en_VC.go b/resources/locales/en_VC/en_VC.go index 8b8a0d8..0a779b3 100644 --- a/resources/locales/en_VC/en_VC.go +++ b/resources/locales/en_VC/en_VC.go @@ -5,23 +5,30 @@ import ( ) type en_VC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_VC' locale func New() locales.Translator { return &en_VC{ - locale: "en_VC", + locale: "en_VC", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_VC) Locale() string { - return l.locale +func (t *en_VC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_VC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_VC' +func (t *en_VC) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_VC' +func (t *en_VC) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_VG/en_VG.go b/resources/locales/en_VG/en_VG.go index 20e6008..aedde4c 100644 --- a/resources/locales/en_VG/en_VG.go +++ b/resources/locales/en_VG/en_VG.go @@ -5,23 +5,30 @@ import ( ) type en_VG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_VG' locale func New() locales.Translator { return &en_VG{ - locale: "en_VG", + locale: "en_VG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_VG) Locale() string { - return l.locale +func (t *en_VG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_VG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_VG' +func (t *en_VG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_VG' +func (t *en_VG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_VI/en_VI.go b/resources/locales/en_VI/en_VI.go index 11d0a99..e5e0f1a 100644 --- a/resources/locales/en_VI/en_VI.go +++ b/resources/locales/en_VI/en_VI.go @@ -5,31 +5,38 @@ import ( ) type en_VI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_VI' locale func New() locales.Translator { return &en_VI{ - locale: "en_VI", + locale: "en_VI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_VI) Locale() string { - return l.locale +func (t *en_VI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_VI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_VI' +func (t *en_VI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_VI' +func (t *en_VI) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/en_VU/en_VU.go b/resources/locales/en_VU/en_VU.go index 3303c3e..2dce6cf 100644 --- a/resources/locales/en_VU/en_VU.go +++ b/resources/locales/en_VU/en_VU.go @@ -5,23 +5,30 @@ import ( ) type en_VU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_VU' locale func New() locales.Translator { return &en_VU{ - locale: "en_VU", + locale: "en_VU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_VU) Locale() string { - return l.locale +func (t *en_VU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_VU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_VU' +func (t *en_VU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_VU' +func (t *en_VU) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_WS/en_WS.go b/resources/locales/en_WS/en_WS.go index 8403be8..e893c86 100644 --- a/resources/locales/en_WS/en_WS.go +++ b/resources/locales/en_WS/en_WS.go @@ -5,23 +5,30 @@ import ( ) type en_WS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_WS' locale func New() locales.Translator { return &en_WS{ - locale: "en_WS", + locale: "en_WS", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_WS) Locale() string { - return l.locale +func (t *en_WS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_WS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_WS' +func (t *en_WS) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_WS' +func (t *en_WS) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_ZA/en_ZA.go b/resources/locales/en_ZA/en_ZA.go index 48a4223..c8f9c9c 100644 --- a/resources/locales/en_ZA/en_ZA.go +++ b/resources/locales/en_ZA/en_ZA.go @@ -5,23 +5,30 @@ import ( ) type en_ZA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_ZA' locale func New() locales.Translator { return &en_ZA{ - locale: "en_ZA", + locale: "en_ZA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_ZA) Locale() string { - return l.locale +func (t *en_ZA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_ZA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_ZA' +func (t *en_ZA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_ZA' +func (t *en_ZA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/en_ZM/en_ZM.go b/resources/locales/en_ZM/en_ZM.go index fb3837a..64ee381 100644 --- a/resources/locales/en_ZM/en_ZM.go +++ b/resources/locales/en_ZM/en_ZM.go @@ -5,23 +5,30 @@ import ( ) type en_ZM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_ZM' locale func New() locales.Translator { return &en_ZM{ - locale: "en_ZM", + locale: "en_ZM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_ZM) Locale() string { - return l.locale +func (t *en_ZM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_ZM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_ZM' +func (t *en_ZM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_ZM' +func (t *en_ZM) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) diff --git a/resources/locales/en_ZW/en_ZW.go b/resources/locales/en_ZW/en_ZW.go index 583f07f..776023d 100644 --- a/resources/locales/en_ZW/en_ZW.go +++ b/resources/locales/en_ZW/en_ZW.go @@ -5,23 +5,30 @@ import ( ) type en_ZW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'en_ZW' locale func New() locales.Translator { return &en_ZW{ - locale: "en_ZW", + locale: "en_ZW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *en_ZW) Locale() string { - return l.locale +func (t *en_ZW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *en_ZW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'en_ZW' +func (t *en_ZW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'en_ZW' +func (t *en_ZW) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/eo/eo.go b/resources/locales/eo/eo.go index 828f275..2203b32 100644 --- a/resources/locales/eo/eo.go +++ b/resources/locales/eo/eo.go @@ -5,23 +5,30 @@ import ( ) type eo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'eo' locale func New() locales.Translator { return &eo{ - locale: "eo", + locale: "eo", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *eo) Locale() string { - return l.locale +func (t *eo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *eo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'eo' +func (t *eo) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'eo' +func (t *eo) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/eo_001/eo_001.go b/resources/locales/eo_001/eo_001.go index 4783a72..23f7388 100644 --- a/resources/locales/eo_001/eo_001.go +++ b/resources/locales/eo_001/eo_001.go @@ -5,23 +5,30 @@ import ( ) type eo_001 struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'eo_001' locale func New() locales.Translator { return &eo_001{ - locale: "eo_001", + locale: "eo_001", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *eo_001) Locale() string { - return l.locale +func (t *eo_001) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *eo_001) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'eo_001' +func (t *eo_001) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'eo_001' +func (t *eo_001) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es/es.go b/resources/locales/es/es.go index 8ab78d2..965b4bb 100644 --- a/resources/locales/es/es.go +++ b/resources/locales/es/es.go @@ -5,23 +5,30 @@ import ( ) type es struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es' locale func New() locales.Translator { return &es{ - locale: "es", + locale: "es", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es) Locale() string { - return l.locale +func (t *es) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es' +func (t *es) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es' +func (t *es) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_419/es_419.go b/resources/locales/es_419/es_419.go index 4950703..a696900 100644 --- a/resources/locales/es_419/es_419.go +++ b/resources/locales/es_419/es_419.go @@ -5,23 +5,30 @@ import ( ) type es_419 struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_419' locale func New() locales.Translator { return &es_419{ - locale: "es_419", + locale: "es_419", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_419) Locale() string { - return l.locale +func (t *es_419) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_419) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_419' +func (t *es_419) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_419' +func (t *es_419) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_AR/es_AR.go b/resources/locales/es_AR/es_AR.go index 5f1fa7b..ee2ee54 100644 --- a/resources/locales/es_AR/es_AR.go +++ b/resources/locales/es_AR/es_AR.go @@ -5,23 +5,30 @@ import ( ) type es_AR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_AR' locale func New() locales.Translator { return &es_AR{ - locale: "es_AR", + locale: "es_AR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_AR) Locale() string { - return l.locale +func (t *es_AR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_AR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_AR' +func (t *es_AR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_AR' +func (t *es_AR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_BO/es_BO.go b/resources/locales/es_BO/es_BO.go index dd50aaa..953879e 100644 --- a/resources/locales/es_BO/es_BO.go +++ b/resources/locales/es_BO/es_BO.go @@ -5,23 +5,30 @@ import ( ) type es_BO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_BO' locale func New() locales.Translator { return &es_BO{ - locale: "es_BO", + locale: "es_BO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_BO) Locale() string { - return l.locale +func (t *es_BO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_BO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_BO' +func (t *es_BO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_BO' +func (t *es_BO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_BR/es_BR.go b/resources/locales/es_BR/es_BR.go index a515773..5015dc4 100644 --- a/resources/locales/es_BR/es_BR.go +++ b/resources/locales/es_BR/es_BR.go @@ -5,23 +5,30 @@ import ( ) type es_BR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_BR' locale func New() locales.Translator { return &es_BR{ - locale: "es_BR", + locale: "es_BR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_BR) Locale() string { - return l.locale +func (t *es_BR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_BR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_BR' +func (t *es_BR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_BR' +func (t *es_BR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_CL/es_CL.go b/resources/locales/es_CL/es_CL.go index eac85ed..b9c30e3 100644 --- a/resources/locales/es_CL/es_CL.go +++ b/resources/locales/es_CL/es_CL.go @@ -5,23 +5,30 @@ import ( ) type es_CL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_CL' locale func New() locales.Translator { return &es_CL{ - locale: "es_CL", + locale: "es_CL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_CL) Locale() string { - return l.locale +func (t *es_CL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_CL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_CL' +func (t *es_CL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_CL' +func (t *es_CL) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_CO/es_CO.go b/resources/locales/es_CO/es_CO.go index 25937a9..65bdea6 100644 --- a/resources/locales/es_CO/es_CO.go +++ b/resources/locales/es_CO/es_CO.go @@ -5,23 +5,30 @@ import ( ) type es_CO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_CO' locale func New() locales.Translator { return &es_CO{ - locale: "es_CO", + locale: "es_CO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_CO) Locale() string { - return l.locale +func (t *es_CO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_CO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_CO' +func (t *es_CO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_CO' +func (t *es_CO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_CR/es_CR.go b/resources/locales/es_CR/es_CR.go index f052bda..6d2b99a 100644 --- a/resources/locales/es_CR/es_CR.go +++ b/resources/locales/es_CR/es_CR.go @@ -5,23 +5,30 @@ import ( ) type es_CR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_CR' locale func New() locales.Translator { return &es_CR{ - locale: "es_CR", + locale: "es_CR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_CR) Locale() string { - return l.locale +func (t *es_CR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_CR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_CR' +func (t *es_CR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_CR' +func (t *es_CR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_CU/es_CU.go b/resources/locales/es_CU/es_CU.go index b0ac973..9be0e54 100644 --- a/resources/locales/es_CU/es_CU.go +++ b/resources/locales/es_CU/es_CU.go @@ -5,23 +5,30 @@ import ( ) type es_CU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_CU' locale func New() locales.Translator { return &es_CU{ - locale: "es_CU", + locale: "es_CU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_CU) Locale() string { - return l.locale +func (t *es_CU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_CU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_CU' +func (t *es_CU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_CU' +func (t *es_CU) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_DO/es_DO.go b/resources/locales/es_DO/es_DO.go index cfdeb25..d0a4ed5 100644 --- a/resources/locales/es_DO/es_DO.go +++ b/resources/locales/es_DO/es_DO.go @@ -5,23 +5,30 @@ import ( ) type es_DO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_DO' locale func New() locales.Translator { return &es_DO{ - locale: "es_DO", + locale: "es_DO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_DO) Locale() string { - return l.locale +func (t *es_DO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_DO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_DO' +func (t *es_DO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_DO' +func (t *es_DO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_EA/es_EA.go b/resources/locales/es_EA/es_EA.go index 5037183..5968033 100644 --- a/resources/locales/es_EA/es_EA.go +++ b/resources/locales/es_EA/es_EA.go @@ -5,23 +5,30 @@ import ( ) type es_EA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_EA' locale func New() locales.Translator { return &es_EA{ - locale: "es_EA", + locale: "es_EA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_EA) Locale() string { - return l.locale +func (t *es_EA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_EA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_EA' +func (t *es_EA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_EA' +func (t *es_EA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_EC/es_EC.go b/resources/locales/es_EC/es_EC.go index 8cc9fc4..4306bee 100644 --- a/resources/locales/es_EC/es_EC.go +++ b/resources/locales/es_EC/es_EC.go @@ -5,23 +5,30 @@ import ( ) type es_EC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_EC' locale func New() locales.Translator { return &es_EC{ - locale: "es_EC", + locale: "es_EC", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_EC) Locale() string { - return l.locale +func (t *es_EC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_EC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_EC' +func (t *es_EC) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_EC' +func (t *es_EC) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_ES/es_ES.go b/resources/locales/es_ES/es_ES.go index f1fb31a..23f2660 100644 --- a/resources/locales/es_ES/es_ES.go +++ b/resources/locales/es_ES/es_ES.go @@ -5,23 +5,30 @@ import ( ) type es_ES struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_ES' locale func New() locales.Translator { return &es_ES{ - locale: "es_ES", + locale: "es_ES", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_ES) Locale() string { - return l.locale +func (t *es_ES) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_ES' +func (t *es_ES) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_ES' +func (t *es_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_GQ/es_GQ.go b/resources/locales/es_GQ/es_GQ.go index f105df8..cc28da3 100644 --- a/resources/locales/es_GQ/es_GQ.go +++ b/resources/locales/es_GQ/es_GQ.go @@ -5,23 +5,30 @@ import ( ) type es_GQ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_GQ' locale func New() locales.Translator { return &es_GQ{ - locale: "es_GQ", + locale: "es_GQ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_GQ) Locale() string { - return l.locale +func (t *es_GQ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_GQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_GQ' +func (t *es_GQ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_GQ' +func (t *es_GQ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_GT/es_GT.go b/resources/locales/es_GT/es_GT.go index 27257a3..a8f09e2 100644 --- a/resources/locales/es_GT/es_GT.go +++ b/resources/locales/es_GT/es_GT.go @@ -5,23 +5,30 @@ import ( ) type es_GT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_GT' locale func New() locales.Translator { return &es_GT{ - locale: "es_GT", + locale: "es_GT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_GT) Locale() string { - return l.locale +func (t *es_GT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_GT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_GT' +func (t *es_GT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_GT' +func (t *es_GT) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_HN/es_HN.go b/resources/locales/es_HN/es_HN.go index 765f43b..52793fa 100644 --- a/resources/locales/es_HN/es_HN.go +++ b/resources/locales/es_HN/es_HN.go @@ -5,23 +5,30 @@ import ( ) type es_HN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_HN' locale func New() locales.Translator { return &es_HN{ - locale: "es_HN", + locale: "es_HN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_HN) Locale() string { - return l.locale +func (t *es_HN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_HN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_HN' +func (t *es_HN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_HN' +func (t *es_HN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_IC/es_IC.go b/resources/locales/es_IC/es_IC.go index 738757b..58506fb 100644 --- a/resources/locales/es_IC/es_IC.go +++ b/resources/locales/es_IC/es_IC.go @@ -5,23 +5,30 @@ import ( ) type es_IC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_IC' locale func New() locales.Translator { return &es_IC{ - locale: "es_IC", + locale: "es_IC", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_IC) Locale() string { - return l.locale +func (t *es_IC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_IC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_IC' +func (t *es_IC) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_IC' +func (t *es_IC) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_MX/es_MX.go b/resources/locales/es_MX/es_MX.go index 7fa4cff..ada8692 100644 --- a/resources/locales/es_MX/es_MX.go +++ b/resources/locales/es_MX/es_MX.go @@ -5,23 +5,30 @@ import ( ) type es_MX struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_MX' locale func New() locales.Translator { return &es_MX{ - locale: "es_MX", + locale: "es_MX", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_MX) Locale() string { - return l.locale +func (t *es_MX) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_MX) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_MX' +func (t *es_MX) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_MX' +func (t *es_MX) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_NI/es_NI.go b/resources/locales/es_NI/es_NI.go index aa50b25..4d5a2e7 100644 --- a/resources/locales/es_NI/es_NI.go +++ b/resources/locales/es_NI/es_NI.go @@ -5,23 +5,30 @@ import ( ) type es_NI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_NI' locale func New() locales.Translator { return &es_NI{ - locale: "es_NI", + locale: "es_NI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_NI) Locale() string { - return l.locale +func (t *es_NI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_NI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_NI' +func (t *es_NI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_NI' +func (t *es_NI) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_PA/es_PA.go b/resources/locales/es_PA/es_PA.go index 8a94e01..32dd18d 100644 --- a/resources/locales/es_PA/es_PA.go +++ b/resources/locales/es_PA/es_PA.go @@ -5,23 +5,30 @@ import ( ) type es_PA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_PA' locale func New() locales.Translator { return &es_PA{ - locale: "es_PA", + locale: "es_PA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_PA) Locale() string { - return l.locale +func (t *es_PA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_PA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_PA' +func (t *es_PA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_PA' +func (t *es_PA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_PE/es_PE.go b/resources/locales/es_PE/es_PE.go index 4435f18..6bb9d30 100644 --- a/resources/locales/es_PE/es_PE.go +++ b/resources/locales/es_PE/es_PE.go @@ -5,23 +5,30 @@ import ( ) type es_PE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_PE' locale func New() locales.Translator { return &es_PE{ - locale: "es_PE", + locale: "es_PE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_PE) Locale() string { - return l.locale +func (t *es_PE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_PE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_PE' +func (t *es_PE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_PE' +func (t *es_PE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_PH/es_PH.go b/resources/locales/es_PH/es_PH.go index fb4db4c..d2d127d 100644 --- a/resources/locales/es_PH/es_PH.go +++ b/resources/locales/es_PH/es_PH.go @@ -5,23 +5,30 @@ import ( ) type es_PH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_PH' locale func New() locales.Translator { return &es_PH{ - locale: "es_PH", + locale: "es_PH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_PH) Locale() string { - return l.locale +func (t *es_PH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_PH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_PH' +func (t *es_PH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_PH' +func (t *es_PH) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_PR/es_PR.go b/resources/locales/es_PR/es_PR.go index be877ff..adaba7d 100644 --- a/resources/locales/es_PR/es_PR.go +++ b/resources/locales/es_PR/es_PR.go @@ -5,23 +5,30 @@ import ( ) type es_PR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_PR' locale func New() locales.Translator { return &es_PR{ - locale: "es_PR", + locale: "es_PR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_PR) Locale() string { - return l.locale +func (t *es_PR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_PR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_PR' +func (t *es_PR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_PR' +func (t *es_PR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_PY/es_PY.go b/resources/locales/es_PY/es_PY.go index 95ae9af..5ae0a48 100644 --- a/resources/locales/es_PY/es_PY.go +++ b/resources/locales/es_PY/es_PY.go @@ -5,23 +5,30 @@ import ( ) type es_PY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_PY' locale func New() locales.Translator { return &es_PY{ - locale: "es_PY", + locale: "es_PY", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_PY) Locale() string { - return l.locale +func (t *es_PY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_PY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_PY' +func (t *es_PY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_PY' +func (t *es_PY) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_SV/es_SV.go b/resources/locales/es_SV/es_SV.go index 0cf7409..6d52bdd 100644 --- a/resources/locales/es_SV/es_SV.go +++ b/resources/locales/es_SV/es_SV.go @@ -5,23 +5,30 @@ import ( ) type es_SV struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_SV' locale func New() locales.Translator { return &es_SV{ - locale: "es_SV", + locale: "es_SV", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_SV) Locale() string { - return l.locale +func (t *es_SV) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_SV) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_SV' +func (t *es_SV) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_SV' +func (t *es_SV) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_US/es_US.go b/resources/locales/es_US/es_US.go index d507f8b..c73b633 100644 --- a/resources/locales/es_US/es_US.go +++ b/resources/locales/es_US/es_US.go @@ -5,23 +5,30 @@ import ( ) type es_US struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_US' locale func New() locales.Translator { return &es_US{ - locale: "es_US", + locale: "es_US", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_US) Locale() string { - return l.locale +func (t *es_US) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_US) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_US' +func (t *es_US) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_US' +func (t *es_US) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_UY/es_UY.go b/resources/locales/es_UY/es_UY.go index d035983..dae96ec 100644 --- a/resources/locales/es_UY/es_UY.go +++ b/resources/locales/es_UY/es_UY.go @@ -5,23 +5,30 @@ import ( ) type es_UY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_UY' locale func New() locales.Translator { return &es_UY{ - locale: "es_UY", + locale: "es_UY", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_UY) Locale() string { - return l.locale +func (t *es_UY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_UY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_UY' +func (t *es_UY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_UY' +func (t *es_UY) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/es_VE/es_VE.go b/resources/locales/es_VE/es_VE.go index ee39afd..312d8d5 100644 --- a/resources/locales/es_VE/es_VE.go +++ b/resources/locales/es_VE/es_VE.go @@ -5,23 +5,30 @@ import ( ) type es_VE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'es_VE' locale func New() locales.Translator { return &es_VE{ - locale: "es_VE", + locale: "es_VE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *es_VE) Locale() string { - return l.locale +func (t *es_VE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *es_VE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'es_VE' +func (t *es_VE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'es_VE' +func (t *es_VE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/et/et.go b/resources/locales/et/et.go index 0ced270..c29d329 100644 --- a/resources/locales/et/et.go +++ b/resources/locales/et/et.go @@ -5,31 +5,38 @@ import ( ) type et struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'et' locale func New() locales.Translator { return &et{ - locale: "et", + locale: "et", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *et) Locale() string { - return l.locale +func (t *et) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *et) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'et' +func (t *et) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'et' +func (t *et) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/et_EE/et_EE.go b/resources/locales/et_EE/et_EE.go index e66b05d..3256e71 100644 --- a/resources/locales/et_EE/et_EE.go +++ b/resources/locales/et_EE/et_EE.go @@ -5,23 +5,30 @@ import ( ) type et_EE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'et_EE' locale func New() locales.Translator { return &et_EE{ - locale: "et_EE", + locale: "et_EE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *et_EE) Locale() string { - return l.locale +func (t *et_EE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *et_EE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'et_EE' +func (t *et_EE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'et_EE' +func (t *et_EE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/eu/eu.go b/resources/locales/eu/eu.go index 3b30fa0..75254e7 100644 --- a/resources/locales/eu/eu.go +++ b/resources/locales/eu/eu.go @@ -5,23 +5,30 @@ import ( ) type eu struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'eu' locale func New() locales.Translator { return &eu{ - locale: "eu", + locale: "eu", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *eu) Locale() string { - return l.locale +func (t *eu) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *eu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'eu' +func (t *eu) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'eu' +func (t *eu) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/eu_ES/eu_ES.go b/resources/locales/eu_ES/eu_ES.go index 2758e18..71b9ad0 100644 --- a/resources/locales/eu_ES/eu_ES.go +++ b/resources/locales/eu_ES/eu_ES.go @@ -5,23 +5,30 @@ import ( ) type eu_ES struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'eu_ES' locale func New() locales.Translator { return &eu_ES{ - locale: "eu_ES", + locale: "eu_ES", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *eu_ES) Locale() string { - return l.locale +func (t *eu_ES) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *eu_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'eu_ES' +func (t *eu_ES) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'eu_ES' +func (t *eu_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ewo/ewo.go b/resources/locales/ewo/ewo.go index f94a175..a5a422f 100644 --- a/resources/locales/ewo/ewo.go +++ b/resources/locales/ewo/ewo.go @@ -5,22 +5,29 @@ import ( ) type ewo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ewo' locale func New() locales.Translator { return &ewo{ - locale: "ewo", + locale: "ewo", + plurals: nil, } } // Locale returns the current translators string locale -func (l *ewo) Locale() string { - return l.locale +func (t *ewo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ewo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ewo' +func (t *ewo) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'ewo' +func (t *ewo) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ewo_CM/ewo_CM.go b/resources/locales/ewo_CM/ewo_CM.go index 3e9ae4e..e7439d1 100644 --- a/resources/locales/ewo_CM/ewo_CM.go +++ b/resources/locales/ewo_CM/ewo_CM.go @@ -5,22 +5,29 @@ import ( ) type ewo_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ewo_CM' locale func New() locales.Translator { return &ewo_CM{ - locale: "ewo_CM", + locale: "ewo_CM", + plurals: nil, } } // Locale returns the current translators string locale -func (l *ewo_CM) Locale() string { - return l.locale +func (t *ewo_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ewo_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ewo_CM' +func (t *ewo_CM) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'ewo_CM' +func (t *ewo_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/fa/fa.go b/resources/locales/fa/fa.go index 0c66a77..06f4431 100644 --- a/resources/locales/fa/fa.go +++ b/resources/locales/fa/fa.go @@ -5,23 +5,30 @@ import ( ) type fa struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fa' locale func New() locales.Translator { return &fa{ - locale: "fa", + locale: "fa", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fa) Locale() string { - return l.locale +func (t *fa) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fa) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fa' +func (t *fa) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fa' +func (t *fa) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/fa_AF/fa_AF.go b/resources/locales/fa_AF/fa_AF.go index 7e1421e..bdd0707 100644 --- a/resources/locales/fa_AF/fa_AF.go +++ b/resources/locales/fa_AF/fa_AF.go @@ -5,23 +5,30 @@ import ( ) type fa_AF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fa_AF' locale func New() locales.Translator { return &fa_AF{ - locale: "fa_AF", + locale: "fa_AF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fa_AF) Locale() string { - return l.locale +func (t *fa_AF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fa_AF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fa_AF' +func (t *fa_AF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fa_AF' +func (t *fa_AF) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/fa_IR/fa_IR.go b/resources/locales/fa_IR/fa_IR.go index b4f0413..ceb9ba6 100644 --- a/resources/locales/fa_IR/fa_IR.go +++ b/resources/locales/fa_IR/fa_IR.go @@ -5,23 +5,30 @@ import ( ) type fa_IR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fa_IR' locale func New() locales.Translator { return &fa_IR{ - locale: "fa_IR", + locale: "fa_IR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fa_IR) Locale() string { - return l.locale +func (t *fa_IR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fa_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fa_IR' +func (t *fa_IR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fa_IR' +func (t *fa_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ff/ff.go b/resources/locales/ff/ff.go index b9757d7..ad3331e 100644 --- a/resources/locales/ff/ff.go +++ b/resources/locales/ff/ff.go @@ -5,23 +5,30 @@ import ( ) type ff struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ff' locale func New() locales.Translator { return &ff{ - locale: "ff", + locale: "ff", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ff) Locale() string { - return l.locale +func (t *ff) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ff) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ff' +func (t *ff) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ff' +func (t *ff) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ff_CM/ff_CM.go b/resources/locales/ff_CM/ff_CM.go index d6733dc..006427d 100644 --- a/resources/locales/ff_CM/ff_CM.go +++ b/resources/locales/ff_CM/ff_CM.go @@ -5,23 +5,30 @@ import ( ) type ff_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ff_CM' locale func New() locales.Translator { return &ff_CM{ - locale: "ff_CM", + locale: "ff_CM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ff_CM) Locale() string { - return l.locale +func (t *ff_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ff_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ff_CM' +func (t *ff_CM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ff_CM' +func (t *ff_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ff_GN/ff_GN.go b/resources/locales/ff_GN/ff_GN.go index fcd8888..1418363 100644 --- a/resources/locales/ff_GN/ff_GN.go +++ b/resources/locales/ff_GN/ff_GN.go @@ -5,23 +5,30 @@ import ( ) type ff_GN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ff_GN' locale func New() locales.Translator { return &ff_GN{ - locale: "ff_GN", + locale: "ff_GN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ff_GN) Locale() string { - return l.locale +func (t *ff_GN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ff_GN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ff_GN' +func (t *ff_GN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ff_GN' +func (t *ff_GN) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ff_MR/ff_MR.go b/resources/locales/ff_MR/ff_MR.go index 8e00e89..e157a40 100644 --- a/resources/locales/ff_MR/ff_MR.go +++ b/resources/locales/ff_MR/ff_MR.go @@ -5,23 +5,30 @@ import ( ) type ff_MR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ff_MR' locale func New() locales.Translator { return &ff_MR{ - locale: "ff_MR", + locale: "ff_MR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ff_MR) Locale() string { - return l.locale +func (t *ff_MR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ff_MR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ff_MR' +func (t *ff_MR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ff_MR' +func (t *ff_MR) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ff_SN/ff_SN.go b/resources/locales/ff_SN/ff_SN.go index b925f8e..e29ee85 100644 --- a/resources/locales/ff_SN/ff_SN.go +++ b/resources/locales/ff_SN/ff_SN.go @@ -5,23 +5,30 @@ import ( ) type ff_SN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ff_SN' locale func New() locales.Translator { return &ff_SN{ - locale: "ff_SN", + locale: "ff_SN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ff_SN) Locale() string { - return l.locale +func (t *ff_SN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ff_SN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ff_SN' +func (t *ff_SN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ff_SN' +func (t *ff_SN) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fi/fi.go b/resources/locales/fi/fi.go index 5e894d5..b968a72 100644 --- a/resources/locales/fi/fi.go +++ b/resources/locales/fi/fi.go @@ -5,23 +5,30 @@ import ( ) type fi struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fi' locale func New() locales.Translator { return &fi{ - locale: "fi", + locale: "fi", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fi) Locale() string { - return l.locale +func (t *fi) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fi) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fi' +func (t *fi) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fi' +func (t *fi) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fi_FI/fi_FI.go b/resources/locales/fi_FI/fi_FI.go index 60129f7..5ef6a9f 100644 --- a/resources/locales/fi_FI/fi_FI.go +++ b/resources/locales/fi_FI/fi_FI.go @@ -5,23 +5,30 @@ import ( ) type fi_FI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fi_FI' locale func New() locales.Translator { return &fi_FI{ - locale: "fi_FI", + locale: "fi_FI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fi_FI) Locale() string { - return l.locale +func (t *fi_FI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fi_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fi_FI' +func (t *fi_FI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fi_FI' +func (t *fi_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fil/fil.go b/resources/locales/fil/fil.go index e6ef630..2fe2c78 100644 --- a/resources/locales/fil/fil.go +++ b/resources/locales/fil/fil.go @@ -5,25 +5,30 @@ import ( ) type fil struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fil' locale func New() locales.Translator { return &fil{ - locale: "fil", + locale: "fil", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fil) Locale() string { - return l.locale +func (t *fil) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fil) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fil' +func (t *fil) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'fil' +func (t *fil) CardinalPluralRule(num string) (locales.PluralRule, error) { f, err := locales.F(num) if err != nil { @@ -35,6 +40,8 @@ func (l *fil) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if (v == 0 && (i == 1 || i == 2 || i == 3)) || (v == 0 && (i%10 != 4 && i%10 != 6 && i%10 != 9)) || (v != 0 && (f%10 != 4 && f%10 != 6 && f%10 != 9)) { return locales.PluralRuleOne, nil } diff --git a/resources/locales/fil_PH/fil_PH.go b/resources/locales/fil_PH/fil_PH.go index 39b2ac6..15ce606 100644 --- a/resources/locales/fil_PH/fil_PH.go +++ b/resources/locales/fil_PH/fil_PH.go @@ -5,28 +5,30 @@ import ( ) type fil_PH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fil_PH' locale func New() locales.Translator { return &fil_PH{ - locale: "fil_PH", + locale: "fil_PH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fil_PH) Locale() string { - return l.locale +func (t *fil_PH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fil_PH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fil_PH' +func (t *fil_PH) Plurals() []locales.PluralRule { + return t.plurals +} - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// CardinalPluralRule returns the PluralRule given 'num' for 'fil_PH' +func (t *fil_PH) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { @@ -35,6 +37,11 @@ func (l *fil_PH) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) + f, err := locales.F(num) + if err != nil { + return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} + } + if (v == 0 && (i == 1 || i == 2 || i == 3)) || (v == 0 && (i%10 != 4 && i%10 != 6 && i%10 != 9)) || (v != 0 && (f%10 != 4 && f%10 != 6 && f%10 != 9)) { return locales.PluralRuleOne, nil } diff --git a/resources/locales/fo/fo.go b/resources/locales/fo/fo.go index ba84122..506ee37 100644 --- a/resources/locales/fo/fo.go +++ b/resources/locales/fo/fo.go @@ -5,23 +5,30 @@ import ( ) type fo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fo' locale func New() locales.Translator { return &fo{ - locale: "fo", + locale: "fo", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fo) Locale() string { - return l.locale +func (t *fo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fo' +func (t *fo) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fo' +func (t *fo) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/fo_DK/fo_DK.go b/resources/locales/fo_DK/fo_DK.go index f1bdc93..4e4b7d6 100644 --- a/resources/locales/fo_DK/fo_DK.go +++ b/resources/locales/fo_DK/fo_DK.go @@ -5,23 +5,30 @@ import ( ) type fo_DK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fo_DK' locale func New() locales.Translator { return &fo_DK{ - locale: "fo_DK", + locale: "fo_DK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fo_DK) Locale() string { - return l.locale +func (t *fo_DK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fo_DK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fo_DK' +func (t *fo_DK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fo_DK' +func (t *fo_DK) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/fo_FO/fo_FO.go b/resources/locales/fo_FO/fo_FO.go index 0f6b6ab..ae2f290 100644 --- a/resources/locales/fo_FO/fo_FO.go +++ b/resources/locales/fo_FO/fo_FO.go @@ -5,23 +5,30 @@ import ( ) type fo_FO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fo_FO' locale func New() locales.Translator { return &fo_FO{ - locale: "fo_FO", + locale: "fo_FO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fo_FO) Locale() string { - return l.locale +func (t *fo_FO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fo_FO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fo_FO' +func (t *fo_FO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fo_FO' +func (t *fo_FO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/fr/fr.go b/resources/locales/fr/fr.go index 3985581..3a0ea0a 100644 --- a/resources/locales/fr/fr.go +++ b/resources/locales/fr/fr.go @@ -5,23 +5,30 @@ import ( ) type fr struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr' locale func New() locales.Translator { return &fr{ - locale: "fr", + locale: "fr", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr) Locale() string { - return l.locale +func (t *fr) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr' +func (t *fr) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr' +func (t *fr) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_BE/fr_BE.go b/resources/locales/fr_BE/fr_BE.go index e4eb83d..d740fd0 100644 --- a/resources/locales/fr_BE/fr_BE.go +++ b/resources/locales/fr_BE/fr_BE.go @@ -5,23 +5,30 @@ import ( ) type fr_BE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_BE' locale func New() locales.Translator { return &fr_BE{ - locale: "fr_BE", + locale: "fr_BE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_BE) Locale() string { - return l.locale +func (t *fr_BE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_BE' +func (t *fr_BE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_BE' +func (t *fr_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_BF/fr_BF.go b/resources/locales/fr_BF/fr_BF.go index d7577f9..50083ba 100644 --- a/resources/locales/fr_BF/fr_BF.go +++ b/resources/locales/fr_BF/fr_BF.go @@ -5,23 +5,30 @@ import ( ) type fr_BF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_BF' locale func New() locales.Translator { return &fr_BF{ - locale: "fr_BF", + locale: "fr_BF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_BF) Locale() string { - return l.locale +func (t *fr_BF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_BF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_BF' +func (t *fr_BF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_BF' +func (t *fr_BF) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_BI/fr_BI.go b/resources/locales/fr_BI/fr_BI.go index 9c3b25f..5250efb 100644 --- a/resources/locales/fr_BI/fr_BI.go +++ b/resources/locales/fr_BI/fr_BI.go @@ -5,23 +5,30 @@ import ( ) type fr_BI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_BI' locale func New() locales.Translator { return &fr_BI{ - locale: "fr_BI", + locale: "fr_BI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_BI) Locale() string { - return l.locale +func (t *fr_BI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_BI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_BI' +func (t *fr_BI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_BI' +func (t *fr_BI) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_BJ/fr_BJ.go b/resources/locales/fr_BJ/fr_BJ.go index 1b2cd3a..b7b082e 100644 --- a/resources/locales/fr_BJ/fr_BJ.go +++ b/resources/locales/fr_BJ/fr_BJ.go @@ -5,23 +5,30 @@ import ( ) type fr_BJ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_BJ' locale func New() locales.Translator { return &fr_BJ{ - locale: "fr_BJ", + locale: "fr_BJ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_BJ) Locale() string { - return l.locale +func (t *fr_BJ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_BJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_BJ' +func (t *fr_BJ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_BJ' +func (t *fr_BJ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_BL/fr_BL.go b/resources/locales/fr_BL/fr_BL.go index d6e9e65..fd0f708 100644 --- a/resources/locales/fr_BL/fr_BL.go +++ b/resources/locales/fr_BL/fr_BL.go @@ -5,23 +5,30 @@ import ( ) type fr_BL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_BL' locale func New() locales.Translator { return &fr_BL{ - locale: "fr_BL", + locale: "fr_BL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_BL) Locale() string { - return l.locale +func (t *fr_BL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_BL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_BL' +func (t *fr_BL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_BL' +func (t *fr_BL) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_CA/fr_CA.go b/resources/locales/fr_CA/fr_CA.go index 0946cfe..b2c4e01 100644 --- a/resources/locales/fr_CA/fr_CA.go +++ b/resources/locales/fr_CA/fr_CA.go @@ -5,23 +5,30 @@ import ( ) type fr_CA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_CA' locale func New() locales.Translator { return &fr_CA{ - locale: "fr_CA", + locale: "fr_CA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_CA) Locale() string { - return l.locale +func (t *fr_CA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_CA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_CA' +func (t *fr_CA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CA' +func (t *fr_CA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_CD/fr_CD.go b/resources/locales/fr_CD/fr_CD.go index 66ba4e0..ea0e934 100644 --- a/resources/locales/fr_CD/fr_CD.go +++ b/resources/locales/fr_CD/fr_CD.go @@ -5,23 +5,30 @@ import ( ) type fr_CD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_CD' locale func New() locales.Translator { return &fr_CD{ - locale: "fr_CD", + locale: "fr_CD", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_CD) Locale() string { - return l.locale +func (t *fr_CD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_CD' +func (t *fr_CD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CD' +func (t *fr_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_CF/fr_CF.go b/resources/locales/fr_CF/fr_CF.go index 7d4ceb5..3427c9d 100644 --- a/resources/locales/fr_CF/fr_CF.go +++ b/resources/locales/fr_CF/fr_CF.go @@ -5,23 +5,30 @@ import ( ) type fr_CF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_CF' locale func New() locales.Translator { return &fr_CF{ - locale: "fr_CF", + locale: "fr_CF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_CF) Locale() string { - return l.locale +func (t *fr_CF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_CF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_CF' +func (t *fr_CF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CF' +func (t *fr_CF) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_CG/fr_CG.go b/resources/locales/fr_CG/fr_CG.go index fd588c1..ed78ead 100644 --- a/resources/locales/fr_CG/fr_CG.go +++ b/resources/locales/fr_CG/fr_CG.go @@ -5,23 +5,30 @@ import ( ) type fr_CG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_CG' locale func New() locales.Translator { return &fr_CG{ - locale: "fr_CG", + locale: "fr_CG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_CG) Locale() string { - return l.locale +func (t *fr_CG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_CG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_CG' +func (t *fr_CG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CG' +func (t *fr_CG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_CH/fr_CH.go b/resources/locales/fr_CH/fr_CH.go index 3aa0c2d..65623aa 100644 --- a/resources/locales/fr_CH/fr_CH.go +++ b/resources/locales/fr_CH/fr_CH.go @@ -5,23 +5,30 @@ import ( ) type fr_CH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_CH' locale func New() locales.Translator { return &fr_CH{ - locale: "fr_CH", + locale: "fr_CH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_CH) Locale() string { - return l.locale +func (t *fr_CH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_CH' +func (t *fr_CH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CH' +func (t *fr_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_CI/fr_CI.go b/resources/locales/fr_CI/fr_CI.go index ea83c7e..666dd65 100644 --- a/resources/locales/fr_CI/fr_CI.go +++ b/resources/locales/fr_CI/fr_CI.go @@ -5,23 +5,30 @@ import ( ) type fr_CI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_CI' locale func New() locales.Translator { return &fr_CI{ - locale: "fr_CI", + locale: "fr_CI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_CI) Locale() string { - return l.locale +func (t *fr_CI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_CI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_CI' +func (t *fr_CI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CI' +func (t *fr_CI) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_CM/fr_CM.go b/resources/locales/fr_CM/fr_CM.go index 0788ead..ca59bdd 100644 --- a/resources/locales/fr_CM/fr_CM.go +++ b/resources/locales/fr_CM/fr_CM.go @@ -5,23 +5,30 @@ import ( ) type fr_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_CM' locale func New() locales.Translator { return &fr_CM{ - locale: "fr_CM", + locale: "fr_CM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_CM) Locale() string { - return l.locale +func (t *fr_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_CM' +func (t *fr_CM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CM' +func (t *fr_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_DJ/fr_DJ.go b/resources/locales/fr_DJ/fr_DJ.go index 16344b0..d9c2ee8 100644 --- a/resources/locales/fr_DJ/fr_DJ.go +++ b/resources/locales/fr_DJ/fr_DJ.go @@ -5,23 +5,30 @@ import ( ) type fr_DJ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_DJ' locale func New() locales.Translator { return &fr_DJ{ - locale: "fr_DJ", + locale: "fr_DJ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_DJ) Locale() string { - return l.locale +func (t *fr_DJ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_DJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_DJ' +func (t *fr_DJ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_DJ' +func (t *fr_DJ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_DZ/fr_DZ.go b/resources/locales/fr_DZ/fr_DZ.go index 8c8dcb6..ebb785a 100644 --- a/resources/locales/fr_DZ/fr_DZ.go +++ b/resources/locales/fr_DZ/fr_DZ.go @@ -5,23 +5,30 @@ import ( ) type fr_DZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_DZ' locale func New() locales.Translator { return &fr_DZ{ - locale: "fr_DZ", + locale: "fr_DZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_DZ) Locale() string { - return l.locale +func (t *fr_DZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_DZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_DZ' +func (t *fr_DZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_DZ' +func (t *fr_DZ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_FR/fr_FR.go b/resources/locales/fr_FR/fr_FR.go index e5f297b..1d24ccb 100644 --- a/resources/locales/fr_FR/fr_FR.go +++ b/resources/locales/fr_FR/fr_FR.go @@ -5,23 +5,30 @@ import ( ) type fr_FR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_FR' locale func New() locales.Translator { return &fr_FR{ - locale: "fr_FR", + locale: "fr_FR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_FR) Locale() string { - return l.locale +func (t *fr_FR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_FR' +func (t *fr_FR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_FR' +func (t *fr_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_GA/fr_GA.go b/resources/locales/fr_GA/fr_GA.go index bb22c01..38bd0cc 100644 --- a/resources/locales/fr_GA/fr_GA.go +++ b/resources/locales/fr_GA/fr_GA.go @@ -5,23 +5,30 @@ import ( ) type fr_GA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_GA' locale func New() locales.Translator { return &fr_GA{ - locale: "fr_GA", + locale: "fr_GA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_GA) Locale() string { - return l.locale +func (t *fr_GA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_GA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_GA' +func (t *fr_GA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_GA' +func (t *fr_GA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_GF/fr_GF.go b/resources/locales/fr_GF/fr_GF.go index 08800e6..73048b6 100644 --- a/resources/locales/fr_GF/fr_GF.go +++ b/resources/locales/fr_GF/fr_GF.go @@ -5,23 +5,30 @@ import ( ) type fr_GF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_GF' locale func New() locales.Translator { return &fr_GF{ - locale: "fr_GF", + locale: "fr_GF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_GF) Locale() string { - return l.locale +func (t *fr_GF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_GF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_GF' +func (t *fr_GF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_GF' +func (t *fr_GF) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_GN/fr_GN.go b/resources/locales/fr_GN/fr_GN.go index 1d451d8..3476c74 100644 --- a/resources/locales/fr_GN/fr_GN.go +++ b/resources/locales/fr_GN/fr_GN.go @@ -5,23 +5,30 @@ import ( ) type fr_GN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_GN' locale func New() locales.Translator { return &fr_GN{ - locale: "fr_GN", + locale: "fr_GN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_GN) Locale() string { - return l.locale +func (t *fr_GN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_GN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_GN' +func (t *fr_GN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_GN' +func (t *fr_GN) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_GP/fr_GP.go b/resources/locales/fr_GP/fr_GP.go index b2696a9..6d6044e 100644 --- a/resources/locales/fr_GP/fr_GP.go +++ b/resources/locales/fr_GP/fr_GP.go @@ -5,23 +5,30 @@ import ( ) type fr_GP struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_GP' locale func New() locales.Translator { return &fr_GP{ - locale: "fr_GP", + locale: "fr_GP", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_GP) Locale() string { - return l.locale +func (t *fr_GP) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_GP) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_GP' +func (t *fr_GP) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_GP' +func (t *fr_GP) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_GQ/fr_GQ.go b/resources/locales/fr_GQ/fr_GQ.go index a07c952..beea705 100644 --- a/resources/locales/fr_GQ/fr_GQ.go +++ b/resources/locales/fr_GQ/fr_GQ.go @@ -5,23 +5,30 @@ import ( ) type fr_GQ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_GQ' locale func New() locales.Translator { return &fr_GQ{ - locale: "fr_GQ", + locale: "fr_GQ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_GQ) Locale() string { - return l.locale +func (t *fr_GQ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_GQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_GQ' +func (t *fr_GQ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_GQ' +func (t *fr_GQ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_HT/fr_HT.go b/resources/locales/fr_HT/fr_HT.go index ac569ab..044c28d 100644 --- a/resources/locales/fr_HT/fr_HT.go +++ b/resources/locales/fr_HT/fr_HT.go @@ -5,23 +5,30 @@ import ( ) type fr_HT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_HT' locale func New() locales.Translator { return &fr_HT{ - locale: "fr_HT", + locale: "fr_HT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_HT) Locale() string { - return l.locale +func (t *fr_HT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_HT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_HT' +func (t *fr_HT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_HT' +func (t *fr_HT) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_KM/fr_KM.go b/resources/locales/fr_KM/fr_KM.go index dca8330..e3a43dd 100644 --- a/resources/locales/fr_KM/fr_KM.go +++ b/resources/locales/fr_KM/fr_KM.go @@ -5,23 +5,30 @@ import ( ) type fr_KM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_KM' locale func New() locales.Translator { return &fr_KM{ - locale: "fr_KM", + locale: "fr_KM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_KM) Locale() string { - return l.locale +func (t *fr_KM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_KM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_KM' +func (t *fr_KM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_KM' +func (t *fr_KM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_LU/fr_LU.go b/resources/locales/fr_LU/fr_LU.go index 0a1e409..0ee2a70 100644 --- a/resources/locales/fr_LU/fr_LU.go +++ b/resources/locales/fr_LU/fr_LU.go @@ -5,23 +5,30 @@ import ( ) type fr_LU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_LU' locale func New() locales.Translator { return &fr_LU{ - locale: "fr_LU", + locale: "fr_LU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_LU) Locale() string { - return l.locale +func (t *fr_LU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_LU' +func (t *fr_LU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_LU' +func (t *fr_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_MA/fr_MA.go b/resources/locales/fr_MA/fr_MA.go index 0d05c72..777c1ab 100644 --- a/resources/locales/fr_MA/fr_MA.go +++ b/resources/locales/fr_MA/fr_MA.go @@ -5,23 +5,30 @@ import ( ) type fr_MA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_MA' locale func New() locales.Translator { return &fr_MA{ - locale: "fr_MA", + locale: "fr_MA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_MA) Locale() string { - return l.locale +func (t *fr_MA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_MA' +func (t *fr_MA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MA' +func (t *fr_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_MC/fr_MC.go b/resources/locales/fr_MC/fr_MC.go index d714304..9167d1a 100644 --- a/resources/locales/fr_MC/fr_MC.go +++ b/resources/locales/fr_MC/fr_MC.go @@ -5,23 +5,30 @@ import ( ) type fr_MC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_MC' locale func New() locales.Translator { return &fr_MC{ - locale: "fr_MC", + locale: "fr_MC", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_MC) Locale() string { - return l.locale +func (t *fr_MC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_MC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_MC' +func (t *fr_MC) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MC' +func (t *fr_MC) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_MF/fr_MF.go b/resources/locales/fr_MF/fr_MF.go index 839725b..ca64376 100644 --- a/resources/locales/fr_MF/fr_MF.go +++ b/resources/locales/fr_MF/fr_MF.go @@ -5,23 +5,30 @@ import ( ) type fr_MF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_MF' locale func New() locales.Translator { return &fr_MF{ - locale: "fr_MF", + locale: "fr_MF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_MF) Locale() string { - return l.locale +func (t *fr_MF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_MF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_MF' +func (t *fr_MF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MF' +func (t *fr_MF) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_MG/fr_MG.go b/resources/locales/fr_MG/fr_MG.go index b15ce6d..9893155 100644 --- a/resources/locales/fr_MG/fr_MG.go +++ b/resources/locales/fr_MG/fr_MG.go @@ -5,23 +5,30 @@ import ( ) type fr_MG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_MG' locale func New() locales.Translator { return &fr_MG{ - locale: "fr_MG", + locale: "fr_MG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_MG) Locale() string { - return l.locale +func (t *fr_MG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_MG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_MG' +func (t *fr_MG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MG' +func (t *fr_MG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_ML/fr_ML.go b/resources/locales/fr_ML/fr_ML.go index 7200123..dc9d186 100644 --- a/resources/locales/fr_ML/fr_ML.go +++ b/resources/locales/fr_ML/fr_ML.go @@ -5,23 +5,30 @@ import ( ) type fr_ML struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_ML' locale func New() locales.Translator { return &fr_ML{ - locale: "fr_ML", + locale: "fr_ML", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_ML) Locale() string { - return l.locale +func (t *fr_ML) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_ML' +func (t *fr_ML) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_ML' +func (t *fr_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_MQ/fr_MQ.go b/resources/locales/fr_MQ/fr_MQ.go index 77a6f46..4c4cb91 100644 --- a/resources/locales/fr_MQ/fr_MQ.go +++ b/resources/locales/fr_MQ/fr_MQ.go @@ -5,23 +5,30 @@ import ( ) type fr_MQ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_MQ' locale func New() locales.Translator { return &fr_MQ{ - locale: "fr_MQ", + locale: "fr_MQ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_MQ) Locale() string { - return l.locale +func (t *fr_MQ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_MQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_MQ' +func (t *fr_MQ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MQ' +func (t *fr_MQ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_MR/fr_MR.go b/resources/locales/fr_MR/fr_MR.go index 9d3f80b..43248e9 100644 --- a/resources/locales/fr_MR/fr_MR.go +++ b/resources/locales/fr_MR/fr_MR.go @@ -5,23 +5,30 @@ import ( ) type fr_MR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_MR' locale func New() locales.Translator { return &fr_MR{ - locale: "fr_MR", + locale: "fr_MR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_MR) Locale() string { - return l.locale +func (t *fr_MR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_MR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_MR' +func (t *fr_MR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MR' +func (t *fr_MR) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_MU/fr_MU.go b/resources/locales/fr_MU/fr_MU.go index 81dbfde..5801898 100644 --- a/resources/locales/fr_MU/fr_MU.go +++ b/resources/locales/fr_MU/fr_MU.go @@ -5,23 +5,30 @@ import ( ) type fr_MU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_MU' locale func New() locales.Translator { return &fr_MU{ - locale: "fr_MU", + locale: "fr_MU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_MU) Locale() string { - return l.locale +func (t *fr_MU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_MU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_MU' +func (t *fr_MU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MU' +func (t *fr_MU) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_NC/fr_NC.go b/resources/locales/fr_NC/fr_NC.go index ec90baa..18dd0dd 100644 --- a/resources/locales/fr_NC/fr_NC.go +++ b/resources/locales/fr_NC/fr_NC.go @@ -5,23 +5,30 @@ import ( ) type fr_NC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_NC' locale func New() locales.Translator { return &fr_NC{ - locale: "fr_NC", + locale: "fr_NC", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_NC) Locale() string { - return l.locale +func (t *fr_NC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_NC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_NC' +func (t *fr_NC) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_NC' +func (t *fr_NC) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_NE/fr_NE.go b/resources/locales/fr_NE/fr_NE.go index 099f6a0..913a2c8 100644 --- a/resources/locales/fr_NE/fr_NE.go +++ b/resources/locales/fr_NE/fr_NE.go @@ -5,23 +5,30 @@ import ( ) type fr_NE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_NE' locale func New() locales.Translator { return &fr_NE{ - locale: "fr_NE", + locale: "fr_NE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_NE) Locale() string { - return l.locale +func (t *fr_NE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_NE' +func (t *fr_NE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_NE' +func (t *fr_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_PF/fr_PF.go b/resources/locales/fr_PF/fr_PF.go index 3fb9f89..756caaf 100644 --- a/resources/locales/fr_PF/fr_PF.go +++ b/resources/locales/fr_PF/fr_PF.go @@ -5,23 +5,30 @@ import ( ) type fr_PF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_PF' locale func New() locales.Translator { return &fr_PF{ - locale: "fr_PF", + locale: "fr_PF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_PF) Locale() string { - return l.locale +func (t *fr_PF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_PF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_PF' +func (t *fr_PF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_PF' +func (t *fr_PF) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_PM/fr_PM.go b/resources/locales/fr_PM/fr_PM.go index b849524..75226d7 100644 --- a/resources/locales/fr_PM/fr_PM.go +++ b/resources/locales/fr_PM/fr_PM.go @@ -5,23 +5,30 @@ import ( ) type fr_PM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_PM' locale func New() locales.Translator { return &fr_PM{ - locale: "fr_PM", + locale: "fr_PM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_PM) Locale() string { - return l.locale +func (t *fr_PM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_PM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_PM' +func (t *fr_PM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_PM' +func (t *fr_PM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_RE/fr_RE.go b/resources/locales/fr_RE/fr_RE.go index 9b5d763..fded84b 100644 --- a/resources/locales/fr_RE/fr_RE.go +++ b/resources/locales/fr_RE/fr_RE.go @@ -5,23 +5,30 @@ import ( ) type fr_RE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_RE' locale func New() locales.Translator { return &fr_RE{ - locale: "fr_RE", + locale: "fr_RE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_RE) Locale() string { - return l.locale +func (t *fr_RE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_RE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_RE' +func (t *fr_RE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_RE' +func (t *fr_RE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_RW/fr_RW.go b/resources/locales/fr_RW/fr_RW.go index 1252086..18a3224 100644 --- a/resources/locales/fr_RW/fr_RW.go +++ b/resources/locales/fr_RW/fr_RW.go @@ -5,23 +5,30 @@ import ( ) type fr_RW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_RW' locale func New() locales.Translator { return &fr_RW{ - locale: "fr_RW", + locale: "fr_RW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_RW) Locale() string { - return l.locale +func (t *fr_RW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_RW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_RW' +func (t *fr_RW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_RW' +func (t *fr_RW) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_SC/fr_SC.go b/resources/locales/fr_SC/fr_SC.go index 8e14ee1..fbb2ef7 100644 --- a/resources/locales/fr_SC/fr_SC.go +++ b/resources/locales/fr_SC/fr_SC.go @@ -5,23 +5,30 @@ import ( ) type fr_SC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_SC' locale func New() locales.Translator { return &fr_SC{ - locale: "fr_SC", + locale: "fr_SC", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_SC) Locale() string { - return l.locale +func (t *fr_SC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_SC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_SC' +func (t *fr_SC) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_SC' +func (t *fr_SC) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_SN/fr_SN.go b/resources/locales/fr_SN/fr_SN.go index ef49315..672e0b3 100644 --- a/resources/locales/fr_SN/fr_SN.go +++ b/resources/locales/fr_SN/fr_SN.go @@ -5,23 +5,30 @@ import ( ) type fr_SN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_SN' locale func New() locales.Translator { return &fr_SN{ - locale: "fr_SN", + locale: "fr_SN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_SN) Locale() string { - return l.locale +func (t *fr_SN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_SN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_SN' +func (t *fr_SN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_SN' +func (t *fr_SN) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_SY/fr_SY.go b/resources/locales/fr_SY/fr_SY.go index dc0eada..0872081 100644 --- a/resources/locales/fr_SY/fr_SY.go +++ b/resources/locales/fr_SY/fr_SY.go @@ -5,23 +5,30 @@ import ( ) type fr_SY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_SY' locale func New() locales.Translator { return &fr_SY{ - locale: "fr_SY", + locale: "fr_SY", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_SY) Locale() string { - return l.locale +func (t *fr_SY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_SY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_SY' +func (t *fr_SY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_SY' +func (t *fr_SY) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_TD/fr_TD.go b/resources/locales/fr_TD/fr_TD.go index a35c7f7..af18e29 100644 --- a/resources/locales/fr_TD/fr_TD.go +++ b/resources/locales/fr_TD/fr_TD.go @@ -5,23 +5,30 @@ import ( ) type fr_TD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_TD' locale func New() locales.Translator { return &fr_TD{ - locale: "fr_TD", + locale: "fr_TD", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_TD) Locale() string { - return l.locale +func (t *fr_TD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_TD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_TD' +func (t *fr_TD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_TD' +func (t *fr_TD) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_TG/fr_TG.go b/resources/locales/fr_TG/fr_TG.go index a38e26a..9ec900a 100644 --- a/resources/locales/fr_TG/fr_TG.go +++ b/resources/locales/fr_TG/fr_TG.go @@ -5,23 +5,30 @@ import ( ) type fr_TG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_TG' locale func New() locales.Translator { return &fr_TG{ - locale: "fr_TG", + locale: "fr_TG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_TG) Locale() string { - return l.locale +func (t *fr_TG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_TG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_TG' +func (t *fr_TG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_TG' +func (t *fr_TG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_TN/fr_TN.go b/resources/locales/fr_TN/fr_TN.go index 6ce3ab1..7a0981f 100644 --- a/resources/locales/fr_TN/fr_TN.go +++ b/resources/locales/fr_TN/fr_TN.go @@ -5,23 +5,30 @@ import ( ) type fr_TN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_TN' locale func New() locales.Translator { return &fr_TN{ - locale: "fr_TN", + locale: "fr_TN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_TN) Locale() string { - return l.locale +func (t *fr_TN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_TN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_TN' +func (t *fr_TN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_TN' +func (t *fr_TN) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_VU/fr_VU.go b/resources/locales/fr_VU/fr_VU.go index e5523a5..311e11d 100644 --- a/resources/locales/fr_VU/fr_VU.go +++ b/resources/locales/fr_VU/fr_VU.go @@ -5,23 +5,30 @@ import ( ) type fr_VU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_VU' locale func New() locales.Translator { return &fr_VU{ - locale: "fr_VU", + locale: "fr_VU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_VU) Locale() string { - return l.locale +func (t *fr_VU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_VU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_VU' +func (t *fr_VU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_VU' +func (t *fr_VU) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_WF/fr_WF.go b/resources/locales/fr_WF/fr_WF.go index c803bac..fe6bea6 100644 --- a/resources/locales/fr_WF/fr_WF.go +++ b/resources/locales/fr_WF/fr_WF.go @@ -5,23 +5,30 @@ import ( ) type fr_WF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_WF' locale func New() locales.Translator { return &fr_WF{ - locale: "fr_WF", + locale: "fr_WF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_WF) Locale() string { - return l.locale +func (t *fr_WF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_WF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_WF' +func (t *fr_WF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_WF' +func (t *fr_WF) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fr_YT/fr_YT.go b/resources/locales/fr_YT/fr_YT.go index 13557df..1af62c2 100644 --- a/resources/locales/fr_YT/fr_YT.go +++ b/resources/locales/fr_YT/fr_YT.go @@ -5,23 +5,30 @@ import ( ) type fr_YT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fr_YT' locale func New() locales.Translator { return &fr_YT{ - locale: "fr_YT", + locale: "fr_YT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fr_YT) Locale() string { - return l.locale +func (t *fr_YT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fr_YT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fr_YT' +func (t *fr_YT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fr_YT' +func (t *fr_YT) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fur/fur.go b/resources/locales/fur/fur.go index 3fcb90d..b16ee1a 100644 --- a/resources/locales/fur/fur.go +++ b/resources/locales/fur/fur.go @@ -5,23 +5,30 @@ import ( ) type fur struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fur' locale func New() locales.Translator { return &fur{ - locale: "fur", + locale: "fur", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fur) Locale() string { - return l.locale +func (t *fur) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fur) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fur' +func (t *fur) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fur' +func (t *fur) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/fur_IT/fur_IT.go b/resources/locales/fur_IT/fur_IT.go index 952d6c7..e296a43 100644 --- a/resources/locales/fur_IT/fur_IT.go +++ b/resources/locales/fur_IT/fur_IT.go @@ -5,23 +5,30 @@ import ( ) type fur_IT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fur_IT' locale func New() locales.Translator { return &fur_IT{ - locale: "fur_IT", + locale: "fur_IT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fur_IT) Locale() string { - return l.locale +func (t *fur_IT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fur_IT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fur_IT' +func (t *fur_IT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fur_IT' +func (t *fur_IT) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/fy/fy.go b/resources/locales/fy/fy.go index 1623424..e486030 100644 --- a/resources/locales/fy/fy.go +++ b/resources/locales/fy/fy.go @@ -5,23 +5,30 @@ import ( ) type fy struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fy' locale func New() locales.Translator { return &fy{ - locale: "fy", + locale: "fy", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fy) Locale() string { - return l.locale +func (t *fy) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fy) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fy' +func (t *fy) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fy' +func (t *fy) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/fy_NL/fy_NL.go b/resources/locales/fy_NL/fy_NL.go index 1f4bfb5..b959260 100644 --- a/resources/locales/fy_NL/fy_NL.go +++ b/resources/locales/fy_NL/fy_NL.go @@ -5,31 +5,38 @@ import ( ) type fy_NL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'fy_NL' locale func New() locales.Translator { return &fy_NL{ - locale: "fy_NL", + locale: "fy_NL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *fy_NL) Locale() string { - return l.locale +func (t *fy_NL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *fy_NL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'fy_NL' +func (t *fy_NL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'fy_NL' +func (t *fy_NL) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/ga/ga.go b/resources/locales/ga/ga.go index 910ca76..66d78c7 100644 --- a/resources/locales/ga/ga.go +++ b/resources/locales/ga/ga.go @@ -5,23 +5,30 @@ import ( ) type ga struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ga' locale func New() locales.Translator { return &ga{ - locale: "ga", + locale: "ga", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ga) Locale() string { - return l.locale +func (t *ga) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ga) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ga' +func (t *ga) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ga' +func (t *ga) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ga_IE/ga_IE.go b/resources/locales/ga_IE/ga_IE.go index d460ce8..d6dc8b4 100644 --- a/resources/locales/ga_IE/ga_IE.go +++ b/resources/locales/ga_IE/ga_IE.go @@ -5,23 +5,30 @@ import ( ) type ga_IE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ga_IE' locale func New() locales.Translator { return &ga_IE{ - locale: "ga_IE", + locale: "ga_IE", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ga_IE) Locale() string { - return l.locale +func (t *ga_IE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ga_IE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ga_IE' +func (t *ga_IE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ga_IE' +func (t *ga_IE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/gd/gd.go b/resources/locales/gd/gd.go index d6d8cf4..39729fd 100644 --- a/resources/locales/gd/gd.go +++ b/resources/locales/gd/gd.go @@ -5,23 +5,30 @@ import ( ) type gd struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gd' locale func New() locales.Translator { return &gd{ - locale: "gd", + locale: "gd", + plurals: []locales.PluralRule{2, 3, 4, 6}, } } // Locale returns the current translators string locale -func (l *gd) Locale() string { - return l.locale +func (t *gd) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gd) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gd' +func (t *gd) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'gd' +func (t *gd) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/gd_GB/gd_GB.go b/resources/locales/gd_GB/gd_GB.go index 2c5bfba..af2106c 100644 --- a/resources/locales/gd_GB/gd_GB.go +++ b/resources/locales/gd_GB/gd_GB.go @@ -5,23 +5,30 @@ import ( ) type gd_GB struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gd_GB' locale func New() locales.Translator { return &gd_GB{ - locale: "gd_GB", + locale: "gd_GB", + plurals: []locales.PluralRule{2, 3, 4, 6}, } } // Locale returns the current translators string locale -func (l *gd_GB) Locale() string { - return l.locale +func (t *gd_GB) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gd_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gd_GB' +func (t *gd_GB) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'gd_GB' +func (t *gd_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/gl/gl.go b/resources/locales/gl/gl.go index 7857e59..be9f33f 100644 --- a/resources/locales/gl/gl.go +++ b/resources/locales/gl/gl.go @@ -5,23 +5,30 @@ import ( ) type gl struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gl' locale func New() locales.Translator { return &gl{ - locale: "gl", + locale: "gl", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *gl) Locale() string { - return l.locale +func (t *gl) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gl' +func (t *gl) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'gl' +func (t *gl) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/gl_ES/gl_ES.go b/resources/locales/gl_ES/gl_ES.go index 47656ee..c4fdba2 100644 --- a/resources/locales/gl_ES/gl_ES.go +++ b/resources/locales/gl_ES/gl_ES.go @@ -5,31 +5,38 @@ import ( ) type gl_ES struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gl_ES' locale func New() locales.Translator { return &gl_ES{ - locale: "gl_ES", + locale: "gl_ES", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *gl_ES) Locale() string { - return l.locale +func (t *gl_ES) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gl_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gl_ES' +func (t *gl_ES) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'gl_ES' +func (t *gl_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/gsw/gsw.go b/resources/locales/gsw/gsw.go index 48afabe..23eb441 100644 --- a/resources/locales/gsw/gsw.go +++ b/resources/locales/gsw/gsw.go @@ -5,23 +5,30 @@ import ( ) type gsw struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gsw' locale func New() locales.Translator { return &gsw{ - locale: "gsw", + locale: "gsw", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *gsw) Locale() string { - return l.locale +func (t *gsw) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gsw) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gsw' +func (t *gsw) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'gsw' +func (t *gsw) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/gsw_CH/gsw_CH.go b/resources/locales/gsw_CH/gsw_CH.go index 21a858d..15a69db 100644 --- a/resources/locales/gsw_CH/gsw_CH.go +++ b/resources/locales/gsw_CH/gsw_CH.go @@ -5,23 +5,30 @@ import ( ) type gsw_CH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gsw_CH' locale func New() locales.Translator { return &gsw_CH{ - locale: "gsw_CH", + locale: "gsw_CH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *gsw_CH) Locale() string { - return l.locale +func (t *gsw_CH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gsw_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gsw_CH' +func (t *gsw_CH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'gsw_CH' +func (t *gsw_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/gsw_FR/gsw_FR.go b/resources/locales/gsw_FR/gsw_FR.go index e728ff3..d90d48e 100644 --- a/resources/locales/gsw_FR/gsw_FR.go +++ b/resources/locales/gsw_FR/gsw_FR.go @@ -5,23 +5,30 @@ import ( ) type gsw_FR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gsw_FR' locale func New() locales.Translator { return &gsw_FR{ - locale: "gsw_FR", + locale: "gsw_FR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *gsw_FR) Locale() string { - return l.locale +func (t *gsw_FR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gsw_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gsw_FR' +func (t *gsw_FR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'gsw_FR' +func (t *gsw_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/gsw_LI/gsw_LI.go b/resources/locales/gsw_LI/gsw_LI.go index 296f77d..c4c6fc9 100644 --- a/resources/locales/gsw_LI/gsw_LI.go +++ b/resources/locales/gsw_LI/gsw_LI.go @@ -5,23 +5,30 @@ import ( ) type gsw_LI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gsw_LI' locale func New() locales.Translator { return &gsw_LI{ - locale: "gsw_LI", + locale: "gsw_LI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *gsw_LI) Locale() string { - return l.locale +func (t *gsw_LI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gsw_LI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gsw_LI' +func (t *gsw_LI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'gsw_LI' +func (t *gsw_LI) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/gu/gu.go b/resources/locales/gu/gu.go index ca15d5a..e466001 100644 --- a/resources/locales/gu/gu.go +++ b/resources/locales/gu/gu.go @@ -5,30 +5,37 @@ import ( ) type gu struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gu' locale func New() locales.Translator { return &gu{ - locale: "gu", + locale: "gu", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *gu) Locale() string { - return l.locale +func (t *gu) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gu' +func (t *gu) Plurals() []locales.PluralRule { + return t.plurals +} - n, err := locales.N(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'gu' +func (t *gu) CardinalPluralRule(num string) (locales.PluralRule, error) { + + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - i, err := locales.I(num) + n, err := locales.N(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } diff --git a/resources/locales/gu_IN/gu_IN.go b/resources/locales/gu_IN/gu_IN.go index 2631b10..c725c83 100644 --- a/resources/locales/gu_IN/gu_IN.go +++ b/resources/locales/gu_IN/gu_IN.go @@ -5,23 +5,30 @@ import ( ) type gu_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gu_IN' locale func New() locales.Translator { return &gu_IN{ - locale: "gu_IN", + locale: "gu_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *gu_IN) Locale() string { - return l.locale +func (t *gu_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gu_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gu_IN' +func (t *gu_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'gu_IN' +func (t *gu_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/guz/guz.go b/resources/locales/guz/guz.go index e984140..2aa863f 100644 --- a/resources/locales/guz/guz.go +++ b/resources/locales/guz/guz.go @@ -5,22 +5,29 @@ import ( ) type guz struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'guz' locale func New() locales.Translator { return &guz{ - locale: "guz", + locale: "guz", + plurals: nil, } } // Locale returns the current translators string locale -func (l *guz) Locale() string { - return l.locale +func (t *guz) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *guz) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'guz' +func (t *guz) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'guz' +func (t *guz) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/guz_KE/guz_KE.go b/resources/locales/guz_KE/guz_KE.go index 639c266..defa9d3 100644 --- a/resources/locales/guz_KE/guz_KE.go +++ b/resources/locales/guz_KE/guz_KE.go @@ -5,22 +5,29 @@ import ( ) type guz_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'guz_KE' locale func New() locales.Translator { return &guz_KE{ - locale: "guz_KE", + locale: "guz_KE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *guz_KE) Locale() string { - return l.locale +func (t *guz_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *guz_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'guz_KE' +func (t *guz_KE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'guz_KE' +func (t *guz_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/gv/gv.go b/resources/locales/gv/gv.go index 7da8994..a7244cb 100644 --- a/resources/locales/gv/gv.go +++ b/resources/locales/gv/gv.go @@ -5,23 +5,30 @@ import ( ) type gv struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gv' locale func New() locales.Translator { return &gv{ - locale: "gv", + locale: "gv", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *gv) Locale() string { - return l.locale +func (t *gv) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gv) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gv' +func (t *gv) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'gv' +func (t *gv) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/gv_IM/gv_IM.go b/resources/locales/gv_IM/gv_IM.go index c18da9f..159e596 100644 --- a/resources/locales/gv_IM/gv_IM.go +++ b/resources/locales/gv_IM/gv_IM.go @@ -5,23 +5,30 @@ import ( ) type gv_IM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'gv_IM' locale func New() locales.Translator { return &gv_IM{ - locale: "gv_IM", + locale: "gv_IM", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *gv_IM) Locale() string { - return l.locale +func (t *gv_IM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *gv_IM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'gv_IM' +func (t *gv_IM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'gv_IM' +func (t *gv_IM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ha/ha.go b/resources/locales/ha/ha.go index bf39bdf..21bceb5 100644 --- a/resources/locales/ha/ha.go +++ b/resources/locales/ha/ha.go @@ -5,23 +5,30 @@ import ( ) type ha struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ha' locale func New() locales.Translator { return &ha{ - locale: "ha", + locale: "ha", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ha) Locale() string { - return l.locale +func (t *ha) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ha) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ha' +func (t *ha) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ha' +func (t *ha) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ha_GH/ha_GH.go b/resources/locales/ha_GH/ha_GH.go index 9e38fb1..e556727 100644 --- a/resources/locales/ha_GH/ha_GH.go +++ b/resources/locales/ha_GH/ha_GH.go @@ -5,23 +5,30 @@ import ( ) type ha_GH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ha_GH' locale func New() locales.Translator { return &ha_GH{ - locale: "ha_GH", + locale: "ha_GH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ha_GH) Locale() string { - return l.locale +func (t *ha_GH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ha_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ha_GH' +func (t *ha_GH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ha_GH' +func (t *ha_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ha_NE/ha_NE.go b/resources/locales/ha_NE/ha_NE.go index 3068423..f58d678 100644 --- a/resources/locales/ha_NE/ha_NE.go +++ b/resources/locales/ha_NE/ha_NE.go @@ -5,23 +5,30 @@ import ( ) type ha_NE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ha_NE' locale func New() locales.Translator { return &ha_NE{ - locale: "ha_NE", + locale: "ha_NE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ha_NE) Locale() string { - return l.locale +func (t *ha_NE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ha_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ha_NE' +func (t *ha_NE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ha_NE' +func (t *ha_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ha_NG/ha_NG.go b/resources/locales/ha_NG/ha_NG.go index 24f9d79..48ed0c4 100644 --- a/resources/locales/ha_NG/ha_NG.go +++ b/resources/locales/ha_NG/ha_NG.go @@ -5,23 +5,30 @@ import ( ) type ha_NG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ha_NG' locale func New() locales.Translator { return &ha_NG{ - locale: "ha_NG", + locale: "ha_NG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ha_NG) Locale() string { - return l.locale +func (t *ha_NG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ha_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ha_NG' +func (t *ha_NG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ha_NG' +func (t *ha_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/haw/haw.go b/resources/locales/haw/haw.go index 45fb1ef..0ab494e 100644 --- a/resources/locales/haw/haw.go +++ b/resources/locales/haw/haw.go @@ -5,23 +5,30 @@ import ( ) type haw struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'haw' locale func New() locales.Translator { return &haw{ - locale: "haw", + locale: "haw", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *haw) Locale() string { - return l.locale +func (t *haw) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *haw) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'haw' +func (t *haw) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'haw' +func (t *haw) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/haw_US/haw_US.go b/resources/locales/haw_US/haw_US.go index 06db245..8e20426 100644 --- a/resources/locales/haw_US/haw_US.go +++ b/resources/locales/haw_US/haw_US.go @@ -5,23 +5,30 @@ import ( ) type haw_US struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'haw_US' locale func New() locales.Translator { return &haw_US{ - locale: "haw_US", + locale: "haw_US", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *haw_US) Locale() string { - return l.locale +func (t *haw_US) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *haw_US) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'haw_US' +func (t *haw_US) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'haw_US' +func (t *haw_US) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/he/he.go b/resources/locales/he/he.go index 438435f..b8fc4bb 100644 --- a/resources/locales/he/he.go +++ b/resources/locales/he/he.go @@ -5,23 +5,30 @@ import ( ) type he struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'he' locale func New() locales.Translator { return &he{ - locale: "he", + locale: "he", + plurals: []locales.PluralRule{2, 3, 5, 6}, } } // Locale returns the current translators string locale -func (l *he) Locale() string { - return l.locale +func (t *he) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *he) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'he' +func (t *he) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'he' +func (t *he) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/he_IL/he_IL.go b/resources/locales/he_IL/he_IL.go index 95a7122..3f78471 100644 --- a/resources/locales/he_IL/he_IL.go +++ b/resources/locales/he_IL/he_IL.go @@ -5,28 +5,30 @@ import ( ) type he_IL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'he_IL' locale func New() locales.Translator { return &he_IL{ - locale: "he_IL", + locale: "he_IL", + plurals: []locales.PluralRule{2, 3, 5, 6}, } } // Locale returns the current translators string locale -func (l *he_IL) Locale() string { - return l.locale +func (t *he_IL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *he_IL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'he_IL' +func (t *he_IL) Plurals() []locales.PluralRule { + return t.plurals +} - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// CardinalPluralRule returns the PluralRule given 'num' for 'he_IL' +func (t *he_IL) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { @@ -35,6 +37,11 @@ func (l *he_IL) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) + n, err := locales.N(num) + if err != nil { + return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} + } + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } else if i == 2 && v == 0 { diff --git a/resources/locales/hi/hi.go b/resources/locales/hi/hi.go index 13cf0c6..6995680 100644 --- a/resources/locales/hi/hi.go +++ b/resources/locales/hi/hi.go @@ -5,30 +5,37 @@ import ( ) type hi struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hi' locale func New() locales.Translator { return &hi{ - locale: "hi", + locale: "hi", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *hi) Locale() string { - return l.locale +func (t *hi) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hi) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hi' +func (t *hi) Plurals() []locales.PluralRule { + return t.plurals +} - n, err := locales.N(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'hi' +func (t *hi) CardinalPluralRule(num string) (locales.PluralRule, error) { + + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - i, err := locales.I(num) + n, err := locales.N(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } diff --git a/resources/locales/hi_IN/hi_IN.go b/resources/locales/hi_IN/hi_IN.go index 653a48d..dd99a8a 100644 --- a/resources/locales/hi_IN/hi_IN.go +++ b/resources/locales/hi_IN/hi_IN.go @@ -5,23 +5,30 @@ import ( ) type hi_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hi_IN' locale func New() locales.Translator { return &hi_IN{ - locale: "hi_IN", + locale: "hi_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *hi_IN) Locale() string { - return l.locale +func (t *hi_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hi_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hi_IN' +func (t *hi_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'hi_IN' +func (t *hi_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/hr/hr.go b/resources/locales/hr/hr.go index e3e0d76..e0d1918 100644 --- a/resources/locales/hr/hr.go +++ b/resources/locales/hr/hr.go @@ -5,23 +5,30 @@ import ( ) type hr struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hr' locale func New() locales.Translator { return &hr{ - locale: "hr", + locale: "hr", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *hr) Locale() string { - return l.locale +func (t *hr) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hr) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hr' +func (t *hr) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'hr' +func (t *hr) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/hr_BA/hr_BA.go b/resources/locales/hr_BA/hr_BA.go index 86292ae..1ac6af0 100644 --- a/resources/locales/hr_BA/hr_BA.go +++ b/resources/locales/hr_BA/hr_BA.go @@ -5,23 +5,30 @@ import ( ) type hr_BA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hr_BA' locale func New() locales.Translator { return &hr_BA{ - locale: "hr_BA", + locale: "hr_BA", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *hr_BA) Locale() string { - return l.locale +func (t *hr_BA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hr_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hr_BA' +func (t *hr_BA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'hr_BA' +func (t *hr_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) diff --git a/resources/locales/hr_HR/hr_HR.go b/resources/locales/hr_HR/hr_HR.go index c291d5d..ca5826a 100644 --- a/resources/locales/hr_HR/hr_HR.go +++ b/resources/locales/hr_HR/hr_HR.go @@ -5,36 +5,43 @@ import ( ) type hr_HR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hr_HR' locale func New() locales.Translator { return &hr_HR{ - locale: "hr_HR", + locale: "hr_HR", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *hr_HR) Locale() string { - return l.locale +func (t *hr_HR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hr_HR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hr_HR' +func (t *hr_HR) Plurals() []locales.PluralRule { + return t.plurals +} - i, err := locales.I(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'hr_HR' +func (t *hr_HR) CardinalPluralRule(num string) (locales.PluralRule, error) { + + f, err := locales.F(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - - f, err := locales.F(num) + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { return locales.PluralRuleOne, nil } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { diff --git a/resources/locales/hsb/hsb.go b/resources/locales/hsb/hsb.go index 70487cd..1308396 100644 --- a/resources/locales/hsb/hsb.go +++ b/resources/locales/hsb/hsb.go @@ -5,23 +5,32 @@ import ( ) type hsb struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hsb' locale func New() locales.Translator { return &hsb{ - locale: "hsb", + locale: "hsb", + plurals: []locales.PluralRule{2, 3, 4, 6}, } } // Locale returns the current translators string locale -func (l *hsb) Locale() string { - return l.locale +func (t *hsb) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hsb) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hsb' +func (t *hsb) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'hsb' +func (t *hsb) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) f, err := locales.F(num) if err != nil { @@ -33,8 +42,6 @@ func (l *hsb) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if (v == 0 && i%100 == 1) || (f%100 == 1) { return locales.PluralRuleOne, nil } else if (v == 0 && i%100 == 2) || (f%100 == 2) { diff --git a/resources/locales/hsb_DE/hsb_DE.go b/resources/locales/hsb_DE/hsb_DE.go index 2fc451f..ae51764 100644 --- a/resources/locales/hsb_DE/hsb_DE.go +++ b/resources/locales/hsb_DE/hsb_DE.go @@ -5,32 +5,39 @@ import ( ) type hsb_DE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hsb_DE' locale func New() locales.Translator { return &hsb_DE{ - locale: "hsb_DE", + locale: "hsb_DE", + plurals: []locales.PluralRule{2, 3, 4, 6}, } } // Locale returns the current translators string locale -func (l *hsb_DE) Locale() string { - return l.locale +func (t *hsb_DE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hsb_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hsb_DE' +func (t *hsb_DE) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'hsb_DE' +func (t *hsb_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { - f, err := locales.F(num) + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - i, err := locales.I(num) + v := locales.V(num) + + f, err := locales.F(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } diff --git a/resources/locales/hu/hu.go b/resources/locales/hu/hu.go index 5e83ed8..7c62bf6 100644 --- a/resources/locales/hu/hu.go +++ b/resources/locales/hu/hu.go @@ -5,23 +5,30 @@ import ( ) type hu struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hu' locale func New() locales.Translator { return &hu{ - locale: "hu", + locale: "hu", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *hu) Locale() string { - return l.locale +func (t *hu) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hu' +func (t *hu) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'hu' +func (t *hu) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/hu_HU/hu_HU.go b/resources/locales/hu_HU/hu_HU.go index 4dc6438..e124bd6 100644 --- a/resources/locales/hu_HU/hu_HU.go +++ b/resources/locales/hu_HU/hu_HU.go @@ -5,23 +5,30 @@ import ( ) type hu_HU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hu_HU' locale func New() locales.Translator { return &hu_HU{ - locale: "hu_HU", + locale: "hu_HU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *hu_HU) Locale() string { - return l.locale +func (t *hu_HU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hu_HU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hu_HU' +func (t *hu_HU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'hu_HU' +func (t *hu_HU) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/hy/hy.go b/resources/locales/hy/hy.go index 3eee7f3..06f2fd2 100644 --- a/resources/locales/hy/hy.go +++ b/resources/locales/hy/hy.go @@ -5,23 +5,30 @@ import ( ) type hy struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hy' locale func New() locales.Translator { return &hy{ - locale: "hy", + locale: "hy", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *hy) Locale() string { - return l.locale +func (t *hy) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hy) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hy' +func (t *hy) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'hy' +func (t *hy) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/hy_AM/hy_AM.go b/resources/locales/hy_AM/hy_AM.go index 8d64f6a..7fae512 100644 --- a/resources/locales/hy_AM/hy_AM.go +++ b/resources/locales/hy_AM/hy_AM.go @@ -5,23 +5,30 @@ import ( ) type hy_AM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'hy_AM' locale func New() locales.Translator { return &hy_AM{ - locale: "hy_AM", + locale: "hy_AM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *hy_AM) Locale() string { - return l.locale +func (t *hy_AM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *hy_AM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'hy_AM' +func (t *hy_AM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'hy_AM' +func (t *hy_AM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/id/id.go b/resources/locales/id/id.go index 7318ebc..0596a7d 100644 --- a/resources/locales/id/id.go +++ b/resources/locales/id/id.go @@ -5,23 +5,30 @@ import ( ) type id struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'id' locale func New() locales.Translator { return &id{ - locale: "id", + locale: "id", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *id) Locale() string { - return l.locale +func (t *id) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *id) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'id' +func (t *id) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'id' +func (t *id) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/id_ID/id_ID.go b/resources/locales/id_ID/id_ID.go index a6015b7..443c008 100644 --- a/resources/locales/id_ID/id_ID.go +++ b/resources/locales/id_ID/id_ID.go @@ -5,23 +5,30 @@ import ( ) type id_ID struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'id_ID' locale func New() locales.Translator { return &id_ID{ - locale: "id_ID", + locale: "id_ID", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *id_ID) Locale() string { - return l.locale +func (t *id_ID) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *id_ID) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'id_ID' +func (t *id_ID) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'id_ID' +func (t *id_ID) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ig/ig.go b/resources/locales/ig/ig.go index 9ec31d4..bdb3269 100644 --- a/resources/locales/ig/ig.go +++ b/resources/locales/ig/ig.go @@ -5,23 +5,30 @@ import ( ) type ig struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ig' locale func New() locales.Translator { return &ig{ - locale: "ig", + locale: "ig", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ig) Locale() string { - return l.locale +func (t *ig) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ig) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ig' +func (t *ig) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ig' +func (t *ig) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ig_NG/ig_NG.go b/resources/locales/ig_NG/ig_NG.go index f271bcd..b1330af 100644 --- a/resources/locales/ig_NG/ig_NG.go +++ b/resources/locales/ig_NG/ig_NG.go @@ -5,23 +5,30 @@ import ( ) type ig_NG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ig_NG' locale func New() locales.Translator { return &ig_NG{ - locale: "ig_NG", + locale: "ig_NG", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ig_NG) Locale() string { - return l.locale +func (t *ig_NG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ig_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ig_NG' +func (t *ig_NG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ig_NG' +func (t *ig_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ii/ii.go b/resources/locales/ii/ii.go index 0fe684a..302c1b8 100644 --- a/resources/locales/ii/ii.go +++ b/resources/locales/ii/ii.go @@ -5,23 +5,30 @@ import ( ) type ii struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ii' locale func New() locales.Translator { return &ii{ - locale: "ii", + locale: "ii", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ii) Locale() string { - return l.locale +func (t *ii) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ii) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ii' +func (t *ii) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ii' +func (t *ii) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ii_CN/ii_CN.go b/resources/locales/ii_CN/ii_CN.go index 41b467e..b5e3c71 100644 --- a/resources/locales/ii_CN/ii_CN.go +++ b/resources/locales/ii_CN/ii_CN.go @@ -5,23 +5,30 @@ import ( ) type ii_CN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ii_CN' locale func New() locales.Translator { return &ii_CN{ - locale: "ii_CN", + locale: "ii_CN", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ii_CN) Locale() string { - return l.locale +func (t *ii_CN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ii_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ii_CN' +func (t *ii_CN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ii_CN' +func (t *ii_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/is/is.go b/resources/locales/is/is.go index 81d67f8..6a4236a 100644 --- a/resources/locales/is/is.go +++ b/resources/locales/is/is.go @@ -5,23 +5,30 @@ import ( ) type is struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'is' locale func New() locales.Translator { return &is{ - locale: "is", + locale: "is", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *is) Locale() string { - return l.locale +func (t *is) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *is) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'is' +func (t *is) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'is' +func (t *is) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/is_IS/is_IS.go b/resources/locales/is_IS/is_IS.go index d648eb4..ab411c4 100644 --- a/resources/locales/is_IS/is_IS.go +++ b/resources/locales/is_IS/is_IS.go @@ -5,23 +5,30 @@ import ( ) type is_IS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'is_IS' locale func New() locales.Translator { return &is_IS{ - locale: "is_IS", + locale: "is_IS", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *is_IS) Locale() string { - return l.locale +func (t *is_IS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *is_IS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'is_IS' +func (t *is_IS) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'is_IS' +func (t *is_IS) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/it/it.go b/resources/locales/it/it.go index c4996d6..a80940e 100644 --- a/resources/locales/it/it.go +++ b/resources/locales/it/it.go @@ -5,23 +5,30 @@ import ( ) type it struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'it' locale func New() locales.Translator { return &it{ - locale: "it", + locale: "it", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *it) Locale() string { - return l.locale +func (t *it) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *it) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'it' +func (t *it) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'it' +func (t *it) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/it_CH/it_CH.go b/resources/locales/it_CH/it_CH.go index 31bf759..3c28bdc 100644 --- a/resources/locales/it_CH/it_CH.go +++ b/resources/locales/it_CH/it_CH.go @@ -5,23 +5,30 @@ import ( ) type it_CH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'it_CH' locale func New() locales.Translator { return &it_CH{ - locale: "it_CH", + locale: "it_CH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *it_CH) Locale() string { - return l.locale +func (t *it_CH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *it_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'it_CH' +func (t *it_CH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'it_CH' +func (t *it_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/it_IT/it_IT.go b/resources/locales/it_IT/it_IT.go index 1cc30d0..b345bde 100644 --- a/resources/locales/it_IT/it_IT.go +++ b/resources/locales/it_IT/it_IT.go @@ -5,23 +5,30 @@ import ( ) type it_IT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'it_IT' locale func New() locales.Translator { return &it_IT{ - locale: "it_IT", + locale: "it_IT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *it_IT) Locale() string { - return l.locale +func (t *it_IT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *it_IT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'it_IT' +func (t *it_IT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'it_IT' +func (t *it_IT) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) diff --git a/resources/locales/it_SM/it_SM.go b/resources/locales/it_SM/it_SM.go index 95056db..d939a34 100644 --- a/resources/locales/it_SM/it_SM.go +++ b/resources/locales/it_SM/it_SM.go @@ -5,23 +5,30 @@ import ( ) type it_SM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'it_SM' locale func New() locales.Translator { return &it_SM{ - locale: "it_SM", + locale: "it_SM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *it_SM) Locale() string { - return l.locale +func (t *it_SM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *it_SM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'it_SM' +func (t *it_SM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'it_SM' +func (t *it_SM) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ja/ja.go b/resources/locales/ja/ja.go index d0472a0..1142dc0 100644 --- a/resources/locales/ja/ja.go +++ b/resources/locales/ja/ja.go @@ -5,23 +5,30 @@ import ( ) type ja struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ja' locale func New() locales.Translator { return &ja{ - locale: "ja", + locale: "ja", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ja) Locale() string { - return l.locale +func (t *ja) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ja) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ja' +func (t *ja) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ja' +func (t *ja) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ja_JP/ja_JP.go b/resources/locales/ja_JP/ja_JP.go index b39d3c6..4d15ace 100644 --- a/resources/locales/ja_JP/ja_JP.go +++ b/resources/locales/ja_JP/ja_JP.go @@ -5,23 +5,30 @@ import ( ) type ja_JP struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ja_JP' locale func New() locales.Translator { return &ja_JP{ - locale: "ja_JP", + locale: "ja_JP", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ja_JP) Locale() string { - return l.locale +func (t *ja_JP) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ja_JP) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ja_JP' +func (t *ja_JP) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ja_JP' +func (t *ja_JP) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/jgo/jgo.go b/resources/locales/jgo/jgo.go index fc75d0f..aa035d8 100644 --- a/resources/locales/jgo/jgo.go +++ b/resources/locales/jgo/jgo.go @@ -5,23 +5,30 @@ import ( ) type jgo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'jgo' locale func New() locales.Translator { return &jgo{ - locale: "jgo", + locale: "jgo", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *jgo) Locale() string { - return l.locale +func (t *jgo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *jgo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'jgo' +func (t *jgo) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'jgo' +func (t *jgo) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/jgo_CM/jgo_CM.go b/resources/locales/jgo_CM/jgo_CM.go index 8ce2ae0..8b32f67 100644 --- a/resources/locales/jgo_CM/jgo_CM.go +++ b/resources/locales/jgo_CM/jgo_CM.go @@ -5,23 +5,30 @@ import ( ) type jgo_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'jgo_CM' locale func New() locales.Translator { return &jgo_CM{ - locale: "jgo_CM", + locale: "jgo_CM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *jgo_CM) Locale() string { - return l.locale +func (t *jgo_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *jgo_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'jgo_CM' +func (t *jgo_CM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'jgo_CM' +func (t *jgo_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/jmc/jmc.go b/resources/locales/jmc/jmc.go index d8c37d9..9b66c33 100644 --- a/resources/locales/jmc/jmc.go +++ b/resources/locales/jmc/jmc.go @@ -5,23 +5,30 @@ import ( ) type jmc struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'jmc' locale func New() locales.Translator { return &jmc{ - locale: "jmc", + locale: "jmc", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *jmc) Locale() string { - return l.locale +func (t *jmc) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *jmc) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'jmc' +func (t *jmc) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'jmc' +func (t *jmc) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/jmc_TZ/jmc_TZ.go b/resources/locales/jmc_TZ/jmc_TZ.go index 53aa74d..154327f 100644 --- a/resources/locales/jmc_TZ/jmc_TZ.go +++ b/resources/locales/jmc_TZ/jmc_TZ.go @@ -5,23 +5,30 @@ import ( ) type jmc_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'jmc_TZ' locale func New() locales.Translator { return &jmc_TZ{ - locale: "jmc_TZ", + locale: "jmc_TZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *jmc_TZ) Locale() string { - return l.locale +func (t *jmc_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *jmc_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'jmc_TZ' +func (t *jmc_TZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'jmc_TZ' +func (t *jmc_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ka/ka.go b/resources/locales/ka/ka.go index c20eb55..34d5e30 100644 --- a/resources/locales/ka/ka.go +++ b/resources/locales/ka/ka.go @@ -5,23 +5,30 @@ import ( ) type ka struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ka' locale func New() locales.Translator { return &ka{ - locale: "ka", + locale: "ka", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ka) Locale() string { - return l.locale +func (t *ka) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ka) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ka' +func (t *ka) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ka' +func (t *ka) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ka_GE/ka_GE.go b/resources/locales/ka_GE/ka_GE.go index 4d9059d..7c7a5a4 100644 --- a/resources/locales/ka_GE/ka_GE.go +++ b/resources/locales/ka_GE/ka_GE.go @@ -5,23 +5,30 @@ import ( ) type ka_GE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ka_GE' locale func New() locales.Translator { return &ka_GE{ - locale: "ka_GE", + locale: "ka_GE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ka_GE) Locale() string { - return l.locale +func (t *ka_GE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ka_GE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ka_GE' +func (t *ka_GE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ka_GE' +func (t *ka_GE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/kab/kab.go b/resources/locales/kab/kab.go index 230c590..61b866a 100644 --- a/resources/locales/kab/kab.go +++ b/resources/locales/kab/kab.go @@ -5,23 +5,30 @@ import ( ) type kab struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kab' locale func New() locales.Translator { return &kab{ - locale: "kab", + locale: "kab", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *kab) Locale() string { - return l.locale +func (t *kab) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kab) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kab' +func (t *kab) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kab' +func (t *kab) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/kab_DZ/kab_DZ.go b/resources/locales/kab_DZ/kab_DZ.go index f7e1b3c..4beba1d 100644 --- a/resources/locales/kab_DZ/kab_DZ.go +++ b/resources/locales/kab_DZ/kab_DZ.go @@ -5,23 +5,30 @@ import ( ) type kab_DZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kab_DZ' locale func New() locales.Translator { return &kab_DZ{ - locale: "kab_DZ", + locale: "kab_DZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *kab_DZ) Locale() string { - return l.locale +func (t *kab_DZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kab_DZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kab_DZ' +func (t *kab_DZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kab_DZ' +func (t *kab_DZ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/kam/kam.go b/resources/locales/kam/kam.go index b353592..51ab726 100644 --- a/resources/locales/kam/kam.go +++ b/resources/locales/kam/kam.go @@ -5,22 +5,29 @@ import ( ) type kam struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kam' locale func New() locales.Translator { return &kam{ - locale: "kam", + locale: "kam", + plurals: nil, } } // Locale returns the current translators string locale -func (l *kam) Locale() string { - return l.locale +func (t *kam) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kam) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kam' +func (t *kam) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'kam' +func (t *kam) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/kam_KE/kam_KE.go b/resources/locales/kam_KE/kam_KE.go index 3269b61..18ffff7 100644 --- a/resources/locales/kam_KE/kam_KE.go +++ b/resources/locales/kam_KE/kam_KE.go @@ -5,22 +5,29 @@ import ( ) type kam_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kam_KE' locale func New() locales.Translator { return &kam_KE{ - locale: "kam_KE", + locale: "kam_KE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *kam_KE) Locale() string { - return l.locale +func (t *kam_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kam_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kam_KE' +func (t *kam_KE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'kam_KE' +func (t *kam_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/kde/kde.go b/resources/locales/kde/kde.go index 9e84cae..f213053 100644 --- a/resources/locales/kde/kde.go +++ b/resources/locales/kde/kde.go @@ -5,23 +5,30 @@ import ( ) type kde struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kde' locale func New() locales.Translator { return &kde{ - locale: "kde", + locale: "kde", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *kde) Locale() string { - return l.locale +func (t *kde) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kde) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kde' +func (t *kde) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kde' +func (t *kde) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/kde_TZ/kde_TZ.go b/resources/locales/kde_TZ/kde_TZ.go index 6aa316d..d889b71 100644 --- a/resources/locales/kde_TZ/kde_TZ.go +++ b/resources/locales/kde_TZ/kde_TZ.go @@ -5,23 +5,30 @@ import ( ) type kde_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kde_TZ' locale func New() locales.Translator { return &kde_TZ{ - locale: "kde_TZ", + locale: "kde_TZ", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *kde_TZ) Locale() string { - return l.locale +func (t *kde_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kde_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kde_TZ' +func (t *kde_TZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kde_TZ' +func (t *kde_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/kea/kea.go b/resources/locales/kea/kea.go index 0b95347..a81436a 100644 --- a/resources/locales/kea/kea.go +++ b/resources/locales/kea/kea.go @@ -5,23 +5,30 @@ import ( ) type kea struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kea' locale func New() locales.Translator { return &kea{ - locale: "kea", + locale: "kea", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *kea) Locale() string { - return l.locale +func (t *kea) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kea) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kea' +func (t *kea) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kea' +func (t *kea) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/kea_CV/kea_CV.go b/resources/locales/kea_CV/kea_CV.go index 74013f3..d58a497 100644 --- a/resources/locales/kea_CV/kea_CV.go +++ b/resources/locales/kea_CV/kea_CV.go @@ -5,23 +5,30 @@ import ( ) type kea_CV struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kea_CV' locale func New() locales.Translator { return &kea_CV{ - locale: "kea_CV", + locale: "kea_CV", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *kea_CV) Locale() string { - return l.locale +func (t *kea_CV) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kea_CV) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kea_CV' +func (t *kea_CV) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kea_CV' +func (t *kea_CV) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/khq/khq.go b/resources/locales/khq/khq.go index 0921990..5257dbe 100644 --- a/resources/locales/khq/khq.go +++ b/resources/locales/khq/khq.go @@ -5,22 +5,29 @@ import ( ) type khq struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'khq' locale func New() locales.Translator { return &khq{ - locale: "khq", + locale: "khq", + plurals: nil, } } // Locale returns the current translators string locale -func (l *khq) Locale() string { - return l.locale +func (t *khq) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *khq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'khq' +func (t *khq) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'khq' +func (t *khq) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/khq_ML/khq_ML.go b/resources/locales/khq_ML/khq_ML.go index 1dd0288..6c84373 100644 --- a/resources/locales/khq_ML/khq_ML.go +++ b/resources/locales/khq_ML/khq_ML.go @@ -5,22 +5,29 @@ import ( ) type khq_ML struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'khq_ML' locale func New() locales.Translator { return &khq_ML{ - locale: "khq_ML", + locale: "khq_ML", + plurals: nil, } } // Locale returns the current translators string locale -func (l *khq_ML) Locale() string { - return l.locale +func (t *khq_ML) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *khq_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'khq_ML' +func (t *khq_ML) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'khq_ML' +func (t *khq_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ki/ki.go b/resources/locales/ki/ki.go index de04f47..d976cef 100644 --- a/resources/locales/ki/ki.go +++ b/resources/locales/ki/ki.go @@ -5,22 +5,29 @@ import ( ) type ki struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ki' locale func New() locales.Translator { return &ki{ - locale: "ki", + locale: "ki", + plurals: nil, } } // Locale returns the current translators string locale -func (l *ki) Locale() string { - return l.locale +func (t *ki) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ki) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ki' +func (t *ki) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'ki' +func (t *ki) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ki_KE/ki_KE.go b/resources/locales/ki_KE/ki_KE.go index a7e14d7..334dce4 100644 --- a/resources/locales/ki_KE/ki_KE.go +++ b/resources/locales/ki_KE/ki_KE.go @@ -5,22 +5,29 @@ import ( ) type ki_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ki_KE' locale func New() locales.Translator { return &ki_KE{ - locale: "ki_KE", + locale: "ki_KE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *ki_KE) Locale() string { - return l.locale +func (t *ki_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ki_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ki_KE' +func (t *ki_KE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'ki_KE' +func (t *ki_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/kk/kk.go b/resources/locales/kk/kk.go index f39b56c..b295094 100644 --- a/resources/locales/kk/kk.go +++ b/resources/locales/kk/kk.go @@ -5,23 +5,30 @@ import ( ) type kk struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kk' locale func New() locales.Translator { return &kk{ - locale: "kk", + locale: "kk", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *kk) Locale() string { - return l.locale +func (t *kk) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kk) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kk' +func (t *kk) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kk' +func (t *kk) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/kk_KZ/kk_KZ.go b/resources/locales/kk_KZ/kk_KZ.go index 2fb7453..9b12cfc 100644 --- a/resources/locales/kk_KZ/kk_KZ.go +++ b/resources/locales/kk_KZ/kk_KZ.go @@ -5,23 +5,30 @@ import ( ) type kk_KZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kk_KZ' locale func New() locales.Translator { return &kk_KZ{ - locale: "kk_KZ", + locale: "kk_KZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *kk_KZ) Locale() string { - return l.locale +func (t *kk_KZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kk_KZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kk_KZ' +func (t *kk_KZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kk_KZ' +func (t *kk_KZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/kkj/kkj.go b/resources/locales/kkj/kkj.go index 0ede1bb..9f5aeca 100644 --- a/resources/locales/kkj/kkj.go +++ b/resources/locales/kkj/kkj.go @@ -5,23 +5,30 @@ import ( ) type kkj struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kkj' locale func New() locales.Translator { return &kkj{ - locale: "kkj", + locale: "kkj", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *kkj) Locale() string { - return l.locale +func (t *kkj) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kkj) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kkj' +func (t *kkj) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kkj' +func (t *kkj) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/kkj_CM/kkj_CM.go b/resources/locales/kkj_CM/kkj_CM.go index 479277a..966c9a3 100644 --- a/resources/locales/kkj_CM/kkj_CM.go +++ b/resources/locales/kkj_CM/kkj_CM.go @@ -5,23 +5,30 @@ import ( ) type kkj_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kkj_CM' locale func New() locales.Translator { return &kkj_CM{ - locale: "kkj_CM", + locale: "kkj_CM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *kkj_CM) Locale() string { - return l.locale +func (t *kkj_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kkj_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kkj_CM' +func (t *kkj_CM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kkj_CM' +func (t *kkj_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/kl/kl.go b/resources/locales/kl/kl.go index a8f5e6f..f097d2a 100644 --- a/resources/locales/kl/kl.go +++ b/resources/locales/kl/kl.go @@ -5,23 +5,30 @@ import ( ) type kl struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kl' locale func New() locales.Translator { return &kl{ - locale: "kl", + locale: "kl", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *kl) Locale() string { - return l.locale +func (t *kl) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kl' +func (t *kl) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kl' +func (t *kl) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/kl_GL/kl_GL.go b/resources/locales/kl_GL/kl_GL.go index a477cfe..39197ee 100644 --- a/resources/locales/kl_GL/kl_GL.go +++ b/resources/locales/kl_GL/kl_GL.go @@ -5,23 +5,30 @@ import ( ) type kl_GL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kl_GL' locale func New() locales.Translator { return &kl_GL{ - locale: "kl_GL", + locale: "kl_GL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *kl_GL) Locale() string { - return l.locale +func (t *kl_GL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kl_GL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kl_GL' +func (t *kl_GL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kl_GL' +func (t *kl_GL) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/kln/kln.go b/resources/locales/kln/kln.go index 236eeed..e2ee9b8 100644 --- a/resources/locales/kln/kln.go +++ b/resources/locales/kln/kln.go @@ -5,22 +5,29 @@ import ( ) type kln struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kln' locale func New() locales.Translator { return &kln{ - locale: "kln", + locale: "kln", + plurals: nil, } } // Locale returns the current translators string locale -func (l *kln) Locale() string { - return l.locale +func (t *kln) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kln) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kln' +func (t *kln) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'kln' +func (t *kln) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/kln_KE/kln_KE.go b/resources/locales/kln_KE/kln_KE.go index 9fd2fb2..3a59b9b 100644 --- a/resources/locales/kln_KE/kln_KE.go +++ b/resources/locales/kln_KE/kln_KE.go @@ -5,22 +5,29 @@ import ( ) type kln_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kln_KE' locale func New() locales.Translator { return &kln_KE{ - locale: "kln_KE", + locale: "kln_KE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *kln_KE) Locale() string { - return l.locale +func (t *kln_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kln_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kln_KE' +func (t *kln_KE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'kln_KE' +func (t *kln_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/km/km.go b/resources/locales/km/km.go index ab50b8f..7d9a895 100644 --- a/resources/locales/km/km.go +++ b/resources/locales/km/km.go @@ -5,23 +5,30 @@ import ( ) type km struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'km' locale func New() locales.Translator { return &km{ - locale: "km", + locale: "km", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *km) Locale() string { - return l.locale +func (t *km) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *km) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'km' +func (t *km) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'km' +func (t *km) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/km_KH/km_KH.go b/resources/locales/km_KH/km_KH.go index 3d19f29..e4c94c2 100644 --- a/resources/locales/km_KH/km_KH.go +++ b/resources/locales/km_KH/km_KH.go @@ -5,23 +5,30 @@ import ( ) type km_KH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'km_KH' locale func New() locales.Translator { return &km_KH{ - locale: "km_KH", + locale: "km_KH", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *km_KH) Locale() string { - return l.locale +func (t *km_KH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *km_KH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'km_KH' +func (t *km_KH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'km_KH' +func (t *km_KH) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/kn/kn.go b/resources/locales/kn/kn.go index 49bb474..e3484ff 100644 --- a/resources/locales/kn/kn.go +++ b/resources/locales/kn/kn.go @@ -5,23 +5,30 @@ import ( ) type kn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kn' locale func New() locales.Translator { return &kn{ - locale: "kn", + locale: "kn", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *kn) Locale() string { - return l.locale +func (t *kn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kn' +func (t *kn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kn' +func (t *kn) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/kn_IN/kn_IN.go b/resources/locales/kn_IN/kn_IN.go index 54577ee..a28e9ab 100644 --- a/resources/locales/kn_IN/kn_IN.go +++ b/resources/locales/kn_IN/kn_IN.go @@ -5,30 +5,37 @@ import ( ) type kn_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kn_IN' locale func New() locales.Translator { return &kn_IN{ - locale: "kn_IN", + locale: "kn_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *kn_IN) Locale() string { - return l.locale +func (t *kn_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kn_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kn_IN' +func (t *kn_IN) Plurals() []locales.PluralRule { + return t.plurals +} - n, err := locales.N(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'kn_IN' +func (t *kn_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { + + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - i, err := locales.I(num) + n, err := locales.N(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } diff --git a/resources/locales/ko/ko.go b/resources/locales/ko/ko.go index beae37a..e46b2dc 100644 --- a/resources/locales/ko/ko.go +++ b/resources/locales/ko/ko.go @@ -5,23 +5,30 @@ import ( ) type ko struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ko' locale func New() locales.Translator { return &ko{ - locale: "ko", + locale: "ko", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ko) Locale() string { - return l.locale +func (t *ko) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ko) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ko' +func (t *ko) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ko' +func (t *ko) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ko_KP/ko_KP.go b/resources/locales/ko_KP/ko_KP.go index 38ef888..e4e0b83 100644 --- a/resources/locales/ko_KP/ko_KP.go +++ b/resources/locales/ko_KP/ko_KP.go @@ -5,23 +5,30 @@ import ( ) type ko_KP struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ko_KP' locale func New() locales.Translator { return &ko_KP{ - locale: "ko_KP", + locale: "ko_KP", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ko_KP) Locale() string { - return l.locale +func (t *ko_KP) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ko_KP) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ko_KP' +func (t *ko_KP) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ko_KP' +func (t *ko_KP) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ko_KR/ko_KR.go b/resources/locales/ko_KR/ko_KR.go index 0858f92..d24be91 100644 --- a/resources/locales/ko_KR/ko_KR.go +++ b/resources/locales/ko_KR/ko_KR.go @@ -5,23 +5,30 @@ import ( ) type ko_KR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ko_KR' locale func New() locales.Translator { return &ko_KR{ - locale: "ko_KR", + locale: "ko_KR", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ko_KR) Locale() string { - return l.locale +func (t *ko_KR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ko_KR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ko_KR' +func (t *ko_KR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ko_KR' +func (t *ko_KR) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/kok/kok.go b/resources/locales/kok/kok.go index e34ce44..79f5295 100644 --- a/resources/locales/kok/kok.go +++ b/resources/locales/kok/kok.go @@ -5,22 +5,29 @@ import ( ) type kok struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kok' locale func New() locales.Translator { return &kok{ - locale: "kok", + locale: "kok", + plurals: nil, } } // Locale returns the current translators string locale -func (l *kok) Locale() string { - return l.locale +func (t *kok) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kok) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kok' +func (t *kok) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'kok' +func (t *kok) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/kok_IN/kok_IN.go b/resources/locales/kok_IN/kok_IN.go index fb307db..9bf91ee 100644 --- a/resources/locales/kok_IN/kok_IN.go +++ b/resources/locales/kok_IN/kok_IN.go @@ -5,22 +5,29 @@ import ( ) type kok_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kok_IN' locale func New() locales.Translator { return &kok_IN{ - locale: "kok_IN", + locale: "kok_IN", + plurals: nil, } } // Locale returns the current translators string locale -func (l *kok_IN) Locale() string { - return l.locale +func (t *kok_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kok_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kok_IN' +func (t *kok_IN) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'kok_IN' +func (t *kok_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ks/ks.go b/resources/locales/ks/ks.go index 2b21f36..6c447e4 100644 --- a/resources/locales/ks/ks.go +++ b/resources/locales/ks/ks.go @@ -5,23 +5,30 @@ import ( ) type ks struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ks' locale func New() locales.Translator { return &ks{ - locale: "ks", + locale: "ks", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ks) Locale() string { - return l.locale +func (t *ks) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ks) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ks' +func (t *ks) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ks' +func (t *ks) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ks_IN/ks_IN.go b/resources/locales/ks_IN/ks_IN.go index 2c6673c..ecd5aee 100644 --- a/resources/locales/ks_IN/ks_IN.go +++ b/resources/locales/ks_IN/ks_IN.go @@ -5,23 +5,30 @@ import ( ) type ks_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ks_IN' locale func New() locales.Translator { return &ks_IN{ - locale: "ks_IN", + locale: "ks_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ks_IN) Locale() string { - return l.locale +func (t *ks_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ks_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ks_IN' +func (t *ks_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ks_IN' +func (t *ks_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ksb/ksb.go b/resources/locales/ksb/ksb.go index 4f5bce8..6c0110e 100644 --- a/resources/locales/ksb/ksb.go +++ b/resources/locales/ksb/ksb.go @@ -5,23 +5,30 @@ import ( ) type ksb struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ksb' locale func New() locales.Translator { return &ksb{ - locale: "ksb", + locale: "ksb", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ksb) Locale() string { - return l.locale +func (t *ksb) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ksb) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ksb' +func (t *ksb) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ksb' +func (t *ksb) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ksb_TZ/ksb_TZ.go b/resources/locales/ksb_TZ/ksb_TZ.go index 8af99f5..6c5be17 100644 --- a/resources/locales/ksb_TZ/ksb_TZ.go +++ b/resources/locales/ksb_TZ/ksb_TZ.go @@ -5,23 +5,30 @@ import ( ) type ksb_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ksb_TZ' locale func New() locales.Translator { return &ksb_TZ{ - locale: "ksb_TZ", + locale: "ksb_TZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ksb_TZ) Locale() string { - return l.locale +func (t *ksb_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ksb_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ksb_TZ' +func (t *ksb_TZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ksb_TZ' +func (t *ksb_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ksf/ksf.go b/resources/locales/ksf/ksf.go index 1d2bd94..8776e27 100644 --- a/resources/locales/ksf/ksf.go +++ b/resources/locales/ksf/ksf.go @@ -5,22 +5,29 @@ import ( ) type ksf struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ksf' locale func New() locales.Translator { return &ksf{ - locale: "ksf", + locale: "ksf", + plurals: nil, } } // Locale returns the current translators string locale -func (l *ksf) Locale() string { - return l.locale +func (t *ksf) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ksf) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ksf' +func (t *ksf) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'ksf' +func (t *ksf) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ksf_CM/ksf_CM.go b/resources/locales/ksf_CM/ksf_CM.go index 48d6453..4685511 100644 --- a/resources/locales/ksf_CM/ksf_CM.go +++ b/resources/locales/ksf_CM/ksf_CM.go @@ -5,22 +5,29 @@ import ( ) type ksf_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ksf_CM' locale func New() locales.Translator { return &ksf_CM{ - locale: "ksf_CM", + locale: "ksf_CM", + plurals: nil, } } // Locale returns the current translators string locale -func (l *ksf_CM) Locale() string { - return l.locale +func (t *ksf_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ksf_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ksf_CM' +func (t *ksf_CM) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'ksf_CM' +func (t *ksf_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ksh/ksh.go b/resources/locales/ksh/ksh.go index 600eec0..78f9296 100644 --- a/resources/locales/ksh/ksh.go +++ b/resources/locales/ksh/ksh.go @@ -5,23 +5,30 @@ import ( ) type ksh struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ksh' locale func New() locales.Translator { return &ksh{ - locale: "ksh", + locale: "ksh", + plurals: []locales.PluralRule{1, 2, 6}, } } // Locale returns the current translators string locale -func (l *ksh) Locale() string { - return l.locale +func (t *ksh) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ksh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ksh' +func (t *ksh) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ksh' +func (t *ksh) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ksh_DE/ksh_DE.go b/resources/locales/ksh_DE/ksh_DE.go index 028e48a..a2ef03b 100644 --- a/resources/locales/ksh_DE/ksh_DE.go +++ b/resources/locales/ksh_DE/ksh_DE.go @@ -5,23 +5,30 @@ import ( ) type ksh_DE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ksh_DE' locale func New() locales.Translator { return &ksh_DE{ - locale: "ksh_DE", + locale: "ksh_DE", + plurals: []locales.PluralRule{1, 2, 6}, } } // Locale returns the current translators string locale -func (l *ksh_DE) Locale() string { - return l.locale +func (t *ksh_DE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ksh_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ksh_DE' +func (t *ksh_DE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ksh_DE' +func (t *ksh_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/kw/kw.go b/resources/locales/kw/kw.go index 09ace32..2b68467 100644 --- a/resources/locales/kw/kw.go +++ b/resources/locales/kw/kw.go @@ -5,23 +5,30 @@ import ( ) type kw struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kw' locale func New() locales.Translator { return &kw{ - locale: "kw", + locale: "kw", + plurals: []locales.PluralRule{2, 3, 6}, } } // Locale returns the current translators string locale -func (l *kw) Locale() string { - return l.locale +func (t *kw) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kw) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kw' +func (t *kw) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kw' +func (t *kw) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/kw_GB/kw_GB.go b/resources/locales/kw_GB/kw_GB.go index 4857edb..1907dd5 100644 --- a/resources/locales/kw_GB/kw_GB.go +++ b/resources/locales/kw_GB/kw_GB.go @@ -5,23 +5,30 @@ import ( ) type kw_GB struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'kw_GB' locale func New() locales.Translator { return &kw_GB{ - locale: "kw_GB", + locale: "kw_GB", + plurals: []locales.PluralRule{2, 3, 6}, } } // Locale returns the current translators string locale -func (l *kw_GB) Locale() string { - return l.locale +func (t *kw_GB) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *kw_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'kw_GB' +func (t *kw_GB) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'kw_GB' +func (t *kw_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ky/ky.go b/resources/locales/ky/ky.go index 6a47baa..a6592d6 100644 --- a/resources/locales/ky/ky.go +++ b/resources/locales/ky/ky.go @@ -5,23 +5,30 @@ import ( ) type ky struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ky' locale func New() locales.Translator { return &ky{ - locale: "ky", + locale: "ky", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ky) Locale() string { - return l.locale +func (t *ky) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ky) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ky' +func (t *ky) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ky' +func (t *ky) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ky_KG/ky_KG.go b/resources/locales/ky_KG/ky_KG.go index 3f436ee..94df6ab 100644 --- a/resources/locales/ky_KG/ky_KG.go +++ b/resources/locales/ky_KG/ky_KG.go @@ -5,23 +5,30 @@ import ( ) type ky_KG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ky_KG' locale func New() locales.Translator { return &ky_KG{ - locale: "ky_KG", + locale: "ky_KG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ky_KG) Locale() string { - return l.locale +func (t *ky_KG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ky_KG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ky_KG' +func (t *ky_KG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ky_KG' +func (t *ky_KG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/lag/lag.go b/resources/locales/lag/lag.go index f744061..54f11e7 100644 --- a/resources/locales/lag/lag.go +++ b/resources/locales/lag/lag.go @@ -5,23 +5,30 @@ import ( ) type lag struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lag' locale func New() locales.Translator { return &lag{ - locale: "lag", + locale: "lag", + plurals: []locales.PluralRule{1, 2, 6}, } } // Locale returns the current translators string locale -func (l *lag) Locale() string { - return l.locale +func (t *lag) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lag) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lag' +func (t *lag) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lag' +func (t *lag) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/lag_TZ/lag_TZ.go b/resources/locales/lag_TZ/lag_TZ.go index 4430d83..d2937cf 100644 --- a/resources/locales/lag_TZ/lag_TZ.go +++ b/resources/locales/lag_TZ/lag_TZ.go @@ -5,30 +5,37 @@ import ( ) type lag_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lag_TZ' locale func New() locales.Translator { return &lag_TZ{ - locale: "lag_TZ", + locale: "lag_TZ", + plurals: []locales.PluralRule{1, 2, 6}, } } // Locale returns the current translators string locale -func (l *lag_TZ) Locale() string { - return l.locale +func (t *lag_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lag_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lag_TZ' +func (t *lag_TZ) Plurals() []locales.PluralRule { + return t.plurals +} - n, err := locales.N(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'lag_TZ' +func (t *lag_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { + + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - i, err := locales.I(num) + n, err := locales.N(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } diff --git a/resources/locales/lb/lb.go b/resources/locales/lb/lb.go index 2ce8dd3..fdd9b41 100644 --- a/resources/locales/lb/lb.go +++ b/resources/locales/lb/lb.go @@ -5,23 +5,30 @@ import ( ) type lb struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lb' locale func New() locales.Translator { return &lb{ - locale: "lb", + locale: "lb", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *lb) Locale() string { - return l.locale +func (t *lb) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lb) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lb' +func (t *lb) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lb' +func (t *lb) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/lb_LU/lb_LU.go b/resources/locales/lb_LU/lb_LU.go index 717115d..8f01c53 100644 --- a/resources/locales/lb_LU/lb_LU.go +++ b/resources/locales/lb_LU/lb_LU.go @@ -5,23 +5,30 @@ import ( ) type lb_LU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lb_LU' locale func New() locales.Translator { return &lb_LU{ - locale: "lb_LU", + locale: "lb_LU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *lb_LU) Locale() string { - return l.locale +func (t *lb_LU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lb_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lb_LU' +func (t *lb_LU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lb_LU' +func (t *lb_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/lg/lg.go b/resources/locales/lg/lg.go index d9067b5..656bfdd 100644 --- a/resources/locales/lg/lg.go +++ b/resources/locales/lg/lg.go @@ -5,23 +5,30 @@ import ( ) type lg struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lg' locale func New() locales.Translator { return &lg{ - locale: "lg", + locale: "lg", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *lg) Locale() string { - return l.locale +func (t *lg) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lg' +func (t *lg) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lg' +func (t *lg) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/lg_UG/lg_UG.go b/resources/locales/lg_UG/lg_UG.go index a79fc59..87c6545 100644 --- a/resources/locales/lg_UG/lg_UG.go +++ b/resources/locales/lg_UG/lg_UG.go @@ -5,23 +5,30 @@ import ( ) type lg_UG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lg_UG' locale func New() locales.Translator { return &lg_UG{ - locale: "lg_UG", + locale: "lg_UG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *lg_UG) Locale() string { - return l.locale +func (t *lg_UG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lg_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lg_UG' +func (t *lg_UG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lg_UG' +func (t *lg_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/lkt/lkt.go b/resources/locales/lkt/lkt.go index 8a50203..9d16e6e 100644 --- a/resources/locales/lkt/lkt.go +++ b/resources/locales/lkt/lkt.go @@ -5,23 +5,30 @@ import ( ) type lkt struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lkt' locale func New() locales.Translator { return &lkt{ - locale: "lkt", + locale: "lkt", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *lkt) Locale() string { - return l.locale +func (t *lkt) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lkt) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lkt' +func (t *lkt) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lkt' +func (t *lkt) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/lkt_US/lkt_US.go b/resources/locales/lkt_US/lkt_US.go index b344366..bfd5606 100644 --- a/resources/locales/lkt_US/lkt_US.go +++ b/resources/locales/lkt_US/lkt_US.go @@ -5,23 +5,30 @@ import ( ) type lkt_US struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lkt_US' locale func New() locales.Translator { return &lkt_US{ - locale: "lkt_US", + locale: "lkt_US", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *lkt_US) Locale() string { - return l.locale +func (t *lkt_US) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lkt_US) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lkt_US' +func (t *lkt_US) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lkt_US' +func (t *lkt_US) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ln/ln.go b/resources/locales/ln/ln.go index 4eb34ac..04ae958 100644 --- a/resources/locales/ln/ln.go +++ b/resources/locales/ln/ln.go @@ -5,23 +5,30 @@ import ( ) type ln struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ln' locale func New() locales.Translator { return &ln{ - locale: "ln", + locale: "ln", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ln) Locale() string { - return l.locale +func (t *ln) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ln) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ln' +func (t *ln) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ln' +func (t *ln) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ln_AO/ln_AO.go b/resources/locales/ln_AO/ln_AO.go index b8c9e63..0e4c963 100644 --- a/resources/locales/ln_AO/ln_AO.go +++ b/resources/locales/ln_AO/ln_AO.go @@ -5,23 +5,30 @@ import ( ) type ln_AO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ln_AO' locale func New() locales.Translator { return &ln_AO{ - locale: "ln_AO", + locale: "ln_AO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ln_AO) Locale() string { - return l.locale +func (t *ln_AO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ln_AO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ln_AO' +func (t *ln_AO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ln_AO' +func (t *ln_AO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ln_CD/ln_CD.go b/resources/locales/ln_CD/ln_CD.go index cc161b7..5ae22b4 100644 --- a/resources/locales/ln_CD/ln_CD.go +++ b/resources/locales/ln_CD/ln_CD.go @@ -5,23 +5,30 @@ import ( ) type ln_CD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ln_CD' locale func New() locales.Translator { return &ln_CD{ - locale: "ln_CD", + locale: "ln_CD", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ln_CD) Locale() string { - return l.locale +func (t *ln_CD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ln_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ln_CD' +func (t *ln_CD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ln_CD' +func (t *ln_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ln_CF/ln_CF.go b/resources/locales/ln_CF/ln_CF.go index 8378752..c01c752 100644 --- a/resources/locales/ln_CF/ln_CF.go +++ b/resources/locales/ln_CF/ln_CF.go @@ -5,23 +5,30 @@ import ( ) type ln_CF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ln_CF' locale func New() locales.Translator { return &ln_CF{ - locale: "ln_CF", + locale: "ln_CF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ln_CF) Locale() string { - return l.locale +func (t *ln_CF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ln_CF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ln_CF' +func (t *ln_CF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ln_CF' +func (t *ln_CF) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ln_CG/ln_CG.go b/resources/locales/ln_CG/ln_CG.go index 83925b7..72ad83d 100644 --- a/resources/locales/ln_CG/ln_CG.go +++ b/resources/locales/ln_CG/ln_CG.go @@ -5,23 +5,30 @@ import ( ) type ln_CG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ln_CG' locale func New() locales.Translator { return &ln_CG{ - locale: "ln_CG", + locale: "ln_CG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ln_CG) Locale() string { - return l.locale +func (t *ln_CG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ln_CG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ln_CG' +func (t *ln_CG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ln_CG' +func (t *ln_CG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/lo/lo.go b/resources/locales/lo/lo.go index d3920f1..e862bcb 100644 --- a/resources/locales/lo/lo.go +++ b/resources/locales/lo/lo.go @@ -5,23 +5,30 @@ import ( ) type lo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lo' locale func New() locales.Translator { return &lo{ - locale: "lo", + locale: "lo", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *lo) Locale() string { - return l.locale +func (t *lo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lo' +func (t *lo) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lo' +func (t *lo) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/lo_LA/lo_LA.go b/resources/locales/lo_LA/lo_LA.go index d79b827..99db8d0 100644 --- a/resources/locales/lo_LA/lo_LA.go +++ b/resources/locales/lo_LA/lo_LA.go @@ -5,23 +5,30 @@ import ( ) type lo_LA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lo_LA' locale func New() locales.Translator { return &lo_LA{ - locale: "lo_LA", + locale: "lo_LA", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *lo_LA) Locale() string { - return l.locale +func (t *lo_LA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lo_LA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lo_LA' +func (t *lo_LA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lo_LA' +func (t *lo_LA) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/locale_info.go b/resources/locales/locale_info.go index 6aede51..77ea695 100644 --- a/resources/locales/locale_info.go +++ b/resources/locales/locale_info.go @@ -34,29 +34,43 @@ const ( PluralRuleOther // other - required—general plural form—also used if the language only has a single form ) +const ( + pluralsString = "UnknownZeroOneTwoFewManyOther" +) + // Translator encapsulates an instance of type Translator interface { + + // Locale returns the string value of the translator Locale() string + + // Plurals returns an array of plural rules associated + // with this translator + Plurals() []PluralRule + + // CardinalPluralRule returns the plural rule needed + // determined by the provided 'num' variable + CardinalPluralRule(num string) (PluralRule, error) } -// PluralStringToInt returns the enum value of 'plural' provided -func PluralStringToInt(plural string) PluralRule { - - switch plural { - case "zero": - return PluralRuleZero - case "one": - return PluralRuleOne - case "two": - return PluralRuleTwo - case "few": - return PluralRuleFew - case "many": - return PluralRuleMany - case "other": - return PluralRuleOther +// String returns the string value of PluralRule +func (p PluralRule) String() string { + + switch p { + case PluralRuleZero: + return pluralsString[7:11] + case PluralRuleOne: + return pluralsString[11:14] + case PluralRuleTwo: + return pluralsString[14:17] + case PluralRuleFew: + return pluralsString[17:20] + case PluralRuleMany: + return pluralsString[20:24] + case PluralRuleOther: + return pluralsString[24:] default: - return PluralRuleUnknown + return pluralsString[:7] } } diff --git a/resources/locales/lrc/lrc.go b/resources/locales/lrc/lrc.go index 120e55e..07ac99f 100644 --- a/resources/locales/lrc/lrc.go +++ b/resources/locales/lrc/lrc.go @@ -5,22 +5,29 @@ import ( ) type lrc struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lrc' locale func New() locales.Translator { return &lrc{ - locale: "lrc", + locale: "lrc", + plurals: nil, } } // Locale returns the current translators string locale -func (l *lrc) Locale() string { - return l.locale +func (t *lrc) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lrc) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lrc' +func (t *lrc) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'lrc' +func (t *lrc) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/lrc_IQ/lrc_IQ.go b/resources/locales/lrc_IQ/lrc_IQ.go index cf2ad85..cddcd02 100644 --- a/resources/locales/lrc_IQ/lrc_IQ.go +++ b/resources/locales/lrc_IQ/lrc_IQ.go @@ -5,22 +5,29 @@ import ( ) type lrc_IQ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lrc_IQ' locale func New() locales.Translator { return &lrc_IQ{ - locale: "lrc_IQ", + locale: "lrc_IQ", + plurals: nil, } } // Locale returns the current translators string locale -func (l *lrc_IQ) Locale() string { - return l.locale +func (t *lrc_IQ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lrc_IQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lrc_IQ' +func (t *lrc_IQ) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'lrc_IQ' +func (t *lrc_IQ) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/lrc_IR/lrc_IR.go b/resources/locales/lrc_IR/lrc_IR.go index d63d479..c0b623d 100644 --- a/resources/locales/lrc_IR/lrc_IR.go +++ b/resources/locales/lrc_IR/lrc_IR.go @@ -5,22 +5,29 @@ import ( ) type lrc_IR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lrc_IR' locale func New() locales.Translator { return &lrc_IR{ - locale: "lrc_IR", + locale: "lrc_IR", + plurals: nil, } } // Locale returns the current translators string locale -func (l *lrc_IR) Locale() string { - return l.locale +func (t *lrc_IR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lrc_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lrc_IR' +func (t *lrc_IR) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'lrc_IR' +func (t *lrc_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/lt/lt.go b/resources/locales/lt/lt.go index 34ef0b5..9da0bc6 100644 --- a/resources/locales/lt/lt.go +++ b/resources/locales/lt/lt.go @@ -5,23 +5,30 @@ import ( ) type lt struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lt' locale func New() locales.Translator { return <{ - locale: "lt", + locale: "lt", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *lt) Locale() string { - return l.locale +func (t *lt) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lt) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lt' +func (t *lt) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lt' +func (t *lt) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/lt_LT/lt_LT.go b/resources/locales/lt_LT/lt_LT.go index f01bfd5..238be80 100644 --- a/resources/locales/lt_LT/lt_LT.go +++ b/resources/locales/lt_LT/lt_LT.go @@ -5,23 +5,30 @@ import ( ) type lt_LT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lt_LT' locale func New() locales.Translator { return <_LT{ - locale: "lt_LT", + locale: "lt_LT", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *lt_LT) Locale() string { - return l.locale +func (t *lt_LT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lt_LT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lt_LT' +func (t *lt_LT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lt_LT' +func (t *lt_LT) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/lu/lu.go b/resources/locales/lu/lu.go index 2266e5f..0463c4d 100644 --- a/resources/locales/lu/lu.go +++ b/resources/locales/lu/lu.go @@ -5,22 +5,29 @@ import ( ) type lu struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lu' locale func New() locales.Translator { return &lu{ - locale: "lu", + locale: "lu", + plurals: nil, } } // Locale returns the current translators string locale -func (l *lu) Locale() string { - return l.locale +func (t *lu) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lu' +func (t *lu) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'lu' +func (t *lu) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/lu_CD/lu_CD.go b/resources/locales/lu_CD/lu_CD.go index 07876df..c8ccf30 100644 --- a/resources/locales/lu_CD/lu_CD.go +++ b/resources/locales/lu_CD/lu_CD.go @@ -5,22 +5,29 @@ import ( ) type lu_CD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lu_CD' locale func New() locales.Translator { return &lu_CD{ - locale: "lu_CD", + locale: "lu_CD", + plurals: nil, } } // Locale returns the current translators string locale -func (l *lu_CD) Locale() string { - return l.locale +func (t *lu_CD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lu_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lu_CD' +func (t *lu_CD) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'lu_CD' +func (t *lu_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/luo/luo.go b/resources/locales/luo/luo.go index 24c4bd7..a406ba7 100644 --- a/resources/locales/luo/luo.go +++ b/resources/locales/luo/luo.go @@ -5,22 +5,29 @@ import ( ) type luo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'luo' locale func New() locales.Translator { return &luo{ - locale: "luo", + locale: "luo", + plurals: nil, } } // Locale returns the current translators string locale -func (l *luo) Locale() string { - return l.locale +func (t *luo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *luo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'luo' +func (t *luo) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'luo' +func (t *luo) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/luo_KE/luo_KE.go b/resources/locales/luo_KE/luo_KE.go index ed79d58..77a8006 100644 --- a/resources/locales/luo_KE/luo_KE.go +++ b/resources/locales/luo_KE/luo_KE.go @@ -5,22 +5,29 @@ import ( ) type luo_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'luo_KE' locale func New() locales.Translator { return &luo_KE{ - locale: "luo_KE", + locale: "luo_KE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *luo_KE) Locale() string { - return l.locale +func (t *luo_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *luo_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'luo_KE' +func (t *luo_KE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'luo_KE' +func (t *luo_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/luy/luy.go b/resources/locales/luy/luy.go index 6ebd761..16db39b 100644 --- a/resources/locales/luy/luy.go +++ b/resources/locales/luy/luy.go @@ -5,22 +5,29 @@ import ( ) type luy struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'luy' locale func New() locales.Translator { return &luy{ - locale: "luy", + locale: "luy", + plurals: nil, } } // Locale returns the current translators string locale -func (l *luy) Locale() string { - return l.locale +func (t *luy) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *luy) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'luy' +func (t *luy) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'luy' +func (t *luy) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/luy_KE/luy_KE.go b/resources/locales/luy_KE/luy_KE.go index 7d5dc09..20b1269 100644 --- a/resources/locales/luy_KE/luy_KE.go +++ b/resources/locales/luy_KE/luy_KE.go @@ -5,22 +5,29 @@ import ( ) type luy_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'luy_KE' locale func New() locales.Translator { return &luy_KE{ - locale: "luy_KE", + locale: "luy_KE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *luy_KE) Locale() string { - return l.locale +func (t *luy_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *luy_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'luy_KE' +func (t *luy_KE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'luy_KE' +func (t *luy_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/lv/lv.go b/resources/locales/lv/lv.go index dd2572f..680b812 100644 --- a/resources/locales/lv/lv.go +++ b/resources/locales/lv/lv.go @@ -5,23 +5,30 @@ import ( ) type lv struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lv' locale func New() locales.Translator { return &lv{ - locale: "lv", + locale: "lv", + plurals: []locales.PluralRule{1, 2, 6}, } } // Locale returns the current translators string locale -func (l *lv) Locale() string { - return l.locale +func (t *lv) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lv) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lv' +func (t *lv) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lv' +func (t *lv) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/lv_LV/lv_LV.go b/resources/locales/lv_LV/lv_LV.go index cfd8d53..6f16268 100644 --- a/resources/locales/lv_LV/lv_LV.go +++ b/resources/locales/lv_LV/lv_LV.go @@ -5,23 +5,30 @@ import ( ) type lv_LV struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'lv_LV' locale func New() locales.Translator { return &lv_LV{ - locale: "lv_LV", + locale: "lv_LV", + plurals: []locales.PluralRule{1, 2, 6}, } } // Locale returns the current translators string locale -func (l *lv_LV) Locale() string { - return l.locale +func (t *lv_LV) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *lv_LV) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'lv_LV' +func (t *lv_LV) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'lv_LV' +func (t *lv_LV) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mas/mas.go b/resources/locales/mas/mas.go index 009a02b..722b839 100644 --- a/resources/locales/mas/mas.go +++ b/resources/locales/mas/mas.go @@ -5,23 +5,30 @@ import ( ) type mas struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mas' locale func New() locales.Translator { return &mas{ - locale: "mas", + locale: "mas", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mas) Locale() string { - return l.locale +func (t *mas) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mas) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mas' +func (t *mas) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mas' +func (t *mas) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mas_KE/mas_KE.go b/resources/locales/mas_KE/mas_KE.go index 8ffae0c..9235527 100644 --- a/resources/locales/mas_KE/mas_KE.go +++ b/resources/locales/mas_KE/mas_KE.go @@ -5,23 +5,30 @@ import ( ) type mas_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mas_KE' locale func New() locales.Translator { return &mas_KE{ - locale: "mas_KE", + locale: "mas_KE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mas_KE) Locale() string { - return l.locale +func (t *mas_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mas_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mas_KE' +func (t *mas_KE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mas_KE' +func (t *mas_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mas_TZ/mas_TZ.go b/resources/locales/mas_TZ/mas_TZ.go index 4d055f5..3b6640e 100644 --- a/resources/locales/mas_TZ/mas_TZ.go +++ b/resources/locales/mas_TZ/mas_TZ.go @@ -5,23 +5,30 @@ import ( ) type mas_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mas_TZ' locale func New() locales.Translator { return &mas_TZ{ - locale: "mas_TZ", + locale: "mas_TZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mas_TZ) Locale() string { - return l.locale +func (t *mas_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mas_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mas_TZ' +func (t *mas_TZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mas_TZ' +func (t *mas_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mer/mer.go b/resources/locales/mer/mer.go index 0b3e3c4..b1e8952 100644 --- a/resources/locales/mer/mer.go +++ b/resources/locales/mer/mer.go @@ -5,22 +5,29 @@ import ( ) type mer struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mer' locale func New() locales.Translator { return &mer{ - locale: "mer", + locale: "mer", + plurals: nil, } } // Locale returns the current translators string locale -func (l *mer) Locale() string { - return l.locale +func (t *mer) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mer) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mer' +func (t *mer) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'mer' +func (t *mer) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mer_KE/mer_KE.go b/resources/locales/mer_KE/mer_KE.go index acb8c2b..7ccc2a9 100644 --- a/resources/locales/mer_KE/mer_KE.go +++ b/resources/locales/mer_KE/mer_KE.go @@ -5,22 +5,29 @@ import ( ) type mer_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mer_KE' locale func New() locales.Translator { return &mer_KE{ - locale: "mer_KE", + locale: "mer_KE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *mer_KE) Locale() string { - return l.locale +func (t *mer_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mer_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mer_KE' +func (t *mer_KE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'mer_KE' +func (t *mer_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mfe/mfe.go b/resources/locales/mfe/mfe.go index 06bfb82..e3d8b0e 100644 --- a/resources/locales/mfe/mfe.go +++ b/resources/locales/mfe/mfe.go @@ -5,22 +5,29 @@ import ( ) type mfe struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mfe' locale func New() locales.Translator { return &mfe{ - locale: "mfe", + locale: "mfe", + plurals: nil, } } // Locale returns the current translators string locale -func (l *mfe) Locale() string { - return l.locale +func (t *mfe) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mfe) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mfe' +func (t *mfe) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'mfe' +func (t *mfe) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mfe_MU/mfe_MU.go b/resources/locales/mfe_MU/mfe_MU.go index 4703170..38c582b 100644 --- a/resources/locales/mfe_MU/mfe_MU.go +++ b/resources/locales/mfe_MU/mfe_MU.go @@ -5,22 +5,29 @@ import ( ) type mfe_MU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mfe_MU' locale func New() locales.Translator { return &mfe_MU{ - locale: "mfe_MU", + locale: "mfe_MU", + plurals: nil, } } // Locale returns the current translators string locale -func (l *mfe_MU) Locale() string { - return l.locale +func (t *mfe_MU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mfe_MU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mfe_MU' +func (t *mfe_MU) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'mfe_MU' +func (t *mfe_MU) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mg/mg.go b/resources/locales/mg/mg.go index 611ecaf..76b8454 100644 --- a/resources/locales/mg/mg.go +++ b/resources/locales/mg/mg.go @@ -5,23 +5,30 @@ import ( ) type mg struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mg' locale func New() locales.Translator { return &mg{ - locale: "mg", + locale: "mg", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mg) Locale() string { - return l.locale +func (t *mg) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mg' +func (t *mg) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mg' +func (t *mg) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mg_MG/mg_MG.go b/resources/locales/mg_MG/mg_MG.go index bd432d7..6b2b87e 100644 --- a/resources/locales/mg_MG/mg_MG.go +++ b/resources/locales/mg_MG/mg_MG.go @@ -5,23 +5,30 @@ import ( ) type mg_MG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mg_MG' locale func New() locales.Translator { return &mg_MG{ - locale: "mg_MG", + locale: "mg_MG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mg_MG) Locale() string { - return l.locale +func (t *mg_MG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mg_MG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mg_MG' +func (t *mg_MG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mg_MG' +func (t *mg_MG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mgh/mgh.go b/resources/locales/mgh/mgh.go index caaecd3..64f5db8 100644 --- a/resources/locales/mgh/mgh.go +++ b/resources/locales/mgh/mgh.go @@ -5,22 +5,29 @@ import ( ) type mgh struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mgh' locale func New() locales.Translator { return &mgh{ - locale: "mgh", + locale: "mgh", + plurals: nil, } } // Locale returns the current translators string locale -func (l *mgh) Locale() string { - return l.locale +func (t *mgh) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mgh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mgh' +func (t *mgh) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'mgh' +func (t *mgh) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mgh_MZ/mgh_MZ.go b/resources/locales/mgh_MZ/mgh_MZ.go index 3c226a1..f484588 100644 --- a/resources/locales/mgh_MZ/mgh_MZ.go +++ b/resources/locales/mgh_MZ/mgh_MZ.go @@ -5,22 +5,29 @@ import ( ) type mgh_MZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mgh_MZ' locale func New() locales.Translator { return &mgh_MZ{ - locale: "mgh_MZ", + locale: "mgh_MZ", + plurals: nil, } } // Locale returns the current translators string locale -func (l *mgh_MZ) Locale() string { - return l.locale +func (t *mgh_MZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mgh_MZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mgh_MZ' +func (t *mgh_MZ) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'mgh_MZ' +func (t *mgh_MZ) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mgo/mgo.go b/resources/locales/mgo/mgo.go index 6a76436..036429a 100644 --- a/resources/locales/mgo/mgo.go +++ b/resources/locales/mgo/mgo.go @@ -5,23 +5,30 @@ import ( ) type mgo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mgo' locale func New() locales.Translator { return &mgo{ - locale: "mgo", + locale: "mgo", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mgo) Locale() string { - return l.locale +func (t *mgo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mgo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mgo' +func (t *mgo) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mgo' +func (t *mgo) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mgo_CM/mgo_CM.go b/resources/locales/mgo_CM/mgo_CM.go index 1d15cba..f725276 100644 --- a/resources/locales/mgo_CM/mgo_CM.go +++ b/resources/locales/mgo_CM/mgo_CM.go @@ -5,23 +5,30 @@ import ( ) type mgo_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mgo_CM' locale func New() locales.Translator { return &mgo_CM{ - locale: "mgo_CM", + locale: "mgo_CM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mgo_CM) Locale() string { - return l.locale +func (t *mgo_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mgo_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mgo_CM' +func (t *mgo_CM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mgo_CM' +func (t *mgo_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mk/mk.go b/resources/locales/mk/mk.go index 60c89ca..5d1465c 100644 --- a/resources/locales/mk/mk.go +++ b/resources/locales/mk/mk.go @@ -5,28 +5,30 @@ import ( ) type mk struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mk' locale func New() locales.Translator { return &mk{ - locale: "mk", + locale: "mk", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mk) Locale() string { - return l.locale +func (t *mk) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mk) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mk' +func (t *mk) Plurals() []locales.PluralRule { + return t.plurals +} - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// CardinalPluralRule returns the PluralRule given 'num' for 'mk' +func (t *mk) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { @@ -35,6 +37,11 @@ func (l *mk) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) + f, err := locales.F(num) + if err != nil { + return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} + } + if (v == 0 && i%10 == 1) || (f%10 == 1) { return locales.PluralRuleOne, nil } diff --git a/resources/locales/mk_MK/mk_MK.go b/resources/locales/mk_MK/mk_MK.go index e08a0a1..a4efb79 100644 --- a/resources/locales/mk_MK/mk_MK.go +++ b/resources/locales/mk_MK/mk_MK.go @@ -5,23 +5,30 @@ import ( ) type mk_MK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mk_MK' locale func New() locales.Translator { return &mk_MK{ - locale: "mk_MK", + locale: "mk_MK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mk_MK) Locale() string { - return l.locale +func (t *mk_MK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mk_MK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mk_MK' +func (t *mk_MK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mk_MK' +func (t *mk_MK) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ml/ml.go b/resources/locales/ml/ml.go index 5f6b9e2..c6e69ab 100644 --- a/resources/locales/ml/ml.go +++ b/resources/locales/ml/ml.go @@ -5,23 +5,30 @@ import ( ) type ml struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ml' locale func New() locales.Translator { return &ml{ - locale: "ml", + locale: "ml", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ml) Locale() string { - return l.locale +func (t *ml) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ml) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ml' +func (t *ml) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ml' +func (t *ml) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ml_IN/ml_IN.go b/resources/locales/ml_IN/ml_IN.go index 3457eae..e50bdf7 100644 --- a/resources/locales/ml_IN/ml_IN.go +++ b/resources/locales/ml_IN/ml_IN.go @@ -5,23 +5,30 @@ import ( ) type ml_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ml_IN' locale func New() locales.Translator { return &ml_IN{ - locale: "ml_IN", + locale: "ml_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ml_IN) Locale() string { - return l.locale +func (t *ml_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ml_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ml_IN' +func (t *ml_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ml_IN' +func (t *ml_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mn/mn.go b/resources/locales/mn/mn.go index c14628a..28209d1 100644 --- a/resources/locales/mn/mn.go +++ b/resources/locales/mn/mn.go @@ -5,23 +5,30 @@ import ( ) type mn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mn' locale func New() locales.Translator { return &mn{ - locale: "mn", + locale: "mn", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mn) Locale() string { - return l.locale +func (t *mn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mn' +func (t *mn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mn' +func (t *mn) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mn_MN/mn_MN.go b/resources/locales/mn_MN/mn_MN.go index c7d05fc..c0e12a6 100644 --- a/resources/locales/mn_MN/mn_MN.go +++ b/resources/locales/mn_MN/mn_MN.go @@ -5,23 +5,30 @@ import ( ) type mn_MN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mn_MN' locale func New() locales.Translator { return &mn_MN{ - locale: "mn_MN", + locale: "mn_MN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mn_MN) Locale() string { - return l.locale +func (t *mn_MN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mn_MN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mn_MN' +func (t *mn_MN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mn_MN' +func (t *mn_MN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mr/mr.go b/resources/locales/mr/mr.go index 9d9edda..57c3d9d 100644 --- a/resources/locales/mr/mr.go +++ b/resources/locales/mr/mr.go @@ -5,23 +5,30 @@ import ( ) type mr struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mr' locale func New() locales.Translator { return &mr{ - locale: "mr", + locale: "mr", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mr) Locale() string { - return l.locale +func (t *mr) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mr) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mr' +func (t *mr) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mr' +func (t *mr) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mr_IN/mr_IN.go b/resources/locales/mr_IN/mr_IN.go index 54344a8..281ecbb 100644 --- a/resources/locales/mr_IN/mr_IN.go +++ b/resources/locales/mr_IN/mr_IN.go @@ -5,23 +5,30 @@ import ( ) type mr_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mr_IN' locale func New() locales.Translator { return &mr_IN{ - locale: "mr_IN", + locale: "mr_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *mr_IN) Locale() string { - return l.locale +func (t *mr_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mr_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mr_IN' +func (t *mr_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mr_IN' +func (t *mr_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ms/ms.go b/resources/locales/ms/ms.go index 013b51f..7fb1857 100644 --- a/resources/locales/ms/ms.go +++ b/resources/locales/ms/ms.go @@ -5,23 +5,30 @@ import ( ) type ms struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ms' locale func New() locales.Translator { return &ms{ - locale: "ms", + locale: "ms", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ms) Locale() string { - return l.locale +func (t *ms) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ms) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ms' +func (t *ms) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ms' +func (t *ms) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ms_BN/ms_BN.go b/resources/locales/ms_BN/ms_BN.go index 6afa282..0a1d7a2 100644 --- a/resources/locales/ms_BN/ms_BN.go +++ b/resources/locales/ms_BN/ms_BN.go @@ -5,23 +5,30 @@ import ( ) type ms_BN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ms_BN' locale func New() locales.Translator { return &ms_BN{ - locale: "ms_BN", + locale: "ms_BN", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ms_BN) Locale() string { - return l.locale +func (t *ms_BN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ms_BN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ms_BN' +func (t *ms_BN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ms_BN' +func (t *ms_BN) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ms_MY/ms_MY.go b/resources/locales/ms_MY/ms_MY.go index b13895e..951bc3b 100644 --- a/resources/locales/ms_MY/ms_MY.go +++ b/resources/locales/ms_MY/ms_MY.go @@ -5,23 +5,30 @@ import ( ) type ms_MY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ms_MY' locale func New() locales.Translator { return &ms_MY{ - locale: "ms_MY", + locale: "ms_MY", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ms_MY) Locale() string { - return l.locale +func (t *ms_MY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ms_MY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ms_MY' +func (t *ms_MY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ms_MY' +func (t *ms_MY) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ms_SG/ms_SG.go b/resources/locales/ms_SG/ms_SG.go index 10f4d62..63b40ec 100644 --- a/resources/locales/ms_SG/ms_SG.go +++ b/resources/locales/ms_SG/ms_SG.go @@ -5,23 +5,30 @@ import ( ) type ms_SG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ms_SG' locale func New() locales.Translator { return &ms_SG{ - locale: "ms_SG", + locale: "ms_SG", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ms_SG) Locale() string { - return l.locale +func (t *ms_SG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ms_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ms_SG' +func (t *ms_SG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ms_SG' +func (t *ms_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/mt/mt.go b/resources/locales/mt/mt.go index 7916a35..f7e53e9 100644 --- a/resources/locales/mt/mt.go +++ b/resources/locales/mt/mt.go @@ -5,23 +5,30 @@ import ( ) type mt struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mt' locale func New() locales.Translator { return &mt{ - locale: "mt", + locale: "mt", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *mt) Locale() string { - return l.locale +func (t *mt) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mt) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mt' +func (t *mt) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mt' +func (t *mt) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mt_MT/mt_MT.go b/resources/locales/mt_MT/mt_MT.go index 268cfba..6c5bc75 100644 --- a/resources/locales/mt_MT/mt_MT.go +++ b/resources/locales/mt_MT/mt_MT.go @@ -5,23 +5,30 @@ import ( ) type mt_MT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mt_MT' locale func New() locales.Translator { return &mt_MT{ - locale: "mt_MT", + locale: "mt_MT", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *mt_MT) Locale() string { - return l.locale +func (t *mt_MT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mt_MT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mt_MT' +func (t *mt_MT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'mt_MT' +func (t *mt_MT) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/mua/mua.go b/resources/locales/mua/mua.go index b675aa7..312eacb 100644 --- a/resources/locales/mua/mua.go +++ b/resources/locales/mua/mua.go @@ -5,22 +5,29 @@ import ( ) type mua struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mua' locale func New() locales.Translator { return &mua{ - locale: "mua", + locale: "mua", + plurals: nil, } } // Locale returns the current translators string locale -func (l *mua) Locale() string { - return l.locale +func (t *mua) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mua) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mua' +func (t *mua) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'mua' +func (t *mua) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mua_CM/mua_CM.go b/resources/locales/mua_CM/mua_CM.go index 4afaa0b..36b1750 100644 --- a/resources/locales/mua_CM/mua_CM.go +++ b/resources/locales/mua_CM/mua_CM.go @@ -5,22 +5,29 @@ import ( ) type mua_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mua_CM' locale func New() locales.Translator { return &mua_CM{ - locale: "mua_CM", + locale: "mua_CM", + plurals: nil, } } // Locale returns the current translators string locale -func (l *mua_CM) Locale() string { - return l.locale +func (t *mua_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mua_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mua_CM' +func (t *mua_CM) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'mua_CM' +func (t *mua_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/my/my.go b/resources/locales/my/my.go index deffcca..dd23e2a 100644 --- a/resources/locales/my/my.go +++ b/resources/locales/my/my.go @@ -5,23 +5,30 @@ import ( ) type my struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'my' locale func New() locales.Translator { return &my{ - locale: "my", + locale: "my", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *my) Locale() string { - return l.locale +func (t *my) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *my) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'my' +func (t *my) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'my' +func (t *my) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/my_MM/my_MM.go b/resources/locales/my_MM/my_MM.go index 258fb61..1d3ce8e 100644 --- a/resources/locales/my_MM/my_MM.go +++ b/resources/locales/my_MM/my_MM.go @@ -5,23 +5,30 @@ import ( ) type my_MM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'my_MM' locale func New() locales.Translator { return &my_MM{ - locale: "my_MM", + locale: "my_MM", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *my_MM) Locale() string { - return l.locale +func (t *my_MM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *my_MM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'my_MM' +func (t *my_MM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'my_MM' +func (t *my_MM) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/mzn/mzn.go b/resources/locales/mzn/mzn.go index b785cf9..1e316c1 100644 --- a/resources/locales/mzn/mzn.go +++ b/resources/locales/mzn/mzn.go @@ -5,22 +5,29 @@ import ( ) type mzn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mzn' locale func New() locales.Translator { return &mzn{ - locale: "mzn", + locale: "mzn", + plurals: nil, } } // Locale returns the current translators string locale -func (l *mzn) Locale() string { - return l.locale +func (t *mzn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mzn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mzn' +func (t *mzn) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'mzn' +func (t *mzn) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mzn_IR/mzn_IR.go b/resources/locales/mzn_IR/mzn_IR.go index 851e5fe..99acb08 100644 --- a/resources/locales/mzn_IR/mzn_IR.go +++ b/resources/locales/mzn_IR/mzn_IR.go @@ -5,22 +5,29 @@ import ( ) type mzn_IR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'mzn_IR' locale func New() locales.Translator { return &mzn_IR{ - locale: "mzn_IR", + locale: "mzn_IR", + plurals: nil, } } // Locale returns the current translators string locale -func (l *mzn_IR) Locale() string { - return l.locale +func (t *mzn_IR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *mzn_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'mzn_IR' +func (t *mzn_IR) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'mzn_IR' +func (t *mzn_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/naq/naq.go b/resources/locales/naq/naq.go index 7b6cfe8..8306f74 100644 --- a/resources/locales/naq/naq.go +++ b/resources/locales/naq/naq.go @@ -5,23 +5,30 @@ import ( ) type naq struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'naq' locale func New() locales.Translator { return &naq{ - locale: "naq", + locale: "naq", + plurals: []locales.PluralRule{2, 3, 6}, } } // Locale returns the current translators string locale -func (l *naq) Locale() string { - return l.locale +func (t *naq) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *naq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'naq' +func (t *naq) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'naq' +func (t *naq) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/naq_NA/naq_NA.go b/resources/locales/naq_NA/naq_NA.go index 223da27..9157d08 100644 --- a/resources/locales/naq_NA/naq_NA.go +++ b/resources/locales/naq_NA/naq_NA.go @@ -5,23 +5,30 @@ import ( ) type naq_NA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'naq_NA' locale func New() locales.Translator { return &naq_NA{ - locale: "naq_NA", + locale: "naq_NA", + plurals: []locales.PluralRule{2, 3, 6}, } } // Locale returns the current translators string locale -func (l *naq_NA) Locale() string { - return l.locale +func (t *naq_NA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *naq_NA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'naq_NA' +func (t *naq_NA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'naq_NA' +func (t *naq_NA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nb/nb.go b/resources/locales/nb/nb.go index 4c0826a..d1bea85 100644 --- a/resources/locales/nb/nb.go +++ b/resources/locales/nb/nb.go @@ -5,23 +5,30 @@ import ( ) type nb struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nb' locale func New() locales.Translator { return &nb{ - locale: "nb", + locale: "nb", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nb) Locale() string { - return l.locale +func (t *nb) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nb) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nb' +func (t *nb) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nb' +func (t *nb) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nb_NO/nb_NO.go b/resources/locales/nb_NO/nb_NO.go index 568a632..7ce5ad4 100644 --- a/resources/locales/nb_NO/nb_NO.go +++ b/resources/locales/nb_NO/nb_NO.go @@ -5,23 +5,30 @@ import ( ) type nb_NO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nb_NO' locale func New() locales.Translator { return &nb_NO{ - locale: "nb_NO", + locale: "nb_NO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nb_NO) Locale() string { - return l.locale +func (t *nb_NO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nb_NO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nb_NO' +func (t *nb_NO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nb_NO' +func (t *nb_NO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nb_SJ/nb_SJ.go b/resources/locales/nb_SJ/nb_SJ.go index dcc14e1..37d4fe7 100644 --- a/resources/locales/nb_SJ/nb_SJ.go +++ b/resources/locales/nb_SJ/nb_SJ.go @@ -5,23 +5,30 @@ import ( ) type nb_SJ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nb_SJ' locale func New() locales.Translator { return &nb_SJ{ - locale: "nb_SJ", + locale: "nb_SJ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nb_SJ) Locale() string { - return l.locale +func (t *nb_SJ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nb_SJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nb_SJ' +func (t *nb_SJ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nb_SJ' +func (t *nb_SJ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nd/nd.go b/resources/locales/nd/nd.go index 1403274..b92ada0 100644 --- a/resources/locales/nd/nd.go +++ b/resources/locales/nd/nd.go @@ -5,23 +5,30 @@ import ( ) type nd struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nd' locale func New() locales.Translator { return &nd{ - locale: "nd", + locale: "nd", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nd) Locale() string { - return l.locale +func (t *nd) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nd) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nd' +func (t *nd) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nd' +func (t *nd) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nd_ZW/nd_ZW.go b/resources/locales/nd_ZW/nd_ZW.go index f38d49c..262a799 100644 --- a/resources/locales/nd_ZW/nd_ZW.go +++ b/resources/locales/nd_ZW/nd_ZW.go @@ -5,23 +5,30 @@ import ( ) type nd_ZW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nd_ZW' locale func New() locales.Translator { return &nd_ZW{ - locale: "nd_ZW", + locale: "nd_ZW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nd_ZW) Locale() string { - return l.locale +func (t *nd_ZW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nd_ZW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nd_ZW' +func (t *nd_ZW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nd_ZW' +func (t *nd_ZW) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ne/ne.go b/resources/locales/ne/ne.go index 04363ff..f6efcf6 100644 --- a/resources/locales/ne/ne.go +++ b/resources/locales/ne/ne.go @@ -5,23 +5,30 @@ import ( ) type ne struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ne' locale func New() locales.Translator { return &ne{ - locale: "ne", + locale: "ne", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ne) Locale() string { - return l.locale +func (t *ne) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ne) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ne' +func (t *ne) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ne' +func (t *ne) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ne_IN/ne_IN.go b/resources/locales/ne_IN/ne_IN.go index e026d7f..5754103 100644 --- a/resources/locales/ne_IN/ne_IN.go +++ b/resources/locales/ne_IN/ne_IN.go @@ -5,23 +5,30 @@ import ( ) type ne_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ne_IN' locale func New() locales.Translator { return &ne_IN{ - locale: "ne_IN", + locale: "ne_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ne_IN) Locale() string { - return l.locale +func (t *ne_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ne_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ne_IN' +func (t *ne_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ne_IN' +func (t *ne_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ne_NP/ne_NP.go b/resources/locales/ne_NP/ne_NP.go index a066989..83e1756 100644 --- a/resources/locales/ne_NP/ne_NP.go +++ b/resources/locales/ne_NP/ne_NP.go @@ -5,23 +5,30 @@ import ( ) type ne_NP struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ne_NP' locale func New() locales.Translator { return &ne_NP{ - locale: "ne_NP", + locale: "ne_NP", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ne_NP) Locale() string { - return l.locale +func (t *ne_NP) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ne_NP) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ne_NP' +func (t *ne_NP) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ne_NP' +func (t *ne_NP) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nl/nl.go b/resources/locales/nl/nl.go index c2287fb..b4343c9 100644 --- a/resources/locales/nl/nl.go +++ b/resources/locales/nl/nl.go @@ -5,23 +5,30 @@ import ( ) type nl struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nl' locale func New() locales.Translator { return &nl{ - locale: "nl", + locale: "nl", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nl) Locale() string { - return l.locale +func (t *nl) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nl' +func (t *nl) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nl' +func (t *nl) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/nl_AW/nl_AW.go b/resources/locales/nl_AW/nl_AW.go index 85a4a7a..a4dc1e8 100644 --- a/resources/locales/nl_AW/nl_AW.go +++ b/resources/locales/nl_AW/nl_AW.go @@ -5,23 +5,30 @@ import ( ) type nl_AW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nl_AW' locale func New() locales.Translator { return &nl_AW{ - locale: "nl_AW", + locale: "nl_AW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nl_AW) Locale() string { - return l.locale +func (t *nl_AW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nl_AW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nl_AW' +func (t *nl_AW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nl_AW' +func (t *nl_AW) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/nl_BE/nl_BE.go b/resources/locales/nl_BE/nl_BE.go index 5950a83..060b19d 100644 --- a/resources/locales/nl_BE/nl_BE.go +++ b/resources/locales/nl_BE/nl_BE.go @@ -5,31 +5,38 @@ import ( ) type nl_BE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nl_BE' locale func New() locales.Translator { return &nl_BE{ - locale: "nl_BE", + locale: "nl_BE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nl_BE) Locale() string { - return l.locale +func (t *nl_BE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nl_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nl_BE' +func (t *nl_BE) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'nl_BE' +func (t *nl_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/nl_BQ/nl_BQ.go b/resources/locales/nl_BQ/nl_BQ.go index 7c318d2..03ce5e8 100644 --- a/resources/locales/nl_BQ/nl_BQ.go +++ b/resources/locales/nl_BQ/nl_BQ.go @@ -5,23 +5,30 @@ import ( ) type nl_BQ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nl_BQ' locale func New() locales.Translator { return &nl_BQ{ - locale: "nl_BQ", + locale: "nl_BQ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nl_BQ) Locale() string { - return l.locale +func (t *nl_BQ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nl_BQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nl_BQ' +func (t *nl_BQ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nl_BQ' +func (t *nl_BQ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/nl_CW/nl_CW.go b/resources/locales/nl_CW/nl_CW.go index 0459f11..c14ef3f 100644 --- a/resources/locales/nl_CW/nl_CW.go +++ b/resources/locales/nl_CW/nl_CW.go @@ -5,31 +5,38 @@ import ( ) type nl_CW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nl_CW' locale func New() locales.Translator { return &nl_CW{ - locale: "nl_CW", + locale: "nl_CW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nl_CW) Locale() string { - return l.locale +func (t *nl_CW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nl_CW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nl_CW' +func (t *nl_CW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nl_CW' +func (t *nl_CW) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/nl_NL/nl_NL.go b/resources/locales/nl_NL/nl_NL.go index ff77c03..a8cb62f 100644 --- a/resources/locales/nl_NL/nl_NL.go +++ b/resources/locales/nl_NL/nl_NL.go @@ -5,23 +5,30 @@ import ( ) type nl_NL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nl_NL' locale func New() locales.Translator { return &nl_NL{ - locale: "nl_NL", + locale: "nl_NL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nl_NL) Locale() string { - return l.locale +func (t *nl_NL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nl_NL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nl_NL' +func (t *nl_NL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nl_NL' +func (t *nl_NL) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/nl_SR/nl_SR.go b/resources/locales/nl_SR/nl_SR.go index 3da061e..1b7fac3 100644 --- a/resources/locales/nl_SR/nl_SR.go +++ b/resources/locales/nl_SR/nl_SR.go @@ -5,23 +5,30 @@ import ( ) type nl_SR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nl_SR' locale func New() locales.Translator { return &nl_SR{ - locale: "nl_SR", + locale: "nl_SR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nl_SR) Locale() string { - return l.locale +func (t *nl_SR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nl_SR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nl_SR' +func (t *nl_SR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nl_SR' +func (t *nl_SR) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/nl_SX/nl_SX.go b/resources/locales/nl_SX/nl_SX.go index b8062e6..9cd24c0 100644 --- a/resources/locales/nl_SX/nl_SX.go +++ b/resources/locales/nl_SX/nl_SX.go @@ -5,23 +5,30 @@ import ( ) type nl_SX struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nl_SX' locale func New() locales.Translator { return &nl_SX{ - locale: "nl_SX", + locale: "nl_SX", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nl_SX) Locale() string { - return l.locale +func (t *nl_SX) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nl_SX) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nl_SX' +func (t *nl_SX) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nl_SX' +func (t *nl_SX) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/nmg/nmg.go b/resources/locales/nmg/nmg.go index 2a5a6d9..002dcb2 100644 --- a/resources/locales/nmg/nmg.go +++ b/resources/locales/nmg/nmg.go @@ -5,22 +5,29 @@ import ( ) type nmg struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nmg' locale func New() locales.Translator { return &nmg{ - locale: "nmg", + locale: "nmg", + plurals: nil, } } // Locale returns the current translators string locale -func (l *nmg) Locale() string { - return l.locale +func (t *nmg) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nmg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nmg' +func (t *nmg) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'nmg' +func (t *nmg) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/nmg_CM/nmg_CM.go b/resources/locales/nmg_CM/nmg_CM.go index 69ba039..63937fe 100644 --- a/resources/locales/nmg_CM/nmg_CM.go +++ b/resources/locales/nmg_CM/nmg_CM.go @@ -5,22 +5,29 @@ import ( ) type nmg_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nmg_CM' locale func New() locales.Translator { return &nmg_CM{ - locale: "nmg_CM", + locale: "nmg_CM", + plurals: nil, } } // Locale returns the current translators string locale -func (l *nmg_CM) Locale() string { - return l.locale +func (t *nmg_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nmg_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nmg_CM' +func (t *nmg_CM) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'nmg_CM' +func (t *nmg_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/nn/nn.go b/resources/locales/nn/nn.go index 840c9e7..1ed6cc7 100644 --- a/resources/locales/nn/nn.go +++ b/resources/locales/nn/nn.go @@ -5,23 +5,30 @@ import ( ) type nn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nn' locale func New() locales.Translator { return &nn{ - locale: "nn", + locale: "nn", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nn) Locale() string { - return l.locale +func (t *nn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nn' +func (t *nn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nn' +func (t *nn) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nn_NO/nn_NO.go b/resources/locales/nn_NO/nn_NO.go index d4a5145..a0b00b7 100644 --- a/resources/locales/nn_NO/nn_NO.go +++ b/resources/locales/nn_NO/nn_NO.go @@ -5,23 +5,30 @@ import ( ) type nn_NO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nn_NO' locale func New() locales.Translator { return &nn_NO{ - locale: "nn_NO", + locale: "nn_NO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nn_NO) Locale() string { - return l.locale +func (t *nn_NO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nn_NO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nn_NO' +func (t *nn_NO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nn_NO' +func (t *nn_NO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nnh/nnh.go b/resources/locales/nnh/nnh.go index 8a4be2f..af8d744 100644 --- a/resources/locales/nnh/nnh.go +++ b/resources/locales/nnh/nnh.go @@ -5,23 +5,30 @@ import ( ) type nnh struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nnh' locale func New() locales.Translator { return &nnh{ - locale: "nnh", + locale: "nnh", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nnh) Locale() string { - return l.locale +func (t *nnh) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nnh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nnh' +func (t *nnh) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nnh' +func (t *nnh) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nnh_CM/nnh_CM.go b/resources/locales/nnh_CM/nnh_CM.go index 0f1959a..0c8db11 100644 --- a/resources/locales/nnh_CM/nnh_CM.go +++ b/resources/locales/nnh_CM/nnh_CM.go @@ -5,23 +5,30 @@ import ( ) type nnh_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nnh_CM' locale func New() locales.Translator { return &nnh_CM{ - locale: "nnh_CM", + locale: "nnh_CM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nnh_CM) Locale() string { - return l.locale +func (t *nnh_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nnh_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nnh_CM' +func (t *nnh_CM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nnh_CM' +func (t *nnh_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nus/nus.go b/resources/locales/nus/nus.go index ea0733f..f120857 100644 --- a/resources/locales/nus/nus.go +++ b/resources/locales/nus/nus.go @@ -5,22 +5,29 @@ import ( ) type nus struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nus' locale func New() locales.Translator { return &nus{ - locale: "nus", + locale: "nus", + plurals: nil, } } // Locale returns the current translators string locale -func (l *nus) Locale() string { - return l.locale +func (t *nus) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nus) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nus' +func (t *nus) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'nus' +func (t *nus) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/nus_SS/nus_SS.go b/resources/locales/nus_SS/nus_SS.go index 46b8768..567d813 100644 --- a/resources/locales/nus_SS/nus_SS.go +++ b/resources/locales/nus_SS/nus_SS.go @@ -5,22 +5,29 @@ import ( ) type nus_SS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nus_SS' locale func New() locales.Translator { return &nus_SS{ - locale: "nus_SS", + locale: "nus_SS", + plurals: nil, } } // Locale returns the current translators string locale -func (l *nus_SS) Locale() string { - return l.locale +func (t *nus_SS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nus_SS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nus_SS' +func (t *nus_SS) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'nus_SS' +func (t *nus_SS) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/nyn/nyn.go b/resources/locales/nyn/nyn.go index 8fa8e6a..e99ed7d 100644 --- a/resources/locales/nyn/nyn.go +++ b/resources/locales/nyn/nyn.go @@ -5,23 +5,30 @@ import ( ) type nyn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nyn' locale func New() locales.Translator { return &nyn{ - locale: "nyn", + locale: "nyn", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nyn) Locale() string { - return l.locale +func (t *nyn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nyn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nyn' +func (t *nyn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nyn' +func (t *nyn) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/nyn_UG/nyn_UG.go b/resources/locales/nyn_UG/nyn_UG.go index d8773e3..b65ad9a 100644 --- a/resources/locales/nyn_UG/nyn_UG.go +++ b/resources/locales/nyn_UG/nyn_UG.go @@ -5,23 +5,30 @@ import ( ) type nyn_UG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'nyn_UG' locale func New() locales.Translator { return &nyn_UG{ - locale: "nyn_UG", + locale: "nyn_UG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *nyn_UG) Locale() string { - return l.locale +func (t *nyn_UG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *nyn_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'nyn_UG' +func (t *nyn_UG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'nyn_UG' +func (t *nyn_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/om/om.go b/resources/locales/om/om.go index 15d676e..4b176bf 100644 --- a/resources/locales/om/om.go +++ b/resources/locales/om/om.go @@ -5,23 +5,30 @@ import ( ) type om struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'om' locale func New() locales.Translator { return &om{ - locale: "om", + locale: "om", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *om) Locale() string { - return l.locale +func (t *om) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *om) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'om' +func (t *om) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'om' +func (t *om) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/om_ET/om_ET.go b/resources/locales/om_ET/om_ET.go index 1cf46be..239d24c 100644 --- a/resources/locales/om_ET/om_ET.go +++ b/resources/locales/om_ET/om_ET.go @@ -5,23 +5,30 @@ import ( ) type om_ET struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'om_ET' locale func New() locales.Translator { return &om_ET{ - locale: "om_ET", + locale: "om_ET", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *om_ET) Locale() string { - return l.locale +func (t *om_ET) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *om_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'om_ET' +func (t *om_ET) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'om_ET' +func (t *om_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/om_KE/om_KE.go b/resources/locales/om_KE/om_KE.go index 3f9e273..b7baeb6 100644 --- a/resources/locales/om_KE/om_KE.go +++ b/resources/locales/om_KE/om_KE.go @@ -5,23 +5,30 @@ import ( ) type om_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'om_KE' locale func New() locales.Translator { return &om_KE{ - locale: "om_KE", + locale: "om_KE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *om_KE) Locale() string { - return l.locale +func (t *om_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *om_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'om_KE' +func (t *om_KE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'om_KE' +func (t *om_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/or/or.go b/resources/locales/or/or.go index ef1ffbb..315b5b3 100644 --- a/resources/locales/or/or.go +++ b/resources/locales/or/or.go @@ -5,23 +5,30 @@ import ( ) type or struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'or' locale func New() locales.Translator { return &or{ - locale: "or", + locale: "or", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *or) Locale() string { - return l.locale +func (t *or) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *or) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'or' +func (t *or) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'or' +func (t *or) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/or_IN/or_IN.go b/resources/locales/or_IN/or_IN.go index 3d0f036..20cdd17 100644 --- a/resources/locales/or_IN/or_IN.go +++ b/resources/locales/or_IN/or_IN.go @@ -5,23 +5,30 @@ import ( ) type or_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'or_IN' locale func New() locales.Translator { return &or_IN{ - locale: "or_IN", + locale: "or_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *or_IN) Locale() string { - return l.locale +func (t *or_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *or_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'or_IN' +func (t *or_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'or_IN' +func (t *or_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/os/os.go b/resources/locales/os/os.go index f2fe987..fffeb72 100644 --- a/resources/locales/os/os.go +++ b/resources/locales/os/os.go @@ -5,23 +5,30 @@ import ( ) type os struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'os' locale func New() locales.Translator { return &os{ - locale: "os", + locale: "os", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *os) Locale() string { - return l.locale +func (t *os) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *os) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'os' +func (t *os) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'os' +func (t *os) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/os_GE/os_GE.go b/resources/locales/os_GE/os_GE.go index d653a1b..4a8bb3e 100644 --- a/resources/locales/os_GE/os_GE.go +++ b/resources/locales/os_GE/os_GE.go @@ -5,23 +5,30 @@ import ( ) type os_GE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'os_GE' locale func New() locales.Translator { return &os_GE{ - locale: "os_GE", + locale: "os_GE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *os_GE) Locale() string { - return l.locale +func (t *os_GE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *os_GE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'os_GE' +func (t *os_GE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'os_GE' +func (t *os_GE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/os_RU/os_RU.go b/resources/locales/os_RU/os_RU.go index 4f3dfac..62c62f7 100644 --- a/resources/locales/os_RU/os_RU.go +++ b/resources/locales/os_RU/os_RU.go @@ -5,23 +5,30 @@ import ( ) type os_RU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'os_RU' locale func New() locales.Translator { return &os_RU{ - locale: "os_RU", + locale: "os_RU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *os_RU) Locale() string { - return l.locale +func (t *os_RU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *os_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'os_RU' +func (t *os_RU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'os_RU' +func (t *os_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pa/pa.go b/resources/locales/pa/pa.go index e07b21f..83276da 100644 --- a/resources/locales/pa/pa.go +++ b/resources/locales/pa/pa.go @@ -5,23 +5,30 @@ import ( ) type pa struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pa' locale func New() locales.Translator { return &pa{ - locale: "pa", + locale: "pa", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pa) Locale() string { - return l.locale +func (t *pa) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pa) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pa' +func (t *pa) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pa' +func (t *pa) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pa_Arab/pa_Arab.go b/resources/locales/pa_Arab/pa_Arab.go index cd8af11..36ce20e 100644 --- a/resources/locales/pa_Arab/pa_Arab.go +++ b/resources/locales/pa_Arab/pa_Arab.go @@ -5,23 +5,30 @@ import ( ) type pa_Arab struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pa_Arab' locale func New() locales.Translator { return &pa_Arab{ - locale: "pa_Arab", + locale: "pa_Arab", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pa_Arab) Locale() string { - return l.locale +func (t *pa_Arab) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pa_Arab) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pa_Arab' +func (t *pa_Arab) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pa_Arab' +func (t *pa_Arab) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pa_Arab_PK/pa_Arab_PK.go b/resources/locales/pa_Arab_PK/pa_Arab_PK.go index 87bdf5a..7f788eb 100644 --- a/resources/locales/pa_Arab_PK/pa_Arab_PK.go +++ b/resources/locales/pa_Arab_PK/pa_Arab_PK.go @@ -5,23 +5,30 @@ import ( ) type pa_Arab_PK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pa_Arab_PK' locale func New() locales.Translator { return &pa_Arab_PK{ - locale: "pa_Arab_PK", + locale: "pa_Arab_PK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pa_Arab_PK) Locale() string { - return l.locale +func (t *pa_Arab_PK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pa_Arab_PK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pa_Arab_PK' +func (t *pa_Arab_PK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pa_Arab_PK' +func (t *pa_Arab_PK) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pa_Guru/pa_Guru.go b/resources/locales/pa_Guru/pa_Guru.go index 6058654..38185a0 100644 --- a/resources/locales/pa_Guru/pa_Guru.go +++ b/resources/locales/pa_Guru/pa_Guru.go @@ -5,23 +5,30 @@ import ( ) type pa_Guru struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pa_Guru' locale func New() locales.Translator { return &pa_Guru{ - locale: "pa_Guru", + locale: "pa_Guru", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pa_Guru) Locale() string { - return l.locale +func (t *pa_Guru) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pa_Guru) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pa_Guru' +func (t *pa_Guru) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pa_Guru' +func (t *pa_Guru) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pa_Guru_IN/pa_Guru_IN.go b/resources/locales/pa_Guru_IN/pa_Guru_IN.go index 31885ee..78d4d18 100644 --- a/resources/locales/pa_Guru_IN/pa_Guru_IN.go +++ b/resources/locales/pa_Guru_IN/pa_Guru_IN.go @@ -5,23 +5,30 @@ import ( ) type pa_Guru_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pa_Guru_IN' locale func New() locales.Translator { return &pa_Guru_IN{ - locale: "pa_Guru_IN", + locale: "pa_Guru_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pa_Guru_IN) Locale() string { - return l.locale +func (t *pa_Guru_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pa_Guru_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pa_Guru_IN' +func (t *pa_Guru_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pa_Guru_IN' +func (t *pa_Guru_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pl/pl.go b/resources/locales/pl/pl.go index 0c2544f..6493e28 100644 --- a/resources/locales/pl/pl.go +++ b/resources/locales/pl/pl.go @@ -5,23 +5,30 @@ import ( ) type pl struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pl' locale func New() locales.Translator { return &pl{ - locale: "pl", + locale: "pl", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *pl) Locale() string { - return l.locale +func (t *pl) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pl' +func (t *pl) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pl' +func (t *pl) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/pl_PL/pl_PL.go b/resources/locales/pl_PL/pl_PL.go index 920b4ce..85f1b2c 100644 --- a/resources/locales/pl_PL/pl_PL.go +++ b/resources/locales/pl_PL/pl_PL.go @@ -5,23 +5,30 @@ import ( ) type pl_PL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pl_PL' locale func New() locales.Translator { return &pl_PL{ - locale: "pl_PL", + locale: "pl_PL", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *pl_PL) Locale() string { - return l.locale +func (t *pl_PL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pl_PL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pl_PL' +func (t *pl_PL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pl_PL' +func (t *pl_PL) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/prg/prg.go b/resources/locales/prg/prg.go index 606b050..232bd19 100644 --- a/resources/locales/prg/prg.go +++ b/resources/locales/prg/prg.go @@ -5,25 +5,30 @@ import ( ) type prg struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'prg' locale func New() locales.Translator { return &prg{ - locale: "prg", + locale: "prg", + plurals: []locales.PluralRule{1, 2, 6}, } } // Locale returns the current translators string locale -func (l *prg) Locale() string { - return l.locale +func (t *prg) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *prg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'prg' +func (t *prg) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'prg' +func (t *prg) CardinalPluralRule(num string) (locales.PluralRule, error) { f, err := locales.F(num) if err != nil { @@ -35,6 +40,8 @@ func (l *prg) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if (n%10 == 0) || (n%100 >= 11 && n%100 <= 19) || (v == 2 && f%100 >= 11 && f%100 <= 19) { return locales.PluralRuleZero, nil } else if (n%10 == 1 && n%100 != 11) || (v == 2 && f%10 == 1 && f%100 != 11) || (v != 2 && f%10 == 1) { diff --git a/resources/locales/prg_001/prg_001.go b/resources/locales/prg_001/prg_001.go index b996b71..f6b4bf9 100644 --- a/resources/locales/prg_001/prg_001.go +++ b/resources/locales/prg_001/prg_001.go @@ -5,23 +5,30 @@ import ( ) type prg_001 struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'prg_001' locale func New() locales.Translator { return &prg_001{ - locale: "prg_001", + locale: "prg_001", + plurals: []locales.PluralRule{1, 2, 6}, } } // Locale returns the current translators string locale -func (l *prg_001) Locale() string { - return l.locale +func (t *prg_001) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *prg_001) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'prg_001' +func (t *prg_001) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'prg_001' +func (t *prg_001) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ps/ps.go b/resources/locales/ps/ps.go index d6fe630..0d1282c 100644 --- a/resources/locales/ps/ps.go +++ b/resources/locales/ps/ps.go @@ -5,23 +5,30 @@ import ( ) type ps struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ps' locale func New() locales.Translator { return &ps{ - locale: "ps", + locale: "ps", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ps) Locale() string { - return l.locale +func (t *ps) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ps) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ps' +func (t *ps) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ps' +func (t *ps) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ps_AF/ps_AF.go b/resources/locales/ps_AF/ps_AF.go index f9f902b..4308152 100644 --- a/resources/locales/ps_AF/ps_AF.go +++ b/resources/locales/ps_AF/ps_AF.go @@ -5,23 +5,30 @@ import ( ) type ps_AF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ps_AF' locale func New() locales.Translator { return &ps_AF{ - locale: "ps_AF", + locale: "ps_AF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ps_AF) Locale() string { - return l.locale +func (t *ps_AF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ps_AF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ps_AF' +func (t *ps_AF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ps_AF' +func (t *ps_AF) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt/pt.go b/resources/locales/pt/pt.go index 1ba2334..4fda138 100644 --- a/resources/locales/pt/pt.go +++ b/resources/locales/pt/pt.go @@ -5,23 +5,30 @@ import ( ) type pt struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt' locale func New() locales.Translator { return &pt{ - locale: "pt", + locale: "pt", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt) Locale() string { - return l.locale +func (t *pt) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt' +func (t *pt) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt' +func (t *pt) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_AO/pt_AO.go b/resources/locales/pt_AO/pt_AO.go index b848a36..9c64be3 100644 --- a/resources/locales/pt_AO/pt_AO.go +++ b/resources/locales/pt_AO/pt_AO.go @@ -5,23 +5,30 @@ import ( ) type pt_AO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_AO' locale func New() locales.Translator { return &pt_AO{ - locale: "pt_AO", + locale: "pt_AO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_AO) Locale() string { - return l.locale +func (t *pt_AO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_AO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_AO' +func (t *pt_AO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_AO' +func (t *pt_AO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_BR/pt_BR.go b/resources/locales/pt_BR/pt_BR.go index 397d65c..9cbb35e 100644 --- a/resources/locales/pt_BR/pt_BR.go +++ b/resources/locales/pt_BR/pt_BR.go @@ -5,23 +5,30 @@ import ( ) type pt_BR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_BR' locale func New() locales.Translator { return &pt_BR{ - locale: "pt_BR", + locale: "pt_BR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_BR) Locale() string { - return l.locale +func (t *pt_BR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_BR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_BR' +func (t *pt_BR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_BR' +func (t *pt_BR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_CH/pt_CH.go b/resources/locales/pt_CH/pt_CH.go index 797e9cc..5bd85fb 100644 --- a/resources/locales/pt_CH/pt_CH.go +++ b/resources/locales/pt_CH/pt_CH.go @@ -5,23 +5,30 @@ import ( ) type pt_CH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_CH' locale func New() locales.Translator { return &pt_CH{ - locale: "pt_CH", + locale: "pt_CH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_CH) Locale() string { - return l.locale +func (t *pt_CH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_CH' +func (t *pt_CH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_CH' +func (t *pt_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_CV/pt_CV.go b/resources/locales/pt_CV/pt_CV.go index c9e5c29..6d99b0b 100644 --- a/resources/locales/pt_CV/pt_CV.go +++ b/resources/locales/pt_CV/pt_CV.go @@ -5,23 +5,30 @@ import ( ) type pt_CV struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_CV' locale func New() locales.Translator { return &pt_CV{ - locale: "pt_CV", + locale: "pt_CV", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_CV) Locale() string { - return l.locale +func (t *pt_CV) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_CV) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_CV' +func (t *pt_CV) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_CV' +func (t *pt_CV) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_GQ/pt_GQ.go b/resources/locales/pt_GQ/pt_GQ.go index 353e7f9..9797f3f 100644 --- a/resources/locales/pt_GQ/pt_GQ.go +++ b/resources/locales/pt_GQ/pt_GQ.go @@ -5,23 +5,30 @@ import ( ) type pt_GQ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_GQ' locale func New() locales.Translator { return &pt_GQ{ - locale: "pt_GQ", + locale: "pt_GQ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_GQ) Locale() string { - return l.locale +func (t *pt_GQ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_GQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_GQ' +func (t *pt_GQ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_GQ' +func (t *pt_GQ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_GW/pt_GW.go b/resources/locales/pt_GW/pt_GW.go index 8ffcfaf..6adb01c 100644 --- a/resources/locales/pt_GW/pt_GW.go +++ b/resources/locales/pt_GW/pt_GW.go @@ -5,23 +5,30 @@ import ( ) type pt_GW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_GW' locale func New() locales.Translator { return &pt_GW{ - locale: "pt_GW", + locale: "pt_GW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_GW) Locale() string { - return l.locale +func (t *pt_GW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_GW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_GW' +func (t *pt_GW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_GW' +func (t *pt_GW) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_LU/pt_LU.go b/resources/locales/pt_LU/pt_LU.go index f3d5b5d..a79c5ab 100644 --- a/resources/locales/pt_LU/pt_LU.go +++ b/resources/locales/pt_LU/pt_LU.go @@ -5,23 +5,30 @@ import ( ) type pt_LU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_LU' locale func New() locales.Translator { return &pt_LU{ - locale: "pt_LU", + locale: "pt_LU", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_LU) Locale() string { - return l.locale +func (t *pt_LU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_LU' +func (t *pt_LU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_LU' +func (t *pt_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_MO/pt_MO.go b/resources/locales/pt_MO/pt_MO.go index c232731..61c5a16 100644 --- a/resources/locales/pt_MO/pt_MO.go +++ b/resources/locales/pt_MO/pt_MO.go @@ -5,23 +5,30 @@ import ( ) type pt_MO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_MO' locale func New() locales.Translator { return &pt_MO{ - locale: "pt_MO", + locale: "pt_MO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_MO) Locale() string { - return l.locale +func (t *pt_MO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_MO' +func (t *pt_MO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_MO' +func (t *pt_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_MZ/pt_MZ.go b/resources/locales/pt_MZ/pt_MZ.go index 9fc6361..12e0995 100644 --- a/resources/locales/pt_MZ/pt_MZ.go +++ b/resources/locales/pt_MZ/pt_MZ.go @@ -5,23 +5,30 @@ import ( ) type pt_MZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_MZ' locale func New() locales.Translator { return &pt_MZ{ - locale: "pt_MZ", + locale: "pt_MZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_MZ) Locale() string { - return l.locale +func (t *pt_MZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_MZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_MZ' +func (t *pt_MZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_MZ' +func (t *pt_MZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_PT/pt_PT.go b/resources/locales/pt_PT/pt_PT.go index 0f3e25b..b923047 100644 --- a/resources/locales/pt_PT/pt_PT.go +++ b/resources/locales/pt_PT/pt_PT.go @@ -5,23 +5,30 @@ import ( ) type pt_PT struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_PT' locale func New() locales.Translator { return &pt_PT{ - locale: "pt_PT", + locale: "pt_PT", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_PT) Locale() string { - return l.locale +func (t *pt_PT) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_PT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_PT' +func (t *pt_PT) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_PT' +func (t *pt_PT) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_ST/pt_ST.go b/resources/locales/pt_ST/pt_ST.go index 7d63078..2460c1e 100644 --- a/resources/locales/pt_ST/pt_ST.go +++ b/resources/locales/pt_ST/pt_ST.go @@ -5,23 +5,30 @@ import ( ) type pt_ST struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_ST' locale func New() locales.Translator { return &pt_ST{ - locale: "pt_ST", + locale: "pt_ST", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_ST) Locale() string { - return l.locale +func (t *pt_ST) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_ST) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_ST' +func (t *pt_ST) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_ST' +func (t *pt_ST) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/pt_TL/pt_TL.go b/resources/locales/pt_TL/pt_TL.go index 7d1961a..07dd3d5 100644 --- a/resources/locales/pt_TL/pt_TL.go +++ b/resources/locales/pt_TL/pt_TL.go @@ -5,23 +5,30 @@ import ( ) type pt_TL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'pt_TL' locale func New() locales.Translator { return &pt_TL{ - locale: "pt_TL", + locale: "pt_TL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *pt_TL) Locale() string { - return l.locale +func (t *pt_TL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *pt_TL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'pt_TL' +func (t *pt_TL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'pt_TL' +func (t *pt_TL) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/qu/qu.go b/resources/locales/qu/qu.go index 5b4fa7b..4e11ccc 100644 --- a/resources/locales/qu/qu.go +++ b/resources/locales/qu/qu.go @@ -5,22 +5,29 @@ import ( ) type qu struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'qu' locale func New() locales.Translator { return &qu{ - locale: "qu", + locale: "qu", + plurals: nil, } } // Locale returns the current translators string locale -func (l *qu) Locale() string { - return l.locale +func (t *qu) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *qu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'qu' +func (t *qu) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'qu' +func (t *qu) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/qu_BO/qu_BO.go b/resources/locales/qu_BO/qu_BO.go index cdd8a4a..26ae170 100644 --- a/resources/locales/qu_BO/qu_BO.go +++ b/resources/locales/qu_BO/qu_BO.go @@ -5,22 +5,29 @@ import ( ) type qu_BO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'qu_BO' locale func New() locales.Translator { return &qu_BO{ - locale: "qu_BO", + locale: "qu_BO", + plurals: nil, } } // Locale returns the current translators string locale -func (l *qu_BO) Locale() string { - return l.locale +func (t *qu_BO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *qu_BO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'qu_BO' +func (t *qu_BO) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'qu_BO' +func (t *qu_BO) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/qu_EC/qu_EC.go b/resources/locales/qu_EC/qu_EC.go index 519f07f..6762b84 100644 --- a/resources/locales/qu_EC/qu_EC.go +++ b/resources/locales/qu_EC/qu_EC.go @@ -5,22 +5,29 @@ import ( ) type qu_EC struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'qu_EC' locale func New() locales.Translator { return &qu_EC{ - locale: "qu_EC", + locale: "qu_EC", + plurals: nil, } } // Locale returns the current translators string locale -func (l *qu_EC) Locale() string { - return l.locale +func (t *qu_EC) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *qu_EC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'qu_EC' +func (t *qu_EC) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'qu_EC' +func (t *qu_EC) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/qu_PE/qu_PE.go b/resources/locales/qu_PE/qu_PE.go index 966c81c..e6760bb 100644 --- a/resources/locales/qu_PE/qu_PE.go +++ b/resources/locales/qu_PE/qu_PE.go @@ -5,22 +5,29 @@ import ( ) type qu_PE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'qu_PE' locale func New() locales.Translator { return &qu_PE{ - locale: "qu_PE", + locale: "qu_PE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *qu_PE) Locale() string { - return l.locale +func (t *qu_PE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *qu_PE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'qu_PE' +func (t *qu_PE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'qu_PE' +func (t *qu_PE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/rm/rm.go b/resources/locales/rm/rm.go index 9849092..dbff856 100644 --- a/resources/locales/rm/rm.go +++ b/resources/locales/rm/rm.go @@ -5,23 +5,30 @@ import ( ) type rm struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'rm' locale func New() locales.Translator { return &rm{ - locale: "rm", + locale: "rm", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *rm) Locale() string { - return l.locale +func (t *rm) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *rm) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'rm' +func (t *rm) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'rm' +func (t *rm) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/rm_CH/rm_CH.go b/resources/locales/rm_CH/rm_CH.go index 6e4ecee..7b334d0 100644 --- a/resources/locales/rm_CH/rm_CH.go +++ b/resources/locales/rm_CH/rm_CH.go @@ -5,23 +5,30 @@ import ( ) type rm_CH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'rm_CH' locale func New() locales.Translator { return &rm_CH{ - locale: "rm_CH", + locale: "rm_CH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *rm_CH) Locale() string { - return l.locale +func (t *rm_CH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *rm_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'rm_CH' +func (t *rm_CH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'rm_CH' +func (t *rm_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/rn/rn.go b/resources/locales/rn/rn.go index 6d160e5..d717ea8 100644 --- a/resources/locales/rn/rn.go +++ b/resources/locales/rn/rn.go @@ -5,22 +5,29 @@ import ( ) type rn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'rn' locale func New() locales.Translator { return &rn{ - locale: "rn", + locale: "rn", + plurals: nil, } } // Locale returns the current translators string locale -func (l *rn) Locale() string { - return l.locale +func (t *rn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *rn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'rn' +func (t *rn) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'rn' +func (t *rn) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/rn_BI/rn_BI.go b/resources/locales/rn_BI/rn_BI.go index 4a43a2b..12502fe 100644 --- a/resources/locales/rn_BI/rn_BI.go +++ b/resources/locales/rn_BI/rn_BI.go @@ -5,22 +5,29 @@ import ( ) type rn_BI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'rn_BI' locale func New() locales.Translator { return &rn_BI{ - locale: "rn_BI", + locale: "rn_BI", + plurals: nil, } } // Locale returns the current translators string locale -func (l *rn_BI) Locale() string { - return l.locale +func (t *rn_BI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *rn_BI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'rn_BI' +func (t *rn_BI) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'rn_BI' +func (t *rn_BI) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ro/ro.go b/resources/locales/ro/ro.go index 49e25be..e909d62 100644 --- a/resources/locales/ro/ro.go +++ b/resources/locales/ro/ro.go @@ -5,23 +5,30 @@ import ( ) type ro struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ro' locale func New() locales.Translator { return &ro{ - locale: "ro", + locale: "ro", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *ro) Locale() string { - return l.locale +func (t *ro) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ro) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ro' +func (t *ro) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ro' +func (t *ro) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ro_MD/ro_MD.go b/resources/locales/ro_MD/ro_MD.go index c7845e9..70d89f0 100644 --- a/resources/locales/ro_MD/ro_MD.go +++ b/resources/locales/ro_MD/ro_MD.go @@ -5,23 +5,30 @@ import ( ) type ro_MD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ro_MD' locale func New() locales.Translator { return &ro_MD{ - locale: "ro_MD", + locale: "ro_MD", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *ro_MD) Locale() string { - return l.locale +func (t *ro_MD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ro_MD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ro_MD' +func (t *ro_MD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ro_MD' +func (t *ro_MD) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ro_RO/ro_RO.go b/resources/locales/ro_RO/ro_RO.go index bb1e0d7..e40c152 100644 --- a/resources/locales/ro_RO/ro_RO.go +++ b/resources/locales/ro_RO/ro_RO.go @@ -5,28 +5,30 @@ import ( ) type ro_RO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ro_RO' locale func New() locales.Translator { return &ro_RO{ - locale: "ro_RO", + locale: "ro_RO", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *ro_RO) Locale() string { - return l.locale +func (t *ro_RO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ro_RO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ro_RO' +func (t *ro_RO) Plurals() []locales.PluralRule { + return t.plurals +} - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// CardinalPluralRule returns the PluralRule given 'num' for 'ro_RO' +func (t *ro_RO) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) @@ -35,6 +37,11 @@ func (l *ro_RO) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + i, err := locales.I(num) + if err != nil { + return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} + } + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } else if (v != 0) || (n == 0) || (n != 1 && n%100 >= 1 && n%100 <= 19) { diff --git a/resources/locales/rof/rof.go b/resources/locales/rof/rof.go index dea50ca..228351c 100644 --- a/resources/locales/rof/rof.go +++ b/resources/locales/rof/rof.go @@ -5,23 +5,30 @@ import ( ) type rof struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'rof' locale func New() locales.Translator { return &rof{ - locale: "rof", + locale: "rof", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *rof) Locale() string { - return l.locale +func (t *rof) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *rof) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'rof' +func (t *rof) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'rof' +func (t *rof) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/rof_TZ/rof_TZ.go b/resources/locales/rof_TZ/rof_TZ.go index 1122c33..04c567d 100644 --- a/resources/locales/rof_TZ/rof_TZ.go +++ b/resources/locales/rof_TZ/rof_TZ.go @@ -5,23 +5,30 @@ import ( ) type rof_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'rof_TZ' locale func New() locales.Translator { return &rof_TZ{ - locale: "rof_TZ", + locale: "rof_TZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *rof_TZ) Locale() string { - return l.locale +func (t *rof_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *rof_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'rof_TZ' +func (t *rof_TZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'rof_TZ' +func (t *rof_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/root/root.go b/resources/locales/root/root.go index ccdfc13..a0048f6 100644 --- a/resources/locales/root/root.go +++ b/resources/locales/root/root.go @@ -5,23 +5,30 @@ import ( ) type root struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'root' locale func New() locales.Translator { return &root{ - locale: "root", + locale: "root", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *root) Locale() string { - return l.locale +func (t *root) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *root) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'root' +func (t *root) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'root' +func (t *root) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ru/ru.go b/resources/locales/ru/ru.go index d839df5..f02e28b 100644 --- a/resources/locales/ru/ru.go +++ b/resources/locales/ru/ru.go @@ -5,23 +5,30 @@ import ( ) type ru struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ru' locale func New() locales.Translator { return &ru{ - locale: "ru", + locale: "ru", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ru) Locale() string { - return l.locale +func (t *ru) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ru) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ru' +func (t *ru) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ru' +func (t *ru) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ru_BY/ru_BY.go b/resources/locales/ru_BY/ru_BY.go index 06a292c..2533aff 100644 --- a/resources/locales/ru_BY/ru_BY.go +++ b/resources/locales/ru_BY/ru_BY.go @@ -5,23 +5,30 @@ import ( ) type ru_BY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ru_BY' locale func New() locales.Translator { return &ru_BY{ - locale: "ru_BY", + locale: "ru_BY", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ru_BY) Locale() string { - return l.locale +func (t *ru_BY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ru_BY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ru_BY' +func (t *ru_BY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ru_BY' +func (t *ru_BY) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ru_KG/ru_KG.go b/resources/locales/ru_KG/ru_KG.go index 84f8970..38e24c6 100644 --- a/resources/locales/ru_KG/ru_KG.go +++ b/resources/locales/ru_KG/ru_KG.go @@ -5,23 +5,30 @@ import ( ) type ru_KG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ru_KG' locale func New() locales.Translator { return &ru_KG{ - locale: "ru_KG", + locale: "ru_KG", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ru_KG) Locale() string { - return l.locale +func (t *ru_KG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ru_KG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ru_KG' +func (t *ru_KG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ru_KG' +func (t *ru_KG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ru_KZ/ru_KZ.go b/resources/locales/ru_KZ/ru_KZ.go index 1a19e09..7a95322 100644 --- a/resources/locales/ru_KZ/ru_KZ.go +++ b/resources/locales/ru_KZ/ru_KZ.go @@ -5,31 +5,38 @@ import ( ) type ru_KZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ru_KZ' locale func New() locales.Translator { return &ru_KZ{ - locale: "ru_KZ", + locale: "ru_KZ", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ru_KZ) Locale() string { - return l.locale +func (t *ru_KZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ru_KZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ru_KZ' +func (t *ru_KZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ru_KZ' +func (t *ru_KZ) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if v == 0 && i%10 == 1 && i%100 != 11 { return locales.PluralRuleOne, nil } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { diff --git a/resources/locales/ru_MD/ru_MD.go b/resources/locales/ru_MD/ru_MD.go index eb78149..33ffa76 100644 --- a/resources/locales/ru_MD/ru_MD.go +++ b/resources/locales/ru_MD/ru_MD.go @@ -5,23 +5,30 @@ import ( ) type ru_MD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ru_MD' locale func New() locales.Translator { return &ru_MD{ - locale: "ru_MD", + locale: "ru_MD", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ru_MD) Locale() string { - return l.locale +func (t *ru_MD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ru_MD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ru_MD' +func (t *ru_MD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ru_MD' +func (t *ru_MD) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ru_RU/ru_RU.go b/resources/locales/ru_RU/ru_RU.go index 5b65935..f845bbb 100644 --- a/resources/locales/ru_RU/ru_RU.go +++ b/resources/locales/ru_RU/ru_RU.go @@ -5,23 +5,30 @@ import ( ) type ru_RU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ru_RU' locale func New() locales.Translator { return &ru_RU{ - locale: "ru_RU", + locale: "ru_RU", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ru_RU) Locale() string { - return l.locale +func (t *ru_RU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ru_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ru_RU' +func (t *ru_RU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ru_RU' +func (t *ru_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ru_UA/ru_UA.go b/resources/locales/ru_UA/ru_UA.go index 466f5bc..4e14fba 100644 --- a/resources/locales/ru_UA/ru_UA.go +++ b/resources/locales/ru_UA/ru_UA.go @@ -5,23 +5,30 @@ import ( ) type ru_UA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ru_UA' locale func New() locales.Translator { return &ru_UA{ - locale: "ru_UA", + locale: "ru_UA", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *ru_UA) Locale() string { - return l.locale +func (t *ru_UA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ru_UA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ru_UA' +func (t *ru_UA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ru_UA' +func (t *ru_UA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/rw/rw.go b/resources/locales/rw/rw.go index 6fbd92b..2d671b9 100644 --- a/resources/locales/rw/rw.go +++ b/resources/locales/rw/rw.go @@ -5,22 +5,29 @@ import ( ) type rw struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'rw' locale func New() locales.Translator { return &rw{ - locale: "rw", + locale: "rw", + plurals: nil, } } // Locale returns the current translators string locale -func (l *rw) Locale() string { - return l.locale +func (t *rw) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *rw) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'rw' +func (t *rw) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'rw' +func (t *rw) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/rw_RW/rw_RW.go b/resources/locales/rw_RW/rw_RW.go index b763673..7eaa0cf 100644 --- a/resources/locales/rw_RW/rw_RW.go +++ b/resources/locales/rw_RW/rw_RW.go @@ -5,22 +5,29 @@ import ( ) type rw_RW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'rw_RW' locale func New() locales.Translator { return &rw_RW{ - locale: "rw_RW", + locale: "rw_RW", + plurals: nil, } } // Locale returns the current translators string locale -func (l *rw_RW) Locale() string { - return l.locale +func (t *rw_RW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *rw_RW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'rw_RW' +func (t *rw_RW) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'rw_RW' +func (t *rw_RW) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/rwk/rwk.go b/resources/locales/rwk/rwk.go index a4f3ea0..f5a887c 100644 --- a/resources/locales/rwk/rwk.go +++ b/resources/locales/rwk/rwk.go @@ -5,23 +5,30 @@ import ( ) type rwk struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'rwk' locale func New() locales.Translator { return &rwk{ - locale: "rwk", + locale: "rwk", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *rwk) Locale() string { - return l.locale +func (t *rwk) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *rwk) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'rwk' +func (t *rwk) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'rwk' +func (t *rwk) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/rwk_TZ/rwk_TZ.go b/resources/locales/rwk_TZ/rwk_TZ.go index 678e2bf..c336b52 100644 --- a/resources/locales/rwk_TZ/rwk_TZ.go +++ b/resources/locales/rwk_TZ/rwk_TZ.go @@ -5,23 +5,30 @@ import ( ) type rwk_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'rwk_TZ' locale func New() locales.Translator { return &rwk_TZ{ - locale: "rwk_TZ", + locale: "rwk_TZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *rwk_TZ) Locale() string { - return l.locale +func (t *rwk_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *rwk_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'rwk_TZ' +func (t *rwk_TZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'rwk_TZ' +func (t *rwk_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/sah/sah.go b/resources/locales/sah/sah.go index 38e8a1c..0a85e52 100644 --- a/resources/locales/sah/sah.go +++ b/resources/locales/sah/sah.go @@ -5,23 +5,30 @@ import ( ) type sah struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sah' locale func New() locales.Translator { return &sah{ - locale: "sah", + locale: "sah", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *sah) Locale() string { - return l.locale +func (t *sah) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sah) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sah' +func (t *sah) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sah' +func (t *sah) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/sah_RU/sah_RU.go b/resources/locales/sah_RU/sah_RU.go index 973afd2..fab7e64 100644 --- a/resources/locales/sah_RU/sah_RU.go +++ b/resources/locales/sah_RU/sah_RU.go @@ -5,23 +5,30 @@ import ( ) type sah_RU struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sah_RU' locale func New() locales.Translator { return &sah_RU{ - locale: "sah_RU", + locale: "sah_RU", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *sah_RU) Locale() string { - return l.locale +func (t *sah_RU) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sah_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sah_RU' +func (t *sah_RU) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sah_RU' +func (t *sah_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/saq/saq.go b/resources/locales/saq/saq.go index 2b09e26..78094e6 100644 --- a/resources/locales/saq/saq.go +++ b/resources/locales/saq/saq.go @@ -5,23 +5,30 @@ import ( ) type saq struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'saq' locale func New() locales.Translator { return &saq{ - locale: "saq", + locale: "saq", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *saq) Locale() string { - return l.locale +func (t *saq) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *saq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'saq' +func (t *saq) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'saq' +func (t *saq) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/saq_KE/saq_KE.go b/resources/locales/saq_KE/saq_KE.go index 480d790..119f2c5 100644 --- a/resources/locales/saq_KE/saq_KE.go +++ b/resources/locales/saq_KE/saq_KE.go @@ -5,23 +5,30 @@ import ( ) type saq_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'saq_KE' locale func New() locales.Translator { return &saq_KE{ - locale: "saq_KE", + locale: "saq_KE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *saq_KE) Locale() string { - return l.locale +func (t *saq_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *saq_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'saq_KE' +func (t *saq_KE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'saq_KE' +func (t *saq_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/sbp/sbp.go b/resources/locales/sbp/sbp.go index 95766d2..bd76911 100644 --- a/resources/locales/sbp/sbp.go +++ b/resources/locales/sbp/sbp.go @@ -5,22 +5,29 @@ import ( ) type sbp struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sbp' locale func New() locales.Translator { return &sbp{ - locale: "sbp", + locale: "sbp", + plurals: nil, } } // Locale returns the current translators string locale -func (l *sbp) Locale() string { - return l.locale +func (t *sbp) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sbp) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sbp' +func (t *sbp) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'sbp' +func (t *sbp) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/sbp_TZ/sbp_TZ.go b/resources/locales/sbp_TZ/sbp_TZ.go index 6271188..78bfeaa 100644 --- a/resources/locales/sbp_TZ/sbp_TZ.go +++ b/resources/locales/sbp_TZ/sbp_TZ.go @@ -5,22 +5,29 @@ import ( ) type sbp_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sbp_TZ' locale func New() locales.Translator { return &sbp_TZ{ - locale: "sbp_TZ", + locale: "sbp_TZ", + plurals: nil, } } // Locale returns the current translators string locale -func (l *sbp_TZ) Locale() string { - return l.locale +func (t *sbp_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sbp_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sbp_TZ' +func (t *sbp_TZ) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'sbp_TZ' +func (t *sbp_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/se/se.go b/resources/locales/se/se.go index 38f2c96..49dd74b 100644 --- a/resources/locales/se/se.go +++ b/resources/locales/se/se.go @@ -5,23 +5,30 @@ import ( ) type se struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'se' locale func New() locales.Translator { return &se{ - locale: "se", + locale: "se", + plurals: []locales.PluralRule{2, 3, 6}, } } // Locale returns the current translators string locale -func (l *se) Locale() string { - return l.locale +func (t *se) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *se) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'se' +func (t *se) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'se' +func (t *se) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/se_FI/se_FI.go b/resources/locales/se_FI/se_FI.go index a876802..3156e6b 100644 --- a/resources/locales/se_FI/se_FI.go +++ b/resources/locales/se_FI/se_FI.go @@ -5,23 +5,30 @@ import ( ) type se_FI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'se_FI' locale func New() locales.Translator { return &se_FI{ - locale: "se_FI", + locale: "se_FI", + plurals: []locales.PluralRule{2, 3, 6}, } } // Locale returns the current translators string locale -func (l *se_FI) Locale() string { - return l.locale +func (t *se_FI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *se_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'se_FI' +func (t *se_FI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'se_FI' +func (t *se_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/se_NO/se_NO.go b/resources/locales/se_NO/se_NO.go index e5d3ad8..5863a2d 100644 --- a/resources/locales/se_NO/se_NO.go +++ b/resources/locales/se_NO/se_NO.go @@ -5,23 +5,30 @@ import ( ) type se_NO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'se_NO' locale func New() locales.Translator { return &se_NO{ - locale: "se_NO", + locale: "se_NO", + plurals: []locales.PluralRule{2, 3, 6}, } } // Locale returns the current translators string locale -func (l *se_NO) Locale() string { - return l.locale +func (t *se_NO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *se_NO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'se_NO' +func (t *se_NO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'se_NO' +func (t *se_NO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/se_SE/se_SE.go b/resources/locales/se_SE/se_SE.go index 7100d67..1466ee0 100644 --- a/resources/locales/se_SE/se_SE.go +++ b/resources/locales/se_SE/se_SE.go @@ -5,23 +5,30 @@ import ( ) type se_SE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'se_SE' locale func New() locales.Translator { return &se_SE{ - locale: "se_SE", + locale: "se_SE", + plurals: []locales.PluralRule{2, 3, 6}, } } // Locale returns the current translators string locale -func (l *se_SE) Locale() string { - return l.locale +func (t *se_SE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *se_SE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'se_SE' +func (t *se_SE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'se_SE' +func (t *se_SE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/seh/seh.go b/resources/locales/seh/seh.go index 0cbf8fc..fc55cc7 100644 --- a/resources/locales/seh/seh.go +++ b/resources/locales/seh/seh.go @@ -5,23 +5,30 @@ import ( ) type seh struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'seh' locale func New() locales.Translator { return &seh{ - locale: "seh", + locale: "seh", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *seh) Locale() string { - return l.locale +func (t *seh) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *seh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'seh' +func (t *seh) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'seh' +func (t *seh) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/seh_MZ/seh_MZ.go b/resources/locales/seh_MZ/seh_MZ.go index baadfd5..41701d7 100644 --- a/resources/locales/seh_MZ/seh_MZ.go +++ b/resources/locales/seh_MZ/seh_MZ.go @@ -5,23 +5,30 @@ import ( ) type seh_MZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'seh_MZ' locale func New() locales.Translator { return &seh_MZ{ - locale: "seh_MZ", + locale: "seh_MZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *seh_MZ) Locale() string { - return l.locale +func (t *seh_MZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *seh_MZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'seh_MZ' +func (t *seh_MZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'seh_MZ' +func (t *seh_MZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ses/ses.go b/resources/locales/ses/ses.go index 16496ba..3a003e1 100644 --- a/resources/locales/ses/ses.go +++ b/resources/locales/ses/ses.go @@ -5,23 +5,30 @@ import ( ) type ses struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ses' locale func New() locales.Translator { return &ses{ - locale: "ses", + locale: "ses", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ses) Locale() string { - return l.locale +func (t *ses) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ses) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ses' +func (t *ses) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ses' +func (t *ses) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ses_ML/ses_ML.go b/resources/locales/ses_ML/ses_ML.go index d5285ab..060411c 100644 --- a/resources/locales/ses_ML/ses_ML.go +++ b/resources/locales/ses_ML/ses_ML.go @@ -5,23 +5,30 @@ import ( ) type ses_ML struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ses_ML' locale func New() locales.Translator { return &ses_ML{ - locale: "ses_ML", + locale: "ses_ML", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *ses_ML) Locale() string { - return l.locale +func (t *ses_ML) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ses_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ses_ML' +func (t *ses_ML) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ses_ML' +func (t *ses_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/sg/sg.go b/resources/locales/sg/sg.go index a46b2ab..c8c4d9a 100644 --- a/resources/locales/sg/sg.go +++ b/resources/locales/sg/sg.go @@ -5,23 +5,30 @@ import ( ) type sg struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sg' locale func New() locales.Translator { return &sg{ - locale: "sg", + locale: "sg", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *sg) Locale() string { - return l.locale +func (t *sg) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sg' +func (t *sg) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sg' +func (t *sg) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/sg_CF/sg_CF.go b/resources/locales/sg_CF/sg_CF.go index e114e05..270fa3f 100644 --- a/resources/locales/sg_CF/sg_CF.go +++ b/resources/locales/sg_CF/sg_CF.go @@ -5,23 +5,30 @@ import ( ) type sg_CF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sg_CF' locale func New() locales.Translator { return &sg_CF{ - locale: "sg_CF", + locale: "sg_CF", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *sg_CF) Locale() string { - return l.locale +func (t *sg_CF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sg_CF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sg_CF' +func (t *sg_CF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sg_CF' +func (t *sg_CF) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/shi/shi.go b/resources/locales/shi/shi.go index b011c8f..3a13e95 100644 --- a/resources/locales/shi/shi.go +++ b/resources/locales/shi/shi.go @@ -5,23 +5,30 @@ import ( ) type shi struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'shi' locale func New() locales.Translator { return &shi{ - locale: "shi", + locale: "shi", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *shi) Locale() string { - return l.locale +func (t *shi) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *shi) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'shi' +func (t *shi) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'shi' +func (t *shi) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/shi_Latn/shi_Latn.go b/resources/locales/shi_Latn/shi_Latn.go index 8a60d42..ead5508 100644 --- a/resources/locales/shi_Latn/shi_Latn.go +++ b/resources/locales/shi_Latn/shi_Latn.go @@ -5,23 +5,30 @@ import ( ) type shi_Latn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'shi_Latn' locale func New() locales.Translator { return &shi_Latn{ - locale: "shi_Latn", + locale: "shi_Latn", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *shi_Latn) Locale() string { - return l.locale +func (t *shi_Latn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *shi_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'shi_Latn' +func (t *shi_Latn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'shi_Latn' +func (t *shi_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/shi_Latn_MA/shi_Latn_MA.go b/resources/locales/shi_Latn_MA/shi_Latn_MA.go index d37165f..454c3fa 100644 --- a/resources/locales/shi_Latn_MA/shi_Latn_MA.go +++ b/resources/locales/shi_Latn_MA/shi_Latn_MA.go @@ -5,23 +5,30 @@ import ( ) type shi_Latn_MA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'shi_Latn_MA' locale func New() locales.Translator { return &shi_Latn_MA{ - locale: "shi_Latn_MA", + locale: "shi_Latn_MA", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *shi_Latn_MA) Locale() string { - return l.locale +func (t *shi_Latn_MA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *shi_Latn_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'shi_Latn_MA' +func (t *shi_Latn_MA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'shi_Latn_MA' +func (t *shi_Latn_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/shi_Tfng/shi_Tfng.go b/resources/locales/shi_Tfng/shi_Tfng.go index d89e2a0..8ab6572 100644 --- a/resources/locales/shi_Tfng/shi_Tfng.go +++ b/resources/locales/shi_Tfng/shi_Tfng.go @@ -5,23 +5,30 @@ import ( ) type shi_Tfng struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'shi_Tfng' locale func New() locales.Translator { return &shi_Tfng{ - locale: "shi_Tfng", + locale: "shi_Tfng", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *shi_Tfng) Locale() string { - return l.locale +func (t *shi_Tfng) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *shi_Tfng) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'shi_Tfng' +func (t *shi_Tfng) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'shi_Tfng' +func (t *shi_Tfng) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go b/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go index f5c4ae7..a0547ff 100644 --- a/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go +++ b/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go @@ -5,30 +5,37 @@ import ( ) type shi_Tfng_MA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'shi_Tfng_MA' locale func New() locales.Translator { return &shi_Tfng_MA{ - locale: "shi_Tfng_MA", + locale: "shi_Tfng_MA", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *shi_Tfng_MA) Locale() string { - return l.locale +func (t *shi_Tfng_MA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *shi_Tfng_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'shi_Tfng_MA' +func (t *shi_Tfng_MA) Plurals() []locales.PluralRule { + return t.plurals +} - n, err := locales.N(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'shi_Tfng_MA' +func (t *shi_Tfng_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { + + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - i, err := locales.I(num) + n, err := locales.N(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } diff --git a/resources/locales/si/si.go b/resources/locales/si/si.go index 5c8a966..2c342a8 100644 --- a/resources/locales/si/si.go +++ b/resources/locales/si/si.go @@ -5,23 +5,30 @@ import ( ) type si struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'si' locale func New() locales.Translator { return &si{ - locale: "si", + locale: "si", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *si) Locale() string { - return l.locale +func (t *si) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *si) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'si' +func (t *si) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'si' +func (t *si) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/si_LK/si_LK.go b/resources/locales/si_LK/si_LK.go index fe2aee7..02590d4 100644 --- a/resources/locales/si_LK/si_LK.go +++ b/resources/locales/si_LK/si_LK.go @@ -5,35 +5,42 @@ import ( ) type si_LK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'si_LK' locale func New() locales.Translator { return &si_LK{ - locale: "si_LK", + locale: "si_LK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *si_LK) Locale() string { - return l.locale +func (t *si_LK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *si_LK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'si_LK' +func (t *si_LK) Plurals() []locales.PluralRule { + return t.plurals +} - n, err := locales.N(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'si_LK' +func (t *si_LK) CardinalPluralRule(num string) (locales.PluralRule, error) { + + f, err := locales.F(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - i, err := locales.I(num) + n, err := locales.N(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - f, err := locales.F(num) + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } diff --git a/resources/locales/sk/sk.go b/resources/locales/sk/sk.go index 1734c59..8d86cda 100644 --- a/resources/locales/sk/sk.go +++ b/resources/locales/sk/sk.go @@ -5,23 +5,30 @@ import ( ) type sk struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sk' locale func New() locales.Translator { return &sk{ - locale: "sk", + locale: "sk", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *sk) Locale() string { - return l.locale +func (t *sk) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sk) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sk' +func (t *sk) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sk' +func (t *sk) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sk_SK/sk_SK.go b/resources/locales/sk_SK/sk_SK.go index 851739e..3366933 100644 --- a/resources/locales/sk_SK/sk_SK.go +++ b/resources/locales/sk_SK/sk_SK.go @@ -5,31 +5,38 @@ import ( ) type sk_SK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sk_SK' locale func New() locales.Translator { return &sk_SK{ - locale: "sk_SK", + locale: "sk_SK", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *sk_SK) Locale() string { - return l.locale +func (t *sk_SK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sk_SK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sk_SK' +func (t *sk_SK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sk_SK' +func (t *sk_SK) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } else if i >= 2 && i <= 4 && v == 0 { diff --git a/resources/locales/sl/sl.go b/resources/locales/sl/sl.go index 37faad5..e18b0bf 100644 --- a/resources/locales/sl/sl.go +++ b/resources/locales/sl/sl.go @@ -5,23 +5,30 @@ import ( ) type sl struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sl' locale func New() locales.Translator { return &sl{ - locale: "sl", + locale: "sl", + plurals: []locales.PluralRule{2, 3, 4, 6}, } } // Locale returns the current translators string locale -func (l *sl) Locale() string { - return l.locale +func (t *sl) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sl' +func (t *sl) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sl' +func (t *sl) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sl_SI/sl_SI.go b/resources/locales/sl_SI/sl_SI.go index fedc1a5..4d03608 100644 --- a/resources/locales/sl_SI/sl_SI.go +++ b/resources/locales/sl_SI/sl_SI.go @@ -5,23 +5,30 @@ import ( ) type sl_SI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sl_SI' locale func New() locales.Translator { return &sl_SI{ - locale: "sl_SI", + locale: "sl_SI", + plurals: []locales.PluralRule{2, 3, 4, 6}, } } // Locale returns the current translators string locale -func (l *sl_SI) Locale() string { - return l.locale +func (t *sl_SI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sl_SI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sl_SI' +func (t *sl_SI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sl_SI' +func (t *sl_SI) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/smn/smn.go b/resources/locales/smn/smn.go index e2a2469..27abdb6 100644 --- a/resources/locales/smn/smn.go +++ b/resources/locales/smn/smn.go @@ -5,23 +5,30 @@ import ( ) type smn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'smn' locale func New() locales.Translator { return &smn{ - locale: "smn", + locale: "smn", + plurals: []locales.PluralRule{2, 3, 6}, } } // Locale returns the current translators string locale -func (l *smn) Locale() string { - return l.locale +func (t *smn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *smn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'smn' +func (t *smn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'smn' +func (t *smn) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/smn_FI/smn_FI.go b/resources/locales/smn_FI/smn_FI.go index 25e55ee..3d4f5fb 100644 --- a/resources/locales/smn_FI/smn_FI.go +++ b/resources/locales/smn_FI/smn_FI.go @@ -5,23 +5,30 @@ import ( ) type smn_FI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'smn_FI' locale func New() locales.Translator { return &smn_FI{ - locale: "smn_FI", + locale: "smn_FI", + plurals: []locales.PluralRule{2, 3, 6}, } } // Locale returns the current translators string locale -func (l *smn_FI) Locale() string { - return l.locale +func (t *smn_FI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *smn_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'smn_FI' +func (t *smn_FI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'smn_FI' +func (t *smn_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/sn/sn.go b/resources/locales/sn/sn.go index f3331a5..e4604db 100644 --- a/resources/locales/sn/sn.go +++ b/resources/locales/sn/sn.go @@ -5,23 +5,30 @@ import ( ) type sn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sn' locale func New() locales.Translator { return &sn{ - locale: "sn", + locale: "sn", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sn) Locale() string { - return l.locale +func (t *sn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sn' +func (t *sn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sn' +func (t *sn) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/sn_ZW/sn_ZW.go b/resources/locales/sn_ZW/sn_ZW.go index 9fef1ab..cbcd766 100644 --- a/resources/locales/sn_ZW/sn_ZW.go +++ b/resources/locales/sn_ZW/sn_ZW.go @@ -5,23 +5,30 @@ import ( ) type sn_ZW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sn_ZW' locale func New() locales.Translator { return &sn_ZW{ - locale: "sn_ZW", + locale: "sn_ZW", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sn_ZW) Locale() string { - return l.locale +func (t *sn_ZW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sn_ZW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sn_ZW' +func (t *sn_ZW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sn_ZW' +func (t *sn_ZW) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/so/so.go b/resources/locales/so/so.go index 4a6bf7a..7196689 100644 --- a/resources/locales/so/so.go +++ b/resources/locales/so/so.go @@ -5,23 +5,30 @@ import ( ) type so struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'so' locale func New() locales.Translator { return &so{ - locale: "so", + locale: "so", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *so) Locale() string { - return l.locale +func (t *so) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *so) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'so' +func (t *so) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'so' +func (t *so) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/so_DJ/so_DJ.go b/resources/locales/so_DJ/so_DJ.go index dba0389..523c0b1 100644 --- a/resources/locales/so_DJ/so_DJ.go +++ b/resources/locales/so_DJ/so_DJ.go @@ -5,23 +5,30 @@ import ( ) type so_DJ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'so_DJ' locale func New() locales.Translator { return &so_DJ{ - locale: "so_DJ", + locale: "so_DJ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *so_DJ) Locale() string { - return l.locale +func (t *so_DJ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *so_DJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'so_DJ' +func (t *so_DJ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'so_DJ' +func (t *so_DJ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/so_ET/so_ET.go b/resources/locales/so_ET/so_ET.go index f2b7710..e9bdf7b 100644 --- a/resources/locales/so_ET/so_ET.go +++ b/resources/locales/so_ET/so_ET.go @@ -5,23 +5,30 @@ import ( ) type so_ET struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'so_ET' locale func New() locales.Translator { return &so_ET{ - locale: "so_ET", + locale: "so_ET", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *so_ET) Locale() string { - return l.locale +func (t *so_ET) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *so_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'so_ET' +func (t *so_ET) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'so_ET' +func (t *so_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/so_KE/so_KE.go b/resources/locales/so_KE/so_KE.go index e2041da..44fd115 100644 --- a/resources/locales/so_KE/so_KE.go +++ b/resources/locales/so_KE/so_KE.go @@ -5,23 +5,30 @@ import ( ) type so_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'so_KE' locale func New() locales.Translator { return &so_KE{ - locale: "so_KE", + locale: "so_KE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *so_KE) Locale() string { - return l.locale +func (t *so_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *so_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'so_KE' +func (t *so_KE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'so_KE' +func (t *so_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/so_SO/so_SO.go b/resources/locales/so_SO/so_SO.go index b55f03a..d590bad 100644 --- a/resources/locales/so_SO/so_SO.go +++ b/resources/locales/so_SO/so_SO.go @@ -5,23 +5,30 @@ import ( ) type so_SO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'so_SO' locale func New() locales.Translator { return &so_SO{ - locale: "so_SO", + locale: "so_SO", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *so_SO) Locale() string { - return l.locale +func (t *so_SO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *so_SO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'so_SO' +func (t *so_SO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'so_SO' +func (t *so_SO) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/sq/sq.go b/resources/locales/sq/sq.go index ba305f7..0d70b8d 100644 --- a/resources/locales/sq/sq.go +++ b/resources/locales/sq/sq.go @@ -5,23 +5,30 @@ import ( ) type sq struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sq' locale func New() locales.Translator { return &sq{ - locale: "sq", + locale: "sq", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sq) Locale() string { - return l.locale +func (t *sq) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sq' +func (t *sq) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sq' +func (t *sq) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/sq_AL/sq_AL.go b/resources/locales/sq_AL/sq_AL.go index 557ba3f..3a47393 100644 --- a/resources/locales/sq_AL/sq_AL.go +++ b/resources/locales/sq_AL/sq_AL.go @@ -5,23 +5,30 @@ import ( ) type sq_AL struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sq_AL' locale func New() locales.Translator { return &sq_AL{ - locale: "sq_AL", + locale: "sq_AL", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sq_AL) Locale() string { - return l.locale +func (t *sq_AL) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sq_AL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sq_AL' +func (t *sq_AL) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sq_AL' +func (t *sq_AL) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/sq_MK/sq_MK.go b/resources/locales/sq_MK/sq_MK.go index 5aa038a..921c8a1 100644 --- a/resources/locales/sq_MK/sq_MK.go +++ b/resources/locales/sq_MK/sq_MK.go @@ -5,23 +5,30 @@ import ( ) type sq_MK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sq_MK' locale func New() locales.Translator { return &sq_MK{ - locale: "sq_MK", + locale: "sq_MK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sq_MK) Locale() string { - return l.locale +func (t *sq_MK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sq_MK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sq_MK' +func (t *sq_MK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sq_MK' +func (t *sq_MK) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/sq_XK/sq_XK.go b/resources/locales/sq_XK/sq_XK.go index af31fb3..eea1cdc 100644 --- a/resources/locales/sq_XK/sq_XK.go +++ b/resources/locales/sq_XK/sq_XK.go @@ -5,23 +5,30 @@ import ( ) type sq_XK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sq_XK' locale func New() locales.Translator { return &sq_XK{ - locale: "sq_XK", + locale: "sq_XK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sq_XK) Locale() string { - return l.locale +func (t *sq_XK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sq_XK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sq_XK' +func (t *sq_XK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sq_XK' +func (t *sq_XK) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/sr/sr.go b/resources/locales/sr/sr.go index f1173e9..a41c95b 100644 --- a/resources/locales/sr/sr.go +++ b/resources/locales/sr/sr.go @@ -5,23 +5,30 @@ import ( ) type sr struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr' locale func New() locales.Translator { return &sr{ - locale: "sr", + locale: "sr", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr) Locale() string { - return l.locale +func (t *sr) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr' +func (t *sr) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sr' +func (t *sr) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sr_Cyrl/sr_Cyrl.go b/resources/locales/sr_Cyrl/sr_Cyrl.go index 1fbe112..59a495b 100644 --- a/resources/locales/sr_Cyrl/sr_Cyrl.go +++ b/resources/locales/sr_Cyrl/sr_Cyrl.go @@ -5,23 +5,30 @@ import ( ) type sr_Cyrl struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr_Cyrl' locale func New() locales.Translator { return &sr_Cyrl{ - locale: "sr_Cyrl", + locale: "sr_Cyrl", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr_Cyrl) Locale() string { - return l.locale +func (t *sr_Cyrl) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr_Cyrl' +func (t *sr_Cyrl) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Cyrl' +func (t *sr_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go b/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go index 01faecd..71173b1 100644 --- a/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go +++ b/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go @@ -5,23 +5,30 @@ import ( ) type sr_Cyrl_BA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr_Cyrl_BA' locale func New() locales.Translator { return &sr_Cyrl_BA{ - locale: "sr_Cyrl_BA", + locale: "sr_Cyrl_BA", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr_Cyrl_BA) Locale() string { - return l.locale +func (t *sr_Cyrl_BA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr_Cyrl_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr_Cyrl_BA' +func (t *sr_Cyrl_BA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Cyrl_BA' +func (t *sr_Cyrl_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go b/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go index 967bba1..f19ea43 100644 --- a/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go +++ b/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go @@ -5,28 +5,30 @@ import ( ) type sr_Cyrl_ME struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr_Cyrl_ME' locale func New() locales.Translator { return &sr_Cyrl_ME{ - locale: "sr_Cyrl_ME", + locale: "sr_Cyrl_ME", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr_Cyrl_ME) Locale() string { - return l.locale +func (t *sr_Cyrl_ME) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr_Cyrl_ME) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr_Cyrl_ME' +func (t *sr_Cyrl_ME) Plurals() []locales.PluralRule { + return t.plurals +} - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Cyrl_ME' +func (t *sr_Cyrl_ME) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { @@ -35,6 +37,11 @@ func (l *sr_Cyrl_ME) CardinalPluralRule(num string) (locales.PluralRule, error) v := locales.V(num) + f, err := locales.F(num) + if err != nil { + return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} + } + if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { return locales.PluralRuleOne, nil } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { diff --git a/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go b/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go index af9bb2c..8e2d086 100644 --- a/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go +++ b/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go @@ -5,32 +5,39 @@ import ( ) type sr_Cyrl_RS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr_Cyrl_RS' locale func New() locales.Translator { return &sr_Cyrl_RS{ - locale: "sr_Cyrl_RS", + locale: "sr_Cyrl_RS", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr_Cyrl_RS) Locale() string { - return l.locale +func (t *sr_Cyrl_RS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr_Cyrl_RS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr_Cyrl_RS' +func (t *sr_Cyrl_RS) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Cyrl_RS' +func (t *sr_Cyrl_RS) CardinalPluralRule(num string) (locales.PluralRule, error) { - f, err := locales.F(num) + i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - i, err := locales.I(num) + v := locales.V(num) + + f, err := locales.F(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } diff --git a/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go b/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go index ce93b97..c40ed09 100644 --- a/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go +++ b/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go @@ -5,28 +5,30 @@ import ( ) type sr_Cyrl_XK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr_Cyrl_XK' locale func New() locales.Translator { return &sr_Cyrl_XK{ - locale: "sr_Cyrl_XK", + locale: "sr_Cyrl_XK", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr_Cyrl_XK) Locale() string { - return l.locale +func (t *sr_Cyrl_XK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr_Cyrl_XK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr_Cyrl_XK' +func (t *sr_Cyrl_XK) Plurals() []locales.PluralRule { + return t.plurals +} - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Cyrl_XK' +func (t *sr_Cyrl_XK) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { @@ -35,6 +37,11 @@ func (l *sr_Cyrl_XK) CardinalPluralRule(num string) (locales.PluralRule, error) v := locales.V(num) + f, err := locales.F(num) + if err != nil { + return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} + } + if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { return locales.PluralRuleOne, nil } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { diff --git a/resources/locales/sr_Latn/sr_Latn.go b/resources/locales/sr_Latn/sr_Latn.go index c00050e..07a498b 100644 --- a/resources/locales/sr_Latn/sr_Latn.go +++ b/resources/locales/sr_Latn/sr_Latn.go @@ -5,28 +5,30 @@ import ( ) type sr_Latn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr_Latn' locale func New() locales.Translator { return &sr_Latn{ - locale: "sr_Latn", + locale: "sr_Latn", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr_Latn) Locale() string { - return l.locale +func (t *sr_Latn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr_Latn' +func (t *sr_Latn) Plurals() []locales.PluralRule { + return t.plurals +} - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Latn' +func (t *sr_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { v := locales.V(num) @@ -35,6 +37,11 @@ func (l *sr_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + i, err := locales.I(num) + if err != nil { + return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} + } + if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { return locales.PluralRuleOne, nil } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { diff --git a/resources/locales/sr_Latn_BA/sr_Latn_BA.go b/resources/locales/sr_Latn_BA/sr_Latn_BA.go index 18df95c..297b8b3 100644 --- a/resources/locales/sr_Latn_BA/sr_Latn_BA.go +++ b/resources/locales/sr_Latn_BA/sr_Latn_BA.go @@ -5,23 +5,30 @@ import ( ) type sr_Latn_BA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr_Latn_BA' locale func New() locales.Translator { return &sr_Latn_BA{ - locale: "sr_Latn_BA", + locale: "sr_Latn_BA", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr_Latn_BA) Locale() string { - return l.locale +func (t *sr_Latn_BA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr_Latn_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr_Latn_BA' +func (t *sr_Latn_BA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Latn_BA' +func (t *sr_Latn_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { f, err := locales.F(num) if err != nil { diff --git a/resources/locales/sr_Latn_ME/sr_Latn_ME.go b/resources/locales/sr_Latn_ME/sr_Latn_ME.go index d0d93d6..19ff3d3 100644 --- a/resources/locales/sr_Latn_ME/sr_Latn_ME.go +++ b/resources/locales/sr_Latn_ME/sr_Latn_ME.go @@ -5,23 +5,30 @@ import ( ) type sr_Latn_ME struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr_Latn_ME' locale func New() locales.Translator { return &sr_Latn_ME{ - locale: "sr_Latn_ME", + locale: "sr_Latn_ME", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr_Latn_ME) Locale() string { - return l.locale +func (t *sr_Latn_ME) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr_Latn_ME) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr_Latn_ME' +func (t *sr_Latn_ME) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Latn_ME' +func (t *sr_Latn_ME) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sr_Latn_RS/sr_Latn_RS.go b/resources/locales/sr_Latn_RS/sr_Latn_RS.go index 86bbf3b..970fb5b 100644 --- a/resources/locales/sr_Latn_RS/sr_Latn_RS.go +++ b/resources/locales/sr_Latn_RS/sr_Latn_RS.go @@ -5,23 +5,30 @@ import ( ) type sr_Latn_RS struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr_Latn_RS' locale func New() locales.Translator { return &sr_Latn_RS{ - locale: "sr_Latn_RS", + locale: "sr_Latn_RS", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr_Latn_RS) Locale() string { - return l.locale +func (t *sr_Latn_RS) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr_Latn_RS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr_Latn_RS' +func (t *sr_Latn_RS) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Latn_RS' +func (t *sr_Latn_RS) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sr_Latn_XK/sr_Latn_XK.go b/resources/locales/sr_Latn_XK/sr_Latn_XK.go index ca7fa80..35cc6ac 100644 --- a/resources/locales/sr_Latn_XK/sr_Latn_XK.go +++ b/resources/locales/sr_Latn_XK/sr_Latn_XK.go @@ -5,23 +5,30 @@ import ( ) type sr_Latn_XK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sr_Latn_XK' locale func New() locales.Translator { return &sr_Latn_XK{ - locale: "sr_Latn_XK", + locale: "sr_Latn_XK", + plurals: []locales.PluralRule{2, 4, 6}, } } // Locale returns the current translators string locale -func (l *sr_Latn_XK) Locale() string { - return l.locale +func (t *sr_Latn_XK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sr_Latn_XK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sr_Latn_XK' +func (t *sr_Latn_XK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Latn_XK' +func (t *sr_Latn_XK) CardinalPluralRule(num string) (locales.PluralRule, error) { f, err := locales.F(num) if err != nil { diff --git a/resources/locales/sv/sv.go b/resources/locales/sv/sv.go index 8e4ce0d..fc10cd5 100644 --- a/resources/locales/sv/sv.go +++ b/resources/locales/sv/sv.go @@ -5,31 +5,38 @@ import ( ) type sv struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sv' locale func New() locales.Translator { return &sv{ - locale: "sv", + locale: "sv", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sv) Locale() string { - return l.locale +func (t *sv) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sv) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sv' +func (t *sv) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sv' +func (t *sv) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/sv_AX/sv_AX.go b/resources/locales/sv_AX/sv_AX.go index a70b939..765e4a7 100644 --- a/resources/locales/sv_AX/sv_AX.go +++ b/resources/locales/sv_AX/sv_AX.go @@ -5,23 +5,30 @@ import ( ) type sv_AX struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sv_AX' locale func New() locales.Translator { return &sv_AX{ - locale: "sv_AX", + locale: "sv_AX", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sv_AX) Locale() string { - return l.locale +func (t *sv_AX) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sv_AX) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sv_AX' +func (t *sv_AX) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sv_AX' +func (t *sv_AX) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sv_FI/sv_FI.go b/resources/locales/sv_FI/sv_FI.go index 0b3e0f9..3957dd7 100644 --- a/resources/locales/sv_FI/sv_FI.go +++ b/resources/locales/sv_FI/sv_FI.go @@ -5,31 +5,38 @@ import ( ) type sv_FI struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sv_FI' locale func New() locales.Translator { return &sv_FI{ - locale: "sv_FI", + locale: "sv_FI", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sv_FI) Locale() string { - return l.locale +func (t *sv_FI) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sv_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sv_FI' +func (t *sv_FI) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sv_FI' +func (t *sv_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/sv_SE/sv_SE.go b/resources/locales/sv_SE/sv_SE.go index dcc41a2..a68e09d 100644 --- a/resources/locales/sv_SE/sv_SE.go +++ b/resources/locales/sv_SE/sv_SE.go @@ -5,23 +5,30 @@ import ( ) type sv_SE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sv_SE' locale func New() locales.Translator { return &sv_SE{ - locale: "sv_SE", + locale: "sv_SE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sv_SE) Locale() string { - return l.locale +func (t *sv_SE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sv_SE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sv_SE' +func (t *sv_SE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sv_SE' +func (t *sv_SE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sw/sw.go b/resources/locales/sw/sw.go index e53d5e9..115cbcd 100644 --- a/resources/locales/sw/sw.go +++ b/resources/locales/sw/sw.go @@ -5,31 +5,38 @@ import ( ) type sw struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sw' locale func New() locales.Translator { return &sw{ - locale: "sw", + locale: "sw", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sw) Locale() string { - return l.locale +func (t *sw) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sw) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sw' +func (t *sw) Plurals() []locales.PluralRule { + return t.plurals +} - v := locales.V(num) +// CardinalPluralRule returns the PluralRule given 'num' for 'sw' +func (t *sw) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } + v := locales.V(num) + if i == 1 && v == 0 { return locales.PluralRuleOne, nil } diff --git a/resources/locales/sw_CD/sw_CD.go b/resources/locales/sw_CD/sw_CD.go index 16f7071..e6dcc60 100644 --- a/resources/locales/sw_CD/sw_CD.go +++ b/resources/locales/sw_CD/sw_CD.go @@ -5,23 +5,30 @@ import ( ) type sw_CD struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sw_CD' locale func New() locales.Translator { return &sw_CD{ - locale: "sw_CD", + locale: "sw_CD", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sw_CD) Locale() string { - return l.locale +func (t *sw_CD) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sw_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sw_CD' +func (t *sw_CD) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sw_CD' +func (t *sw_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sw_KE/sw_KE.go b/resources/locales/sw_KE/sw_KE.go index f122737..ba7c68e 100644 --- a/resources/locales/sw_KE/sw_KE.go +++ b/resources/locales/sw_KE/sw_KE.go @@ -5,23 +5,30 @@ import ( ) type sw_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sw_KE' locale func New() locales.Translator { return &sw_KE{ - locale: "sw_KE", + locale: "sw_KE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sw_KE) Locale() string { - return l.locale +func (t *sw_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sw_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sw_KE' +func (t *sw_KE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sw_KE' +func (t *sw_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sw_TZ/sw_TZ.go b/resources/locales/sw_TZ/sw_TZ.go index fbd15ad..cff37a2 100644 --- a/resources/locales/sw_TZ/sw_TZ.go +++ b/resources/locales/sw_TZ/sw_TZ.go @@ -5,23 +5,30 @@ import ( ) type sw_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sw_TZ' locale func New() locales.Translator { return &sw_TZ{ - locale: "sw_TZ", + locale: "sw_TZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sw_TZ) Locale() string { - return l.locale +func (t *sw_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sw_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sw_TZ' +func (t *sw_TZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sw_TZ' +func (t *sw_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/sw_UG/sw_UG.go b/resources/locales/sw_UG/sw_UG.go index 5185517..f03be97 100644 --- a/resources/locales/sw_UG/sw_UG.go +++ b/resources/locales/sw_UG/sw_UG.go @@ -5,23 +5,30 @@ import ( ) type sw_UG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'sw_UG' locale func New() locales.Translator { return &sw_UG{ - locale: "sw_UG", + locale: "sw_UG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *sw_UG) Locale() string { - return l.locale +func (t *sw_UG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *sw_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'sw_UG' +func (t *sw_UG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'sw_UG' +func (t *sw_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ta/ta.go b/resources/locales/ta/ta.go index a6913fe..8c2bd69 100644 --- a/resources/locales/ta/ta.go +++ b/resources/locales/ta/ta.go @@ -5,23 +5,30 @@ import ( ) type ta struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ta' locale func New() locales.Translator { return &ta{ - locale: "ta", + locale: "ta", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ta) Locale() string { - return l.locale +func (t *ta) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ta) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ta' +func (t *ta) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ta' +func (t *ta) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ta_IN/ta_IN.go b/resources/locales/ta_IN/ta_IN.go index c9c2cb0..b5e0422 100644 --- a/resources/locales/ta_IN/ta_IN.go +++ b/resources/locales/ta_IN/ta_IN.go @@ -5,23 +5,30 @@ import ( ) type ta_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ta_IN' locale func New() locales.Translator { return &ta_IN{ - locale: "ta_IN", + locale: "ta_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ta_IN) Locale() string { - return l.locale +func (t *ta_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ta_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ta_IN' +func (t *ta_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ta_IN' +func (t *ta_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ta_LK/ta_LK.go b/resources/locales/ta_LK/ta_LK.go index 3a90096..f4a23c9 100644 --- a/resources/locales/ta_LK/ta_LK.go +++ b/resources/locales/ta_LK/ta_LK.go @@ -5,23 +5,30 @@ import ( ) type ta_LK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ta_LK' locale func New() locales.Translator { return &ta_LK{ - locale: "ta_LK", + locale: "ta_LK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ta_LK) Locale() string { - return l.locale +func (t *ta_LK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ta_LK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ta_LK' +func (t *ta_LK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ta_LK' +func (t *ta_LK) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ta_MY/ta_MY.go b/resources/locales/ta_MY/ta_MY.go index dc145ac..f2b1679 100644 --- a/resources/locales/ta_MY/ta_MY.go +++ b/resources/locales/ta_MY/ta_MY.go @@ -5,23 +5,30 @@ import ( ) type ta_MY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ta_MY' locale func New() locales.Translator { return &ta_MY{ - locale: "ta_MY", + locale: "ta_MY", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ta_MY) Locale() string { - return l.locale +func (t *ta_MY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ta_MY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ta_MY' +func (t *ta_MY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ta_MY' +func (t *ta_MY) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ta_SG/ta_SG.go b/resources/locales/ta_SG/ta_SG.go index 1314e61..2ef9f35 100644 --- a/resources/locales/ta_SG/ta_SG.go +++ b/resources/locales/ta_SG/ta_SG.go @@ -5,23 +5,30 @@ import ( ) type ta_SG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ta_SG' locale func New() locales.Translator { return &ta_SG{ - locale: "ta_SG", + locale: "ta_SG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ta_SG) Locale() string { - return l.locale +func (t *ta_SG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ta_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ta_SG' +func (t *ta_SG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ta_SG' +func (t *ta_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/te/te.go b/resources/locales/te/te.go index b25e9af..5862da9 100644 --- a/resources/locales/te/te.go +++ b/resources/locales/te/te.go @@ -5,23 +5,30 @@ import ( ) type te struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'te' locale func New() locales.Translator { return &te{ - locale: "te", + locale: "te", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *te) Locale() string { - return l.locale +func (t *te) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *te) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'te' +func (t *te) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'te' +func (t *te) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/te_IN/te_IN.go b/resources/locales/te_IN/te_IN.go index 9ce4721..23f4ab8 100644 --- a/resources/locales/te_IN/te_IN.go +++ b/resources/locales/te_IN/te_IN.go @@ -5,23 +5,30 @@ import ( ) type te_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'te_IN' locale func New() locales.Translator { return &te_IN{ - locale: "te_IN", + locale: "te_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *te_IN) Locale() string { - return l.locale +func (t *te_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *te_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'te_IN' +func (t *te_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'te_IN' +func (t *te_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/teo/teo.go b/resources/locales/teo/teo.go index 01043ac..480ce21 100644 --- a/resources/locales/teo/teo.go +++ b/resources/locales/teo/teo.go @@ -5,23 +5,30 @@ import ( ) type teo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'teo' locale func New() locales.Translator { return &teo{ - locale: "teo", + locale: "teo", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *teo) Locale() string { - return l.locale +func (t *teo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *teo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'teo' +func (t *teo) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'teo' +func (t *teo) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/teo_KE/teo_KE.go b/resources/locales/teo_KE/teo_KE.go index 4ced716..cb8d92b 100644 --- a/resources/locales/teo_KE/teo_KE.go +++ b/resources/locales/teo_KE/teo_KE.go @@ -5,23 +5,30 @@ import ( ) type teo_KE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'teo_KE' locale func New() locales.Translator { return &teo_KE{ - locale: "teo_KE", + locale: "teo_KE", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *teo_KE) Locale() string { - return l.locale +func (t *teo_KE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *teo_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'teo_KE' +func (t *teo_KE) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'teo_KE' +func (t *teo_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/teo_UG/teo_UG.go b/resources/locales/teo_UG/teo_UG.go index 135ee45..0c6bbaf 100644 --- a/resources/locales/teo_UG/teo_UG.go +++ b/resources/locales/teo_UG/teo_UG.go @@ -5,23 +5,30 @@ import ( ) type teo_UG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'teo_UG' locale func New() locales.Translator { return &teo_UG{ - locale: "teo_UG", + locale: "teo_UG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *teo_UG) Locale() string { - return l.locale +func (t *teo_UG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *teo_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'teo_UG' +func (t *teo_UG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'teo_UG' +func (t *teo_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/th/th.go b/resources/locales/th/th.go index bb06932..5d53f2f 100644 --- a/resources/locales/th/th.go +++ b/resources/locales/th/th.go @@ -5,23 +5,30 @@ import ( ) type th struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'th' locale func New() locales.Translator { return &th{ - locale: "th", + locale: "th", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *th) Locale() string { - return l.locale +func (t *th) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *th) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'th' +func (t *th) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'th' +func (t *th) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/th_TH/th_TH.go b/resources/locales/th_TH/th_TH.go index 2fa78f6..ed8dd76 100644 --- a/resources/locales/th_TH/th_TH.go +++ b/resources/locales/th_TH/th_TH.go @@ -5,23 +5,30 @@ import ( ) type th_TH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'th_TH' locale func New() locales.Translator { return &th_TH{ - locale: "th_TH", + locale: "th_TH", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *th_TH) Locale() string { - return l.locale +func (t *th_TH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *th_TH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'th_TH' +func (t *th_TH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'th_TH' +func (t *th_TH) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/ti/ti.go b/resources/locales/ti/ti.go index 522c0ff..8dd9f9e 100644 --- a/resources/locales/ti/ti.go +++ b/resources/locales/ti/ti.go @@ -5,23 +5,30 @@ import ( ) type ti struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ti' locale func New() locales.Translator { return &ti{ - locale: "ti", + locale: "ti", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ti) Locale() string { - return l.locale +func (t *ti) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ti) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ti' +func (t *ti) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ti' +func (t *ti) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ti_ER/ti_ER.go b/resources/locales/ti_ER/ti_ER.go index 67fe65a..f56cb59 100644 --- a/resources/locales/ti_ER/ti_ER.go +++ b/resources/locales/ti_ER/ti_ER.go @@ -5,23 +5,30 @@ import ( ) type ti_ER struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ti_ER' locale func New() locales.Translator { return &ti_ER{ - locale: "ti_ER", + locale: "ti_ER", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ti_ER) Locale() string { - return l.locale +func (t *ti_ER) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ti_ER) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ti_ER' +func (t *ti_ER) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ti_ER' +func (t *ti_ER) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ti_ET/ti_ET.go b/resources/locales/ti_ET/ti_ET.go index fcd95ee..54dba55 100644 --- a/resources/locales/ti_ET/ti_ET.go +++ b/resources/locales/ti_ET/ti_ET.go @@ -5,23 +5,30 @@ import ( ) type ti_ET struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ti_ET' locale func New() locales.Translator { return &ti_ET{ - locale: "ti_ET", + locale: "ti_ET", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ti_ET) Locale() string { - return l.locale +func (t *ti_ET) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ti_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ti_ET' +func (t *ti_ET) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ti_ET' +func (t *ti_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/tk/tk.go b/resources/locales/tk/tk.go index 09e94fb..a7a3357 100644 --- a/resources/locales/tk/tk.go +++ b/resources/locales/tk/tk.go @@ -5,23 +5,30 @@ import ( ) type tk struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'tk' locale func New() locales.Translator { return &tk{ - locale: "tk", + locale: "tk", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *tk) Locale() string { - return l.locale +func (t *tk) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *tk) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'tk' +func (t *tk) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'tk' +func (t *tk) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/tk_TM/tk_TM.go b/resources/locales/tk_TM/tk_TM.go index 5baf325..2797563 100644 --- a/resources/locales/tk_TM/tk_TM.go +++ b/resources/locales/tk_TM/tk_TM.go @@ -5,23 +5,30 @@ import ( ) type tk_TM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'tk_TM' locale func New() locales.Translator { return &tk_TM{ - locale: "tk_TM", + locale: "tk_TM", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *tk_TM) Locale() string { - return l.locale +func (t *tk_TM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *tk_TM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'tk_TM' +func (t *tk_TM) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'tk_TM' +func (t *tk_TM) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/to/to.go b/resources/locales/to/to.go index 33991f1..8958f17 100644 --- a/resources/locales/to/to.go +++ b/resources/locales/to/to.go @@ -5,23 +5,30 @@ import ( ) type to struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'to' locale func New() locales.Translator { return &to{ - locale: "to", + locale: "to", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *to) Locale() string { - return l.locale +func (t *to) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *to) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'to' +func (t *to) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'to' +func (t *to) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/to_TO/to_TO.go b/resources/locales/to_TO/to_TO.go index bc3d12e..d098999 100644 --- a/resources/locales/to_TO/to_TO.go +++ b/resources/locales/to_TO/to_TO.go @@ -5,23 +5,30 @@ import ( ) type to_TO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'to_TO' locale func New() locales.Translator { return &to_TO{ - locale: "to_TO", + locale: "to_TO", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *to_TO) Locale() string { - return l.locale +func (t *to_TO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *to_TO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'to_TO' +func (t *to_TO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'to_TO' +func (t *to_TO) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/tr/tr.go b/resources/locales/tr/tr.go index 3d6ad46..1a15c94 100644 --- a/resources/locales/tr/tr.go +++ b/resources/locales/tr/tr.go @@ -5,23 +5,30 @@ import ( ) type tr struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'tr' locale func New() locales.Translator { return &tr{ - locale: "tr", + locale: "tr", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *tr) Locale() string { - return l.locale +func (t *tr) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *tr) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'tr' +func (t *tr) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'tr' +func (t *tr) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/tr_CY/tr_CY.go b/resources/locales/tr_CY/tr_CY.go index 9caa140..800edf2 100644 --- a/resources/locales/tr_CY/tr_CY.go +++ b/resources/locales/tr_CY/tr_CY.go @@ -5,23 +5,30 @@ import ( ) type tr_CY struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'tr_CY' locale func New() locales.Translator { return &tr_CY{ - locale: "tr_CY", + locale: "tr_CY", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *tr_CY) Locale() string { - return l.locale +func (t *tr_CY) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *tr_CY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'tr_CY' +func (t *tr_CY) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'tr_CY' +func (t *tr_CY) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/tr_TR/tr_TR.go b/resources/locales/tr_TR/tr_TR.go index adfeceb..293bc02 100644 --- a/resources/locales/tr_TR/tr_TR.go +++ b/resources/locales/tr_TR/tr_TR.go @@ -5,23 +5,30 @@ import ( ) type tr_TR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'tr_TR' locale func New() locales.Translator { return &tr_TR{ - locale: "tr_TR", + locale: "tr_TR", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *tr_TR) Locale() string { - return l.locale +func (t *tr_TR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *tr_TR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'tr_TR' +func (t *tr_TR) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'tr_TR' +func (t *tr_TR) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/twq/twq.go b/resources/locales/twq/twq.go index eac3f7b..92f95df 100644 --- a/resources/locales/twq/twq.go +++ b/resources/locales/twq/twq.go @@ -5,22 +5,29 @@ import ( ) type twq struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'twq' locale func New() locales.Translator { return &twq{ - locale: "twq", + locale: "twq", + plurals: nil, } } // Locale returns the current translators string locale -func (l *twq) Locale() string { - return l.locale +func (t *twq) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *twq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'twq' +func (t *twq) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'twq' +func (t *twq) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/twq_NE/twq_NE.go b/resources/locales/twq_NE/twq_NE.go index b6de844..33eaed9 100644 --- a/resources/locales/twq_NE/twq_NE.go +++ b/resources/locales/twq_NE/twq_NE.go @@ -5,22 +5,29 @@ import ( ) type twq_NE struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'twq_NE' locale func New() locales.Translator { return &twq_NE{ - locale: "twq_NE", + locale: "twq_NE", + plurals: nil, } } // Locale returns the current translators string locale -func (l *twq_NE) Locale() string { - return l.locale +func (t *twq_NE) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *twq_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'twq_NE' +func (t *twq_NE) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'twq_NE' +func (t *twq_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/tzm/tzm.go b/resources/locales/tzm/tzm.go index 9aa62e0..4d37fef 100644 --- a/resources/locales/tzm/tzm.go +++ b/resources/locales/tzm/tzm.go @@ -5,23 +5,30 @@ import ( ) type tzm struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'tzm' locale func New() locales.Translator { return &tzm{ - locale: "tzm", + locale: "tzm", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *tzm) Locale() string { - return l.locale +func (t *tzm) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *tzm) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'tzm' +func (t *tzm) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'tzm' +func (t *tzm) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/tzm_MA/tzm_MA.go b/resources/locales/tzm_MA/tzm_MA.go index 53de933..9072117 100644 --- a/resources/locales/tzm_MA/tzm_MA.go +++ b/resources/locales/tzm_MA/tzm_MA.go @@ -5,23 +5,30 @@ import ( ) type tzm_MA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'tzm_MA' locale func New() locales.Translator { return &tzm_MA{ - locale: "tzm_MA", + locale: "tzm_MA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *tzm_MA) Locale() string { - return l.locale +func (t *tzm_MA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *tzm_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'tzm_MA' +func (t *tzm_MA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'tzm_MA' +func (t *tzm_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ug/ug.go b/resources/locales/ug/ug.go index 6fdcd88..5e9dcf5 100644 --- a/resources/locales/ug/ug.go +++ b/resources/locales/ug/ug.go @@ -5,23 +5,30 @@ import ( ) type ug struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ug' locale func New() locales.Translator { return &ug{ - locale: "ug", + locale: "ug", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ug) Locale() string { - return l.locale +func (t *ug) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ug) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ug' +func (t *ug) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ug' +func (t *ug) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/ug_CN/ug_CN.go b/resources/locales/ug_CN/ug_CN.go index c0c755e..307fc55 100644 --- a/resources/locales/ug_CN/ug_CN.go +++ b/resources/locales/ug_CN/ug_CN.go @@ -5,23 +5,30 @@ import ( ) type ug_CN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ug_CN' locale func New() locales.Translator { return &ug_CN{ - locale: "ug_CN", + locale: "ug_CN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ug_CN) Locale() string { - return l.locale +func (t *ug_CN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ug_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ug_CN' +func (t *ug_CN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ug_CN' +func (t *ug_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/uk/uk.go b/resources/locales/uk/uk.go index 17a8034..1871e18 100644 --- a/resources/locales/uk/uk.go +++ b/resources/locales/uk/uk.go @@ -5,31 +5,38 @@ import ( ) type uk struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'uk' locale func New() locales.Translator { return &uk{ - locale: "uk", + locale: "uk", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *uk) Locale() string { - return l.locale +func (t *uk) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *uk) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'uk' +func (t *uk) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'uk' +func (t *uk) CardinalPluralRule(num string) (locales.PluralRule, error) { + + v := locales.V(num) i, err := locales.I(num) if err != nil { return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} } - v := locales.V(num) - if v == 0 && i%10 == 1 && i%100 != 11 { return locales.PluralRuleOne, nil } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { diff --git a/resources/locales/uk_UA/uk_UA.go b/resources/locales/uk_UA/uk_UA.go index 16fc14a..d1a7cd4 100644 --- a/resources/locales/uk_UA/uk_UA.go +++ b/resources/locales/uk_UA/uk_UA.go @@ -5,23 +5,30 @@ import ( ) type uk_UA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'uk_UA' locale func New() locales.Translator { return &uk_UA{ - locale: "uk_UA", + locale: "uk_UA", + plurals: []locales.PluralRule{2, 4, 5, 6}, } } // Locale returns the current translators string locale -func (l *uk_UA) Locale() string { - return l.locale +func (t *uk_UA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *uk_UA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'uk_UA' +func (t *uk_UA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'uk_UA' +func (t *uk_UA) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ur/ur.go b/resources/locales/ur/ur.go index 7546bf9..c492777 100644 --- a/resources/locales/ur/ur.go +++ b/resources/locales/ur/ur.go @@ -5,23 +5,30 @@ import ( ) type ur struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ur' locale func New() locales.Translator { return &ur{ - locale: "ur", + locale: "ur", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ur) Locale() string { - return l.locale +func (t *ur) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ur) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ur' +func (t *ur) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ur' +func (t *ur) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ur_IN/ur_IN.go b/resources/locales/ur_IN/ur_IN.go index 5208820..8ce711c 100644 --- a/resources/locales/ur_IN/ur_IN.go +++ b/resources/locales/ur_IN/ur_IN.go @@ -5,23 +5,30 @@ import ( ) type ur_IN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ur_IN' locale func New() locales.Translator { return &ur_IN{ - locale: "ur_IN", + locale: "ur_IN", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ur_IN) Locale() string { - return l.locale +func (t *ur_IN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ur_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ur_IN' +func (t *ur_IN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ur_IN' +func (t *ur_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/ur_PK/ur_PK.go b/resources/locales/ur_PK/ur_PK.go index 3c5b472..6a22afc 100644 --- a/resources/locales/ur_PK/ur_PK.go +++ b/resources/locales/ur_PK/ur_PK.go @@ -5,23 +5,30 @@ import ( ) type ur_PK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'ur_PK' locale func New() locales.Translator { return &ur_PK{ - locale: "ur_PK", + locale: "ur_PK", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *ur_PK) Locale() string { - return l.locale +func (t *ur_PK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *ur_PK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'ur_PK' +func (t *ur_PK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'ur_PK' +func (t *ur_PK) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/uz/uz.go b/resources/locales/uz/uz.go index 674b29f..c2729bd 100644 --- a/resources/locales/uz/uz.go +++ b/resources/locales/uz/uz.go @@ -5,23 +5,30 @@ import ( ) type uz struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'uz' locale func New() locales.Translator { return &uz{ - locale: "uz", + locale: "uz", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *uz) Locale() string { - return l.locale +func (t *uz) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *uz) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'uz' +func (t *uz) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'uz' +func (t *uz) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/uz_Arab/uz_Arab.go b/resources/locales/uz_Arab/uz_Arab.go index 8551e44..92fe363 100644 --- a/resources/locales/uz_Arab/uz_Arab.go +++ b/resources/locales/uz_Arab/uz_Arab.go @@ -5,23 +5,30 @@ import ( ) type uz_Arab struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'uz_Arab' locale func New() locales.Translator { return &uz_Arab{ - locale: "uz_Arab", + locale: "uz_Arab", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *uz_Arab) Locale() string { - return l.locale +func (t *uz_Arab) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *uz_Arab) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'uz_Arab' +func (t *uz_Arab) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Arab' +func (t *uz_Arab) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/uz_Arab_AF/uz_Arab_AF.go b/resources/locales/uz_Arab_AF/uz_Arab_AF.go index 7bc5425..4be7a5d 100644 --- a/resources/locales/uz_Arab_AF/uz_Arab_AF.go +++ b/resources/locales/uz_Arab_AF/uz_Arab_AF.go @@ -5,23 +5,30 @@ import ( ) type uz_Arab_AF struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'uz_Arab_AF' locale func New() locales.Translator { return &uz_Arab_AF{ - locale: "uz_Arab_AF", + locale: "uz_Arab_AF", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *uz_Arab_AF) Locale() string { - return l.locale +func (t *uz_Arab_AF) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *uz_Arab_AF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'uz_Arab_AF' +func (t *uz_Arab_AF) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Arab_AF' +func (t *uz_Arab_AF) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/uz_Cyrl/uz_Cyrl.go b/resources/locales/uz_Cyrl/uz_Cyrl.go index 2d9a0d5..bd8fa25 100644 --- a/resources/locales/uz_Cyrl/uz_Cyrl.go +++ b/resources/locales/uz_Cyrl/uz_Cyrl.go @@ -5,23 +5,30 @@ import ( ) type uz_Cyrl struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'uz_Cyrl' locale func New() locales.Translator { return &uz_Cyrl{ - locale: "uz_Cyrl", + locale: "uz_Cyrl", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *uz_Cyrl) Locale() string { - return l.locale +func (t *uz_Cyrl) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *uz_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'uz_Cyrl' +func (t *uz_Cyrl) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Cyrl' +func (t *uz_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go b/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go index 7673a51..11ae05e 100644 --- a/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go +++ b/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go @@ -5,23 +5,30 @@ import ( ) type uz_Cyrl_UZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'uz_Cyrl_UZ' locale func New() locales.Translator { return &uz_Cyrl_UZ{ - locale: "uz_Cyrl_UZ", + locale: "uz_Cyrl_UZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *uz_Cyrl_UZ) Locale() string { - return l.locale +func (t *uz_Cyrl_UZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *uz_Cyrl_UZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'uz_Cyrl_UZ' +func (t *uz_Cyrl_UZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Cyrl_UZ' +func (t *uz_Cyrl_UZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/uz_Latn/uz_Latn.go b/resources/locales/uz_Latn/uz_Latn.go index 93f776f..0e33be3 100644 --- a/resources/locales/uz_Latn/uz_Latn.go +++ b/resources/locales/uz_Latn/uz_Latn.go @@ -5,23 +5,30 @@ import ( ) type uz_Latn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'uz_Latn' locale func New() locales.Translator { return &uz_Latn{ - locale: "uz_Latn", + locale: "uz_Latn", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *uz_Latn) Locale() string { - return l.locale +func (t *uz_Latn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *uz_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'uz_Latn' +func (t *uz_Latn) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Latn' +func (t *uz_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go b/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go index 814d166..56d7b5a 100644 --- a/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go +++ b/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go @@ -5,23 +5,30 @@ import ( ) type uz_Latn_UZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'uz_Latn_UZ' locale func New() locales.Translator { return &uz_Latn_UZ{ - locale: "uz_Latn_UZ", + locale: "uz_Latn_UZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *uz_Latn_UZ) Locale() string { - return l.locale +func (t *uz_Latn_UZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *uz_Latn_UZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'uz_Latn_UZ' +func (t *uz_Latn_UZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Latn_UZ' +func (t *uz_Latn_UZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/vai/vai.go b/resources/locales/vai/vai.go index 48eb5b3..857c241 100644 --- a/resources/locales/vai/vai.go +++ b/resources/locales/vai/vai.go @@ -5,22 +5,29 @@ import ( ) type vai struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vai' locale func New() locales.Translator { return &vai{ - locale: "vai", + locale: "vai", + plurals: nil, } } // Locale returns the current translators string locale -func (l *vai) Locale() string { - return l.locale +func (t *vai) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vai) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vai' +func (t *vai) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'vai' +func (t *vai) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/vai_Latn/vai_Latn.go b/resources/locales/vai_Latn/vai_Latn.go index 324b144..6167aed 100644 --- a/resources/locales/vai_Latn/vai_Latn.go +++ b/resources/locales/vai_Latn/vai_Latn.go @@ -5,22 +5,29 @@ import ( ) type vai_Latn struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vai_Latn' locale func New() locales.Translator { return &vai_Latn{ - locale: "vai_Latn", + locale: "vai_Latn", + plurals: nil, } } // Locale returns the current translators string locale -func (l *vai_Latn) Locale() string { - return l.locale +func (t *vai_Latn) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vai_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vai_Latn' +func (t *vai_Latn) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'vai_Latn' +func (t *vai_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/vai_Latn_LR/vai_Latn_LR.go b/resources/locales/vai_Latn_LR/vai_Latn_LR.go index e1c5137..0b2e6c1 100644 --- a/resources/locales/vai_Latn_LR/vai_Latn_LR.go +++ b/resources/locales/vai_Latn_LR/vai_Latn_LR.go @@ -5,22 +5,29 @@ import ( ) type vai_Latn_LR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vai_Latn_LR' locale func New() locales.Translator { return &vai_Latn_LR{ - locale: "vai_Latn_LR", + locale: "vai_Latn_LR", + plurals: nil, } } // Locale returns the current translators string locale -func (l *vai_Latn_LR) Locale() string { - return l.locale +func (t *vai_Latn_LR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vai_Latn_LR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vai_Latn_LR' +func (t *vai_Latn_LR) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'vai_Latn_LR' +func (t *vai_Latn_LR) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/vai_Vaii/vai_Vaii.go b/resources/locales/vai_Vaii/vai_Vaii.go index 104d372..fa28062 100644 --- a/resources/locales/vai_Vaii/vai_Vaii.go +++ b/resources/locales/vai_Vaii/vai_Vaii.go @@ -5,22 +5,29 @@ import ( ) type vai_Vaii struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vai_Vaii' locale func New() locales.Translator { return &vai_Vaii{ - locale: "vai_Vaii", + locale: "vai_Vaii", + plurals: nil, } } // Locale returns the current translators string locale -func (l *vai_Vaii) Locale() string { - return l.locale +func (t *vai_Vaii) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vai_Vaii) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vai_Vaii' +func (t *vai_Vaii) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'vai_Vaii' +func (t *vai_Vaii) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go b/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go index 34d9f55..f7d15ce 100644 --- a/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go +++ b/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go @@ -5,22 +5,29 @@ import ( ) type vai_Vaii_LR struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vai_Vaii_LR' locale func New() locales.Translator { return &vai_Vaii_LR{ - locale: "vai_Vaii_LR", + locale: "vai_Vaii_LR", + plurals: nil, } } // Locale returns the current translators string locale -func (l *vai_Vaii_LR) Locale() string { - return l.locale +func (t *vai_Vaii_LR) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vai_Vaii_LR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vai_Vaii_LR' +func (t *vai_Vaii_LR) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'vai_Vaii_LR' +func (t *vai_Vaii_LR) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/vi/vi.go b/resources/locales/vi/vi.go index 052c3f2..9080f77 100644 --- a/resources/locales/vi/vi.go +++ b/resources/locales/vi/vi.go @@ -5,23 +5,30 @@ import ( ) type vi struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vi' locale func New() locales.Translator { return &vi{ - locale: "vi", + locale: "vi", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *vi) Locale() string { - return l.locale +func (t *vi) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vi) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vi' +func (t *vi) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'vi' +func (t *vi) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/vi_VN/vi_VN.go b/resources/locales/vi_VN/vi_VN.go index 58095ee..abe1009 100644 --- a/resources/locales/vi_VN/vi_VN.go +++ b/resources/locales/vi_VN/vi_VN.go @@ -5,23 +5,30 @@ import ( ) type vi_VN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vi_VN' locale func New() locales.Translator { return &vi_VN{ - locale: "vi_VN", + locale: "vi_VN", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *vi_VN) Locale() string { - return l.locale +func (t *vi_VN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vi_VN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vi_VN' +func (t *vi_VN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'vi_VN' +func (t *vi_VN) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/vo/vo.go b/resources/locales/vo/vo.go index cfc563d..35a8892 100644 --- a/resources/locales/vo/vo.go +++ b/resources/locales/vo/vo.go @@ -5,23 +5,30 @@ import ( ) type vo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vo' locale func New() locales.Translator { return &vo{ - locale: "vo", + locale: "vo", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *vo) Locale() string { - return l.locale +func (t *vo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vo' +func (t *vo) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'vo' +func (t *vo) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/vo_001/vo_001.go b/resources/locales/vo_001/vo_001.go index 04a1fa4..a28f980 100644 --- a/resources/locales/vo_001/vo_001.go +++ b/resources/locales/vo_001/vo_001.go @@ -5,23 +5,30 @@ import ( ) type vo_001 struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vo_001' locale func New() locales.Translator { return &vo_001{ - locale: "vo_001", + locale: "vo_001", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *vo_001) Locale() string { - return l.locale +func (t *vo_001) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vo_001) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vo_001' +func (t *vo_001) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'vo_001' +func (t *vo_001) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/vun/vun.go b/resources/locales/vun/vun.go index 6a0d44d..e716896 100644 --- a/resources/locales/vun/vun.go +++ b/resources/locales/vun/vun.go @@ -5,23 +5,30 @@ import ( ) type vun struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vun' locale func New() locales.Translator { return &vun{ - locale: "vun", + locale: "vun", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *vun) Locale() string { - return l.locale +func (t *vun) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vun) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vun' +func (t *vun) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'vun' +func (t *vun) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/vun_TZ/vun_TZ.go b/resources/locales/vun_TZ/vun_TZ.go index c10bef8..a279a83 100644 --- a/resources/locales/vun_TZ/vun_TZ.go +++ b/resources/locales/vun_TZ/vun_TZ.go @@ -5,23 +5,30 @@ import ( ) type vun_TZ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'vun_TZ' locale func New() locales.Translator { return &vun_TZ{ - locale: "vun_TZ", + locale: "vun_TZ", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *vun_TZ) Locale() string { - return l.locale +func (t *vun_TZ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *vun_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'vun_TZ' +func (t *vun_TZ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'vun_TZ' +func (t *vun_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/wae/wae.go b/resources/locales/wae/wae.go index 9967c6a..46a3580 100644 --- a/resources/locales/wae/wae.go +++ b/resources/locales/wae/wae.go @@ -5,23 +5,30 @@ import ( ) type wae struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'wae' locale func New() locales.Translator { return &wae{ - locale: "wae", + locale: "wae", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *wae) Locale() string { - return l.locale +func (t *wae) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *wae) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'wae' +func (t *wae) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'wae' +func (t *wae) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/wae_CH/wae_CH.go b/resources/locales/wae_CH/wae_CH.go index c50324f..e91ed57 100644 --- a/resources/locales/wae_CH/wae_CH.go +++ b/resources/locales/wae_CH/wae_CH.go @@ -5,23 +5,30 @@ import ( ) type wae_CH struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'wae_CH' locale func New() locales.Translator { return &wae_CH{ - locale: "wae_CH", + locale: "wae_CH", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *wae_CH) Locale() string { - return l.locale +func (t *wae_CH) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *wae_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'wae_CH' +func (t *wae_CH) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'wae_CH' +func (t *wae_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/xog/xog.go b/resources/locales/xog/xog.go index eb961e1..9a8e7f2 100644 --- a/resources/locales/xog/xog.go +++ b/resources/locales/xog/xog.go @@ -5,23 +5,30 @@ import ( ) type xog struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'xog' locale func New() locales.Translator { return &xog{ - locale: "xog", + locale: "xog", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *xog) Locale() string { - return l.locale +func (t *xog) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *xog) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'xog' +func (t *xog) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'xog' +func (t *xog) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/xog_UG/xog_UG.go b/resources/locales/xog_UG/xog_UG.go index c881fa7..ca65563 100644 --- a/resources/locales/xog_UG/xog_UG.go +++ b/resources/locales/xog_UG/xog_UG.go @@ -5,23 +5,30 @@ import ( ) type xog_UG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'xog_UG' locale func New() locales.Translator { return &xog_UG{ - locale: "xog_UG", + locale: "xog_UG", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *xog_UG) Locale() string { - return l.locale +func (t *xog_UG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *xog_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'xog_UG' +func (t *xog_UG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'xog_UG' +func (t *xog_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/yav/yav.go b/resources/locales/yav/yav.go index 0c5d9c2..85cbab6 100644 --- a/resources/locales/yav/yav.go +++ b/resources/locales/yav/yav.go @@ -5,22 +5,29 @@ import ( ) type yav struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'yav' locale func New() locales.Translator { return &yav{ - locale: "yav", + locale: "yav", + plurals: nil, } } // Locale returns the current translators string locale -func (l *yav) Locale() string { - return l.locale +func (t *yav) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *yav) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'yav' +func (t *yav) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'yav' +func (t *yav) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/yav_CM/yav_CM.go b/resources/locales/yav_CM/yav_CM.go index 357c1c6..a7605f9 100644 --- a/resources/locales/yav_CM/yav_CM.go +++ b/resources/locales/yav_CM/yav_CM.go @@ -5,22 +5,29 @@ import ( ) type yav_CM struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'yav_CM' locale func New() locales.Translator { return &yav_CM{ - locale: "yav_CM", + locale: "yav_CM", + plurals: nil, } } // Locale returns the current translators string locale -func (l *yav_CM) Locale() string { - return l.locale +func (t *yav_CM) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *yav_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'yav_CM' +func (t *yav_CM) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'yav_CM' +func (t *yav_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/yi/yi.go b/resources/locales/yi/yi.go index c058e0e..35c5fbc 100644 --- a/resources/locales/yi/yi.go +++ b/resources/locales/yi/yi.go @@ -5,23 +5,30 @@ import ( ) type yi struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'yi' locale func New() locales.Translator { return &yi{ - locale: "yi", + locale: "yi", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *yi) Locale() string { - return l.locale +func (t *yi) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *yi) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'yi' +func (t *yi) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'yi' +func (t *yi) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/yi_001/yi_001.go b/resources/locales/yi_001/yi_001.go index 4302c38..b591c04 100644 --- a/resources/locales/yi_001/yi_001.go +++ b/resources/locales/yi_001/yi_001.go @@ -5,23 +5,30 @@ import ( ) type yi_001 struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'yi_001' locale func New() locales.Translator { return &yi_001{ - locale: "yi_001", + locale: "yi_001", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *yi_001) Locale() string { - return l.locale +func (t *yi_001) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *yi_001) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'yi_001' +func (t *yi_001) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'yi_001' +func (t *yi_001) CardinalPluralRule(num string) (locales.PluralRule, error) { i, err := locales.I(num) if err != nil { diff --git a/resources/locales/yo/yo.go b/resources/locales/yo/yo.go index efe5fd1..2d15be5 100644 --- a/resources/locales/yo/yo.go +++ b/resources/locales/yo/yo.go @@ -5,23 +5,30 @@ import ( ) type yo struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'yo' locale func New() locales.Translator { return &yo{ - locale: "yo", + locale: "yo", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *yo) Locale() string { - return l.locale +func (t *yo) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *yo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'yo' +func (t *yo) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'yo' +func (t *yo) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/yo_BJ/yo_BJ.go b/resources/locales/yo_BJ/yo_BJ.go index e4a7819..42e33b4 100644 --- a/resources/locales/yo_BJ/yo_BJ.go +++ b/resources/locales/yo_BJ/yo_BJ.go @@ -5,23 +5,30 @@ import ( ) type yo_BJ struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'yo_BJ' locale func New() locales.Translator { return &yo_BJ{ - locale: "yo_BJ", + locale: "yo_BJ", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *yo_BJ) Locale() string { - return l.locale +func (t *yo_BJ) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *yo_BJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'yo_BJ' +func (t *yo_BJ) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'yo_BJ' +func (t *yo_BJ) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/yo_NG/yo_NG.go b/resources/locales/yo_NG/yo_NG.go index 4e5d776..143b4de 100644 --- a/resources/locales/yo_NG/yo_NG.go +++ b/resources/locales/yo_NG/yo_NG.go @@ -5,23 +5,30 @@ import ( ) type yo_NG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'yo_NG' locale func New() locales.Translator { return &yo_NG{ - locale: "yo_NG", + locale: "yo_NG", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *yo_NG) Locale() string { - return l.locale +func (t *yo_NG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *yo_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'yo_NG' +func (t *yo_NG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'yo_NG' +func (t *yo_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/yue/yue.go b/resources/locales/yue/yue.go index d96fdd5..55c7be3 100644 --- a/resources/locales/yue/yue.go +++ b/resources/locales/yue/yue.go @@ -5,22 +5,29 @@ import ( ) type yue struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'yue' locale func New() locales.Translator { return &yue{ - locale: "yue", + locale: "yue", + plurals: nil, } } // Locale returns the current translators string locale -func (l *yue) Locale() string { - return l.locale +func (t *yue) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *yue) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'yue' +func (t *yue) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'yue' +func (t *yue) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/yue_HK/yue_HK.go b/resources/locales/yue_HK/yue_HK.go index a8405ea..bb5dd32 100644 --- a/resources/locales/yue_HK/yue_HK.go +++ b/resources/locales/yue_HK/yue_HK.go @@ -5,22 +5,29 @@ import ( ) type yue_HK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'yue_HK' locale func New() locales.Translator { return &yue_HK{ - locale: "yue_HK", + locale: "yue_HK", + plurals: nil, } } // Locale returns the current translators string locale -func (l *yue_HK) Locale() string { - return l.locale +func (t *yue_HK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *yue_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'yue_HK' +func (t *yue_HK) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'yue_HK' +func (t *yue_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/zgh/zgh.go b/resources/locales/zgh/zgh.go index 4c5b1ca..f5d9fee 100644 --- a/resources/locales/zgh/zgh.go +++ b/resources/locales/zgh/zgh.go @@ -5,22 +5,29 @@ import ( ) type zgh struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zgh' locale func New() locales.Translator { return &zgh{ - locale: "zgh", + locale: "zgh", + plurals: nil, } } // Locale returns the current translators string locale -func (l *zgh) Locale() string { - return l.locale +func (t *zgh) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zgh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zgh' +func (t *zgh) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'zgh' +func (t *zgh) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/zgh_MA/zgh_MA.go b/resources/locales/zgh_MA/zgh_MA.go index 2b58a81..27ccc45 100644 --- a/resources/locales/zgh_MA/zgh_MA.go +++ b/resources/locales/zgh_MA/zgh_MA.go @@ -5,22 +5,29 @@ import ( ) type zgh_MA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zgh_MA' locale func New() locales.Translator { return &zgh_MA{ - locale: "zgh_MA", + locale: "zgh_MA", + plurals: nil, } } // Locale returns the current translators string locale -func (l *zgh_MA) Locale() string { - return l.locale +func (t *zgh_MA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zgh_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zgh_MA' +func (t *zgh_MA) Plurals() []locales.PluralRule { + return t.plurals +} +// CardinalPluralRule returns the PluralRule given 'num' for 'zgh_MA' +func (t *zgh_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { + return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/zh/zh.go b/resources/locales/zh/zh.go index 8e5c8a1..e845ced 100644 --- a/resources/locales/zh/zh.go +++ b/resources/locales/zh/zh.go @@ -5,23 +5,30 @@ import ( ) type zh struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zh' locale func New() locales.Translator { return &zh{ - locale: "zh", + locale: "zh", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *zh) Locale() string { - return l.locale +func (t *zh) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zh' +func (t *zh) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zh' +func (t *zh) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/zh_Hans/zh_Hans.go b/resources/locales/zh_Hans/zh_Hans.go index 018667e..9b760ed 100644 --- a/resources/locales/zh_Hans/zh_Hans.go +++ b/resources/locales/zh_Hans/zh_Hans.go @@ -5,23 +5,30 @@ import ( ) type zh_Hans struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zh_Hans' locale func New() locales.Translator { return &zh_Hans{ - locale: "zh_Hans", + locale: "zh_Hans", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *zh_Hans) Locale() string { - return l.locale +func (t *zh_Hans) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zh_Hans) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zh_Hans' +func (t *zh_Hans) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hans' +func (t *zh_Hans) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/zh_Hans_CN/zh_Hans_CN.go b/resources/locales/zh_Hans_CN/zh_Hans_CN.go index c30a111..218047b 100644 --- a/resources/locales/zh_Hans_CN/zh_Hans_CN.go +++ b/resources/locales/zh_Hans_CN/zh_Hans_CN.go @@ -5,23 +5,30 @@ import ( ) type zh_Hans_CN struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zh_Hans_CN' locale func New() locales.Translator { return &zh_Hans_CN{ - locale: "zh_Hans_CN", + locale: "zh_Hans_CN", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *zh_Hans_CN) Locale() string { - return l.locale +func (t *zh_Hans_CN) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zh_Hans_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zh_Hans_CN' +func (t *zh_Hans_CN) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hans_CN' +func (t *zh_Hans_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/zh_Hans_HK/zh_Hans_HK.go b/resources/locales/zh_Hans_HK/zh_Hans_HK.go index c047360..5b96db1 100644 --- a/resources/locales/zh_Hans_HK/zh_Hans_HK.go +++ b/resources/locales/zh_Hans_HK/zh_Hans_HK.go @@ -5,23 +5,30 @@ import ( ) type zh_Hans_HK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zh_Hans_HK' locale func New() locales.Translator { return &zh_Hans_HK{ - locale: "zh_Hans_HK", + locale: "zh_Hans_HK", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *zh_Hans_HK) Locale() string { - return l.locale +func (t *zh_Hans_HK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zh_Hans_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zh_Hans_HK' +func (t *zh_Hans_HK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hans_HK' +func (t *zh_Hans_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/zh_Hans_MO/zh_Hans_MO.go b/resources/locales/zh_Hans_MO/zh_Hans_MO.go index 354f1db..59195a2 100644 --- a/resources/locales/zh_Hans_MO/zh_Hans_MO.go +++ b/resources/locales/zh_Hans_MO/zh_Hans_MO.go @@ -5,23 +5,30 @@ import ( ) type zh_Hans_MO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zh_Hans_MO' locale func New() locales.Translator { return &zh_Hans_MO{ - locale: "zh_Hans_MO", + locale: "zh_Hans_MO", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *zh_Hans_MO) Locale() string { - return l.locale +func (t *zh_Hans_MO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zh_Hans_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zh_Hans_MO' +func (t *zh_Hans_MO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hans_MO' +func (t *zh_Hans_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/zh_Hans_SG/zh_Hans_SG.go b/resources/locales/zh_Hans_SG/zh_Hans_SG.go index 9b3e91a..3f659a8 100644 --- a/resources/locales/zh_Hans_SG/zh_Hans_SG.go +++ b/resources/locales/zh_Hans_SG/zh_Hans_SG.go @@ -5,23 +5,30 @@ import ( ) type zh_Hans_SG struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zh_Hans_SG' locale func New() locales.Translator { return &zh_Hans_SG{ - locale: "zh_Hans_SG", + locale: "zh_Hans_SG", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *zh_Hans_SG) Locale() string { - return l.locale +func (t *zh_Hans_SG) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zh_Hans_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zh_Hans_SG' +func (t *zh_Hans_SG) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hans_SG' +func (t *zh_Hans_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/zh_Hant/zh_Hant.go b/resources/locales/zh_Hant/zh_Hant.go index 46325d6..7f6a811 100644 --- a/resources/locales/zh_Hant/zh_Hant.go +++ b/resources/locales/zh_Hant/zh_Hant.go @@ -5,23 +5,30 @@ import ( ) type zh_Hant struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zh_Hant' locale func New() locales.Translator { return &zh_Hant{ - locale: "zh_Hant", + locale: "zh_Hant", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *zh_Hant) Locale() string { - return l.locale +func (t *zh_Hant) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zh_Hant) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zh_Hant' +func (t *zh_Hant) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hant' +func (t *zh_Hant) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/zh_Hant_HK/zh_Hant_HK.go b/resources/locales/zh_Hant_HK/zh_Hant_HK.go index a1f4897..b6c8343 100644 --- a/resources/locales/zh_Hant_HK/zh_Hant_HK.go +++ b/resources/locales/zh_Hant_HK/zh_Hant_HK.go @@ -5,23 +5,30 @@ import ( ) type zh_Hant_HK struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zh_Hant_HK' locale func New() locales.Translator { return &zh_Hant_HK{ - locale: "zh_Hant_HK", + locale: "zh_Hant_HK", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *zh_Hant_HK) Locale() string { - return l.locale +func (t *zh_Hant_HK) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zh_Hant_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zh_Hant_HK' +func (t *zh_Hant_HK) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hant_HK' +func (t *zh_Hant_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/zh_Hant_MO/zh_Hant_MO.go b/resources/locales/zh_Hant_MO/zh_Hant_MO.go index e220e45..082df9f 100644 --- a/resources/locales/zh_Hant_MO/zh_Hant_MO.go +++ b/resources/locales/zh_Hant_MO/zh_Hant_MO.go @@ -5,23 +5,30 @@ import ( ) type zh_Hant_MO struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zh_Hant_MO' locale func New() locales.Translator { return &zh_Hant_MO{ - locale: "zh_Hant_MO", + locale: "zh_Hant_MO", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *zh_Hant_MO) Locale() string { - return l.locale +func (t *zh_Hant_MO) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zh_Hant_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zh_Hant_MO' +func (t *zh_Hant_MO) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hant_MO' +func (t *zh_Hant_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/zh_Hant_TW/zh_Hant_TW.go b/resources/locales/zh_Hant_TW/zh_Hant_TW.go index ad91c1a..d9cf021 100644 --- a/resources/locales/zh_Hant_TW/zh_Hant_TW.go +++ b/resources/locales/zh_Hant_TW/zh_Hant_TW.go @@ -5,23 +5,30 @@ import ( ) type zh_Hant_TW struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zh_Hant_TW' locale func New() locales.Translator { return &zh_Hant_TW{ - locale: "zh_Hant_TW", + locale: "zh_Hant_TW", + plurals: []locales.PluralRule{6}, } } // Locale returns the current translators string locale -func (l *zh_Hant_TW) Locale() string { - return l.locale +func (t *zh_Hant_TW) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zh_Hant_TW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zh_Hant_TW' +func (t *zh_Hant_TW) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hant_TW' +func (t *zh_Hant_TW) CardinalPluralRule(num string) (locales.PluralRule, error) { return locales.PluralRuleOther, nil } diff --git a/resources/locales/zu/zu.go b/resources/locales/zu/zu.go index 4aa86d4..1fb258b 100644 --- a/resources/locales/zu/zu.go +++ b/resources/locales/zu/zu.go @@ -5,23 +5,30 @@ import ( ) type zu struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zu' locale func New() locales.Translator { return &zu{ - locale: "zu", + locale: "zu", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *zu) Locale() string { - return l.locale +func (t *zu) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zu' +func (t *zu) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zu' +func (t *zu) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { diff --git a/resources/locales/zu_ZA/zu_ZA.go b/resources/locales/zu_ZA/zu_ZA.go index d44ca4e..987ab6b 100644 --- a/resources/locales/zu_ZA/zu_ZA.go +++ b/resources/locales/zu_ZA/zu_ZA.go @@ -5,23 +5,30 @@ import ( ) type zu_ZA struct { - locale string + locale string + plurals []locales.PluralRule } // New returns a new instance of translator for the 'zu_ZA' locale func New() locales.Translator { return &zu_ZA{ - locale: "zu_ZA", + locale: "zu_ZA", + plurals: []locales.PluralRule{2, 6}, } } // Locale returns the current translators string locale -func (l *zu_ZA) Locale() string { - return l.locale +func (t *zu_ZA) Locale() string { + return t.locale } -// CardinalPluralRule returns the PluralRule given 'num' -func (l *zu_ZA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// Plurals returns the list of plurals associated with 'zu_ZA' +func (t *zu_ZA) Plurals() []locales.PluralRule { + return t.plurals +} + +// CardinalPluralRule returns the PluralRule given 'num' for 'zu_ZA' +func (t *zu_ZA) CardinalPluralRule(num string) (locales.PluralRule, error) { n, err := locales.N(num) if err != nil { From 537bf1ad544a8980fa3a7427821701cff1616a4f Mon Sep 17 00:00:00 2001 From: joeybloggs Date: Tue, 9 Aug 2016 12:41:58 -0400 Subject: [PATCH 2/3] tweak cardinal rule generation for final design. --- cmd/resources/generate_resources.go | 308 +++++++++++++----- cmd/resources/translator.tmpl | 6 +- resources/locales/af/af.go | 15 +- resources/locales/af_NA/af_NA.go | 15 +- resources/locales/af_ZA/af_ZA.go | 15 +- resources/locales/agq/agq.go | 6 +- resources/locales/agq_CM/agq_CM.go | 6 +- resources/locales/ak/ak.go | 15 +- resources/locales/ak_GH/ak_GH.go | 15 +- resources/locales/am/am.go | 21 +- resources/locales/am_ET/am_ET.go | 21 +- resources/locales/ar/ar.go | 23 +- resources/locales/ar_001/ar_001.go | 23 +- resources/locales/ar_AE/ar_AE.go | 23 +- resources/locales/ar_BH/ar_BH.go | 23 +- resources/locales/ar_DJ/ar_DJ.go | 23 +- resources/locales/ar_DZ/ar_DZ.go | 23 +- resources/locales/ar_EG/ar_EG.go | 23 +- resources/locales/ar_EH/ar_EH.go | 23 +- resources/locales/ar_ER/ar_ER.go | 23 +- resources/locales/ar_IL/ar_IL.go | 23 +- resources/locales/ar_IQ/ar_IQ.go | 23 +- resources/locales/ar_JO/ar_JO.go | 23 +- resources/locales/ar_KM/ar_KM.go | 23 +- resources/locales/ar_KW/ar_KW.go | 23 +- resources/locales/ar_LB/ar_LB.go | 23 +- resources/locales/ar_LY/ar_LY.go | 23 +- resources/locales/ar_MA/ar_MA.go | 23 +- resources/locales/ar_MR/ar_MR.go | 23 +- resources/locales/ar_OM/ar_OM.go | 23 +- resources/locales/ar_PS/ar_PS.go | 23 +- resources/locales/ar_QA/ar_QA.go | 23 +- resources/locales/ar_SA/ar_SA.go | 23 +- resources/locales/ar_SD/ar_SD.go | 23 +- resources/locales/ar_SO/ar_SO.go | 23 +- resources/locales/ar_SS/ar_SS.go | 23 +- resources/locales/ar_SY/ar_SY.go | 23 +- resources/locales/ar_TD/ar_TD.go | 23 +- resources/locales/ar_TN/ar_TN.go | 23 +- resources/locales/ar_YE/ar_YE.go | 23 +- resources/locales/as/as.go | 21 +- resources/locales/as_IN/as_IN.go | 21 +- resources/locales/asa/asa.go | 15 +- resources/locales/asa_TZ/asa_TZ.go | 15 +- resources/locales/ast/ast.go | 18 +- resources/locales/ast_ES/ast_ES.go | 18 +- resources/locales/az/az.go | 15 +- resources/locales/az_Cyrl/az_Cyrl.go | 15 +- resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go | 15 +- resources/locales/az_Latn/az_Latn.go | 15 +- resources/locales/az_Latn_AZ/az_Latn_AZ.go | 15 +- resources/locales/bas/bas.go | 6 +- resources/locales/bas_CM/bas_CM.go | 6 +- resources/locales/be/be.go | 19 +- resources/locales/be_BY/be_BY.go | 19 +- resources/locales/bem/bem.go | 15 +- resources/locales/bem_ZM/bem_ZM.go | 15 +- resources/locales/bez/bez.go | 15 +- resources/locales/bez_TZ/bez_TZ.go | 15 +- resources/locales/bg/bg.go | 15 +- resources/locales/bg_BG/bg_BG.go | 15 +- resources/locales/bm/bm.go | 10 +- resources/locales/bm_ML/bm_ML.go | 10 +- resources/locales/bn/bn.go | 21 +- resources/locales/bn_BD/bn_BD.go | 21 +- resources/locales/bn_IN/bn_IN.go | 21 +- resources/locales/bo/bo.go | 10 +- resources/locales/bo_CN/bo_CN.go | 10 +- resources/locales/bo_IN/bo_IN.go | 10 +- resources/locales/br/br.go | 21 +- resources/locales/br_FR/br_FR.go | 21 +- resources/locales/brx/brx.go | 15 +- resources/locales/brx_IN/brx_IN.go | 15 +- resources/locales/bs/bs.go | 26 +- resources/locales/bs_Cyrl/bs_Cyrl.go | 26 +- resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go | 26 +- resources/locales/bs_Latn/bs_Latn.go | 26 +- resources/locales/bs_Latn_BA/bs_Latn_BA.go | 26 +- resources/locales/ca/ca.go | 18 +- resources/locales/ca_AD/ca_AD.go | 18 +- resources/locales/ca_ES/ca_ES.go | 18 +- .../locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go | 18 +- resources/locales/ca_FR/ca_FR.go | 18 +- resources/locales/ca_IT/ca_IT.go | 18 +- resources/locales/ce/ce.go | 15 +- resources/locales/ce_RU/ce_RU.go | 15 +- resources/locales/cgg/cgg.go | 15 +- resources/locales/cgg_UG/cgg_UG.go | 15 +- resources/locales/chr/chr.go | 15 +- resources/locales/chr_US/chr_US.go | 15 +- resources/locales/ckb/ckb.go | 15 +- resources/locales/ckb_IQ/ckb_IQ.go | 15 +- resources/locales/ckb_IR/ckb_IR.go | 15 +- resources/locales/cs/cs.go | 22 +- resources/locales/cs_CZ/cs_CZ.go | 22 +- resources/locales/cu/cu.go | 6 +- resources/locales/cu_RU/cu_RU.go | 6 +- resources/locales/cy/cy.go | 23 +- resources/locales/cy_GB/cy_GB.go | 23 +- resources/locales/da/da.go | 27 +- resources/locales/da_DK/da_DK.go | 27 +- resources/locales/da_GL/da_GL.go | 27 +- resources/locales/dav/dav.go | 6 +- resources/locales/dav_KE/dav_KE.go | 6 +- resources/locales/de/de.go | 18 +- resources/locales/de_AT/de_AT.go | 18 +- resources/locales/de_BE/de_BE.go | 18 +- resources/locales/de_CH/de_CH.go | 18 +- resources/locales/de_DE/de_DE.go | 18 +- resources/locales/de_LI/de_LI.go | 18 +- resources/locales/de_LU/de_LU.go | 18 +- resources/locales/dje/dje.go | 6 +- resources/locales/dje_NE/dje_NE.go | 6 +- resources/locales/dsb/dsb.go | 28 +- resources/locales/dsb_DE/dsb_DE.go | 28 +- resources/locales/dua/dua.go | 6 +- resources/locales/dua_CM/dua_CM.go | 6 +- resources/locales/dyo/dyo.go | 6 +- resources/locales/dyo_SN/dyo_SN.go | 6 +- resources/locales/dz/dz.go | 10 +- resources/locales/dz_BT/dz_BT.go | 10 +- resources/locales/ebu/ebu.go | 6 +- resources/locales/ebu_KE/ebu_KE.go | 6 +- resources/locales/ee/ee.go | 15 +- resources/locales/ee_GH/ee_GH.go | 15 +- resources/locales/ee_TG/ee_TG.go | 15 +- resources/locales/el/el.go | 15 +- resources/locales/el_CY/el_CY.go | 15 +- resources/locales/el_GR/el_GR.go | 15 +- resources/locales/en/en.go | 18 +- resources/locales/en_001/en_001.go | 18 +- resources/locales/en_150/en_150.go | 18 +- resources/locales/en_AG/en_AG.go | 18 +- resources/locales/en_AI/en_AI.go | 18 +- resources/locales/en_AS/en_AS.go | 18 +- resources/locales/en_AT/en_AT.go | 18 +- resources/locales/en_AU/en_AU.go | 18 +- resources/locales/en_BB/en_BB.go | 18 +- resources/locales/en_BE/en_BE.go | 18 +- resources/locales/en_BI/en_BI.go | 18 +- resources/locales/en_BM/en_BM.go | 18 +- resources/locales/en_BS/en_BS.go | 18 +- resources/locales/en_BW/en_BW.go | 18 +- resources/locales/en_BZ/en_BZ.go | 18 +- resources/locales/en_CA/en_CA.go | 18 +- resources/locales/en_CC/en_CC.go | 18 +- resources/locales/en_CH/en_CH.go | 18 +- resources/locales/en_CK/en_CK.go | 18 +- resources/locales/en_CM/en_CM.go | 18 +- resources/locales/en_CX/en_CX.go | 18 +- resources/locales/en_CY/en_CY.go | 18 +- resources/locales/en_DE/en_DE.go | 18 +- resources/locales/en_DG/en_DG.go | 18 +- resources/locales/en_DK/en_DK.go | 18 +- resources/locales/en_DM/en_DM.go | 18 +- resources/locales/en_ER/en_ER.go | 18 +- resources/locales/en_FI/en_FI.go | 18 +- resources/locales/en_FJ/en_FJ.go | 18 +- resources/locales/en_FK/en_FK.go | 18 +- resources/locales/en_FM/en_FM.go | 18 +- resources/locales/en_GB/en_GB.go | 18 +- resources/locales/en_GD/en_GD.go | 18 +- resources/locales/en_GG/en_GG.go | 18 +- resources/locales/en_GH/en_GH.go | 18 +- resources/locales/en_GI/en_GI.go | 18 +- resources/locales/en_GM/en_GM.go | 18 +- resources/locales/en_GU/en_GU.go | 18 +- resources/locales/en_GY/en_GY.go | 18 +- resources/locales/en_HK/en_HK.go | 18 +- resources/locales/en_IE/en_IE.go | 18 +- resources/locales/en_IL/en_IL.go | 18 +- resources/locales/en_IM/en_IM.go | 18 +- resources/locales/en_IN/en_IN.go | 18 +- resources/locales/en_IO/en_IO.go | 18 +- resources/locales/en_JE/en_JE.go | 18 +- resources/locales/en_JM/en_JM.go | 18 +- resources/locales/en_KE/en_KE.go | 18 +- resources/locales/en_KI/en_KI.go | 18 +- resources/locales/en_KN/en_KN.go | 18 +- resources/locales/en_KY/en_KY.go | 18 +- resources/locales/en_LC/en_LC.go | 18 +- resources/locales/en_LR/en_LR.go | 18 +- resources/locales/en_LS/en_LS.go | 18 +- resources/locales/en_MG/en_MG.go | 18 +- resources/locales/en_MH/en_MH.go | 18 +- resources/locales/en_MO/en_MO.go | 18 +- resources/locales/en_MP/en_MP.go | 18 +- resources/locales/en_MS/en_MS.go | 18 +- resources/locales/en_MT/en_MT.go | 18 +- resources/locales/en_MU/en_MU.go | 18 +- resources/locales/en_MW/en_MW.go | 18 +- resources/locales/en_MY/en_MY.go | 18 +- resources/locales/en_NA/en_NA.go | 18 +- resources/locales/en_NF/en_NF.go | 18 +- resources/locales/en_NG/en_NG.go | 18 +- resources/locales/en_NL/en_NL.go | 18 +- resources/locales/en_NR/en_NR.go | 18 +- resources/locales/en_NU/en_NU.go | 18 +- resources/locales/en_NZ/en_NZ.go | 18 +- resources/locales/en_PG/en_PG.go | 18 +- resources/locales/en_PH/en_PH.go | 18 +- resources/locales/en_PK/en_PK.go | 18 +- resources/locales/en_PN/en_PN.go | 18 +- resources/locales/en_PR/en_PR.go | 18 +- resources/locales/en_PW/en_PW.go | 18 +- resources/locales/en_RW/en_RW.go | 18 +- resources/locales/en_SB/en_SB.go | 18 +- resources/locales/en_SC/en_SC.go | 18 +- resources/locales/en_SD/en_SD.go | 18 +- resources/locales/en_SE/en_SE.go | 18 +- resources/locales/en_SG/en_SG.go | 18 +- resources/locales/en_SH/en_SH.go | 18 +- resources/locales/en_SI/en_SI.go | 18 +- resources/locales/en_SL/en_SL.go | 18 +- resources/locales/en_SS/en_SS.go | 18 +- resources/locales/en_SX/en_SX.go | 18 +- resources/locales/en_SZ/en_SZ.go | 18 +- resources/locales/en_TC/en_TC.go | 18 +- resources/locales/en_TK/en_TK.go | 18 +- resources/locales/en_TO/en_TO.go | 18 +- resources/locales/en_TT/en_TT.go | 18 +- resources/locales/en_TV/en_TV.go | 18 +- resources/locales/en_TZ/en_TZ.go | 18 +- resources/locales/en_UG/en_UG.go | 18 +- resources/locales/en_UM/en_UM.go | 18 +- resources/locales/en_US/en_US.go | 18 +- resources/locales/en_US_POSIX/en_US_POSIX.go | 18 +- resources/locales/en_VC/en_VC.go | 18 +- resources/locales/en_VG/en_VG.go | 18 +- resources/locales/en_VI/en_VI.go | 18 +- resources/locales/en_VU/en_VU.go | 18 +- resources/locales/en_WS/en_WS.go | 18 +- resources/locales/en_ZA/en_ZA.go | 18 +- resources/locales/en_ZM/en_ZM.go | 18 +- resources/locales/en_ZW/en_ZW.go | 18 +- resources/locales/eo/eo.go | 15 +- resources/locales/eo_001/eo_001.go | 15 +- resources/locales/es/es.go | 15 +- resources/locales/es_419/es_419.go | 15 +- resources/locales/es_AR/es_AR.go | 15 +- resources/locales/es_BO/es_BO.go | 15 +- resources/locales/es_BR/es_BR.go | 15 +- resources/locales/es_CL/es_CL.go | 15 +- resources/locales/es_CO/es_CO.go | 15 +- resources/locales/es_CR/es_CR.go | 15 +- resources/locales/es_CU/es_CU.go | 15 +- resources/locales/es_DO/es_DO.go | 15 +- resources/locales/es_EA/es_EA.go | 15 +- resources/locales/es_EC/es_EC.go | 15 +- resources/locales/es_ES/es_ES.go | 15 +- resources/locales/es_GQ/es_GQ.go | 15 +- resources/locales/es_GT/es_GT.go | 15 +- resources/locales/es_HN/es_HN.go | 15 +- resources/locales/es_IC/es_IC.go | 15 +- resources/locales/es_MX/es_MX.go | 15 +- resources/locales/es_NI/es_NI.go | 15 +- resources/locales/es_PA/es_PA.go | 15 +- resources/locales/es_PE/es_PE.go | 15 +- resources/locales/es_PH/es_PH.go | 15 +- resources/locales/es_PR/es_PR.go | 15 +- resources/locales/es_PY/es_PY.go | 15 +- resources/locales/es_SV/es_SV.go | 15 +- resources/locales/es_US/es_US.go | 15 +- resources/locales/es_UY/es_UY.go | 15 +- resources/locales/es_VE/es_VE.go | 15 +- resources/locales/et/et.go | 18 +- resources/locales/et_EE/et_EE.go | 18 +- resources/locales/eu/eu.go | 15 +- resources/locales/eu_ES/eu_ES.go | 15 +- resources/locales/ewo/ewo.go | 6 +- resources/locales/ewo_CM/ewo_CM.go | 6 +- resources/locales/fa/fa.go | 21 +- resources/locales/fa_AF/fa_AF.go | 21 +- resources/locales/fa_IR/fa_IR.go | 21 +- resources/locales/ff/ff.go | 16 +- resources/locales/ff_CM/ff_CM.go | 16 +- resources/locales/ff_GN/ff_GN.go | 16 +- resources/locales/ff_MR/ff_MR.go | 16 +- resources/locales/ff_SN/ff_SN.go | 16 +- resources/locales/fi/fi.go | 18 +- resources/locales/fi_FI/fi_FI.go | 18 +- resources/locales/fil/fil.go | 24 +- resources/locales/fil_PH/fil_PH.go | 24 +- resources/locales/fo/fo.go | 15 +- resources/locales/fo_DK/fo_DK.go | 15 +- resources/locales/fo_FO/fo_FO.go | 15 +- resources/locales/fr/fr.go | 16 +- resources/locales/fr_BE/fr_BE.go | 16 +- resources/locales/fr_BF/fr_BF.go | 16 +- resources/locales/fr_BI/fr_BI.go | 16 +- resources/locales/fr_BJ/fr_BJ.go | 16 +- resources/locales/fr_BL/fr_BL.go | 16 +- resources/locales/fr_CA/fr_CA.go | 16 +- resources/locales/fr_CD/fr_CD.go | 16 +- resources/locales/fr_CF/fr_CF.go | 16 +- resources/locales/fr_CG/fr_CG.go | 16 +- resources/locales/fr_CH/fr_CH.go | 16 +- resources/locales/fr_CI/fr_CI.go | 16 +- resources/locales/fr_CM/fr_CM.go | 16 +- resources/locales/fr_DJ/fr_DJ.go | 16 +- resources/locales/fr_DZ/fr_DZ.go | 16 +- resources/locales/fr_FR/fr_FR.go | 16 +- resources/locales/fr_GA/fr_GA.go | 16 +- resources/locales/fr_GF/fr_GF.go | 16 +- resources/locales/fr_GN/fr_GN.go | 16 +- resources/locales/fr_GP/fr_GP.go | 16 +- resources/locales/fr_GQ/fr_GQ.go | 16 +- resources/locales/fr_HT/fr_HT.go | 16 +- resources/locales/fr_KM/fr_KM.go | 16 +- resources/locales/fr_LU/fr_LU.go | 16 +- resources/locales/fr_MA/fr_MA.go | 16 +- resources/locales/fr_MC/fr_MC.go | 16 +- resources/locales/fr_MF/fr_MF.go | 16 +- resources/locales/fr_MG/fr_MG.go | 16 +- resources/locales/fr_ML/fr_ML.go | 16 +- resources/locales/fr_MQ/fr_MQ.go | 16 +- resources/locales/fr_MR/fr_MR.go | 16 +- resources/locales/fr_MU/fr_MU.go | 16 +- resources/locales/fr_NC/fr_NC.go | 16 +- resources/locales/fr_NE/fr_NE.go | 16 +- resources/locales/fr_PF/fr_PF.go | 16 +- resources/locales/fr_PM/fr_PM.go | 16 +- resources/locales/fr_RE/fr_RE.go | 16 +- resources/locales/fr_RW/fr_RW.go | 16 +- resources/locales/fr_SC/fr_SC.go | 16 +- resources/locales/fr_SN/fr_SN.go | 16 +- resources/locales/fr_SY/fr_SY.go | 16 +- resources/locales/fr_TD/fr_TD.go | 16 +- resources/locales/fr_TG/fr_TG.go | 16 +- resources/locales/fr_TN/fr_TN.go | 16 +- resources/locales/fr_VU/fr_VU.go | 16 +- resources/locales/fr_WF/fr_WF.go | 16 +- resources/locales/fr_YT/fr_YT.go | 16 +- resources/locales/fur/fur.go | 15 +- resources/locales/fur_IT/fur_IT.go | 15 +- resources/locales/fy/fy.go | 18 +- resources/locales/fy_NL/fy_NL.go | 18 +- resources/locales/ga/ga.go | 21 +- resources/locales/ga_IE/ga_IE.go | 21 +- resources/locales/gd/gd.go | 19 +- resources/locales/gd_GB/gd_GB.go | 19 +- resources/locales/gl/gl.go | 18 +- resources/locales/gl_ES/gl_ES.go | 18 +- resources/locales/gsw/gsw.go | 15 +- resources/locales/gsw_CH/gsw_CH.go | 15 +- resources/locales/gsw_FR/gsw_FR.go | 15 +- resources/locales/gsw_LI/gsw_LI.go | 15 +- resources/locales/gu/gu.go | 21 +- resources/locales/gu_IN/gu_IN.go | 21 +- resources/locales/guz/guz.go | 6 +- resources/locales/guz_KE/guz_KE.go | 6 +- resources/locales/gv/gv.go | 24 +- resources/locales/gv_IM/gv_IM.go | 24 +- resources/locales/ha/ha.go | 15 +- resources/locales/ha_GH/ha_GH.go | 15 +- resources/locales/ha_NE/ha_NE.go | 15 +- resources/locales/ha_NG/ha_NG.go | 15 +- resources/locales/haw/haw.go | 15 +- resources/locales/haw_US/haw_US.go | 15 +- resources/locales/he/he.go | 27 +- resources/locales/he_IL/he_IL.go | 27 +- resources/locales/hi/hi.go | 21 +- resources/locales/hi_IN/hi_IN.go | 21 +- resources/locales/hr/hr.go | 26 +- resources/locales/hr_BA/hr_BA.go | 26 +- resources/locales/hr_HR/hr_HR.go | 26 +- resources/locales/hsb/hsb.go | 28 +- resources/locales/hsb_DE/hsb_DE.go | 28 +- resources/locales/hu/hu.go | 15 +- resources/locales/hu_HU/hu_HU.go | 15 +- resources/locales/hy/hy.go | 16 +- resources/locales/hy_AM/hy_AM.go | 16 +- resources/locales/id/id.go | 10 +- resources/locales/id_ID/id_ID.go | 10 +- resources/locales/ig/ig.go | 10 +- resources/locales/ig_NG/ig_NG.go | 10 +- resources/locales/ii/ii.go | 10 +- resources/locales/ii_CN/ii_CN.go | 10 +- resources/locales/is/is.go | 22 +- resources/locales/is_IS/is_IS.go | 22 +- resources/locales/it/it.go | 18 +- resources/locales/it_CH/it_CH.go | 18 +- resources/locales/it_IT/it_IT.go | 18 +- resources/locales/it_SM/it_SM.go | 18 +- resources/locales/ja/ja.go | 10 +- resources/locales/ja_JP/ja_JP.go | 10 +- resources/locales/jgo/jgo.go | 15 +- resources/locales/jgo_CM/jgo_CM.go | 15 +- resources/locales/jmc/jmc.go | 15 +- resources/locales/jmc_TZ/jmc_TZ.go | 15 +- resources/locales/ka/ka.go | 15 +- resources/locales/ka_GE/ka_GE.go | 15 +- resources/locales/kab/kab.go | 16 +- resources/locales/kab_DZ/kab_DZ.go | 16 +- resources/locales/kam/kam.go | 6 +- resources/locales/kam_KE/kam_KE.go | 6 +- resources/locales/kde/kde.go | 10 +- resources/locales/kde_TZ/kde_TZ.go | 10 +- resources/locales/kea/kea.go | 10 +- resources/locales/kea_CV/kea_CV.go | 10 +- resources/locales/khq/khq.go | 6 +- resources/locales/khq_ML/khq_ML.go | 6 +- resources/locales/ki/ki.go | 6 +- resources/locales/ki_KE/ki_KE.go | 6 +- resources/locales/kk/kk.go | 15 +- resources/locales/kk_KZ/kk_KZ.go | 15 +- resources/locales/kkj/kkj.go | 15 +- resources/locales/kkj_CM/kkj_CM.go | 15 +- resources/locales/kl/kl.go | 15 +- resources/locales/kl_GL/kl_GL.go | 15 +- resources/locales/kln/kln.go | 6 +- resources/locales/kln_KE/kln_KE.go | 6 +- resources/locales/km/km.go | 10 +- resources/locales/km_KH/km_KH.go | 10 +- resources/locales/kn/kn.go | 21 +- resources/locales/kn_IN/kn_IN.go | 21 +- resources/locales/ko/ko.go | 10 +- resources/locales/ko_KP/ko_KP.go | 10 +- resources/locales/ko_KR/ko_KR.go | 10 +- resources/locales/kok/kok.go | 6 +- resources/locales/kok_IN/kok_IN.go | 6 +- resources/locales/ks/ks.go | 15 +- resources/locales/ks_IN/ks_IN.go | 15 +- resources/locales/ksb/ksb.go | 15 +- resources/locales/ksb_TZ/ksb_TZ.go | 15 +- resources/locales/ksf/ksf.go | 6 +- resources/locales/ksf_CM/ksf_CM.go | 6 +- resources/locales/ksh/ksh.go | 17 +- resources/locales/ksh_DE/ksh_DE.go | 17 +- resources/locales/kw/kw.go | 17 +- resources/locales/kw_GB/kw_GB.go | 17 +- resources/locales/ky/ky.go | 15 +- resources/locales/ky_KG/ky_KG.go | 15 +- resources/locales/lag/lag.go | 23 +- resources/locales/lag_TZ/lag_TZ.go | 23 +- resources/locales/lb/lb.go | 15 +- resources/locales/lb_LU/lb_LU.go | 15 +- resources/locales/lg/lg.go | 15 +- resources/locales/lg_UG/lg_UG.go | 15 +- resources/locales/lkt/lkt.go | 10 +- resources/locales/lkt_US/lkt_US.go | 10 +- resources/locales/ln/ln.go | 15 +- resources/locales/ln_AO/ln_AO.go | 15 +- resources/locales/ln_CD/ln_CD.go | 15 +- resources/locales/ln_CF/ln_CF.go | 15 +- resources/locales/ln_CG/ln_CG.go | 15 +- resources/locales/lo/lo.go | 10 +- resources/locales/lo_LA/lo_LA.go | 10 +- resources/locales/locale_info.go | 174 +++++----- resources/locales/lrc/lrc.go | 6 +- resources/locales/lrc_IQ/lrc_IQ.go | 6 +- resources/locales/lrc_IR/lrc_IR.go | 6 +- resources/locales/lt/lt.go | 25 +- resources/locales/lt_LT/lt_LT.go | 25 +- resources/locales/lu/lu.go | 6 +- resources/locales/lu_CD/lu_CD.go | 6 +- resources/locales/luo/luo.go | 6 +- resources/locales/luo_KE/luo_KE.go | 6 +- resources/locales/luy/luy.go | 6 +- resources/locales/luy_KE/luy_KE.go | 6 +- resources/locales/lv/lv.go | 25 +- resources/locales/lv_LV/lv_LV.go | 25 +- resources/locales/mas/mas.go | 15 +- resources/locales/mas_KE/mas_KE.go | 15 +- resources/locales/mas_TZ/mas_TZ.go | 15 +- resources/locales/mer/mer.go | 6 +- resources/locales/mer_KE/mer_KE.go | 6 +- resources/locales/mfe/mfe.go | 6 +- resources/locales/mfe_MU/mfe_MU.go | 6 +- resources/locales/mg/mg.go | 15 +- resources/locales/mg_MG/mg_MG.go | 15 +- resources/locales/mgh/mgh.go | 6 +- resources/locales/mgh_MZ/mgh_MZ.go | 6 +- resources/locales/mgo/mgo.go | 15 +- resources/locales/mgo_CM/mgo_CM.go | 15 +- resources/locales/mk/mk.go | 24 +- resources/locales/mk_MK/mk_MK.go | 24 +- resources/locales/ml/ml.go | 15 +- resources/locales/ml_IN/ml_IN.go | 15 +- resources/locales/mn/mn.go | 15 +- resources/locales/mn_MN/mn_MN.go | 15 +- resources/locales/mr/mr.go | 21 +- resources/locales/mr_IN/mr_IN.go | 21 +- resources/locales/ms/ms.go | 10 +- resources/locales/ms_BN/ms_BN.go | 10 +- resources/locales/ms_MY/ms_MY.go | 10 +- resources/locales/ms_SG/ms_SG.go | 10 +- resources/locales/mt/mt.go | 19 +- resources/locales/mt_MT/mt_MT.go | 19 +- resources/locales/mua/mua.go | 6 +- resources/locales/mua_CM/mua_CM.go | 6 +- resources/locales/my/my.go | 10 +- resources/locales/my_MM/my_MM.go | 10 +- resources/locales/mzn/mzn.go | 6 +- resources/locales/mzn_IR/mzn_IR.go | 6 +- resources/locales/naq/naq.go | 17 +- resources/locales/naq_NA/naq_NA.go | 17 +- resources/locales/nb/nb.go | 15 +- resources/locales/nb_NO/nb_NO.go | 15 +- resources/locales/nb_SJ/nb_SJ.go | 15 +- resources/locales/nd/nd.go | 15 +- resources/locales/nd_ZW/nd_ZW.go | 15 +- resources/locales/ne/ne.go | 15 +- resources/locales/ne_IN/ne_IN.go | 15 +- resources/locales/ne_NP/ne_NP.go | 15 +- resources/locales/nl/nl.go | 18 +- resources/locales/nl_AW/nl_AW.go | 18 +- resources/locales/nl_BE/nl_BE.go | 18 +- resources/locales/nl_BQ/nl_BQ.go | 18 +- resources/locales/nl_CW/nl_CW.go | 18 +- resources/locales/nl_NL/nl_NL.go | 18 +- resources/locales/nl_SR/nl_SR.go | 18 +- resources/locales/nl_SX/nl_SX.go | 18 +- resources/locales/nmg/nmg.go | 6 +- resources/locales/nmg_CM/nmg_CM.go | 6 +- resources/locales/nn/nn.go | 15 +- resources/locales/nn_NO/nn_NO.go | 15 +- resources/locales/nnh/nnh.go | 15 +- resources/locales/nnh_CM/nnh_CM.go | 15 +- resources/locales/nus/nus.go | 6 +- resources/locales/nus_SS/nus_SS.go | 6 +- resources/locales/nyn/nyn.go | 15 +- resources/locales/nyn_UG/nyn_UG.go | 15 +- resources/locales/om/om.go | 15 +- resources/locales/om_ET/om_ET.go | 15 +- resources/locales/om_KE/om_KE.go | 15 +- resources/locales/or/or.go | 15 +- resources/locales/or_IN/or_IN.go | 15 +- resources/locales/os/os.go | 15 +- resources/locales/os_GE/os_GE.go | 15 +- resources/locales/os_RU/os_RU.go | 15 +- resources/locales/pa/pa.go | 15 +- resources/locales/pa_Arab/pa_Arab.go | 15 +- resources/locales/pa_Arab_PK/pa_Arab_PK.go | 15 +- resources/locales/pa_Guru/pa_Guru.go | 15 +- resources/locales/pa_Guru_IN/pa_Guru_IN.go | 15 +- resources/locales/pl/pl.go | 22 +- resources/locales/pl_PL/pl_PL.go | 22 +- resources/locales/prg/prg.go | 25 +- resources/locales/prg_001/prg_001.go | 25 +- resources/locales/ps/ps.go | 15 +- resources/locales/ps_AF/ps_AF.go | 15 +- resources/locales/pt/pt.go | 15 +- resources/locales/pt_AO/pt_AO.go | 15 +- resources/locales/pt_BR/pt_BR.go | 15 +- resources/locales/pt_CH/pt_CH.go | 15 +- resources/locales/pt_CV/pt_CV.go | 15 +- resources/locales/pt_GQ/pt_GQ.go | 15 +- resources/locales/pt_GW/pt_GW.go | 15 +- resources/locales/pt_LU/pt_LU.go | 15 +- resources/locales/pt_MO/pt_MO.go | 15 +- resources/locales/pt_MZ/pt_MZ.go | 15 +- resources/locales/pt_PT/pt_PT.go | 15 +- resources/locales/pt_ST/pt_ST.go | 15 +- resources/locales/pt_TL/pt_TL.go | 15 +- resources/locales/qu/qu.go | 6 +- resources/locales/qu_BO/qu_BO.go | 6 +- resources/locales/qu_EC/qu_EC.go | 6 +- resources/locales/qu_PE/qu_PE.go | 6 +- resources/locales/rm/rm.go | 15 +- resources/locales/rm_CH/rm_CH.go | 15 +- resources/locales/rn/rn.go | 6 +- resources/locales/rn_BI/rn_BI.go | 6 +- resources/locales/ro/ro.go | 25 +- resources/locales/ro_MD/ro_MD.go | 25 +- resources/locales/ro_RO/ro_RO.go | 25 +- resources/locales/rof/rof.go | 15 +- resources/locales/rof_TZ/rof_TZ.go | 15 +- resources/locales/root/root.go | 10 +- resources/locales/ru/ru.go | 22 +- resources/locales/ru_BY/ru_BY.go | 22 +- resources/locales/ru_KG/ru_KG.go | 22 +- resources/locales/ru_KZ/ru_KZ.go | 22 +- resources/locales/ru_MD/ru_MD.go | 22 +- resources/locales/ru_RU/ru_RU.go | 22 +- resources/locales/ru_UA/ru_UA.go | 22 +- resources/locales/rw/rw.go | 6 +- resources/locales/rw_RW/rw_RW.go | 6 +- resources/locales/rwk/rwk.go | 15 +- resources/locales/rwk_TZ/rwk_TZ.go | 15 +- resources/locales/sah/sah.go | 10 +- resources/locales/sah_RU/sah_RU.go | 10 +- resources/locales/saq/saq.go | 15 +- resources/locales/saq_KE/saq_KE.go | 15 +- resources/locales/sbp/sbp.go | 6 +- resources/locales/sbp_TZ/sbp_TZ.go | 6 +- resources/locales/se/se.go | 17 +- resources/locales/se_FI/se_FI.go | 17 +- resources/locales/se_NO/se_NO.go | 17 +- resources/locales/se_SE/se_SE.go | 17 +- resources/locales/seh/seh.go | 15 +- resources/locales/seh_MZ/seh_MZ.go | 15 +- resources/locales/ses/ses.go | 10 +- resources/locales/ses_ML/ses_ML.go | 10 +- resources/locales/sg/sg.go | 10 +- resources/locales/sg_CF/sg_CF.go | 10 +- resources/locales/shi/shi.go | 23 +- resources/locales/shi_Latn/shi_Latn.go | 23 +- resources/locales/shi_Latn_MA/shi_Latn_MA.go | 23 +- resources/locales/shi_Tfng/shi_Tfng.go | 23 +- resources/locales/shi_Tfng_MA/shi_Tfng_MA.go | 23 +- resources/locales/si/si.go | 27 +- resources/locales/si_LK/si_LK.go | 27 +- resources/locales/sk/sk.go | 22 +- resources/locales/sk_SK/sk_SK.go | 22 +- resources/locales/sl/sl.go | 22 +- resources/locales/sl_SI/sl_SI.go | 22 +- resources/locales/smn/smn.go | 17 +- resources/locales/smn_FI/smn_FI.go | 17 +- resources/locales/sn/sn.go | 15 +- resources/locales/sn_ZW/sn_ZW.go | 15 +- resources/locales/so/so.go | 15 +- resources/locales/so_DJ/so_DJ.go | 15 +- resources/locales/so_ET/so_ET.go | 15 +- resources/locales/so_KE/so_KE.go | 15 +- resources/locales/so_SO/so_SO.go | 15 +- resources/locales/sq/sq.go | 15 +- resources/locales/sq_AL/sq_AL.go | 15 +- resources/locales/sq_MK/sq_MK.go | 15 +- resources/locales/sq_XK/sq_XK.go | 15 +- resources/locales/sr/sr.go | 26 +- resources/locales/sr_Cyrl/sr_Cyrl.go | 26 +- resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go | 26 +- resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go | 26 +- resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go | 26 +- resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go | 26 +- resources/locales/sr_Latn/sr_Latn.go | 26 +- resources/locales/sr_Latn_BA/sr_Latn_BA.go | 26 +- resources/locales/sr_Latn_ME/sr_Latn_ME.go | 26 +- resources/locales/sr_Latn_RS/sr_Latn_RS.go | 26 +- resources/locales/sr_Latn_XK/sr_Latn_XK.go | 26 +- resources/locales/sv/sv.go | 18 +- resources/locales/sv_AX/sv_AX.go | 18 +- resources/locales/sv_FI/sv_FI.go | 18 +- resources/locales/sv_SE/sv_SE.go | 18 +- resources/locales/sw/sw.go | 18 +- resources/locales/sw_CD/sw_CD.go | 18 +- resources/locales/sw_KE/sw_KE.go | 18 +- resources/locales/sw_TZ/sw_TZ.go | 18 +- resources/locales/sw_UG/sw_UG.go | 18 +- resources/locales/ta/ta.go | 15 +- resources/locales/ta_IN/ta_IN.go | 15 +- resources/locales/ta_LK/ta_LK.go | 15 +- resources/locales/ta_MY/ta_MY.go | 15 +- resources/locales/ta_SG/ta_SG.go | 15 +- resources/locales/te/te.go | 15 +- resources/locales/te_IN/te_IN.go | 15 +- resources/locales/teo/teo.go | 15 +- resources/locales/teo_KE/teo_KE.go | 15 +- resources/locales/teo_UG/teo_UG.go | 15 +- resources/locales/th/th.go | 10 +- resources/locales/th_TH/th_TH.go | 10 +- resources/locales/ti/ti.go | 15 +- resources/locales/ti_ER/ti_ER.go | 15 +- resources/locales/ti_ET/ti_ET.go | 15 +- resources/locales/tk/tk.go | 15 +- resources/locales/tk_TM/tk_TM.go | 15 +- resources/locales/to/to.go | 10 +- resources/locales/to_TO/to_TO.go | 10 +- resources/locales/tr/tr.go | 15 +- resources/locales/tr_CY/tr_CY.go | 15 +- resources/locales/tr_TR/tr_TR.go | 15 +- resources/locales/twq/twq.go | 6 +- resources/locales/twq_NE/twq_NE.go | 6 +- resources/locales/tzm/tzm.go | 15 +- resources/locales/tzm_MA/tzm_MA.go | 15 +- resources/locales/ug/ug.go | 15 +- resources/locales/ug_CN/ug_CN.go | 15 +- resources/locales/uk/uk.go | 22 +- resources/locales/uk_UA/uk_UA.go | 22 +- resources/locales/ur/ur.go | 18 +- resources/locales/ur_IN/ur_IN.go | 18 +- resources/locales/ur_PK/ur_PK.go | 18 +- resources/locales/uz/uz.go | 15 +- resources/locales/uz_Arab/uz_Arab.go | 15 +- resources/locales/uz_Arab_AF/uz_Arab_AF.go | 15 +- resources/locales/uz_Cyrl/uz_Cyrl.go | 15 +- resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go | 15 +- resources/locales/uz_Latn/uz_Latn.go | 15 +- resources/locales/uz_Latn_UZ/uz_Latn_UZ.go | 15 +- resources/locales/vai/vai.go | 6 +- resources/locales/vai_Latn/vai_Latn.go | 6 +- resources/locales/vai_Latn_LR/vai_Latn_LR.go | 6 +- resources/locales/vai_Vaii/vai_Vaii.go | 6 +- resources/locales/vai_Vaii_LR/vai_Vaii_LR.go | 6 +- resources/locales/vi/vi.go | 10 +- resources/locales/vi_VN/vi_VN.go | 10 +- resources/locales/vo/vo.go | 15 +- resources/locales/vo_001/vo_001.go | 15 +- resources/locales/vun/vun.go | 15 +- resources/locales/vun_TZ/vun_TZ.go | 15 +- resources/locales/wae/wae.go | 15 +- resources/locales/wae_CH/wae_CH.go | 15 +- resources/locales/xog/xog.go | 15 +- resources/locales/xog_UG/xog_UG.go | 15 +- resources/locales/yav/yav.go | 6 +- resources/locales/yav_CM/yav_CM.go | 6 +- resources/locales/yi/yi.go | 18 +- resources/locales/yi_001/yi_001.go | 18 +- resources/locales/yo/yo.go | 10 +- resources/locales/yo_BJ/yo_BJ.go | 10 +- resources/locales/yo_NG/yo_NG.go | 10 +- resources/locales/yue/yue.go | 6 +- resources/locales/yue_HK/yue_HK.go | 6 +- resources/locales/zgh/zgh.go | 6 +- resources/locales/zgh_MA/zgh_MA.go | 6 +- resources/locales/zh/zh.go | 10 +- resources/locales/zh_Hans/zh_Hans.go | 10 +- resources/locales/zh_Hans_CN/zh_Hans_CN.go | 10 +- resources/locales/zh_Hans_HK/zh_Hans_HK.go | 10 +- resources/locales/zh_Hans_MO/zh_Hans_MO.go | 10 +- resources/locales/zh_Hans_SG/zh_Hans_SG.go | 10 +- resources/locales/zh_Hant/zh_Hant.go | 10 +- resources/locales/zh_Hant_HK/zh_Hant_HK.go | 10 +- resources/locales/zh_Hant_MO/zh_Hant_MO.go | 10 +- resources/locales/zh_Hant_TW/zh_Hant_TW.go | 10 +- resources/locales/zu/zu.go | 21 +- resources/locales/zu_ZA/zu_ZA.go | 21 +- 718 files changed, 5676 insertions(+), 6174 deletions(-) diff --git a/cmd/resources/generate_resources.go b/cmd/resources/generate_resources.go index 2bb256c..25bc96d 100644 --- a/cmd/resources/generate_resources.go +++ b/cmd/resources/generate_resources.go @@ -5,6 +5,7 @@ import ( "log" "os" "os/exec" + "sort" "strings" "github.com/go-playground/universal-translator/resources/locales" @@ -50,37 +51,12 @@ const ( var ( prVarFuncs = map[string]string{ - "n": `n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue:num, InnerError: err} - } - - `, - "i": `i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue:num, InnerError: err} - } - - `, - "v": "v := locales.V(num)\n\n", - "w": `w, err := locales.W(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue:num, InnerError: err} - } - - `, - "f": `f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue:num, InnerError: err} - } - - `, - "t": `t, err := locales.T(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue:num, InnerError: err} - } - - `, + "n": "n := math.Abs(num)\n", + "i": "i := int64(n)\n", + // "v": "v := ...", // inherently available as argument + "w": "w := locales.W(n, v)\n", + "f": "f := locales.F(n, v)\n", + "t": "t := locales.T(n, v)\n", } ) @@ -109,27 +85,8 @@ func main() { panic(err) } - // cardinalPlurals := map[string] - - // for _, p := range ldr.Supplemental().Plurals { - - // for _, pr := range p.PluralRules { - - // fmt.Println(pr.Locales) - - // for _, rule := range pr.PluralRule { - // fmt.Println(rule.Count, rule.Common.Data()) - // } - // } - // } - for _, l := range cldr.Locales() { - // // work on uk for the moment - // if l != "uk" && l != "fil" && l != "gd" { - // if l != "gd" { - // continue - // } fmt.Println(l) baseLocale := strings.SplitN(l, "_", 2)[0] @@ -138,36 +95,60 @@ func main() { Locale: l, } + // plural rules trans.CardinalFunc, trans.Plurals = parseCardinalPluralRuleFunc(cldr, baseLocale) - // fmt.Println(trans.CardinalFunc, trans.Plurals) - // cardinalRules := getLocaleCardinalPluralRules(cldr, baseLocale) - // fmt.Println("CardinalRules:", l, cardinalRules) - // Start Plural Rules + // // number values + // ldml := cldr.RawLDML(l) + + // var decimal, group, minus, percent, permille string + + // // some just have no data... + // if ldml.Numbers != nil { - // for _, p := range cldr.Supplemental().Plurals { + // symbol := ldml.Numbers.Symbols[0] - // for _, pr := range p.PluralRules { + // if len(symbol.Decimal) > 0 { + // decimal = symbol.Decimal[0].Data() + // } + // if len(symbol.Group) > 0 { + // group = symbol.Group[0].Data() + // } + // if len(symbol.MinusSign) > 0 { + // minus = symbol.MinusSign[0].Data() + // } + // if len(symbol.PercentSign) > 0 { + // percent = symbol.PercentSign[0].Data() + // } + // if len(symbol.PerMille) > 0 { + // permille = symbol.PerMille[0].Data() + // } + // } - // locales := strings.Split(pr.Locales, " ") + // var decimalFormat, currencyFormat, currencyAccountingFormat, percentageFormat string - // for _, loc := range locales { + // if len(ldml.Numbers.DecimalFormats) > 0 && len(ldml.Numbers.DecimalFormats[0].DecimalFormatLength) > 0 { + // decimalFormat = ldml.Numbers.DecimalFormats[0].DecimalFormatLength[0].DecimalFormat[0].Pattern[0].Data() + // } - // if loc == baseLocale { + // if len(ldml.Numbers.CurrencyFormats) > 0 && len(ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength) > 0 { - // // plural rule found - // fmt.Println("Locale Plural Rules Found:", loc, baseLocale, l) - // } - // } - // // fmt.Println(pr.Locales) + // currencyFormat = ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength[0].CurrencyFormat[0].Pattern[0].Data() + // currencyAccountingFormat = currencyFormat - // // for _, rule := range pr.PluralRule { - // // fmt.Println(rule.Count, rule.Common.Data()) - // // } + // if len(ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength[0].CurrencyFormat) > 1 { + // currencyAccountingFormat = ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength[0].CurrencyFormat[1].Pattern[0].Data() // } // } - // End Plural Rules + // if len(ldml.Numbers.PercentFormats) > 0 && len(ldml.Numbers.PercentFormats[0].PercentFormatLength) > 0 { + // percentageFormat = ldml.Numbers.PercentFormats[0].PercentFormatLength[0].PercentFormat[0].Pattern[0].Data() + // } + + // // parse Number values + // parseNumbers(decimal, group, minus, percent, permille, decimalFormat, currencyFormat, currencyAccountingFormat, percentageFormat) + + // end number values if err = os.MkdirAll(fmt.Sprintf(locDir, l), 0777); err != nil { log.Fatal(err) @@ -195,6 +176,134 @@ func main() { } } +// func parseNumbers(decimal, group, minus, percent, permille, decimalFormat, currencyFormat, currencyAccountingFormat, percentageFormat string) { + +// if includeDecimalDigits { + +// nfMutex.RLock() + +// if format, exists := numberFormats[pattern]; exists { +// nfMutex.RUnlock() +// return format +// } + +// nfMutex.RUnlock() + +// } else { + +// nfndMutex.RLock() + +// if format, exists := numberFormatsNoDecimals[pattern]; exists { +// nfndMutex.RUnlock() +// return format +// } + +// nfndMutex.RUnlock() +// } + +// format := new(numberFormat) +// patterns := strings.Split(pattern, ";") + +// matches := prefixSuffixRegex.FindAllStringSubmatch(patterns[0], -1) +// if len(matches) > 0 { +// if len(matches[0]) > 1 { +// format.positivePrefix = matches[0][1] +// } +// if len(matches[0]) > 2 { +// format.positiveSuffix = matches[0][2] +// } +// } + +// // default values for negative prefix & suffix +// format.negativePrefix = string(n.Symbols.Negative) + string(format.positivePrefix) +// format.negativeSuffix = format.positiveSuffix + +// // see if they are in the pattern +// if len(patterns) > 1 { +// matches = prefixSuffixRegex.FindAllStringSubmatch(patterns[1], -1) + +// if len(matches) > 0 { +// if len(matches[0]) > 1 { +// format.negativePrefix = matches[0][1] +// } +// if len(matches[0]) > 2 { +// format.negativeSuffix = matches[0][2] +// } +// } +// } + +// pat := patterns[0] + +// if strings.Index(pat, "%") != -1 { +// format.multiplier = 100 +// } else if strings.Index(pat, "‰") != -1 { +// format.multiplier = 1000 +// } else { +// format.multiplier = 1 +// } + +// pos := strings.Index(pat, ".") + +// if pos != -1 { +// pos2 := strings.LastIndex(pat, "0") +// if pos2 > pos { +// format.minDecimalDigits = pos2 - pos +// } + +// pos3 := strings.LastIndex(pat, "#") +// if pos3 >= pos2 { +// format.maxDecimalDigits = pos3 - pos +// } else { +// format.maxDecimalDigits = format.minDecimalDigits +// } + +// pat = pat[0:pos] +// } + +// p := strings.Replace(pat, ",", "", -1) +// pos = strings.Index(p, "0") +// if pos != -1 { +// format.minIntegerDigits = strings.LastIndex(p, "0") - pos + 1 +// } + +// p = strings.Replace(pat, "#", "0", -1) +// pos = strings.LastIndex(pat, ",") +// if pos != -1 { +// format.groupSizeFinal = strings.LastIndex(p, "0") - pos +// pos2 := strings.LastIndex(p[0:pos], ",") +// if pos2 != -1 { +// format.groupSizeMain = pos - pos2 - 1 +// } else { +// format.groupSizeMain = format.groupSizeFinal +// } +// } + +// if includeDecimalDigits { +// nfMutex.Lock() +// numberFormats[pattern] = format +// nfMutex.Unlock() +// return format +// } + +// format.maxDecimalDigits = 0 +// format.minDecimalDigits = 0 +// nfndMutex.Lock() +// numberFormatsNoDecimals[pattern] = format +// nfndMutex.Unlock() +// return format +// } + +type sortRank struct { + Rank uint8 + Value string +} + +type ByRank []sortRank + +func (a ByRank) Len() int { return len(a) } +func (a ByRank) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a ByRank) Less(i, j int) bool { return a[i].Rank < a[j].Rank } + // TODO: cleanup function logic perhaps write a lexer... but it's working right now, and // I'm already farther down the rabbit hole than I'd like and so pulling the chute here. func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results string, plurals string) { @@ -242,35 +351,35 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results psI := pluralStringToInt(rule.Count) pluralArr = append(pluralArr, psI) - // fmt.Println(rule.Count, ps1) - data := strings.Replace(strings.Replace(strings.Replace(strings.TrimSpace(strings.SplitN(rule.Common.Data(), "@", 2)[0]), " = ", " == ", -1), " or ", " || ", -1), " and ", " && ", -1) if len(data) == 0 { if len(prCardinal.PluralRule) == 1 { - results = "return locales." + ps1 + ", nil" + results = "return locales." + ps1 } else { - results += "\n\nreturn locales." + ps1 + ", nil" + results += "\n\nreturn locales." + ps1 // results += "else {\nreturn locales." + locales.PluralStringToString(rule.Count) + ", nil\n}" } continue } - if strings.Contains(data, "n") { - vals[prVarFuncs["n"]] = struct{}{} - } + // // All need n, so always add + // if strings.Contains(data, "n") { + // vals[prVarFuncs["n"]] = struct{}{} + // } if strings.Contains(data, "i") { vals[prVarFuncs["i"]] = struct{}{} } - if strings.Contains(data, "v") { - vals[prVarFuncs["v"]] = struct{}{} - } + // v is inherently avaialable as an argument + // if strings.Contains(data, "v") { + // vals[prVarFuncs["v"]] = struct{}{} + // } if strings.Contains(data, "w") { vals[prVarFuncs["w"]] = struct{}{} @@ -406,21 +515,58 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results results += " {\n" // return plural rule here - results += "return locales." + ps1 + ", nil\n" + results += "return locales." + ps1 + "\n" results += "}" } pre := "\n" + // always needed + vals[prVarFuncs["n"]] = struct{}{} + + sorted := make([]sortRank, 0, len(vals)) + for k := range vals { - pre += k + switch k[:1] { + case "n": + sorted = append(sorted, sortRank{ + Value: prVarFuncs["n"], + Rank: 1, + }) + case "i": + sorted = append(sorted, sortRank{ + Value: prVarFuncs["i"], + Rank: 2, + }) + case "w": + sorted = append(sorted, sortRank{ + Value: prVarFuncs["w"], + Rank: 3, + }) + case "f": + sorted = append(sorted, sortRank{ + Value: prVarFuncs["f"], + Rank: 4, + }) + case "t": + sorted = append(sorted, sortRank{ + Value: prVarFuncs["t"], + Rank: 5, + }) + } + } + + sort.Sort(ByRank(sorted)) + + for _, k := range sorted { + pre += k.Value } pre += "\n" if len(results) == 0 { - results = "return locales.PluralRuleUnknown,nil" + results = "return locales.PluralRuleUnknown" } results = pre + results diff --git a/cmd/resources/translator.tmpl b/cmd/resources/translator.tmpl index 9294cd0..8147d74 100644 --- a/cmd/resources/translator.tmpl +++ b/cmd/resources/translator.tmpl @@ -2,6 +2,8 @@ package {{ .Locale }} import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -28,8 +30,8 @@ func(t *{{ .Locale }}) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for '{{ .Locale }}' -func(t *{{ .Locale }}) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for '{{ .Locale }}' +func(t *{{ .Locale }}) cardinalPluralRule(num float64, v uint64) locales.PluralRule { {{ .CardinalFunc }} } diff --git a/resources/locales/af/af.go b/resources/locales/af/af.go index a509a66..b18c199 100644 --- a/resources/locales/af/af.go +++ b/resources/locales/af/af.go @@ -1,6 +1,8 @@ package af import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *af) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'af' -func (t *af) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'af' +func (t *af) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/af_NA/af_NA.go b/resources/locales/af_NA/af_NA.go index 0373828..e8194c0 100644 --- a/resources/locales/af_NA/af_NA.go +++ b/resources/locales/af_NA/af_NA.go @@ -1,6 +1,8 @@ package af_NA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *af_NA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'af_NA' -func (t *af_NA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'af_NA' +func (t *af_NA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/af_ZA/af_ZA.go b/resources/locales/af_ZA/af_ZA.go index 6004e75..c870816 100644 --- a/resources/locales/af_ZA/af_ZA.go +++ b/resources/locales/af_ZA/af_ZA.go @@ -1,6 +1,8 @@ package af_ZA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *af_ZA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'af_ZA' -func (t *af_ZA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'af_ZA' +func (t *af_ZA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/agq/agq.go b/resources/locales/agq/agq.go index 0c16e1a..434d3ba 100644 --- a/resources/locales/agq/agq.go +++ b/resources/locales/agq/agq.go @@ -1,6 +1,8 @@ package agq import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *agq) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'agq' -func (t *agq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'agq' +func (t *agq) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/agq_CM/agq_CM.go b/resources/locales/agq_CM/agq_CM.go index d89bf56..deb14ab 100644 --- a/resources/locales/agq_CM/agq_CM.go +++ b/resources/locales/agq_CM/agq_CM.go @@ -1,6 +1,8 @@ package agq_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *agq_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'agq_CM' -func (t *agq_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'agq_CM' +func (t *agq_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ak/ak.go b/resources/locales/ak/ak.go index 9fcd8cb..9b9b8af 100644 --- a/resources/locales/ak/ak.go +++ b/resources/locales/ak/ak.go @@ -1,6 +1,8 @@ package ak import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ak) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ak' -func (t *ak) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ak' +func (t *ak) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ak_GH/ak_GH.go b/resources/locales/ak_GH/ak_GH.go index d48818e..d020dd2 100644 --- a/resources/locales/ak_GH/ak_GH.go +++ b/resources/locales/ak_GH/ak_GH.go @@ -1,6 +1,8 @@ package ak_GH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ak_GH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ak_GH' -func (t *ak_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ak_GH' +func (t *ak_GH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/am/am.go b/resources/locales/am/am.go index c1c014c..6515547 100644 --- a/resources/locales/am/am.go +++ b/resources/locales/am/am.go @@ -1,6 +1,8 @@ package am import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *am) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'am' -func (t *am) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'am' +func (t *am) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/am_ET/am_ET.go b/resources/locales/am_ET/am_ET.go index ef7699f..17ed4fb 100644 --- a/resources/locales/am_ET/am_ET.go +++ b/resources/locales/am_ET/am_ET.go @@ -1,6 +1,8 @@ package am_ET import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *am_ET) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'am_ET' -func (t *am_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'am_ET' +func (t *am_ET) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar/ar.go b/resources/locales/ar/ar.go index dbee053..20fccd3 100644 --- a/resources/locales/ar/ar.go +++ b/resources/locales/ar/ar.go @@ -1,6 +1,8 @@ package ar import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar' -func (t *ar) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar' +func (t *ar) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_001/ar_001.go b/resources/locales/ar_001/ar_001.go index b14a7b7..2786890 100644 --- a/resources/locales/ar_001/ar_001.go +++ b/resources/locales/ar_001/ar_001.go @@ -1,6 +1,8 @@ package ar_001 import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_001) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_001' -func (t *ar_001) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_001' +func (t *ar_001) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_AE/ar_AE.go b/resources/locales/ar_AE/ar_AE.go index b5efcec..17b8a62 100644 --- a/resources/locales/ar_AE/ar_AE.go +++ b/resources/locales/ar_AE/ar_AE.go @@ -1,6 +1,8 @@ package ar_AE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_AE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_AE' -func (t *ar_AE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_AE' +func (t *ar_AE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_BH/ar_BH.go b/resources/locales/ar_BH/ar_BH.go index c5b3e9c..4e89138 100644 --- a/resources/locales/ar_BH/ar_BH.go +++ b/resources/locales/ar_BH/ar_BH.go @@ -1,6 +1,8 @@ package ar_BH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_BH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_BH' -func (t *ar_BH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_BH' +func (t *ar_BH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_DJ/ar_DJ.go b/resources/locales/ar_DJ/ar_DJ.go index 0368876..2f5c886 100644 --- a/resources/locales/ar_DJ/ar_DJ.go +++ b/resources/locales/ar_DJ/ar_DJ.go @@ -1,6 +1,8 @@ package ar_DJ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_DJ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_DJ' -func (t *ar_DJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_DJ' +func (t *ar_DJ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_DZ/ar_DZ.go b/resources/locales/ar_DZ/ar_DZ.go index 862c82a..0122b09 100644 --- a/resources/locales/ar_DZ/ar_DZ.go +++ b/resources/locales/ar_DZ/ar_DZ.go @@ -1,6 +1,8 @@ package ar_DZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_DZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_DZ' -func (t *ar_DZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_DZ' +func (t *ar_DZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_EG/ar_EG.go b/resources/locales/ar_EG/ar_EG.go index 2bf4992..34e80e9 100644 --- a/resources/locales/ar_EG/ar_EG.go +++ b/resources/locales/ar_EG/ar_EG.go @@ -1,6 +1,8 @@ package ar_EG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_EG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_EG' -func (t *ar_EG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_EG' +func (t *ar_EG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_EH/ar_EH.go b/resources/locales/ar_EH/ar_EH.go index 1b198e7..9538313 100644 --- a/resources/locales/ar_EH/ar_EH.go +++ b/resources/locales/ar_EH/ar_EH.go @@ -1,6 +1,8 @@ package ar_EH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_EH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_EH' -func (t *ar_EH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_EH' +func (t *ar_EH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_ER/ar_ER.go b/resources/locales/ar_ER/ar_ER.go index 55e140f..631b43c 100644 --- a/resources/locales/ar_ER/ar_ER.go +++ b/resources/locales/ar_ER/ar_ER.go @@ -1,6 +1,8 @@ package ar_ER import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_ER) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_ER' -func (t *ar_ER) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_ER' +func (t *ar_ER) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_IL/ar_IL.go b/resources/locales/ar_IL/ar_IL.go index 9d52fc8..d2d52a7 100644 --- a/resources/locales/ar_IL/ar_IL.go +++ b/resources/locales/ar_IL/ar_IL.go @@ -1,6 +1,8 @@ package ar_IL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_IL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_IL' -func (t *ar_IL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_IL' +func (t *ar_IL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_IQ/ar_IQ.go b/resources/locales/ar_IQ/ar_IQ.go index 29ce5d9..eb12614 100644 --- a/resources/locales/ar_IQ/ar_IQ.go +++ b/resources/locales/ar_IQ/ar_IQ.go @@ -1,6 +1,8 @@ package ar_IQ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_IQ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_IQ' -func (t *ar_IQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_IQ' +func (t *ar_IQ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_JO/ar_JO.go b/resources/locales/ar_JO/ar_JO.go index a19616d..15917c0 100644 --- a/resources/locales/ar_JO/ar_JO.go +++ b/resources/locales/ar_JO/ar_JO.go @@ -1,6 +1,8 @@ package ar_JO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_JO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_JO' -func (t *ar_JO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_JO' +func (t *ar_JO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_KM/ar_KM.go b/resources/locales/ar_KM/ar_KM.go index 4fd86fd..3dc8a16 100644 --- a/resources/locales/ar_KM/ar_KM.go +++ b/resources/locales/ar_KM/ar_KM.go @@ -1,6 +1,8 @@ package ar_KM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_KM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_KM' -func (t *ar_KM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_KM' +func (t *ar_KM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_KW/ar_KW.go b/resources/locales/ar_KW/ar_KW.go index 06e3f5a..fe5ca04 100644 --- a/resources/locales/ar_KW/ar_KW.go +++ b/resources/locales/ar_KW/ar_KW.go @@ -1,6 +1,8 @@ package ar_KW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_KW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_KW' -func (t *ar_KW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_KW' +func (t *ar_KW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_LB/ar_LB.go b/resources/locales/ar_LB/ar_LB.go index bc34f80..a9d9492 100644 --- a/resources/locales/ar_LB/ar_LB.go +++ b/resources/locales/ar_LB/ar_LB.go @@ -1,6 +1,8 @@ package ar_LB import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_LB) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_LB' -func (t *ar_LB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_LB' +func (t *ar_LB) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_LY/ar_LY.go b/resources/locales/ar_LY/ar_LY.go index dd5b602..ad37003 100644 --- a/resources/locales/ar_LY/ar_LY.go +++ b/resources/locales/ar_LY/ar_LY.go @@ -1,6 +1,8 @@ package ar_LY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_LY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_LY' -func (t *ar_LY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_LY' +func (t *ar_LY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_MA/ar_MA.go b/resources/locales/ar_MA/ar_MA.go index c172bfc..25c124c 100644 --- a/resources/locales/ar_MA/ar_MA.go +++ b/resources/locales/ar_MA/ar_MA.go @@ -1,6 +1,8 @@ package ar_MA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_MA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_MA' -func (t *ar_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_MA' +func (t *ar_MA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_MR/ar_MR.go b/resources/locales/ar_MR/ar_MR.go index ee70522..c5f4fc9 100644 --- a/resources/locales/ar_MR/ar_MR.go +++ b/resources/locales/ar_MR/ar_MR.go @@ -1,6 +1,8 @@ package ar_MR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_MR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_MR' -func (t *ar_MR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_MR' +func (t *ar_MR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_OM/ar_OM.go b/resources/locales/ar_OM/ar_OM.go index 661096d..e6e8d98 100644 --- a/resources/locales/ar_OM/ar_OM.go +++ b/resources/locales/ar_OM/ar_OM.go @@ -1,6 +1,8 @@ package ar_OM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_OM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_OM' -func (t *ar_OM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_OM' +func (t *ar_OM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_PS/ar_PS.go b/resources/locales/ar_PS/ar_PS.go index 7b259be..382e140 100644 --- a/resources/locales/ar_PS/ar_PS.go +++ b/resources/locales/ar_PS/ar_PS.go @@ -1,6 +1,8 @@ package ar_PS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_PS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_PS' -func (t *ar_PS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_PS' +func (t *ar_PS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_QA/ar_QA.go b/resources/locales/ar_QA/ar_QA.go index 1150e4a..06edb8c 100644 --- a/resources/locales/ar_QA/ar_QA.go +++ b/resources/locales/ar_QA/ar_QA.go @@ -1,6 +1,8 @@ package ar_QA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_QA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_QA' -func (t *ar_QA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_QA' +func (t *ar_QA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_SA/ar_SA.go b/resources/locales/ar_SA/ar_SA.go index 08451a7..3fd9032 100644 --- a/resources/locales/ar_SA/ar_SA.go +++ b/resources/locales/ar_SA/ar_SA.go @@ -1,6 +1,8 @@ package ar_SA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_SA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_SA' -func (t *ar_SA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_SA' +func (t *ar_SA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_SD/ar_SD.go b/resources/locales/ar_SD/ar_SD.go index d0ae7e9..656ce59 100644 --- a/resources/locales/ar_SD/ar_SD.go +++ b/resources/locales/ar_SD/ar_SD.go @@ -1,6 +1,8 @@ package ar_SD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_SD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_SD' -func (t *ar_SD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_SD' +func (t *ar_SD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_SO/ar_SO.go b/resources/locales/ar_SO/ar_SO.go index 54cff0c..62d9ac1 100644 --- a/resources/locales/ar_SO/ar_SO.go +++ b/resources/locales/ar_SO/ar_SO.go @@ -1,6 +1,8 @@ package ar_SO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_SO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_SO' -func (t *ar_SO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_SO' +func (t *ar_SO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_SS/ar_SS.go b/resources/locales/ar_SS/ar_SS.go index cc5ae5e..ac4a44d 100644 --- a/resources/locales/ar_SS/ar_SS.go +++ b/resources/locales/ar_SS/ar_SS.go @@ -1,6 +1,8 @@ package ar_SS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_SS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_SS' -func (t *ar_SS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_SS' +func (t *ar_SS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_SY/ar_SY.go b/resources/locales/ar_SY/ar_SY.go index 0edda5f..2c55389 100644 --- a/resources/locales/ar_SY/ar_SY.go +++ b/resources/locales/ar_SY/ar_SY.go @@ -1,6 +1,8 @@ package ar_SY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_SY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_SY' -func (t *ar_SY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_SY' +func (t *ar_SY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_TD/ar_TD.go b/resources/locales/ar_TD/ar_TD.go index 388657f..dfffffa 100644 --- a/resources/locales/ar_TD/ar_TD.go +++ b/resources/locales/ar_TD/ar_TD.go @@ -1,6 +1,8 @@ package ar_TD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_TD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_TD' -func (t *ar_TD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_TD' +func (t *ar_TD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_TN/ar_TN.go b/resources/locales/ar_TN/ar_TN.go index 314cf46..4953088 100644 --- a/resources/locales/ar_TN/ar_TN.go +++ b/resources/locales/ar_TN/ar_TN.go @@ -1,6 +1,8 @@ package ar_TN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_TN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_TN' -func (t *ar_TN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_TN' +func (t *ar_TN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ar_YE/ar_YE.go b/resources/locales/ar_YE/ar_YE.go index 79a9ac6..4105161 100644 --- a/resources/locales/ar_YE/ar_YE.go +++ b/resources/locales/ar_YE/ar_YE.go @@ -1,6 +1,8 @@ package ar_YE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *ar_YE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ar_YE' -func (t *ar_YE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ar_YE' +func (t *ar_YE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%100 >= 3 && n%100 <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 99 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/as/as.go b/resources/locales/as/as.go index faed2a5..9fb469c 100644 --- a/resources/locales/as/as.go +++ b/resources/locales/as/as.go @@ -1,6 +1,8 @@ package as import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *as) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'as' -func (t *as) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'as' +func (t *as) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/as_IN/as_IN.go b/resources/locales/as_IN/as_IN.go index 58127b9..3d32163 100644 --- a/resources/locales/as_IN/as_IN.go +++ b/resources/locales/as_IN/as_IN.go @@ -1,6 +1,8 @@ package as_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *as_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'as_IN' -func (t *as_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'as_IN' +func (t *as_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/asa/asa.go b/resources/locales/asa/asa.go index 5fb04f2..ad1ef83 100644 --- a/resources/locales/asa/asa.go +++ b/resources/locales/asa/asa.go @@ -1,6 +1,8 @@ package asa import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *asa) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'asa' -func (t *asa) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'asa' +func (t *asa) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/asa_TZ/asa_TZ.go b/resources/locales/asa_TZ/asa_TZ.go index 625a8cf..6281d31 100644 --- a/resources/locales/asa_TZ/asa_TZ.go +++ b/resources/locales/asa_TZ/asa_TZ.go @@ -1,6 +1,8 @@ package asa_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *asa_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'asa_TZ' -func (t *asa_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'asa_TZ' +func (t *asa_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ast/ast.go b/resources/locales/ast/ast.go index c3d462f..c3c735f 100644 --- a/resources/locales/ast/ast.go +++ b/resources/locales/ast/ast.go @@ -1,6 +1,8 @@ package ast import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ast) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ast' -func (t *ast) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ast' +func (t *ast) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ast_ES/ast_ES.go b/resources/locales/ast_ES/ast_ES.go index e07fd99..46d3a4a 100644 --- a/resources/locales/ast_ES/ast_ES.go +++ b/resources/locales/ast_ES/ast_ES.go @@ -1,6 +1,8 @@ package ast_ES import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ast_ES) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ast_ES' -func (t *ast_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ast_ES' +func (t *ast_ES) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/az/az.go b/resources/locales/az/az.go index 1dfb3c0..1f104dc 100644 --- a/resources/locales/az/az.go +++ b/resources/locales/az/az.go @@ -1,6 +1,8 @@ package az import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *az) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'az' -func (t *az) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'az' +func (t *az) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/az_Cyrl/az_Cyrl.go b/resources/locales/az_Cyrl/az_Cyrl.go index 8f21a9e..401f6b2 100644 --- a/resources/locales/az_Cyrl/az_Cyrl.go +++ b/resources/locales/az_Cyrl/az_Cyrl.go @@ -1,6 +1,8 @@ package az_Cyrl import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *az_Cyrl) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'az_Cyrl' -func (t *az_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'az_Cyrl' +func (t *az_Cyrl) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go b/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go index 5ba46f2..76657cf 100644 --- a/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go +++ b/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go @@ -1,6 +1,8 @@ package az_Cyrl_AZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *az_Cyrl_AZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'az_Cyrl_AZ' -func (t *az_Cyrl_AZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'az_Cyrl_AZ' +func (t *az_Cyrl_AZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/az_Latn/az_Latn.go b/resources/locales/az_Latn/az_Latn.go index 64ae4c6..d0545fa 100644 --- a/resources/locales/az_Latn/az_Latn.go +++ b/resources/locales/az_Latn/az_Latn.go @@ -1,6 +1,8 @@ package az_Latn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *az_Latn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'az_Latn' -func (t *az_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'az_Latn' +func (t *az_Latn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/az_Latn_AZ/az_Latn_AZ.go b/resources/locales/az_Latn_AZ/az_Latn_AZ.go index 5a52499..08ff77a 100644 --- a/resources/locales/az_Latn_AZ/az_Latn_AZ.go +++ b/resources/locales/az_Latn_AZ/az_Latn_AZ.go @@ -1,6 +1,8 @@ package az_Latn_AZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *az_Latn_AZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'az_Latn_AZ' -func (t *az_Latn_AZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'az_Latn_AZ' +func (t *az_Latn_AZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bas/bas.go b/resources/locales/bas/bas.go index 38bcd53..ba60904 100644 --- a/resources/locales/bas/bas.go +++ b/resources/locales/bas/bas.go @@ -1,6 +1,8 @@ package bas import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *bas) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bas' -func (t *bas) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bas' +func (t *bas) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/bas_CM/bas_CM.go b/resources/locales/bas_CM/bas_CM.go index 1960cfc..b1a72c5 100644 --- a/resources/locales/bas_CM/bas_CM.go +++ b/resources/locales/bas_CM/bas_CM.go @@ -1,6 +1,8 @@ package bas_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *bas_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bas_CM' -func (t *bas_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bas_CM' +func (t *bas_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/be/be.go b/resources/locales/be/be.go index 60cb08b..cdefd27 100644 --- a/resources/locales/be/be.go +++ b/resources/locales/be/be.go @@ -1,6 +1,8 @@ package be import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,21 +29,18 @@ func (t *be) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'be' -func (t *be) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'be' +func (t *be) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n%10 == 1 && n%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n%10 >= 2 && n%10 <= 4 && n%100 < 12 && n%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (n%10 == 0) || (n%10 >= 5 && n%10 <= 9) || (n%100 >= 11 && n%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/be_BY/be_BY.go b/resources/locales/be_BY/be_BY.go index 78a4f9c..d93f5f7 100644 --- a/resources/locales/be_BY/be_BY.go +++ b/resources/locales/be_BY/be_BY.go @@ -1,6 +1,8 @@ package be_BY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,21 +29,18 @@ func (t *be_BY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'be_BY' -func (t *be_BY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'be_BY' +func (t *be_BY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n%10 == 1 && n%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n%10 >= 2 && n%10 <= 4 && n%100 < 12 && n%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (n%10 == 0) || (n%10 >= 5 && n%10 <= 9) || (n%100 >= 11 && n%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bem/bem.go b/resources/locales/bem/bem.go index 4ea0072..a3c0e84 100644 --- a/resources/locales/bem/bem.go +++ b/resources/locales/bem/bem.go @@ -1,6 +1,8 @@ package bem import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *bem) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bem' -func (t *bem) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bem' +func (t *bem) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bem_ZM/bem_ZM.go b/resources/locales/bem_ZM/bem_ZM.go index 61d70dc..67ddb90 100644 --- a/resources/locales/bem_ZM/bem_ZM.go +++ b/resources/locales/bem_ZM/bem_ZM.go @@ -1,6 +1,8 @@ package bem_ZM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *bem_ZM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bem_ZM' -func (t *bem_ZM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bem_ZM' +func (t *bem_ZM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bez/bez.go b/resources/locales/bez/bez.go index 8312e19..b799a99 100644 --- a/resources/locales/bez/bez.go +++ b/resources/locales/bez/bez.go @@ -1,6 +1,8 @@ package bez import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *bez) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bez' -func (t *bez) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bez' +func (t *bez) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bez_TZ/bez_TZ.go b/resources/locales/bez_TZ/bez_TZ.go index 4bcde6e..b10b9b0 100644 --- a/resources/locales/bez_TZ/bez_TZ.go +++ b/resources/locales/bez_TZ/bez_TZ.go @@ -1,6 +1,8 @@ package bez_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *bez_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bez_TZ' -func (t *bez_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bez_TZ' +func (t *bez_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bg/bg.go b/resources/locales/bg/bg.go index 8a063a4..10d2823 100644 --- a/resources/locales/bg/bg.go +++ b/resources/locales/bg/bg.go @@ -1,6 +1,8 @@ package bg import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *bg) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bg' -func (t *bg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bg' +func (t *bg) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bg_BG/bg_BG.go b/resources/locales/bg_BG/bg_BG.go index fd7474e..526586f 100644 --- a/resources/locales/bg_BG/bg_BG.go +++ b/resources/locales/bg_BG/bg_BG.go @@ -1,6 +1,8 @@ package bg_BG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *bg_BG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bg_BG' -func (t *bg_BG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bg_BG' +func (t *bg_BG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bm/bm.go b/resources/locales/bm/bm.go index 5ded7c9..190146d 100644 --- a/resources/locales/bm/bm.go +++ b/resources/locales/bm/bm.go @@ -1,6 +1,8 @@ package bm import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *bm) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bm' -func (t *bm) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bm' +func (t *bm) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bm_ML/bm_ML.go b/resources/locales/bm_ML/bm_ML.go index db9c7bb..ca81075 100644 --- a/resources/locales/bm_ML/bm_ML.go +++ b/resources/locales/bm_ML/bm_ML.go @@ -1,6 +1,8 @@ package bm_ML import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *bm_ML) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bm_ML' -func (t *bm_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bm_ML' +func (t *bm_ML) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bn/bn.go b/resources/locales/bn/bn.go index 5badb41..906a923 100644 --- a/resources/locales/bn/bn.go +++ b/resources/locales/bn/bn.go @@ -1,6 +1,8 @@ package bn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *bn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bn' -func (t *bn) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bn' +func (t *bn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bn_BD/bn_BD.go b/resources/locales/bn_BD/bn_BD.go index 3206d8d..c1ee83f 100644 --- a/resources/locales/bn_BD/bn_BD.go +++ b/resources/locales/bn_BD/bn_BD.go @@ -1,6 +1,8 @@ package bn_BD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *bn_BD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bn_BD' -func (t *bn_BD) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bn_BD' +func (t *bn_BD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bn_IN/bn_IN.go b/resources/locales/bn_IN/bn_IN.go index e4f69c5..88d84df 100644 --- a/resources/locales/bn_IN/bn_IN.go +++ b/resources/locales/bn_IN/bn_IN.go @@ -1,6 +1,8 @@ package bn_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *bn_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bn_IN' -func (t *bn_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bn_IN' +func (t *bn_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bo/bo.go b/resources/locales/bo/bo.go index d8927d2..3929137 100644 --- a/resources/locales/bo/bo.go +++ b/resources/locales/bo/bo.go @@ -1,6 +1,8 @@ package bo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *bo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bo' -func (t *bo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bo' +func (t *bo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bo_CN/bo_CN.go b/resources/locales/bo_CN/bo_CN.go index fe042e6..00f1baf 100644 --- a/resources/locales/bo_CN/bo_CN.go +++ b/resources/locales/bo_CN/bo_CN.go @@ -1,6 +1,8 @@ package bo_CN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *bo_CN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bo_CN' -func (t *bo_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bo_CN' +func (t *bo_CN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bo_IN/bo_IN.go b/resources/locales/bo_IN/bo_IN.go index c2f3e7d..369d249 100644 --- a/resources/locales/bo_IN/bo_IN.go +++ b/resources/locales/bo_IN/bo_IN.go @@ -1,6 +1,8 @@ package bo_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *bo_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bo_IN' -func (t *bo_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bo_IN' +func (t *bo_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/br/br.go b/resources/locales/br/br.go index 13a83e8..be69007 100644 --- a/resources/locales/br/br.go +++ b/resources/locales/br/br.go @@ -1,6 +1,8 @@ package br import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,20 @@ func (t *br) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'br' -func (t *br) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'br' +func (t *br) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n%10 == 1 && (n%100 != 11 && n%100 != 71 && n%100 != 91) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n%10 == 2 && (n%100 != 12 && n%100 != 72 && n%100 != 92) { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%10 >= 3 && n%10 <= 4 && (n%10 == 9) && (n%100 < 10 && n%100 > 19) || (n%100 < 70 && n%100 > 79) || (n%100 < 90 && n%100 > 99) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n != 0 && n%1000000 == 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/br_FR/br_FR.go b/resources/locales/br_FR/br_FR.go index 17878e7..00748e2 100644 --- a/resources/locales/br_FR/br_FR.go +++ b/resources/locales/br_FR/br_FR.go @@ -1,6 +1,8 @@ package br_FR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,20 @@ func (t *br_FR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'br_FR' -func (t *br_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'br_FR' +func (t *br_FR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n%10 == 1 && (n%100 != 11 && n%100 != 71 && n%100 != 91) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n%10 == 2 && (n%100 != 12 && n%100 != 72 && n%100 != 92) { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n%10 >= 3 && n%10 <= 4 && (n%10 == 9) && (n%100 < 10 && n%100 > 19) || (n%100 < 70 && n%100 > 79) || (n%100 < 90 && n%100 > 99) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n != 0 && n%1000000 == 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/brx/brx.go b/resources/locales/brx/brx.go index e87fddc..4ca5143 100644 --- a/resources/locales/brx/brx.go +++ b/resources/locales/brx/brx.go @@ -1,6 +1,8 @@ package brx import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *brx) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'brx' -func (t *brx) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'brx' +func (t *brx) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/brx_IN/brx_IN.go b/resources/locales/brx_IN/brx_IN.go index 333353d..848029f 100644 --- a/resources/locales/brx_IN/brx_IN.go +++ b/resources/locales/brx_IN/brx_IN.go @@ -1,6 +1,8 @@ package brx_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *brx_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'brx_IN' -func (t *brx_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'brx_IN' +func (t *brx_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bs/bs.go b/resources/locales/bs/bs.go index f6ccd3c..5c6e8c2 100644 --- a/resources/locales/bs/bs.go +++ b/resources/locales/bs/bs.go @@ -1,6 +1,8 @@ package bs import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *bs) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bs' -func (t *bs) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bs' +func (t *bs) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bs_Cyrl/bs_Cyrl.go b/resources/locales/bs_Cyrl/bs_Cyrl.go index 6161122..395d349 100644 --- a/resources/locales/bs_Cyrl/bs_Cyrl.go +++ b/resources/locales/bs_Cyrl/bs_Cyrl.go @@ -1,6 +1,8 @@ package bs_Cyrl import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *bs_Cyrl) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bs_Cyrl' -func (t *bs_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bs_Cyrl' +func (t *bs_Cyrl) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go b/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go index 1a34e0b..d9386ac 100644 --- a/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go +++ b/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go @@ -1,6 +1,8 @@ package bs_Cyrl_BA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *bs_Cyrl_BA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bs_Cyrl_BA' -func (t *bs_Cyrl_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bs_Cyrl_BA' +func (t *bs_Cyrl_BA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bs_Latn/bs_Latn.go b/resources/locales/bs_Latn/bs_Latn.go index e8d383e..5687888 100644 --- a/resources/locales/bs_Latn/bs_Latn.go +++ b/resources/locales/bs_Latn/bs_Latn.go @@ -1,6 +1,8 @@ package bs_Latn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *bs_Latn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bs_Latn' -func (t *bs_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bs_Latn' +func (t *bs_Latn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/bs_Latn_BA/bs_Latn_BA.go b/resources/locales/bs_Latn_BA/bs_Latn_BA.go index 43b336e..460f9a3 100644 --- a/resources/locales/bs_Latn_BA/bs_Latn_BA.go +++ b/resources/locales/bs_Latn_BA/bs_Latn_BA.go @@ -1,6 +1,8 @@ package bs_Latn_BA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *bs_Latn_BA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'bs_Latn_BA' -func (t *bs_Latn_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bs_Latn_BA' +func (t *bs_Latn_BA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ca/ca.go b/resources/locales/ca/ca.go index 5ab84a0..6f93d70 100644 --- a/resources/locales/ca/ca.go +++ b/resources/locales/ca/ca.go @@ -1,6 +1,8 @@ package ca import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ca) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ca' -func (t *ca) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ca' +func (t *ca) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ca_AD/ca_AD.go b/resources/locales/ca_AD/ca_AD.go index 115f985..ae3adab 100644 --- a/resources/locales/ca_AD/ca_AD.go +++ b/resources/locales/ca_AD/ca_AD.go @@ -1,6 +1,8 @@ package ca_AD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ca_AD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ca_AD' -func (t *ca_AD) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ca_AD' +func (t *ca_AD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ca_ES/ca_ES.go b/resources/locales/ca_ES/ca_ES.go index 64c2fc6..ffefadd 100644 --- a/resources/locales/ca_ES/ca_ES.go +++ b/resources/locales/ca_ES/ca_ES.go @@ -1,6 +1,8 @@ package ca_ES import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ca_ES) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ca_ES' -func (t *ca_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ca_ES' +func (t *ca_ES) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go b/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go index 1922f97..90f226f 100644 --- a/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go +++ b/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go @@ -1,6 +1,8 @@ package ca_ES_VALENCIA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ca_ES_VALENCIA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ca_ES_VALENCIA' -func (t *ca_ES_VALENCIA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ca_ES_VALENCIA' +func (t *ca_ES_VALENCIA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ca_FR/ca_FR.go b/resources/locales/ca_FR/ca_FR.go index ac77e37..39b8091 100644 --- a/resources/locales/ca_FR/ca_FR.go +++ b/resources/locales/ca_FR/ca_FR.go @@ -1,6 +1,8 @@ package ca_FR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ca_FR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ca_FR' -func (t *ca_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ca_FR' +func (t *ca_FR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ca_IT/ca_IT.go b/resources/locales/ca_IT/ca_IT.go index 733dffb..5606509 100644 --- a/resources/locales/ca_IT/ca_IT.go +++ b/resources/locales/ca_IT/ca_IT.go @@ -1,6 +1,8 @@ package ca_IT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ca_IT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ca_IT' -func (t *ca_IT) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ca_IT' +func (t *ca_IT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ce/ce.go b/resources/locales/ce/ce.go index 682ef48..a55631a 100644 --- a/resources/locales/ce/ce.go +++ b/resources/locales/ce/ce.go @@ -1,6 +1,8 @@ package ce import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ce) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ce' -func (t *ce) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ce' +func (t *ce) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ce_RU/ce_RU.go b/resources/locales/ce_RU/ce_RU.go index d4443b0..2adff0f 100644 --- a/resources/locales/ce_RU/ce_RU.go +++ b/resources/locales/ce_RU/ce_RU.go @@ -1,6 +1,8 @@ package ce_RU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ce_RU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ce_RU' -func (t *ce_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ce_RU' +func (t *ce_RU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/cgg/cgg.go b/resources/locales/cgg/cgg.go index 389dbbb..791301d 100644 --- a/resources/locales/cgg/cgg.go +++ b/resources/locales/cgg/cgg.go @@ -1,6 +1,8 @@ package cgg import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *cgg) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'cgg' -func (t *cgg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'cgg' +func (t *cgg) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/cgg_UG/cgg_UG.go b/resources/locales/cgg_UG/cgg_UG.go index 6cbf6ad..5d0c4d9 100644 --- a/resources/locales/cgg_UG/cgg_UG.go +++ b/resources/locales/cgg_UG/cgg_UG.go @@ -1,6 +1,8 @@ package cgg_UG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *cgg_UG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'cgg_UG' -func (t *cgg_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'cgg_UG' +func (t *cgg_UG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/chr/chr.go b/resources/locales/chr/chr.go index eff710b..91efb63 100644 --- a/resources/locales/chr/chr.go +++ b/resources/locales/chr/chr.go @@ -1,6 +1,8 @@ package chr import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *chr) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'chr' -func (t *chr) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'chr' +func (t *chr) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/chr_US/chr_US.go b/resources/locales/chr_US/chr_US.go index 9826102..7d4cfcb 100644 --- a/resources/locales/chr_US/chr_US.go +++ b/resources/locales/chr_US/chr_US.go @@ -1,6 +1,8 @@ package chr_US import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *chr_US) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'chr_US' -func (t *chr_US) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'chr_US' +func (t *chr_US) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ckb/ckb.go b/resources/locales/ckb/ckb.go index 9c7bafb..aa11887 100644 --- a/resources/locales/ckb/ckb.go +++ b/resources/locales/ckb/ckb.go @@ -1,6 +1,8 @@ package ckb import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ckb) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ckb' -func (t *ckb) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ckb' +func (t *ckb) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ckb_IQ/ckb_IQ.go b/resources/locales/ckb_IQ/ckb_IQ.go index 852ee4f..1d6736b 100644 --- a/resources/locales/ckb_IQ/ckb_IQ.go +++ b/resources/locales/ckb_IQ/ckb_IQ.go @@ -1,6 +1,8 @@ package ckb_IQ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ckb_IQ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ckb_IQ' -func (t *ckb_IQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ckb_IQ' +func (t *ckb_IQ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ckb_IR/ckb_IR.go b/resources/locales/ckb_IR/ckb_IR.go index 60d7a55..d0dd93a 100644 --- a/resources/locales/ckb_IR/ckb_IR.go +++ b/resources/locales/ckb_IR/ckb_IR.go @@ -1,6 +1,8 @@ package ckb_IR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ckb_IR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ckb_IR' -func (t *ckb_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ckb_IR' +func (t *ckb_IR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/cs/cs.go b/resources/locales/cs/cs.go index 1d86535..773054d 100644 --- a/resources/locales/cs/cs.go +++ b/resources/locales/cs/cs.go @@ -1,6 +1,8 @@ package cs import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *cs) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'cs' -func (t *cs) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'cs' +func (t *cs) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if i >= 2 && i <= 4 && v == 0 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if v != 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/cs_CZ/cs_CZ.go b/resources/locales/cs_CZ/cs_CZ.go index b2425ab..c0a847c 100644 --- a/resources/locales/cs_CZ/cs_CZ.go +++ b/resources/locales/cs_CZ/cs_CZ.go @@ -1,6 +1,8 @@ package cs_CZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *cs_CZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'cs_CZ' -func (t *cs_CZ) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'cs_CZ' +func (t *cs_CZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if i >= 2 && i <= 4 && v == 0 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if v != 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/cu/cu.go b/resources/locales/cu/cu.go index 65f56d1..ecaa98d 100644 --- a/resources/locales/cu/cu.go +++ b/resources/locales/cu/cu.go @@ -1,6 +1,8 @@ package cu import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *cu) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'cu' -func (t *cu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'cu' +func (t *cu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/cu_RU/cu_RU.go b/resources/locales/cu_RU/cu_RU.go index fa4ab6a..f00e79e 100644 --- a/resources/locales/cu_RU/cu_RU.go +++ b/resources/locales/cu_RU/cu_RU.go @@ -1,6 +1,8 @@ package cu_RU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *cu_RU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'cu_RU' -func (t *cu_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'cu_RU' +func (t *cu_RU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/cy/cy.go b/resources/locales/cy/cy.go index 043a6aa..37c81a5 100644 --- a/resources/locales/cy/cy.go +++ b/resources/locales/cy/cy.go @@ -1,6 +1,8 @@ package cy import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *cy) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'cy' -func (t *cy) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'cy' +func (t *cy) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n == 3 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n == 6 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/cy_GB/cy_GB.go b/resources/locales/cy_GB/cy_GB.go index 4baaed8..8330278 100644 --- a/resources/locales/cy_GB/cy_GB.go +++ b/resources/locales/cy_GB/cy_GB.go @@ -1,6 +1,8 @@ package cy_GB import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,22 @@ func (t *cy_GB) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'cy_GB' -func (t *cy_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'cy_GB' +func (t *cy_GB) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n == 3 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n == 6 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/da/da.go b/resources/locales/da/da.go index 2bd8ac5..cd2aee2 100644 --- a/resources/locales/da/da.go +++ b/resources/locales/da/da.go @@ -1,6 +1,8 @@ package da import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,27 +29,16 @@ func (t *da) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'da' -func (t *da) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'da' +func (t *da) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - t, err := locales.T(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + t := locales.T(n, v) if (n == 1) || (t != 0 && (i == 0 || i == 1)) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/da_DK/da_DK.go b/resources/locales/da_DK/da_DK.go index cc3ea8a..5ff3719 100644 --- a/resources/locales/da_DK/da_DK.go +++ b/resources/locales/da_DK/da_DK.go @@ -1,6 +1,8 @@ package da_DK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,27 +29,16 @@ func (t *da_DK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'da_DK' -func (t *da_DK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'da_DK' +func (t *da_DK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - t, err := locales.T(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + t := locales.T(n, v) if (n == 1) || (t != 0 && (i == 0 || i == 1)) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/da_GL/da_GL.go b/resources/locales/da_GL/da_GL.go index 70b3da0..6096a3f 100644 --- a/resources/locales/da_GL/da_GL.go +++ b/resources/locales/da_GL/da_GL.go @@ -1,6 +1,8 @@ package da_GL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,27 +29,16 @@ func (t *da_GL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'da_GL' -func (t *da_GL) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'da_GL' +func (t *da_GL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - t, err := locales.T(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + t := locales.T(n, v) if (n == 1) || (t != 0 && (i == 0 || i == 1)) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/dav/dav.go b/resources/locales/dav/dav.go index dad14da..64a4372 100644 --- a/resources/locales/dav/dav.go +++ b/resources/locales/dav/dav.go @@ -1,6 +1,8 @@ package dav import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *dav) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dav' -func (t *dav) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dav' +func (t *dav) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dav_KE/dav_KE.go b/resources/locales/dav_KE/dav_KE.go index 730f8a7..e11b79e 100644 --- a/resources/locales/dav_KE/dav_KE.go +++ b/resources/locales/dav_KE/dav_KE.go @@ -1,6 +1,8 @@ package dav_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *dav_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dav_KE' -func (t *dav_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dav_KE' +func (t *dav_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/de/de.go b/resources/locales/de/de.go index abb1aae..aa6c7d0 100644 --- a/resources/locales/de/de.go +++ b/resources/locales/de/de.go @@ -1,6 +1,8 @@ package de import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *de) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'de' -func (t *de) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'de' +func (t *de) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/de_AT/de_AT.go b/resources/locales/de_AT/de_AT.go index 71a9132..26f8ae6 100644 --- a/resources/locales/de_AT/de_AT.go +++ b/resources/locales/de_AT/de_AT.go @@ -1,6 +1,8 @@ package de_AT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *de_AT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'de_AT' -func (t *de_AT) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'de_AT' +func (t *de_AT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/de_BE/de_BE.go b/resources/locales/de_BE/de_BE.go index ac41f7d..4f8c3db 100644 --- a/resources/locales/de_BE/de_BE.go +++ b/resources/locales/de_BE/de_BE.go @@ -1,6 +1,8 @@ package de_BE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *de_BE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'de_BE' -func (t *de_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'de_BE' +func (t *de_BE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/de_CH/de_CH.go b/resources/locales/de_CH/de_CH.go index e773f12..29767b1 100644 --- a/resources/locales/de_CH/de_CH.go +++ b/resources/locales/de_CH/de_CH.go @@ -1,6 +1,8 @@ package de_CH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *de_CH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'de_CH' -func (t *de_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'de_CH' +func (t *de_CH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/de_DE/de_DE.go b/resources/locales/de_DE/de_DE.go index 08a5139..40d2096 100644 --- a/resources/locales/de_DE/de_DE.go +++ b/resources/locales/de_DE/de_DE.go @@ -1,6 +1,8 @@ package de_DE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *de_DE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'de_DE' -func (t *de_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'de_DE' +func (t *de_DE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/de_LI/de_LI.go b/resources/locales/de_LI/de_LI.go index 0edbc89..12a3284 100644 --- a/resources/locales/de_LI/de_LI.go +++ b/resources/locales/de_LI/de_LI.go @@ -1,6 +1,8 @@ package de_LI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *de_LI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'de_LI' -func (t *de_LI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'de_LI' +func (t *de_LI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/de_LU/de_LU.go b/resources/locales/de_LU/de_LU.go index a442b33..d2ddfc3 100644 --- a/resources/locales/de_LU/de_LU.go +++ b/resources/locales/de_LU/de_LU.go @@ -1,6 +1,8 @@ package de_LU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *de_LU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'de_LU' -func (t *de_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'de_LU' +func (t *de_LU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/dje/dje.go b/resources/locales/dje/dje.go index cb2ce54..f2a2560 100644 --- a/resources/locales/dje/dje.go +++ b/resources/locales/dje/dje.go @@ -1,6 +1,8 @@ package dje import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *dje) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dje' -func (t *dje) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dje' +func (t *dje) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dje_NE/dje_NE.go b/resources/locales/dje_NE/dje_NE.go index 907ca1b..4591e31 100644 --- a/resources/locales/dje_NE/dje_NE.go +++ b/resources/locales/dje_NE/dje_NE.go @@ -1,6 +1,8 @@ package dje_NE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *dje_NE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dje_NE' -func (t *dje_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dje_NE' +func (t *dje_NE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dsb/dsb.go b/resources/locales/dsb/dsb.go index eddbc4a..3c1a8e1 100644 --- a/resources/locales/dsb/dsb.go +++ b/resources/locales/dsb/dsb.go @@ -1,6 +1,8 @@ package dsb import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,28 +29,20 @@ func (t *dsb) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dsb' -func (t *dsb) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dsb' +func (t *dsb) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%100 == 1) || (f%100 == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%100 == 2) || (f%100 == 2) { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if (v == 0 && i%100 >= 3 && i%100 <= 4) || (f%100 >= 3 && f%100 <= 4) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/dsb_DE/dsb_DE.go b/resources/locales/dsb_DE/dsb_DE.go index 9b6fd9d..6cfc898 100644 --- a/resources/locales/dsb_DE/dsb_DE.go +++ b/resources/locales/dsb_DE/dsb_DE.go @@ -1,6 +1,8 @@ package dsb_DE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,28 +29,20 @@ func (t *dsb_DE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dsb_DE' -func (t *dsb_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dsb_DE' +func (t *dsb_DE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%100 == 1) || (f%100 == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%100 == 2) || (f%100 == 2) { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if (v == 0 && i%100 >= 3 && i%100 <= 4) || (f%100 >= 3 && f%100 <= 4) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/dua/dua.go b/resources/locales/dua/dua.go index 0aec984..deecb8f 100644 --- a/resources/locales/dua/dua.go +++ b/resources/locales/dua/dua.go @@ -1,6 +1,8 @@ package dua import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *dua) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dua' -func (t *dua) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dua' +func (t *dua) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dua_CM/dua_CM.go b/resources/locales/dua_CM/dua_CM.go index c1b4929..3ce2424 100644 --- a/resources/locales/dua_CM/dua_CM.go +++ b/resources/locales/dua_CM/dua_CM.go @@ -1,6 +1,8 @@ package dua_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *dua_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dua_CM' -func (t *dua_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dua_CM' +func (t *dua_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dyo/dyo.go b/resources/locales/dyo/dyo.go index 6370669..37da024 100644 --- a/resources/locales/dyo/dyo.go +++ b/resources/locales/dyo/dyo.go @@ -1,6 +1,8 @@ package dyo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *dyo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dyo' -func (t *dyo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dyo' +func (t *dyo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dyo_SN/dyo_SN.go b/resources/locales/dyo_SN/dyo_SN.go index b90e944..febd5cd 100644 --- a/resources/locales/dyo_SN/dyo_SN.go +++ b/resources/locales/dyo_SN/dyo_SN.go @@ -1,6 +1,8 @@ package dyo_SN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *dyo_SN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dyo_SN' -func (t *dyo_SN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dyo_SN' +func (t *dyo_SN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/dz/dz.go b/resources/locales/dz/dz.go index 6c024a1..58d620d 100644 --- a/resources/locales/dz/dz.go +++ b/resources/locales/dz/dz.go @@ -1,6 +1,8 @@ package dz import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *dz) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dz' -func (t *dz) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dz' +func (t *dz) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/dz_BT/dz_BT.go b/resources/locales/dz_BT/dz_BT.go index 9b9d906..c98f7db 100644 --- a/resources/locales/dz_BT/dz_BT.go +++ b/resources/locales/dz_BT/dz_BT.go @@ -1,6 +1,8 @@ package dz_BT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *dz_BT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'dz_BT' -func (t *dz_BT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dz_BT' +func (t *dz_BT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ebu/ebu.go b/resources/locales/ebu/ebu.go index 1076d81..319d83a 100644 --- a/resources/locales/ebu/ebu.go +++ b/resources/locales/ebu/ebu.go @@ -1,6 +1,8 @@ package ebu import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *ebu) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ebu' -func (t *ebu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ebu' +func (t *ebu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ebu_KE/ebu_KE.go b/resources/locales/ebu_KE/ebu_KE.go index ddb34b8..6256d6b 100644 --- a/resources/locales/ebu_KE/ebu_KE.go +++ b/resources/locales/ebu_KE/ebu_KE.go @@ -1,6 +1,8 @@ package ebu_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *ebu_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ebu_KE' -func (t *ebu_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ebu_KE' +func (t *ebu_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ee/ee.go b/resources/locales/ee/ee.go index c41b6c7..3a9c158 100644 --- a/resources/locales/ee/ee.go +++ b/resources/locales/ee/ee.go @@ -1,6 +1,8 @@ package ee import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ee) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ee' -func (t *ee) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ee' +func (t *ee) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ee_GH/ee_GH.go b/resources/locales/ee_GH/ee_GH.go index 75fe92f..563dfa4 100644 --- a/resources/locales/ee_GH/ee_GH.go +++ b/resources/locales/ee_GH/ee_GH.go @@ -1,6 +1,8 @@ package ee_GH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ee_GH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ee_GH' -func (t *ee_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ee_GH' +func (t *ee_GH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ee_TG/ee_TG.go b/resources/locales/ee_TG/ee_TG.go index 624b476..9bc2dd2 100644 --- a/resources/locales/ee_TG/ee_TG.go +++ b/resources/locales/ee_TG/ee_TG.go @@ -1,6 +1,8 @@ package ee_TG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ee_TG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ee_TG' -func (t *ee_TG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ee_TG' +func (t *ee_TG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/el/el.go b/resources/locales/el/el.go index 4410370..0b6ad12 100644 --- a/resources/locales/el/el.go +++ b/resources/locales/el/el.go @@ -1,6 +1,8 @@ package el import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *el) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'el' -func (t *el) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'el' +func (t *el) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/el_CY/el_CY.go b/resources/locales/el_CY/el_CY.go index e56f7b7..9dc4e30 100644 --- a/resources/locales/el_CY/el_CY.go +++ b/resources/locales/el_CY/el_CY.go @@ -1,6 +1,8 @@ package el_CY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *el_CY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'el_CY' -func (t *el_CY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'el_CY' +func (t *el_CY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/el_GR/el_GR.go b/resources/locales/el_GR/el_GR.go index 1d28431..b11946a 100644 --- a/resources/locales/el_GR/el_GR.go +++ b/resources/locales/el_GR/el_GR.go @@ -1,6 +1,8 @@ package el_GR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *el_GR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'el_GR' -func (t *el_GR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'el_GR' +func (t *el_GR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en/en.go b/resources/locales/en/en.go index 9c968d4..afdbdb8 100644 --- a/resources/locales/en/en.go +++ b/resources/locales/en/en.go @@ -1,6 +1,8 @@ package en import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en' -func (t *en) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en' +func (t *en) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_001/en_001.go b/resources/locales/en_001/en_001.go index 0bc313b..6633ffb 100644 --- a/resources/locales/en_001/en_001.go +++ b/resources/locales/en_001/en_001.go @@ -1,6 +1,8 @@ package en_001 import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_001) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_001' -func (t *en_001) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_001' +func (t *en_001) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_150/en_150.go b/resources/locales/en_150/en_150.go index a8f9863..c707f1f 100644 --- a/resources/locales/en_150/en_150.go +++ b/resources/locales/en_150/en_150.go @@ -1,6 +1,8 @@ package en_150 import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_150) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_150' -func (t *en_150) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_150' +func (t *en_150) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_AG/en_AG.go b/resources/locales/en_AG/en_AG.go index 6900980..de6173e 100644 --- a/resources/locales/en_AG/en_AG.go +++ b/resources/locales/en_AG/en_AG.go @@ -1,6 +1,8 @@ package en_AG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_AG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_AG' -func (t *en_AG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_AG' +func (t *en_AG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_AI/en_AI.go b/resources/locales/en_AI/en_AI.go index 31d322c..a5f2742 100644 --- a/resources/locales/en_AI/en_AI.go +++ b/resources/locales/en_AI/en_AI.go @@ -1,6 +1,8 @@ package en_AI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_AI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_AI' -func (t *en_AI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_AI' +func (t *en_AI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_AS/en_AS.go b/resources/locales/en_AS/en_AS.go index 3746cec..974f49d 100644 --- a/resources/locales/en_AS/en_AS.go +++ b/resources/locales/en_AS/en_AS.go @@ -1,6 +1,8 @@ package en_AS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_AS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_AS' -func (t *en_AS) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_AS' +func (t *en_AS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_AT/en_AT.go b/resources/locales/en_AT/en_AT.go index 8cfee72..3c2e461 100644 --- a/resources/locales/en_AT/en_AT.go +++ b/resources/locales/en_AT/en_AT.go @@ -1,6 +1,8 @@ package en_AT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_AT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_AT' -func (t *en_AT) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_AT' +func (t *en_AT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_AU/en_AU.go b/resources/locales/en_AU/en_AU.go index 20f6e24..42fc90f 100644 --- a/resources/locales/en_AU/en_AU.go +++ b/resources/locales/en_AU/en_AU.go @@ -1,6 +1,8 @@ package en_AU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_AU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_AU' -func (t *en_AU) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_AU' +func (t *en_AU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_BB/en_BB.go b/resources/locales/en_BB/en_BB.go index f691284..27c1cd3 100644 --- a/resources/locales/en_BB/en_BB.go +++ b/resources/locales/en_BB/en_BB.go @@ -1,6 +1,8 @@ package en_BB import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_BB) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_BB' -func (t *en_BB) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_BB' +func (t *en_BB) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_BE/en_BE.go b/resources/locales/en_BE/en_BE.go index a10ad63..a4d4e4a 100644 --- a/resources/locales/en_BE/en_BE.go +++ b/resources/locales/en_BE/en_BE.go @@ -1,6 +1,8 @@ package en_BE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_BE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_BE' -func (t *en_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_BE' +func (t *en_BE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_BI/en_BI.go b/resources/locales/en_BI/en_BI.go index 867d7d2..d3b9601 100644 --- a/resources/locales/en_BI/en_BI.go +++ b/resources/locales/en_BI/en_BI.go @@ -1,6 +1,8 @@ package en_BI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_BI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_BI' -func (t *en_BI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_BI' +func (t *en_BI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_BM/en_BM.go b/resources/locales/en_BM/en_BM.go index e5c166a..c61bb03 100644 --- a/resources/locales/en_BM/en_BM.go +++ b/resources/locales/en_BM/en_BM.go @@ -1,6 +1,8 @@ package en_BM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_BM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_BM' -func (t *en_BM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_BM' +func (t *en_BM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_BS/en_BS.go b/resources/locales/en_BS/en_BS.go index 06c991b..d056ce3 100644 --- a/resources/locales/en_BS/en_BS.go +++ b/resources/locales/en_BS/en_BS.go @@ -1,6 +1,8 @@ package en_BS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_BS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_BS' -func (t *en_BS) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_BS' +func (t *en_BS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_BW/en_BW.go b/resources/locales/en_BW/en_BW.go index cbc68c6..a23bfe2 100644 --- a/resources/locales/en_BW/en_BW.go +++ b/resources/locales/en_BW/en_BW.go @@ -1,6 +1,8 @@ package en_BW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_BW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_BW' -func (t *en_BW) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_BW' +func (t *en_BW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_BZ/en_BZ.go b/resources/locales/en_BZ/en_BZ.go index 7caa529..d5bc0fc 100644 --- a/resources/locales/en_BZ/en_BZ.go +++ b/resources/locales/en_BZ/en_BZ.go @@ -1,6 +1,8 @@ package en_BZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_BZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_BZ' -func (t *en_BZ) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_BZ' +func (t *en_BZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_CA/en_CA.go b/resources/locales/en_CA/en_CA.go index a99be50..3fdf322 100644 --- a/resources/locales/en_CA/en_CA.go +++ b/resources/locales/en_CA/en_CA.go @@ -1,6 +1,8 @@ package en_CA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_CA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_CA' -func (t *en_CA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_CA' +func (t *en_CA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_CC/en_CC.go b/resources/locales/en_CC/en_CC.go index 934d3c1..6bfc272 100644 --- a/resources/locales/en_CC/en_CC.go +++ b/resources/locales/en_CC/en_CC.go @@ -1,6 +1,8 @@ package en_CC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_CC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_CC' -func (t *en_CC) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_CC' +func (t *en_CC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_CH/en_CH.go b/resources/locales/en_CH/en_CH.go index 5472bd5..166ac8c 100644 --- a/resources/locales/en_CH/en_CH.go +++ b/resources/locales/en_CH/en_CH.go @@ -1,6 +1,8 @@ package en_CH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_CH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_CH' -func (t *en_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_CH' +func (t *en_CH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_CK/en_CK.go b/resources/locales/en_CK/en_CK.go index 733ea5d..7d12687 100644 --- a/resources/locales/en_CK/en_CK.go +++ b/resources/locales/en_CK/en_CK.go @@ -1,6 +1,8 @@ package en_CK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_CK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_CK' -func (t *en_CK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_CK' +func (t *en_CK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_CM/en_CM.go b/resources/locales/en_CM/en_CM.go index 513a0c9..7e9deee 100644 --- a/resources/locales/en_CM/en_CM.go +++ b/resources/locales/en_CM/en_CM.go @@ -1,6 +1,8 @@ package en_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_CM' -func (t *en_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_CM' +func (t *en_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_CX/en_CX.go b/resources/locales/en_CX/en_CX.go index fd9dffa..15d434d 100644 --- a/resources/locales/en_CX/en_CX.go +++ b/resources/locales/en_CX/en_CX.go @@ -1,6 +1,8 @@ package en_CX import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_CX) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_CX' -func (t *en_CX) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_CX' +func (t *en_CX) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_CY/en_CY.go b/resources/locales/en_CY/en_CY.go index 098e1f2..a5fa67d 100644 --- a/resources/locales/en_CY/en_CY.go +++ b/resources/locales/en_CY/en_CY.go @@ -1,6 +1,8 @@ package en_CY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_CY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_CY' -func (t *en_CY) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_CY' +func (t *en_CY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_DE/en_DE.go b/resources/locales/en_DE/en_DE.go index a7047a4..791aa3d 100644 --- a/resources/locales/en_DE/en_DE.go +++ b/resources/locales/en_DE/en_DE.go @@ -1,6 +1,8 @@ package en_DE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_DE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_DE' -func (t *en_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_DE' +func (t *en_DE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_DG/en_DG.go b/resources/locales/en_DG/en_DG.go index 86b57d9..e9ddf72 100644 --- a/resources/locales/en_DG/en_DG.go +++ b/resources/locales/en_DG/en_DG.go @@ -1,6 +1,8 @@ package en_DG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_DG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_DG' -func (t *en_DG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_DG' +func (t *en_DG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_DK/en_DK.go b/resources/locales/en_DK/en_DK.go index b86638c..29c5553 100644 --- a/resources/locales/en_DK/en_DK.go +++ b/resources/locales/en_DK/en_DK.go @@ -1,6 +1,8 @@ package en_DK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_DK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_DK' -func (t *en_DK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_DK' +func (t *en_DK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_DM/en_DM.go b/resources/locales/en_DM/en_DM.go index 4c734b1..aecb6d6 100644 --- a/resources/locales/en_DM/en_DM.go +++ b/resources/locales/en_DM/en_DM.go @@ -1,6 +1,8 @@ package en_DM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_DM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_DM' -func (t *en_DM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_DM' +func (t *en_DM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_ER/en_ER.go b/resources/locales/en_ER/en_ER.go index 2ab97e5..63fa764 100644 --- a/resources/locales/en_ER/en_ER.go +++ b/resources/locales/en_ER/en_ER.go @@ -1,6 +1,8 @@ package en_ER import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_ER) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_ER' -func (t *en_ER) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_ER' +func (t *en_ER) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_FI/en_FI.go b/resources/locales/en_FI/en_FI.go index bea0912..818168f 100644 --- a/resources/locales/en_FI/en_FI.go +++ b/resources/locales/en_FI/en_FI.go @@ -1,6 +1,8 @@ package en_FI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_FI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_FI' -func (t *en_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_FI' +func (t *en_FI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_FJ/en_FJ.go b/resources/locales/en_FJ/en_FJ.go index b0e4a7a..4e380be 100644 --- a/resources/locales/en_FJ/en_FJ.go +++ b/resources/locales/en_FJ/en_FJ.go @@ -1,6 +1,8 @@ package en_FJ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_FJ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_FJ' -func (t *en_FJ) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_FJ' +func (t *en_FJ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_FK/en_FK.go b/resources/locales/en_FK/en_FK.go index 6756f0f..b86dc96 100644 --- a/resources/locales/en_FK/en_FK.go +++ b/resources/locales/en_FK/en_FK.go @@ -1,6 +1,8 @@ package en_FK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_FK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_FK' -func (t *en_FK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_FK' +func (t *en_FK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_FM/en_FM.go b/resources/locales/en_FM/en_FM.go index de49ce0..cfe05f5 100644 --- a/resources/locales/en_FM/en_FM.go +++ b/resources/locales/en_FM/en_FM.go @@ -1,6 +1,8 @@ package en_FM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_FM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_FM' -func (t *en_FM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_FM' +func (t *en_FM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_GB/en_GB.go b/resources/locales/en_GB/en_GB.go index a2b9985..b6cd4a7 100644 --- a/resources/locales/en_GB/en_GB.go +++ b/resources/locales/en_GB/en_GB.go @@ -1,6 +1,8 @@ package en_GB import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_GB) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_GB' -func (t *en_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_GB' +func (t *en_GB) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_GD/en_GD.go b/resources/locales/en_GD/en_GD.go index 17ce7b9..716edde 100644 --- a/resources/locales/en_GD/en_GD.go +++ b/resources/locales/en_GD/en_GD.go @@ -1,6 +1,8 @@ package en_GD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_GD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_GD' -func (t *en_GD) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_GD' +func (t *en_GD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_GG/en_GG.go b/resources/locales/en_GG/en_GG.go index b1a93c3..9b60b57 100644 --- a/resources/locales/en_GG/en_GG.go +++ b/resources/locales/en_GG/en_GG.go @@ -1,6 +1,8 @@ package en_GG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_GG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_GG' -func (t *en_GG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_GG' +func (t *en_GG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_GH/en_GH.go b/resources/locales/en_GH/en_GH.go index 24c1a11..4bc4522 100644 --- a/resources/locales/en_GH/en_GH.go +++ b/resources/locales/en_GH/en_GH.go @@ -1,6 +1,8 @@ package en_GH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_GH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_GH' -func (t *en_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_GH' +func (t *en_GH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_GI/en_GI.go b/resources/locales/en_GI/en_GI.go index 9bd025e..e888b4d 100644 --- a/resources/locales/en_GI/en_GI.go +++ b/resources/locales/en_GI/en_GI.go @@ -1,6 +1,8 @@ package en_GI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_GI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_GI' -func (t *en_GI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_GI' +func (t *en_GI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_GM/en_GM.go b/resources/locales/en_GM/en_GM.go index 3818583..6afa50d 100644 --- a/resources/locales/en_GM/en_GM.go +++ b/resources/locales/en_GM/en_GM.go @@ -1,6 +1,8 @@ package en_GM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_GM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_GM' -func (t *en_GM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_GM' +func (t *en_GM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_GU/en_GU.go b/resources/locales/en_GU/en_GU.go index 67bd9b5..48ee464 100644 --- a/resources/locales/en_GU/en_GU.go +++ b/resources/locales/en_GU/en_GU.go @@ -1,6 +1,8 @@ package en_GU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_GU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_GU' -func (t *en_GU) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_GU' +func (t *en_GU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_GY/en_GY.go b/resources/locales/en_GY/en_GY.go index 5227f2e..3e2ed29 100644 --- a/resources/locales/en_GY/en_GY.go +++ b/resources/locales/en_GY/en_GY.go @@ -1,6 +1,8 @@ package en_GY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_GY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_GY' -func (t *en_GY) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_GY' +func (t *en_GY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_HK/en_HK.go b/resources/locales/en_HK/en_HK.go index 4b2209f..3c38839 100644 --- a/resources/locales/en_HK/en_HK.go +++ b/resources/locales/en_HK/en_HK.go @@ -1,6 +1,8 @@ package en_HK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_HK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_HK' -func (t *en_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_HK' +func (t *en_HK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_IE/en_IE.go b/resources/locales/en_IE/en_IE.go index 56a918b..7e0a4c6 100644 --- a/resources/locales/en_IE/en_IE.go +++ b/resources/locales/en_IE/en_IE.go @@ -1,6 +1,8 @@ package en_IE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_IE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_IE' -func (t *en_IE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_IE' +func (t *en_IE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_IL/en_IL.go b/resources/locales/en_IL/en_IL.go index 4190a24..23f9668 100644 --- a/resources/locales/en_IL/en_IL.go +++ b/resources/locales/en_IL/en_IL.go @@ -1,6 +1,8 @@ package en_IL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_IL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_IL' -func (t *en_IL) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_IL' +func (t *en_IL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_IM/en_IM.go b/resources/locales/en_IM/en_IM.go index e6c518c..daad31e 100644 --- a/resources/locales/en_IM/en_IM.go +++ b/resources/locales/en_IM/en_IM.go @@ -1,6 +1,8 @@ package en_IM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_IM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_IM' -func (t *en_IM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_IM' +func (t *en_IM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_IN/en_IN.go b/resources/locales/en_IN/en_IN.go index b70c621..d19f7c8 100644 --- a/resources/locales/en_IN/en_IN.go +++ b/resources/locales/en_IN/en_IN.go @@ -1,6 +1,8 @@ package en_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_IN' -func (t *en_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_IN' +func (t *en_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_IO/en_IO.go b/resources/locales/en_IO/en_IO.go index 6d26afc..76b7dd8 100644 --- a/resources/locales/en_IO/en_IO.go +++ b/resources/locales/en_IO/en_IO.go @@ -1,6 +1,8 @@ package en_IO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_IO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_IO' -func (t *en_IO) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_IO' +func (t *en_IO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_JE/en_JE.go b/resources/locales/en_JE/en_JE.go index 547ae0e..093f5e3 100644 --- a/resources/locales/en_JE/en_JE.go +++ b/resources/locales/en_JE/en_JE.go @@ -1,6 +1,8 @@ package en_JE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_JE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_JE' -func (t *en_JE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_JE' +func (t *en_JE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_JM/en_JM.go b/resources/locales/en_JM/en_JM.go index e02ebfa..340780b 100644 --- a/resources/locales/en_JM/en_JM.go +++ b/resources/locales/en_JM/en_JM.go @@ -1,6 +1,8 @@ package en_JM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_JM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_JM' -func (t *en_JM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_JM' +func (t *en_JM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_KE/en_KE.go b/resources/locales/en_KE/en_KE.go index 5a9f990..41b6ff8 100644 --- a/resources/locales/en_KE/en_KE.go +++ b/resources/locales/en_KE/en_KE.go @@ -1,6 +1,8 @@ package en_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_KE' -func (t *en_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_KE' +func (t *en_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_KI/en_KI.go b/resources/locales/en_KI/en_KI.go index 48e71fe..557b99e 100644 --- a/resources/locales/en_KI/en_KI.go +++ b/resources/locales/en_KI/en_KI.go @@ -1,6 +1,8 @@ package en_KI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_KI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_KI' -func (t *en_KI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_KI' +func (t *en_KI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_KN/en_KN.go b/resources/locales/en_KN/en_KN.go index 1908f4f..f9fb7b5 100644 --- a/resources/locales/en_KN/en_KN.go +++ b/resources/locales/en_KN/en_KN.go @@ -1,6 +1,8 @@ package en_KN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_KN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_KN' -func (t *en_KN) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_KN' +func (t *en_KN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_KY/en_KY.go b/resources/locales/en_KY/en_KY.go index 5186804..2d5073b 100644 --- a/resources/locales/en_KY/en_KY.go +++ b/resources/locales/en_KY/en_KY.go @@ -1,6 +1,8 @@ package en_KY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_KY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_KY' -func (t *en_KY) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_KY' +func (t *en_KY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_LC/en_LC.go b/resources/locales/en_LC/en_LC.go index bdcb189..9cff49d 100644 --- a/resources/locales/en_LC/en_LC.go +++ b/resources/locales/en_LC/en_LC.go @@ -1,6 +1,8 @@ package en_LC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_LC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_LC' -func (t *en_LC) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_LC' +func (t *en_LC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_LR/en_LR.go b/resources/locales/en_LR/en_LR.go index 2ac7f92..d2c9871 100644 --- a/resources/locales/en_LR/en_LR.go +++ b/resources/locales/en_LR/en_LR.go @@ -1,6 +1,8 @@ package en_LR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_LR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_LR' -func (t *en_LR) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_LR' +func (t *en_LR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_LS/en_LS.go b/resources/locales/en_LS/en_LS.go index eab8094..79fe793 100644 --- a/resources/locales/en_LS/en_LS.go +++ b/resources/locales/en_LS/en_LS.go @@ -1,6 +1,8 @@ package en_LS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_LS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_LS' -func (t *en_LS) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_LS' +func (t *en_LS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_MG/en_MG.go b/resources/locales/en_MG/en_MG.go index 3f4b3f3..2e8bfb1 100644 --- a/resources/locales/en_MG/en_MG.go +++ b/resources/locales/en_MG/en_MG.go @@ -1,6 +1,8 @@ package en_MG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_MG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_MG' -func (t *en_MG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_MG' +func (t *en_MG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_MH/en_MH.go b/resources/locales/en_MH/en_MH.go index a5c004a..9bec029 100644 --- a/resources/locales/en_MH/en_MH.go +++ b/resources/locales/en_MH/en_MH.go @@ -1,6 +1,8 @@ package en_MH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_MH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_MH' -func (t *en_MH) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_MH' +func (t *en_MH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_MO/en_MO.go b/resources/locales/en_MO/en_MO.go index 490dad9..8329c7a 100644 --- a/resources/locales/en_MO/en_MO.go +++ b/resources/locales/en_MO/en_MO.go @@ -1,6 +1,8 @@ package en_MO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_MO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_MO' -func (t *en_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_MO' +func (t *en_MO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_MP/en_MP.go b/resources/locales/en_MP/en_MP.go index b6de1bc..e9fc31e 100644 --- a/resources/locales/en_MP/en_MP.go +++ b/resources/locales/en_MP/en_MP.go @@ -1,6 +1,8 @@ package en_MP import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_MP) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_MP' -func (t *en_MP) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_MP' +func (t *en_MP) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_MS/en_MS.go b/resources/locales/en_MS/en_MS.go index 01a4118..90e4f69 100644 --- a/resources/locales/en_MS/en_MS.go +++ b/resources/locales/en_MS/en_MS.go @@ -1,6 +1,8 @@ package en_MS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_MS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_MS' -func (t *en_MS) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_MS' +func (t *en_MS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_MT/en_MT.go b/resources/locales/en_MT/en_MT.go index 8536253..5db51f4 100644 --- a/resources/locales/en_MT/en_MT.go +++ b/resources/locales/en_MT/en_MT.go @@ -1,6 +1,8 @@ package en_MT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_MT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_MT' -func (t *en_MT) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_MT' +func (t *en_MT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_MU/en_MU.go b/resources/locales/en_MU/en_MU.go index fd67225..4348fa7 100644 --- a/resources/locales/en_MU/en_MU.go +++ b/resources/locales/en_MU/en_MU.go @@ -1,6 +1,8 @@ package en_MU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_MU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_MU' -func (t *en_MU) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_MU' +func (t *en_MU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_MW/en_MW.go b/resources/locales/en_MW/en_MW.go index d36c165..8c2ed5c 100644 --- a/resources/locales/en_MW/en_MW.go +++ b/resources/locales/en_MW/en_MW.go @@ -1,6 +1,8 @@ package en_MW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_MW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_MW' -func (t *en_MW) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_MW' +func (t *en_MW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_MY/en_MY.go b/resources/locales/en_MY/en_MY.go index ae05893..8af1d03 100644 --- a/resources/locales/en_MY/en_MY.go +++ b/resources/locales/en_MY/en_MY.go @@ -1,6 +1,8 @@ package en_MY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_MY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_MY' -func (t *en_MY) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_MY' +func (t *en_MY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_NA/en_NA.go b/resources/locales/en_NA/en_NA.go index 4dcea3a..9a9d0a3 100644 --- a/resources/locales/en_NA/en_NA.go +++ b/resources/locales/en_NA/en_NA.go @@ -1,6 +1,8 @@ package en_NA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_NA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_NA' -func (t *en_NA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_NA' +func (t *en_NA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_NF/en_NF.go b/resources/locales/en_NF/en_NF.go index 488bf51..e8de3bf 100644 --- a/resources/locales/en_NF/en_NF.go +++ b/resources/locales/en_NF/en_NF.go @@ -1,6 +1,8 @@ package en_NF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_NF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_NF' -func (t *en_NF) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_NF' +func (t *en_NF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_NG/en_NG.go b/resources/locales/en_NG/en_NG.go index 944d835..94207ba 100644 --- a/resources/locales/en_NG/en_NG.go +++ b/resources/locales/en_NG/en_NG.go @@ -1,6 +1,8 @@ package en_NG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_NG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_NG' -func (t *en_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_NG' +func (t *en_NG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_NL/en_NL.go b/resources/locales/en_NL/en_NL.go index 00a3b22..b020867 100644 --- a/resources/locales/en_NL/en_NL.go +++ b/resources/locales/en_NL/en_NL.go @@ -1,6 +1,8 @@ package en_NL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_NL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_NL' -func (t *en_NL) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_NL' +func (t *en_NL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_NR/en_NR.go b/resources/locales/en_NR/en_NR.go index 23c4d05..3356f7d 100644 --- a/resources/locales/en_NR/en_NR.go +++ b/resources/locales/en_NR/en_NR.go @@ -1,6 +1,8 @@ package en_NR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_NR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_NR' -func (t *en_NR) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_NR' +func (t *en_NR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_NU/en_NU.go b/resources/locales/en_NU/en_NU.go index 0bba152..b4cad7b 100644 --- a/resources/locales/en_NU/en_NU.go +++ b/resources/locales/en_NU/en_NU.go @@ -1,6 +1,8 @@ package en_NU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_NU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_NU' -func (t *en_NU) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_NU' +func (t *en_NU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_NZ/en_NZ.go b/resources/locales/en_NZ/en_NZ.go index d29e316..98797e2 100644 --- a/resources/locales/en_NZ/en_NZ.go +++ b/resources/locales/en_NZ/en_NZ.go @@ -1,6 +1,8 @@ package en_NZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_NZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_NZ' -func (t *en_NZ) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_NZ' +func (t *en_NZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_PG/en_PG.go b/resources/locales/en_PG/en_PG.go index 8e2f68c..05d2641 100644 --- a/resources/locales/en_PG/en_PG.go +++ b/resources/locales/en_PG/en_PG.go @@ -1,6 +1,8 @@ package en_PG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_PG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_PG' -func (t *en_PG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_PG' +func (t *en_PG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_PH/en_PH.go b/resources/locales/en_PH/en_PH.go index 5070a57..b299a27 100644 --- a/resources/locales/en_PH/en_PH.go +++ b/resources/locales/en_PH/en_PH.go @@ -1,6 +1,8 @@ package en_PH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_PH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_PH' -func (t *en_PH) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_PH' +func (t *en_PH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_PK/en_PK.go b/resources/locales/en_PK/en_PK.go index 07a43c1..1bb35eb 100644 --- a/resources/locales/en_PK/en_PK.go +++ b/resources/locales/en_PK/en_PK.go @@ -1,6 +1,8 @@ package en_PK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_PK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_PK' -func (t *en_PK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_PK' +func (t *en_PK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_PN/en_PN.go b/resources/locales/en_PN/en_PN.go index 4b2fc47..4297405 100644 --- a/resources/locales/en_PN/en_PN.go +++ b/resources/locales/en_PN/en_PN.go @@ -1,6 +1,8 @@ package en_PN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_PN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_PN' -func (t *en_PN) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_PN' +func (t *en_PN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_PR/en_PR.go b/resources/locales/en_PR/en_PR.go index 9d55d10..0be0269 100644 --- a/resources/locales/en_PR/en_PR.go +++ b/resources/locales/en_PR/en_PR.go @@ -1,6 +1,8 @@ package en_PR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_PR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_PR' -func (t *en_PR) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_PR' +func (t *en_PR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_PW/en_PW.go b/resources/locales/en_PW/en_PW.go index f3068ee..aadb888 100644 --- a/resources/locales/en_PW/en_PW.go +++ b/resources/locales/en_PW/en_PW.go @@ -1,6 +1,8 @@ package en_PW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_PW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_PW' -func (t *en_PW) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_PW' +func (t *en_PW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_RW/en_RW.go b/resources/locales/en_RW/en_RW.go index 416a01d..0fbf956 100644 --- a/resources/locales/en_RW/en_RW.go +++ b/resources/locales/en_RW/en_RW.go @@ -1,6 +1,8 @@ package en_RW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_RW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_RW' -func (t *en_RW) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_RW' +func (t *en_RW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SB/en_SB.go b/resources/locales/en_SB/en_SB.go index db526c4..73306f9 100644 --- a/resources/locales/en_SB/en_SB.go +++ b/resources/locales/en_SB/en_SB.go @@ -1,6 +1,8 @@ package en_SB import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SB) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SB' -func (t *en_SB) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SB' +func (t *en_SB) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SC/en_SC.go b/resources/locales/en_SC/en_SC.go index e4b25e7..ac19c06 100644 --- a/resources/locales/en_SC/en_SC.go +++ b/resources/locales/en_SC/en_SC.go @@ -1,6 +1,8 @@ package en_SC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SC' -func (t *en_SC) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SC' +func (t *en_SC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SD/en_SD.go b/resources/locales/en_SD/en_SD.go index 305e52b..21f5862 100644 --- a/resources/locales/en_SD/en_SD.go +++ b/resources/locales/en_SD/en_SD.go @@ -1,6 +1,8 @@ package en_SD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SD' -func (t *en_SD) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SD' +func (t *en_SD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SE/en_SE.go b/resources/locales/en_SE/en_SE.go index c026c0c..ce2c2d8 100644 --- a/resources/locales/en_SE/en_SE.go +++ b/resources/locales/en_SE/en_SE.go @@ -1,6 +1,8 @@ package en_SE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SE' -func (t *en_SE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SE' +func (t *en_SE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SG/en_SG.go b/resources/locales/en_SG/en_SG.go index d7ec9db..7e17cdf 100644 --- a/resources/locales/en_SG/en_SG.go +++ b/resources/locales/en_SG/en_SG.go @@ -1,6 +1,8 @@ package en_SG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SG' -func (t *en_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SG' +func (t *en_SG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SH/en_SH.go b/resources/locales/en_SH/en_SH.go index e1000b7..be33b12 100644 --- a/resources/locales/en_SH/en_SH.go +++ b/resources/locales/en_SH/en_SH.go @@ -1,6 +1,8 @@ package en_SH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SH' -func (t *en_SH) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SH' +func (t *en_SH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SI/en_SI.go b/resources/locales/en_SI/en_SI.go index 81e3447..9f6efa0 100644 --- a/resources/locales/en_SI/en_SI.go +++ b/resources/locales/en_SI/en_SI.go @@ -1,6 +1,8 @@ package en_SI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SI' -func (t *en_SI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SI' +func (t *en_SI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SL/en_SL.go b/resources/locales/en_SL/en_SL.go index bfd7758..3f8f9a5 100644 --- a/resources/locales/en_SL/en_SL.go +++ b/resources/locales/en_SL/en_SL.go @@ -1,6 +1,8 @@ package en_SL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SL' -func (t *en_SL) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SL' +func (t *en_SL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SS/en_SS.go b/resources/locales/en_SS/en_SS.go index 75603d6..9a7eae1 100644 --- a/resources/locales/en_SS/en_SS.go +++ b/resources/locales/en_SS/en_SS.go @@ -1,6 +1,8 @@ package en_SS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SS' -func (t *en_SS) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SS' +func (t *en_SS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SX/en_SX.go b/resources/locales/en_SX/en_SX.go index 85ab774..7b891e8 100644 --- a/resources/locales/en_SX/en_SX.go +++ b/resources/locales/en_SX/en_SX.go @@ -1,6 +1,8 @@ package en_SX import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SX) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SX' -func (t *en_SX) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SX' +func (t *en_SX) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_SZ/en_SZ.go b/resources/locales/en_SZ/en_SZ.go index 08cd495..250c115 100644 --- a/resources/locales/en_SZ/en_SZ.go +++ b/resources/locales/en_SZ/en_SZ.go @@ -1,6 +1,8 @@ package en_SZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_SZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_SZ' -func (t *en_SZ) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_SZ' +func (t *en_SZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_TC/en_TC.go b/resources/locales/en_TC/en_TC.go index 3f67822..b52ec8b 100644 --- a/resources/locales/en_TC/en_TC.go +++ b/resources/locales/en_TC/en_TC.go @@ -1,6 +1,8 @@ package en_TC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_TC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_TC' -func (t *en_TC) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_TC' +func (t *en_TC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_TK/en_TK.go b/resources/locales/en_TK/en_TK.go index 9dba507..63def71 100644 --- a/resources/locales/en_TK/en_TK.go +++ b/resources/locales/en_TK/en_TK.go @@ -1,6 +1,8 @@ package en_TK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_TK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_TK' -func (t *en_TK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_TK' +func (t *en_TK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_TO/en_TO.go b/resources/locales/en_TO/en_TO.go index 677856b..b9a1dec 100644 --- a/resources/locales/en_TO/en_TO.go +++ b/resources/locales/en_TO/en_TO.go @@ -1,6 +1,8 @@ package en_TO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_TO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_TO' -func (t *en_TO) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_TO' +func (t *en_TO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_TT/en_TT.go b/resources/locales/en_TT/en_TT.go index ade4eaf..9741b19 100644 --- a/resources/locales/en_TT/en_TT.go +++ b/resources/locales/en_TT/en_TT.go @@ -1,6 +1,8 @@ package en_TT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_TT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_TT' -func (t *en_TT) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_TT' +func (t *en_TT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_TV/en_TV.go b/resources/locales/en_TV/en_TV.go index 629f153..7bbfa35 100644 --- a/resources/locales/en_TV/en_TV.go +++ b/resources/locales/en_TV/en_TV.go @@ -1,6 +1,8 @@ package en_TV import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_TV) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_TV' -func (t *en_TV) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_TV' +func (t *en_TV) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_TZ/en_TZ.go b/resources/locales/en_TZ/en_TZ.go index 9488114..1132a00 100644 --- a/resources/locales/en_TZ/en_TZ.go +++ b/resources/locales/en_TZ/en_TZ.go @@ -1,6 +1,8 @@ package en_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_TZ' -func (t *en_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_TZ' +func (t *en_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_UG/en_UG.go b/resources/locales/en_UG/en_UG.go index a7196e7..f8ceffe 100644 --- a/resources/locales/en_UG/en_UG.go +++ b/resources/locales/en_UG/en_UG.go @@ -1,6 +1,8 @@ package en_UG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_UG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_UG' -func (t *en_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_UG' +func (t *en_UG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_UM/en_UM.go b/resources/locales/en_UM/en_UM.go index 736a82c..b19d03b 100644 --- a/resources/locales/en_UM/en_UM.go +++ b/resources/locales/en_UM/en_UM.go @@ -1,6 +1,8 @@ package en_UM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_UM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_UM' -func (t *en_UM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_UM' +func (t *en_UM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_US/en_US.go b/resources/locales/en_US/en_US.go index 84f0396..96d4f3b 100644 --- a/resources/locales/en_US/en_US.go +++ b/resources/locales/en_US/en_US.go @@ -1,6 +1,8 @@ package en_US import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_US) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_US' -func (t *en_US) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_US' +func (t *en_US) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_US_POSIX/en_US_POSIX.go b/resources/locales/en_US_POSIX/en_US_POSIX.go index 258db36..e26625d 100644 --- a/resources/locales/en_US_POSIX/en_US_POSIX.go +++ b/resources/locales/en_US_POSIX/en_US_POSIX.go @@ -1,6 +1,8 @@ package en_US_POSIX import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_US_POSIX) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_US_POSIX' -func (t *en_US_POSIX) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_US_POSIX' +func (t *en_US_POSIX) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_VC/en_VC.go b/resources/locales/en_VC/en_VC.go index 0a779b3..3ac8d93 100644 --- a/resources/locales/en_VC/en_VC.go +++ b/resources/locales/en_VC/en_VC.go @@ -1,6 +1,8 @@ package en_VC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_VC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_VC' -func (t *en_VC) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_VC' +func (t *en_VC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_VG/en_VG.go b/resources/locales/en_VG/en_VG.go index aedde4c..6293cee 100644 --- a/resources/locales/en_VG/en_VG.go +++ b/resources/locales/en_VG/en_VG.go @@ -1,6 +1,8 @@ package en_VG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_VG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_VG' -func (t *en_VG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_VG' +func (t *en_VG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_VI/en_VI.go b/resources/locales/en_VI/en_VI.go index e5e0f1a..fb0cc7f 100644 --- a/resources/locales/en_VI/en_VI.go +++ b/resources/locales/en_VI/en_VI.go @@ -1,6 +1,8 @@ package en_VI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_VI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_VI' -func (t *en_VI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_VI' +func (t *en_VI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_VU/en_VU.go b/resources/locales/en_VU/en_VU.go index 2dce6cf..7d768a4 100644 --- a/resources/locales/en_VU/en_VU.go +++ b/resources/locales/en_VU/en_VU.go @@ -1,6 +1,8 @@ package en_VU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_VU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_VU' -func (t *en_VU) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_VU' +func (t *en_VU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_WS/en_WS.go b/resources/locales/en_WS/en_WS.go index e893c86..70771af 100644 --- a/resources/locales/en_WS/en_WS.go +++ b/resources/locales/en_WS/en_WS.go @@ -1,6 +1,8 @@ package en_WS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_WS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_WS' -func (t *en_WS) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_WS' +func (t *en_WS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_ZA/en_ZA.go b/resources/locales/en_ZA/en_ZA.go index c8f9c9c..3555e05 100644 --- a/resources/locales/en_ZA/en_ZA.go +++ b/resources/locales/en_ZA/en_ZA.go @@ -1,6 +1,8 @@ package en_ZA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_ZA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_ZA' -func (t *en_ZA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_ZA' +func (t *en_ZA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_ZM/en_ZM.go b/resources/locales/en_ZM/en_ZM.go index 64ee381..4fd8a29 100644 --- a/resources/locales/en_ZM/en_ZM.go +++ b/resources/locales/en_ZM/en_ZM.go @@ -1,6 +1,8 @@ package en_ZM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_ZM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_ZM' -func (t *en_ZM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_ZM' +func (t *en_ZM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/en_ZW/en_ZW.go b/resources/locales/en_ZW/en_ZW.go index 776023d..0020339 100644 --- a/resources/locales/en_ZW/en_ZW.go +++ b/resources/locales/en_ZW/en_ZW.go @@ -1,6 +1,8 @@ package en_ZW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *en_ZW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'en_ZW' -func (t *en_ZW) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'en_ZW' +func (t *en_ZW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/eo/eo.go b/resources/locales/eo/eo.go index 2203b32..068f13a 100644 --- a/resources/locales/eo/eo.go +++ b/resources/locales/eo/eo.go @@ -1,6 +1,8 @@ package eo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *eo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'eo' -func (t *eo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'eo' +func (t *eo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/eo_001/eo_001.go b/resources/locales/eo_001/eo_001.go index 23f7388..10ac892 100644 --- a/resources/locales/eo_001/eo_001.go +++ b/resources/locales/eo_001/eo_001.go @@ -1,6 +1,8 @@ package eo_001 import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *eo_001) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'eo_001' -func (t *eo_001) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'eo_001' +func (t *eo_001) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es/es.go b/resources/locales/es/es.go index 965b4bb..661ac85 100644 --- a/resources/locales/es/es.go +++ b/resources/locales/es/es.go @@ -1,6 +1,8 @@ package es import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es' -func (t *es) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es' +func (t *es) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_419/es_419.go b/resources/locales/es_419/es_419.go index a696900..725ecb0 100644 --- a/resources/locales/es_419/es_419.go +++ b/resources/locales/es_419/es_419.go @@ -1,6 +1,8 @@ package es_419 import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_419) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_419' -func (t *es_419) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_419' +func (t *es_419) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_AR/es_AR.go b/resources/locales/es_AR/es_AR.go index ee2ee54..d04a733 100644 --- a/resources/locales/es_AR/es_AR.go +++ b/resources/locales/es_AR/es_AR.go @@ -1,6 +1,8 @@ package es_AR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_AR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_AR' -func (t *es_AR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_AR' +func (t *es_AR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_BO/es_BO.go b/resources/locales/es_BO/es_BO.go index 953879e..ac1545b 100644 --- a/resources/locales/es_BO/es_BO.go +++ b/resources/locales/es_BO/es_BO.go @@ -1,6 +1,8 @@ package es_BO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_BO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_BO' -func (t *es_BO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_BO' +func (t *es_BO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_BR/es_BR.go b/resources/locales/es_BR/es_BR.go index 5015dc4..129153d 100644 --- a/resources/locales/es_BR/es_BR.go +++ b/resources/locales/es_BR/es_BR.go @@ -1,6 +1,8 @@ package es_BR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_BR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_BR' -func (t *es_BR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_BR' +func (t *es_BR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_CL/es_CL.go b/resources/locales/es_CL/es_CL.go index b9c30e3..428779e 100644 --- a/resources/locales/es_CL/es_CL.go +++ b/resources/locales/es_CL/es_CL.go @@ -1,6 +1,8 @@ package es_CL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_CL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_CL' -func (t *es_CL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_CL' +func (t *es_CL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_CO/es_CO.go b/resources/locales/es_CO/es_CO.go index 65bdea6..39da299 100644 --- a/resources/locales/es_CO/es_CO.go +++ b/resources/locales/es_CO/es_CO.go @@ -1,6 +1,8 @@ package es_CO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_CO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_CO' -func (t *es_CO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_CO' +func (t *es_CO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_CR/es_CR.go b/resources/locales/es_CR/es_CR.go index 6d2b99a..5daa481 100644 --- a/resources/locales/es_CR/es_CR.go +++ b/resources/locales/es_CR/es_CR.go @@ -1,6 +1,8 @@ package es_CR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_CR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_CR' -func (t *es_CR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_CR' +func (t *es_CR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_CU/es_CU.go b/resources/locales/es_CU/es_CU.go index 9be0e54..d17a7bb 100644 --- a/resources/locales/es_CU/es_CU.go +++ b/resources/locales/es_CU/es_CU.go @@ -1,6 +1,8 @@ package es_CU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_CU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_CU' -func (t *es_CU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_CU' +func (t *es_CU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_DO/es_DO.go b/resources/locales/es_DO/es_DO.go index d0a4ed5..ebafeca 100644 --- a/resources/locales/es_DO/es_DO.go +++ b/resources/locales/es_DO/es_DO.go @@ -1,6 +1,8 @@ package es_DO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_DO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_DO' -func (t *es_DO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_DO' +func (t *es_DO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_EA/es_EA.go b/resources/locales/es_EA/es_EA.go index 5968033..69649b3 100644 --- a/resources/locales/es_EA/es_EA.go +++ b/resources/locales/es_EA/es_EA.go @@ -1,6 +1,8 @@ package es_EA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_EA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_EA' -func (t *es_EA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_EA' +func (t *es_EA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_EC/es_EC.go b/resources/locales/es_EC/es_EC.go index 4306bee..3013024 100644 --- a/resources/locales/es_EC/es_EC.go +++ b/resources/locales/es_EC/es_EC.go @@ -1,6 +1,8 @@ package es_EC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_EC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_EC' -func (t *es_EC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_EC' +func (t *es_EC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_ES/es_ES.go b/resources/locales/es_ES/es_ES.go index 23f2660..c245054 100644 --- a/resources/locales/es_ES/es_ES.go +++ b/resources/locales/es_ES/es_ES.go @@ -1,6 +1,8 @@ package es_ES import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_ES) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_ES' -func (t *es_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_ES' +func (t *es_ES) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_GQ/es_GQ.go b/resources/locales/es_GQ/es_GQ.go index cc28da3..4830743 100644 --- a/resources/locales/es_GQ/es_GQ.go +++ b/resources/locales/es_GQ/es_GQ.go @@ -1,6 +1,8 @@ package es_GQ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_GQ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_GQ' -func (t *es_GQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_GQ' +func (t *es_GQ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_GT/es_GT.go b/resources/locales/es_GT/es_GT.go index a8f09e2..39bdd7c 100644 --- a/resources/locales/es_GT/es_GT.go +++ b/resources/locales/es_GT/es_GT.go @@ -1,6 +1,8 @@ package es_GT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_GT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_GT' -func (t *es_GT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_GT' +func (t *es_GT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_HN/es_HN.go b/resources/locales/es_HN/es_HN.go index 52793fa..81cd474 100644 --- a/resources/locales/es_HN/es_HN.go +++ b/resources/locales/es_HN/es_HN.go @@ -1,6 +1,8 @@ package es_HN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_HN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_HN' -func (t *es_HN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_HN' +func (t *es_HN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_IC/es_IC.go b/resources/locales/es_IC/es_IC.go index 58506fb..f79a0d1 100644 --- a/resources/locales/es_IC/es_IC.go +++ b/resources/locales/es_IC/es_IC.go @@ -1,6 +1,8 @@ package es_IC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_IC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_IC' -func (t *es_IC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_IC' +func (t *es_IC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_MX/es_MX.go b/resources/locales/es_MX/es_MX.go index ada8692..e07b450 100644 --- a/resources/locales/es_MX/es_MX.go +++ b/resources/locales/es_MX/es_MX.go @@ -1,6 +1,8 @@ package es_MX import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_MX) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_MX' -func (t *es_MX) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_MX' +func (t *es_MX) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_NI/es_NI.go b/resources/locales/es_NI/es_NI.go index 4d5a2e7..aa53e46 100644 --- a/resources/locales/es_NI/es_NI.go +++ b/resources/locales/es_NI/es_NI.go @@ -1,6 +1,8 @@ package es_NI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_NI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_NI' -func (t *es_NI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_NI' +func (t *es_NI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_PA/es_PA.go b/resources/locales/es_PA/es_PA.go index 32dd18d..276181f 100644 --- a/resources/locales/es_PA/es_PA.go +++ b/resources/locales/es_PA/es_PA.go @@ -1,6 +1,8 @@ package es_PA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_PA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_PA' -func (t *es_PA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_PA' +func (t *es_PA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_PE/es_PE.go b/resources/locales/es_PE/es_PE.go index 6bb9d30..0ac4d5e 100644 --- a/resources/locales/es_PE/es_PE.go +++ b/resources/locales/es_PE/es_PE.go @@ -1,6 +1,8 @@ package es_PE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_PE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_PE' -func (t *es_PE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_PE' +func (t *es_PE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_PH/es_PH.go b/resources/locales/es_PH/es_PH.go index d2d127d..42137cd 100644 --- a/resources/locales/es_PH/es_PH.go +++ b/resources/locales/es_PH/es_PH.go @@ -1,6 +1,8 @@ package es_PH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_PH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_PH' -func (t *es_PH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_PH' +func (t *es_PH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_PR/es_PR.go b/resources/locales/es_PR/es_PR.go index adaba7d..090c7bd 100644 --- a/resources/locales/es_PR/es_PR.go +++ b/resources/locales/es_PR/es_PR.go @@ -1,6 +1,8 @@ package es_PR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_PR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_PR' -func (t *es_PR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_PR' +func (t *es_PR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_PY/es_PY.go b/resources/locales/es_PY/es_PY.go index 5ae0a48..92d28a8 100644 --- a/resources/locales/es_PY/es_PY.go +++ b/resources/locales/es_PY/es_PY.go @@ -1,6 +1,8 @@ package es_PY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_PY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_PY' -func (t *es_PY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_PY' +func (t *es_PY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_SV/es_SV.go b/resources/locales/es_SV/es_SV.go index 6d52bdd..31e4663 100644 --- a/resources/locales/es_SV/es_SV.go +++ b/resources/locales/es_SV/es_SV.go @@ -1,6 +1,8 @@ package es_SV import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_SV) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_SV' -func (t *es_SV) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_SV' +func (t *es_SV) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_US/es_US.go b/resources/locales/es_US/es_US.go index c73b633..b933870 100644 --- a/resources/locales/es_US/es_US.go +++ b/resources/locales/es_US/es_US.go @@ -1,6 +1,8 @@ package es_US import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_US) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_US' -func (t *es_US) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_US' +func (t *es_US) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_UY/es_UY.go b/resources/locales/es_UY/es_UY.go index dae96ec..8c8cb28 100644 --- a/resources/locales/es_UY/es_UY.go +++ b/resources/locales/es_UY/es_UY.go @@ -1,6 +1,8 @@ package es_UY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_UY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_UY' -func (t *es_UY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_UY' +func (t *es_UY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/es_VE/es_VE.go b/resources/locales/es_VE/es_VE.go index 312d8d5..c5739ac 100644 --- a/resources/locales/es_VE/es_VE.go +++ b/resources/locales/es_VE/es_VE.go @@ -1,6 +1,8 @@ package es_VE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *es_VE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'es_VE' -func (t *es_VE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'es_VE' +func (t *es_VE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/et/et.go b/resources/locales/et/et.go index c29d329..468facf 100644 --- a/resources/locales/et/et.go +++ b/resources/locales/et/et.go @@ -1,6 +1,8 @@ package et import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *et) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'et' -func (t *et) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'et' +func (t *et) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/et_EE/et_EE.go b/resources/locales/et_EE/et_EE.go index 3256e71..fc8dd39 100644 --- a/resources/locales/et_EE/et_EE.go +++ b/resources/locales/et_EE/et_EE.go @@ -1,6 +1,8 @@ package et_EE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *et_EE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'et_EE' -func (t *et_EE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'et_EE' +func (t *et_EE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/eu/eu.go b/resources/locales/eu/eu.go index 75254e7..5c7ab38 100644 --- a/resources/locales/eu/eu.go +++ b/resources/locales/eu/eu.go @@ -1,6 +1,8 @@ package eu import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *eu) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'eu' -func (t *eu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'eu' +func (t *eu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/eu_ES/eu_ES.go b/resources/locales/eu_ES/eu_ES.go index 71b9ad0..c232506 100644 --- a/resources/locales/eu_ES/eu_ES.go +++ b/resources/locales/eu_ES/eu_ES.go @@ -1,6 +1,8 @@ package eu_ES import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *eu_ES) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'eu_ES' -func (t *eu_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'eu_ES' +func (t *eu_ES) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ewo/ewo.go b/resources/locales/ewo/ewo.go index a5a422f..69d6e87 100644 --- a/resources/locales/ewo/ewo.go +++ b/resources/locales/ewo/ewo.go @@ -1,6 +1,8 @@ package ewo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *ewo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ewo' -func (t *ewo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ewo' +func (t *ewo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ewo_CM/ewo_CM.go b/resources/locales/ewo_CM/ewo_CM.go index e7439d1..b608b8a 100644 --- a/resources/locales/ewo_CM/ewo_CM.go +++ b/resources/locales/ewo_CM/ewo_CM.go @@ -1,6 +1,8 @@ package ewo_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *ewo_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ewo_CM' -func (t *ewo_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ewo_CM' +func (t *ewo_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/fa/fa.go b/resources/locales/fa/fa.go index 06f4431..6fdbd59 100644 --- a/resources/locales/fa/fa.go +++ b/resources/locales/fa/fa.go @@ -1,6 +1,8 @@ package fa import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *fa) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fa' -func (t *fa) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fa' +func (t *fa) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fa_AF/fa_AF.go b/resources/locales/fa_AF/fa_AF.go index bdd0707..ace06b4 100644 --- a/resources/locales/fa_AF/fa_AF.go +++ b/resources/locales/fa_AF/fa_AF.go @@ -1,6 +1,8 @@ package fa_AF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *fa_AF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fa_AF' -func (t *fa_AF) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fa_AF' +func (t *fa_AF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fa_IR/fa_IR.go b/resources/locales/fa_IR/fa_IR.go index ceb9ba6..c929004 100644 --- a/resources/locales/fa_IR/fa_IR.go +++ b/resources/locales/fa_IR/fa_IR.go @@ -1,6 +1,8 @@ package fa_IR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *fa_IR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fa_IR' -func (t *fa_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fa_IR' +func (t *fa_IR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ff/ff.go b/resources/locales/ff/ff.go index ad3331e..4a3899a 100644 --- a/resources/locales/ff/ff.go +++ b/resources/locales/ff/ff.go @@ -1,6 +1,8 @@ package ff import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *ff) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ff' -func (t *ff) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ff' +func (t *ff) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ff_CM/ff_CM.go b/resources/locales/ff_CM/ff_CM.go index 006427d..d918280 100644 --- a/resources/locales/ff_CM/ff_CM.go +++ b/resources/locales/ff_CM/ff_CM.go @@ -1,6 +1,8 @@ package ff_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *ff_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ff_CM' -func (t *ff_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ff_CM' +func (t *ff_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ff_GN/ff_GN.go b/resources/locales/ff_GN/ff_GN.go index 1418363..d4727c1 100644 --- a/resources/locales/ff_GN/ff_GN.go +++ b/resources/locales/ff_GN/ff_GN.go @@ -1,6 +1,8 @@ package ff_GN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *ff_GN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ff_GN' -func (t *ff_GN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ff_GN' +func (t *ff_GN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ff_MR/ff_MR.go b/resources/locales/ff_MR/ff_MR.go index e157a40..422d407 100644 --- a/resources/locales/ff_MR/ff_MR.go +++ b/resources/locales/ff_MR/ff_MR.go @@ -1,6 +1,8 @@ package ff_MR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *ff_MR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ff_MR' -func (t *ff_MR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ff_MR' +func (t *ff_MR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ff_SN/ff_SN.go b/resources/locales/ff_SN/ff_SN.go index e29ee85..1d69860 100644 --- a/resources/locales/ff_SN/ff_SN.go +++ b/resources/locales/ff_SN/ff_SN.go @@ -1,6 +1,8 @@ package ff_SN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *ff_SN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ff_SN' -func (t *ff_SN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ff_SN' +func (t *ff_SN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fi/fi.go b/resources/locales/fi/fi.go index b968a72..70dac6c 100644 --- a/resources/locales/fi/fi.go +++ b/resources/locales/fi/fi.go @@ -1,6 +1,8 @@ package fi import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *fi) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fi' -func (t *fi) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fi' +func (t *fi) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fi_FI/fi_FI.go b/resources/locales/fi_FI/fi_FI.go index 5ef6a9f..ada6069 100644 --- a/resources/locales/fi_FI/fi_FI.go +++ b/resources/locales/fi_FI/fi_FI.go @@ -1,6 +1,8 @@ package fi_FI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *fi_FI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fi_FI' -func (t *fi_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fi_FI' +func (t *fi_FI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fil/fil.go b/resources/locales/fil/fil.go index 2fe2c78..1db5bd6 100644 --- a/resources/locales/fil/fil.go +++ b/resources/locales/fil/fil.go @@ -1,6 +1,8 @@ package fil import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,16 @@ func (t *fil) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fil' -func (t *fil) CardinalPluralRule(num string) (locales.PluralRule, error) { - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fil' +func (t *fil) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && (i == 1 || i == 2 || i == 3)) || (v == 0 && (i%10 != 4 && i%10 != 6 && i%10 != 9)) || (v != 0 && (f%10 != 4 && f%10 != 6 && f%10 != 9)) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fil_PH/fil_PH.go b/resources/locales/fil_PH/fil_PH.go index 15ce606..6cab000 100644 --- a/resources/locales/fil_PH/fil_PH.go +++ b/resources/locales/fil_PH/fil_PH.go @@ -1,6 +1,8 @@ package fil_PH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,16 @@ func (t *fil_PH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fil_PH' -func (t *fil_PH) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fil_PH' +func (t *fil_PH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && (i == 1 || i == 2 || i == 3)) || (v == 0 && (i%10 != 4 && i%10 != 6 && i%10 != 9)) || (v != 0 && (f%10 != 4 && f%10 != 6 && f%10 != 9)) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fo/fo.go b/resources/locales/fo/fo.go index 506ee37..867c63e 100644 --- a/resources/locales/fo/fo.go +++ b/resources/locales/fo/fo.go @@ -1,6 +1,8 @@ package fo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *fo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fo' -func (t *fo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fo' +func (t *fo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fo_DK/fo_DK.go b/resources/locales/fo_DK/fo_DK.go index 4e4b7d6..74af2e4 100644 --- a/resources/locales/fo_DK/fo_DK.go +++ b/resources/locales/fo_DK/fo_DK.go @@ -1,6 +1,8 @@ package fo_DK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *fo_DK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fo_DK' -func (t *fo_DK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fo_DK' +func (t *fo_DK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fo_FO/fo_FO.go b/resources/locales/fo_FO/fo_FO.go index ae2f290..290c216 100644 --- a/resources/locales/fo_FO/fo_FO.go +++ b/resources/locales/fo_FO/fo_FO.go @@ -1,6 +1,8 @@ package fo_FO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *fo_FO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fo_FO' -func (t *fo_FO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fo_FO' +func (t *fo_FO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr/fr.go b/resources/locales/fr/fr.go index 3a0ea0a..1e624e9 100644 --- a/resources/locales/fr/fr.go +++ b/resources/locales/fr/fr.go @@ -1,6 +1,8 @@ package fr import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr' -func (t *fr) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr' +func (t *fr) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_BE/fr_BE.go b/resources/locales/fr_BE/fr_BE.go index d740fd0..64b5ccc 100644 --- a/resources/locales/fr_BE/fr_BE.go +++ b/resources/locales/fr_BE/fr_BE.go @@ -1,6 +1,8 @@ package fr_BE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_BE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_BE' -func (t *fr_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_BE' +func (t *fr_BE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_BF/fr_BF.go b/resources/locales/fr_BF/fr_BF.go index 50083ba..bc0f244 100644 --- a/resources/locales/fr_BF/fr_BF.go +++ b/resources/locales/fr_BF/fr_BF.go @@ -1,6 +1,8 @@ package fr_BF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_BF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_BF' -func (t *fr_BF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_BF' +func (t *fr_BF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_BI/fr_BI.go b/resources/locales/fr_BI/fr_BI.go index 5250efb..d7e6bba 100644 --- a/resources/locales/fr_BI/fr_BI.go +++ b/resources/locales/fr_BI/fr_BI.go @@ -1,6 +1,8 @@ package fr_BI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_BI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_BI' -func (t *fr_BI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_BI' +func (t *fr_BI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_BJ/fr_BJ.go b/resources/locales/fr_BJ/fr_BJ.go index b7b082e..dd55776 100644 --- a/resources/locales/fr_BJ/fr_BJ.go +++ b/resources/locales/fr_BJ/fr_BJ.go @@ -1,6 +1,8 @@ package fr_BJ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_BJ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_BJ' -func (t *fr_BJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_BJ' +func (t *fr_BJ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_BL/fr_BL.go b/resources/locales/fr_BL/fr_BL.go index fd0f708..1d8ccde 100644 --- a/resources/locales/fr_BL/fr_BL.go +++ b/resources/locales/fr_BL/fr_BL.go @@ -1,6 +1,8 @@ package fr_BL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_BL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_BL' -func (t *fr_BL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_BL' +func (t *fr_BL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_CA/fr_CA.go b/resources/locales/fr_CA/fr_CA.go index b2c4e01..6f992c0 100644 --- a/resources/locales/fr_CA/fr_CA.go +++ b/resources/locales/fr_CA/fr_CA.go @@ -1,6 +1,8 @@ package fr_CA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_CA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CA' -func (t *fr_CA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_CA' +func (t *fr_CA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_CD/fr_CD.go b/resources/locales/fr_CD/fr_CD.go index ea0e934..4088fa5 100644 --- a/resources/locales/fr_CD/fr_CD.go +++ b/resources/locales/fr_CD/fr_CD.go @@ -1,6 +1,8 @@ package fr_CD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_CD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CD' -func (t *fr_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_CD' +func (t *fr_CD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_CF/fr_CF.go b/resources/locales/fr_CF/fr_CF.go index 3427c9d..dce9520 100644 --- a/resources/locales/fr_CF/fr_CF.go +++ b/resources/locales/fr_CF/fr_CF.go @@ -1,6 +1,8 @@ package fr_CF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_CF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CF' -func (t *fr_CF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_CF' +func (t *fr_CF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_CG/fr_CG.go b/resources/locales/fr_CG/fr_CG.go index ed78ead..ec3e2a0 100644 --- a/resources/locales/fr_CG/fr_CG.go +++ b/resources/locales/fr_CG/fr_CG.go @@ -1,6 +1,8 @@ package fr_CG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_CG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CG' -func (t *fr_CG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_CG' +func (t *fr_CG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_CH/fr_CH.go b/resources/locales/fr_CH/fr_CH.go index 65623aa..7ac1ed8 100644 --- a/resources/locales/fr_CH/fr_CH.go +++ b/resources/locales/fr_CH/fr_CH.go @@ -1,6 +1,8 @@ package fr_CH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_CH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CH' -func (t *fr_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_CH' +func (t *fr_CH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_CI/fr_CI.go b/resources/locales/fr_CI/fr_CI.go index 666dd65..cad3e6b 100644 --- a/resources/locales/fr_CI/fr_CI.go +++ b/resources/locales/fr_CI/fr_CI.go @@ -1,6 +1,8 @@ package fr_CI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_CI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CI' -func (t *fr_CI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_CI' +func (t *fr_CI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_CM/fr_CM.go b/resources/locales/fr_CM/fr_CM.go index ca59bdd..621b81b 100644 --- a/resources/locales/fr_CM/fr_CM.go +++ b/resources/locales/fr_CM/fr_CM.go @@ -1,6 +1,8 @@ package fr_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_CM' -func (t *fr_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_CM' +func (t *fr_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_DJ/fr_DJ.go b/resources/locales/fr_DJ/fr_DJ.go index d9c2ee8..7c1849e 100644 --- a/resources/locales/fr_DJ/fr_DJ.go +++ b/resources/locales/fr_DJ/fr_DJ.go @@ -1,6 +1,8 @@ package fr_DJ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_DJ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_DJ' -func (t *fr_DJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_DJ' +func (t *fr_DJ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_DZ/fr_DZ.go b/resources/locales/fr_DZ/fr_DZ.go index ebb785a..b30bd50 100644 --- a/resources/locales/fr_DZ/fr_DZ.go +++ b/resources/locales/fr_DZ/fr_DZ.go @@ -1,6 +1,8 @@ package fr_DZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_DZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_DZ' -func (t *fr_DZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_DZ' +func (t *fr_DZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_FR/fr_FR.go b/resources/locales/fr_FR/fr_FR.go index 1d24ccb..0841c85 100644 --- a/resources/locales/fr_FR/fr_FR.go +++ b/resources/locales/fr_FR/fr_FR.go @@ -1,6 +1,8 @@ package fr_FR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_FR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_FR' -func (t *fr_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_FR' +func (t *fr_FR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_GA/fr_GA.go b/resources/locales/fr_GA/fr_GA.go index 38bd0cc..bfd22fc 100644 --- a/resources/locales/fr_GA/fr_GA.go +++ b/resources/locales/fr_GA/fr_GA.go @@ -1,6 +1,8 @@ package fr_GA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_GA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_GA' -func (t *fr_GA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_GA' +func (t *fr_GA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_GF/fr_GF.go b/resources/locales/fr_GF/fr_GF.go index 73048b6..693162a 100644 --- a/resources/locales/fr_GF/fr_GF.go +++ b/resources/locales/fr_GF/fr_GF.go @@ -1,6 +1,8 @@ package fr_GF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_GF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_GF' -func (t *fr_GF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_GF' +func (t *fr_GF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_GN/fr_GN.go b/resources/locales/fr_GN/fr_GN.go index 3476c74..16f310d 100644 --- a/resources/locales/fr_GN/fr_GN.go +++ b/resources/locales/fr_GN/fr_GN.go @@ -1,6 +1,8 @@ package fr_GN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_GN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_GN' -func (t *fr_GN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_GN' +func (t *fr_GN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_GP/fr_GP.go b/resources/locales/fr_GP/fr_GP.go index 6d6044e..53cf876 100644 --- a/resources/locales/fr_GP/fr_GP.go +++ b/resources/locales/fr_GP/fr_GP.go @@ -1,6 +1,8 @@ package fr_GP import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_GP) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_GP' -func (t *fr_GP) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_GP' +func (t *fr_GP) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_GQ/fr_GQ.go b/resources/locales/fr_GQ/fr_GQ.go index beea705..f8c6e3f 100644 --- a/resources/locales/fr_GQ/fr_GQ.go +++ b/resources/locales/fr_GQ/fr_GQ.go @@ -1,6 +1,8 @@ package fr_GQ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_GQ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_GQ' -func (t *fr_GQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_GQ' +func (t *fr_GQ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_HT/fr_HT.go b/resources/locales/fr_HT/fr_HT.go index 044c28d..7bc59f0 100644 --- a/resources/locales/fr_HT/fr_HT.go +++ b/resources/locales/fr_HT/fr_HT.go @@ -1,6 +1,8 @@ package fr_HT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_HT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_HT' -func (t *fr_HT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_HT' +func (t *fr_HT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_KM/fr_KM.go b/resources/locales/fr_KM/fr_KM.go index e3a43dd..c9b01d0 100644 --- a/resources/locales/fr_KM/fr_KM.go +++ b/resources/locales/fr_KM/fr_KM.go @@ -1,6 +1,8 @@ package fr_KM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_KM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_KM' -func (t *fr_KM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_KM' +func (t *fr_KM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_LU/fr_LU.go b/resources/locales/fr_LU/fr_LU.go index 0ee2a70..d48cc32 100644 --- a/resources/locales/fr_LU/fr_LU.go +++ b/resources/locales/fr_LU/fr_LU.go @@ -1,6 +1,8 @@ package fr_LU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_LU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_LU' -func (t *fr_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_LU' +func (t *fr_LU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_MA/fr_MA.go b/resources/locales/fr_MA/fr_MA.go index 777c1ab..f2c31d9 100644 --- a/resources/locales/fr_MA/fr_MA.go +++ b/resources/locales/fr_MA/fr_MA.go @@ -1,6 +1,8 @@ package fr_MA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_MA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MA' -func (t *fr_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_MA' +func (t *fr_MA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_MC/fr_MC.go b/resources/locales/fr_MC/fr_MC.go index 9167d1a..4b9f1b6 100644 --- a/resources/locales/fr_MC/fr_MC.go +++ b/resources/locales/fr_MC/fr_MC.go @@ -1,6 +1,8 @@ package fr_MC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_MC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MC' -func (t *fr_MC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_MC' +func (t *fr_MC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_MF/fr_MF.go b/resources/locales/fr_MF/fr_MF.go index ca64376..a505da0 100644 --- a/resources/locales/fr_MF/fr_MF.go +++ b/resources/locales/fr_MF/fr_MF.go @@ -1,6 +1,8 @@ package fr_MF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_MF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MF' -func (t *fr_MF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_MF' +func (t *fr_MF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_MG/fr_MG.go b/resources/locales/fr_MG/fr_MG.go index 9893155..7ef5f01 100644 --- a/resources/locales/fr_MG/fr_MG.go +++ b/resources/locales/fr_MG/fr_MG.go @@ -1,6 +1,8 @@ package fr_MG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_MG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MG' -func (t *fr_MG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_MG' +func (t *fr_MG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_ML/fr_ML.go b/resources/locales/fr_ML/fr_ML.go index dc9d186..e3abc1f 100644 --- a/resources/locales/fr_ML/fr_ML.go +++ b/resources/locales/fr_ML/fr_ML.go @@ -1,6 +1,8 @@ package fr_ML import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_ML) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_ML' -func (t *fr_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_ML' +func (t *fr_ML) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_MQ/fr_MQ.go b/resources/locales/fr_MQ/fr_MQ.go index 4c4cb91..62d215c 100644 --- a/resources/locales/fr_MQ/fr_MQ.go +++ b/resources/locales/fr_MQ/fr_MQ.go @@ -1,6 +1,8 @@ package fr_MQ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_MQ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MQ' -func (t *fr_MQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_MQ' +func (t *fr_MQ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_MR/fr_MR.go b/resources/locales/fr_MR/fr_MR.go index 43248e9..ec652fc 100644 --- a/resources/locales/fr_MR/fr_MR.go +++ b/resources/locales/fr_MR/fr_MR.go @@ -1,6 +1,8 @@ package fr_MR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_MR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MR' -func (t *fr_MR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_MR' +func (t *fr_MR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_MU/fr_MU.go b/resources/locales/fr_MU/fr_MU.go index 5801898..715b72c 100644 --- a/resources/locales/fr_MU/fr_MU.go +++ b/resources/locales/fr_MU/fr_MU.go @@ -1,6 +1,8 @@ package fr_MU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_MU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_MU' -func (t *fr_MU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_MU' +func (t *fr_MU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_NC/fr_NC.go b/resources/locales/fr_NC/fr_NC.go index 18dd0dd..bf877bc 100644 --- a/resources/locales/fr_NC/fr_NC.go +++ b/resources/locales/fr_NC/fr_NC.go @@ -1,6 +1,8 @@ package fr_NC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_NC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_NC' -func (t *fr_NC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_NC' +func (t *fr_NC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_NE/fr_NE.go b/resources/locales/fr_NE/fr_NE.go index 913a2c8..0606e14 100644 --- a/resources/locales/fr_NE/fr_NE.go +++ b/resources/locales/fr_NE/fr_NE.go @@ -1,6 +1,8 @@ package fr_NE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_NE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_NE' -func (t *fr_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_NE' +func (t *fr_NE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_PF/fr_PF.go b/resources/locales/fr_PF/fr_PF.go index 756caaf..6b37d55 100644 --- a/resources/locales/fr_PF/fr_PF.go +++ b/resources/locales/fr_PF/fr_PF.go @@ -1,6 +1,8 @@ package fr_PF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_PF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_PF' -func (t *fr_PF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_PF' +func (t *fr_PF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_PM/fr_PM.go b/resources/locales/fr_PM/fr_PM.go index 75226d7..c1dd028 100644 --- a/resources/locales/fr_PM/fr_PM.go +++ b/resources/locales/fr_PM/fr_PM.go @@ -1,6 +1,8 @@ package fr_PM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_PM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_PM' -func (t *fr_PM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_PM' +func (t *fr_PM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_RE/fr_RE.go b/resources/locales/fr_RE/fr_RE.go index fded84b..2dfa88d 100644 --- a/resources/locales/fr_RE/fr_RE.go +++ b/resources/locales/fr_RE/fr_RE.go @@ -1,6 +1,8 @@ package fr_RE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_RE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_RE' -func (t *fr_RE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_RE' +func (t *fr_RE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_RW/fr_RW.go b/resources/locales/fr_RW/fr_RW.go index 18a3224..fe66e2b 100644 --- a/resources/locales/fr_RW/fr_RW.go +++ b/resources/locales/fr_RW/fr_RW.go @@ -1,6 +1,8 @@ package fr_RW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_RW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_RW' -func (t *fr_RW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_RW' +func (t *fr_RW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_SC/fr_SC.go b/resources/locales/fr_SC/fr_SC.go index fbb2ef7..41d4f1e 100644 --- a/resources/locales/fr_SC/fr_SC.go +++ b/resources/locales/fr_SC/fr_SC.go @@ -1,6 +1,8 @@ package fr_SC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_SC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_SC' -func (t *fr_SC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_SC' +func (t *fr_SC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_SN/fr_SN.go b/resources/locales/fr_SN/fr_SN.go index 672e0b3..e8a3f78 100644 --- a/resources/locales/fr_SN/fr_SN.go +++ b/resources/locales/fr_SN/fr_SN.go @@ -1,6 +1,8 @@ package fr_SN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_SN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_SN' -func (t *fr_SN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_SN' +func (t *fr_SN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_SY/fr_SY.go b/resources/locales/fr_SY/fr_SY.go index 0872081..20efb63 100644 --- a/resources/locales/fr_SY/fr_SY.go +++ b/resources/locales/fr_SY/fr_SY.go @@ -1,6 +1,8 @@ package fr_SY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_SY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_SY' -func (t *fr_SY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_SY' +func (t *fr_SY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_TD/fr_TD.go b/resources/locales/fr_TD/fr_TD.go index af18e29..f3b9159 100644 --- a/resources/locales/fr_TD/fr_TD.go +++ b/resources/locales/fr_TD/fr_TD.go @@ -1,6 +1,8 @@ package fr_TD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_TD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_TD' -func (t *fr_TD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_TD' +func (t *fr_TD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_TG/fr_TG.go b/resources/locales/fr_TG/fr_TG.go index 9ec900a..a1dd1c0 100644 --- a/resources/locales/fr_TG/fr_TG.go +++ b/resources/locales/fr_TG/fr_TG.go @@ -1,6 +1,8 @@ package fr_TG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_TG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_TG' -func (t *fr_TG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_TG' +func (t *fr_TG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_TN/fr_TN.go b/resources/locales/fr_TN/fr_TN.go index 7a0981f..b4fc135 100644 --- a/resources/locales/fr_TN/fr_TN.go +++ b/resources/locales/fr_TN/fr_TN.go @@ -1,6 +1,8 @@ package fr_TN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_TN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_TN' -func (t *fr_TN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_TN' +func (t *fr_TN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_VU/fr_VU.go b/resources/locales/fr_VU/fr_VU.go index 311e11d..959e3ac 100644 --- a/resources/locales/fr_VU/fr_VU.go +++ b/resources/locales/fr_VU/fr_VU.go @@ -1,6 +1,8 @@ package fr_VU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_VU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_VU' -func (t *fr_VU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_VU' +func (t *fr_VU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_WF/fr_WF.go b/resources/locales/fr_WF/fr_WF.go index fe6bea6..930239b 100644 --- a/resources/locales/fr_WF/fr_WF.go +++ b/resources/locales/fr_WF/fr_WF.go @@ -1,6 +1,8 @@ package fr_WF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_WF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_WF' -func (t *fr_WF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_WF' +func (t *fr_WF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fr_YT/fr_YT.go b/resources/locales/fr_YT/fr_YT.go index 1af62c2..392a293 100644 --- a/resources/locales/fr_YT/fr_YT.go +++ b/resources/locales/fr_YT/fr_YT.go @@ -1,6 +1,8 @@ package fr_YT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *fr_YT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fr_YT' -func (t *fr_YT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fr_YT' +func (t *fr_YT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fur/fur.go b/resources/locales/fur/fur.go index b16ee1a..347469c 100644 --- a/resources/locales/fur/fur.go +++ b/resources/locales/fur/fur.go @@ -1,6 +1,8 @@ package fur import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *fur) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fur' -func (t *fur) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fur' +func (t *fur) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fur_IT/fur_IT.go b/resources/locales/fur_IT/fur_IT.go index e296a43..dfe83dd 100644 --- a/resources/locales/fur_IT/fur_IT.go +++ b/resources/locales/fur_IT/fur_IT.go @@ -1,6 +1,8 @@ package fur_IT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *fur_IT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fur_IT' -func (t *fur_IT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fur_IT' +func (t *fur_IT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fy/fy.go b/resources/locales/fy/fy.go index e486030..6786b98 100644 --- a/resources/locales/fy/fy.go +++ b/resources/locales/fy/fy.go @@ -1,6 +1,8 @@ package fy import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *fy) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fy' -func (t *fy) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fy' +func (t *fy) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/fy_NL/fy_NL.go b/resources/locales/fy_NL/fy_NL.go index b959260..291c0fb 100644 --- a/resources/locales/fy_NL/fy_NL.go +++ b/resources/locales/fy_NL/fy_NL.go @@ -1,6 +1,8 @@ package fy_NL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *fy_NL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'fy_NL' -func (t *fy_NL) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'fy_NL' +func (t *fy_NL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ga/ga.go b/resources/locales/ga/ga.go index 66d78c7..4ebd4cb 100644 --- a/resources/locales/ga/ga.go +++ b/resources/locales/ga/ga.go @@ -1,6 +1,8 @@ package ga import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,20 @@ func (t *ga) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ga' -func (t *ga) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ga' +func (t *ga) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n >= 3 && n <= 6 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n >= 7 && n <= 10 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ga_IE/ga_IE.go b/resources/locales/ga_IE/ga_IE.go index d6dc8b4..5162b68 100644 --- a/resources/locales/ga_IE/ga_IE.go +++ b/resources/locales/ga_IE/ga_IE.go @@ -1,6 +1,8 @@ package ga_IE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,20 @@ func (t *ga_IE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ga_IE' -func (t *ga_IE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ga_IE' +func (t *ga_IE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if n >= 3 && n <= 6 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n >= 7 && n <= 10 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gd/gd.go b/resources/locales/gd/gd.go index 39729fd..5f092f6 100644 --- a/resources/locales/gd/gd.go +++ b/resources/locales/gd/gd.go @@ -1,6 +1,8 @@ package gd import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,21 +29,18 @@ func (t *gd) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gd' -func (t *gd) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gd' +func (t *gd) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 || n == 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 || n == 12 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if (n >= 3 && n <= 10) || (n >= 13 && n <= 19) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gd_GB/gd_GB.go b/resources/locales/gd_GB/gd_GB.go index af2106c..e0b5184 100644 --- a/resources/locales/gd_GB/gd_GB.go +++ b/resources/locales/gd_GB/gd_GB.go @@ -1,6 +1,8 @@ package gd_GB import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,21 +29,18 @@ func (t *gd_GB) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gd_GB' -func (t *gd_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gd_GB' +func (t *gd_GB) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 || n == 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 || n == 12 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if (n >= 3 && n <= 10) || (n >= 13 && n <= 19) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gl/gl.go b/resources/locales/gl/gl.go index be9f33f..e4c54c5 100644 --- a/resources/locales/gl/gl.go +++ b/resources/locales/gl/gl.go @@ -1,6 +1,8 @@ package gl import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *gl) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gl' -func (t *gl) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gl' +func (t *gl) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gl_ES/gl_ES.go b/resources/locales/gl_ES/gl_ES.go index c4fdba2..a96aa95 100644 --- a/resources/locales/gl_ES/gl_ES.go +++ b/resources/locales/gl_ES/gl_ES.go @@ -1,6 +1,8 @@ package gl_ES import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *gl_ES) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gl_ES' -func (t *gl_ES) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gl_ES' +func (t *gl_ES) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gsw/gsw.go b/resources/locales/gsw/gsw.go index 23eb441..a1a9df4 100644 --- a/resources/locales/gsw/gsw.go +++ b/resources/locales/gsw/gsw.go @@ -1,6 +1,8 @@ package gsw import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *gsw) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gsw' -func (t *gsw) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gsw' +func (t *gsw) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gsw_CH/gsw_CH.go b/resources/locales/gsw_CH/gsw_CH.go index 15a69db..e33817e 100644 --- a/resources/locales/gsw_CH/gsw_CH.go +++ b/resources/locales/gsw_CH/gsw_CH.go @@ -1,6 +1,8 @@ package gsw_CH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *gsw_CH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gsw_CH' -func (t *gsw_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gsw_CH' +func (t *gsw_CH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gsw_FR/gsw_FR.go b/resources/locales/gsw_FR/gsw_FR.go index d90d48e..f29478d 100644 --- a/resources/locales/gsw_FR/gsw_FR.go +++ b/resources/locales/gsw_FR/gsw_FR.go @@ -1,6 +1,8 @@ package gsw_FR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *gsw_FR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gsw_FR' -func (t *gsw_FR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gsw_FR' +func (t *gsw_FR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gsw_LI/gsw_LI.go b/resources/locales/gsw_LI/gsw_LI.go index c4c6fc9..39fa3ad 100644 --- a/resources/locales/gsw_LI/gsw_LI.go +++ b/resources/locales/gsw_LI/gsw_LI.go @@ -1,6 +1,8 @@ package gsw_LI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *gsw_LI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gsw_LI' -func (t *gsw_LI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gsw_LI' +func (t *gsw_LI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gu/gu.go b/resources/locales/gu/gu.go index e466001..17835f5 100644 --- a/resources/locales/gu/gu.go +++ b/resources/locales/gu/gu.go @@ -1,6 +1,8 @@ package gu import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *gu) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gu' -func (t *gu) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gu' +func (t *gu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gu_IN/gu_IN.go b/resources/locales/gu_IN/gu_IN.go index c725c83..13b9946 100644 --- a/resources/locales/gu_IN/gu_IN.go +++ b/resources/locales/gu_IN/gu_IN.go @@ -1,6 +1,8 @@ package gu_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *gu_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gu_IN' -func (t *gu_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gu_IN' +func (t *gu_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/guz/guz.go b/resources/locales/guz/guz.go index 2aa863f..9383a36 100644 --- a/resources/locales/guz/guz.go +++ b/resources/locales/guz/guz.go @@ -1,6 +1,8 @@ package guz import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *guz) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'guz' -func (t *guz) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'guz' +func (t *guz) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/guz_KE/guz_KE.go b/resources/locales/guz_KE/guz_KE.go index defa9d3..f2635c8 100644 --- a/resources/locales/guz_KE/guz_KE.go +++ b/resources/locales/guz_KE/guz_KE.go @@ -1,6 +1,8 @@ package guz_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *guz_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'guz_KE' -func (t *guz_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'guz_KE' +func (t *guz_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/gv/gv.go b/resources/locales/gv/gv.go index a7244cb..cd6d03f 100644 --- a/resources/locales/gv/gv.go +++ b/resources/locales/gv/gv.go @@ -1,6 +1,8 @@ package gv import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,21 @@ func (t *gv) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gv' -func (t *gv) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gv' +func (t *gv) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if v == 0 && (i%100 == 0 || i%100 == 20 || i%100 == 40 || i%100 == 60 || i%100 == 80) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if v != 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/gv_IM/gv_IM.go b/resources/locales/gv_IM/gv_IM.go index 159e596..9d62fe7 100644 --- a/resources/locales/gv_IM/gv_IM.go +++ b/resources/locales/gv_IM/gv_IM.go @@ -1,6 +1,8 @@ package gv_IM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,25 +29,21 @@ func (t *gv_IM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'gv_IM' -func (t *gv_IM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'gv_IM' +func (t *gv_IM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if v == 0 && (i%100 == 0 || i%100 == 20 || i%100 == 40 || i%100 == 60 || i%100 == 80) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if v != 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ha/ha.go b/resources/locales/ha/ha.go index 21bceb5..66c0b96 100644 --- a/resources/locales/ha/ha.go +++ b/resources/locales/ha/ha.go @@ -1,6 +1,8 @@ package ha import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ha) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ha' -func (t *ha) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ha' +func (t *ha) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ha_GH/ha_GH.go b/resources/locales/ha_GH/ha_GH.go index e556727..12706b4 100644 --- a/resources/locales/ha_GH/ha_GH.go +++ b/resources/locales/ha_GH/ha_GH.go @@ -1,6 +1,8 @@ package ha_GH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ha_GH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ha_GH' -func (t *ha_GH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ha_GH' +func (t *ha_GH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ha_NE/ha_NE.go b/resources/locales/ha_NE/ha_NE.go index f58d678..7bf6043 100644 --- a/resources/locales/ha_NE/ha_NE.go +++ b/resources/locales/ha_NE/ha_NE.go @@ -1,6 +1,8 @@ package ha_NE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ha_NE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ha_NE' -func (t *ha_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ha_NE' +func (t *ha_NE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ha_NG/ha_NG.go b/resources/locales/ha_NG/ha_NG.go index 48ed0c4..b274a67 100644 --- a/resources/locales/ha_NG/ha_NG.go +++ b/resources/locales/ha_NG/ha_NG.go @@ -1,6 +1,8 @@ package ha_NG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ha_NG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ha_NG' -func (t *ha_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ha_NG' +func (t *ha_NG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/haw/haw.go b/resources/locales/haw/haw.go index 0ab494e..f148293 100644 --- a/resources/locales/haw/haw.go +++ b/resources/locales/haw/haw.go @@ -1,6 +1,8 @@ package haw import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *haw) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'haw' -func (t *haw) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'haw' +func (t *haw) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/haw_US/haw_US.go b/resources/locales/haw_US/haw_US.go index 8e20426..cc49ba4 100644 --- a/resources/locales/haw_US/haw_US.go +++ b/resources/locales/haw_US/haw_US.go @@ -1,6 +1,8 @@ package haw_US import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *haw_US) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'haw_US' -func (t *haw_US) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'haw_US' +func (t *haw_US) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/he/he.go b/resources/locales/he/he.go index b8fc4bb..2e98fb0 100644 --- a/resources/locales/he/he.go +++ b/resources/locales/he/he.go @@ -1,6 +1,8 @@ package he import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,28 +29,19 @@ func (t *he) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'he' -func (t *he) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'he' +func (t *he) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if i == 2 && v == 0 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if v == 0 && n < 0 && n > 10 && n%10 == 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/he_IL/he_IL.go b/resources/locales/he_IL/he_IL.go index 3f78471..9c300f3 100644 --- a/resources/locales/he_IL/he_IL.go +++ b/resources/locales/he_IL/he_IL.go @@ -1,6 +1,8 @@ package he_IL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,28 +29,19 @@ func (t *he_IL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'he_IL' -func (t *he_IL) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'he_IL' +func (t *he_IL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if i == 2 && v == 0 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if v == 0 && n < 0 && n > 10 && n%10 == 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hi/hi.go b/resources/locales/hi/hi.go index 6995680..cb9b519 100644 --- a/resources/locales/hi/hi.go +++ b/resources/locales/hi/hi.go @@ -1,6 +1,8 @@ package hi import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *hi) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hi' -func (t *hi) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hi' +func (t *hi) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hi_IN/hi_IN.go b/resources/locales/hi_IN/hi_IN.go index dd99a8a..03e90e7 100644 --- a/resources/locales/hi_IN/hi_IN.go +++ b/resources/locales/hi_IN/hi_IN.go @@ -1,6 +1,8 @@ package hi_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *hi_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hi_IN' -func (t *hi_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hi_IN' +func (t *hi_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hr/hr.go b/resources/locales/hr/hr.go index e0d1918..fa73c11 100644 --- a/resources/locales/hr/hr.go +++ b/resources/locales/hr/hr.go @@ -1,6 +1,8 @@ package hr import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *hr) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hr' -func (t *hr) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hr' +func (t *hr) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hr_BA/hr_BA.go b/resources/locales/hr_BA/hr_BA.go index 1ac6af0..c71cec0 100644 --- a/resources/locales/hr_BA/hr_BA.go +++ b/resources/locales/hr_BA/hr_BA.go @@ -1,6 +1,8 @@ package hr_BA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *hr_BA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hr_BA' -func (t *hr_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hr_BA' +func (t *hr_BA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hr_HR/hr_HR.go b/resources/locales/hr_HR/hr_HR.go index ca5826a..34a1460 100644 --- a/resources/locales/hr_HR/hr_HR.go +++ b/resources/locales/hr_HR/hr_HR.go @@ -1,6 +1,8 @@ package hr_HR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *hr_HR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hr_HR' -func (t *hr_HR) CardinalPluralRule(num string) (locales.PluralRule, error) { - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hr_HR' +func (t *hr_HR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hsb/hsb.go b/resources/locales/hsb/hsb.go index 1308396..5946603 100644 --- a/resources/locales/hsb/hsb.go +++ b/resources/locales/hsb/hsb.go @@ -1,6 +1,8 @@ package hsb import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,28 +29,20 @@ func (t *hsb) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hsb' -func (t *hsb) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hsb' +func (t *hsb) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%100 == 1) || (f%100 == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%100 == 2) || (f%100 == 2) { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if (v == 0 && i%100 >= 3 && i%100 <= 4) || (f%100 >= 3 && f%100 <= 4) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hsb_DE/hsb_DE.go b/resources/locales/hsb_DE/hsb_DE.go index ae51764..c00b765 100644 --- a/resources/locales/hsb_DE/hsb_DE.go +++ b/resources/locales/hsb_DE/hsb_DE.go @@ -1,6 +1,8 @@ package hsb_DE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,28 +29,20 @@ func (t *hsb_DE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hsb_DE' -func (t *hsb_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hsb_DE' +func (t *hsb_DE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%100 == 1) || (f%100 == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%100 == 2) || (f%100 == 2) { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if (v == 0 && i%100 >= 3 && i%100 <= 4) || (f%100 >= 3 && f%100 <= 4) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hu/hu.go b/resources/locales/hu/hu.go index 7c62bf6..f5a71d2 100644 --- a/resources/locales/hu/hu.go +++ b/resources/locales/hu/hu.go @@ -1,6 +1,8 @@ package hu import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *hu) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hu' -func (t *hu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hu' +func (t *hu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hu_HU/hu_HU.go b/resources/locales/hu_HU/hu_HU.go index e124bd6..2b0399e 100644 --- a/resources/locales/hu_HU/hu_HU.go +++ b/resources/locales/hu_HU/hu_HU.go @@ -1,6 +1,8 @@ package hu_HU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *hu_HU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hu_HU' -func (t *hu_HU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hu_HU' +func (t *hu_HU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hy/hy.go b/resources/locales/hy/hy.go index 06f2fd2..ab3c091 100644 --- a/resources/locales/hy/hy.go +++ b/resources/locales/hy/hy.go @@ -1,6 +1,8 @@ package hy import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *hy) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hy' -func (t *hy) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hy' +func (t *hy) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/hy_AM/hy_AM.go b/resources/locales/hy_AM/hy_AM.go index 7fae512..736dff1 100644 --- a/resources/locales/hy_AM/hy_AM.go +++ b/resources/locales/hy_AM/hy_AM.go @@ -1,6 +1,8 @@ package hy_AM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *hy_AM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'hy_AM' -func (t *hy_AM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'hy_AM' +func (t *hy_AM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/id/id.go b/resources/locales/id/id.go index 0596a7d..944007f 100644 --- a/resources/locales/id/id.go +++ b/resources/locales/id/id.go @@ -1,6 +1,8 @@ package id import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *id) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'id' -func (t *id) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'id' +func (t *id) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/id_ID/id_ID.go b/resources/locales/id_ID/id_ID.go index 443c008..e5fca4f 100644 --- a/resources/locales/id_ID/id_ID.go +++ b/resources/locales/id_ID/id_ID.go @@ -1,6 +1,8 @@ package id_ID import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *id_ID) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'id_ID' -func (t *id_ID) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'id_ID' +func (t *id_ID) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ig/ig.go b/resources/locales/ig/ig.go index bdb3269..43ec687 100644 --- a/resources/locales/ig/ig.go +++ b/resources/locales/ig/ig.go @@ -1,6 +1,8 @@ package ig import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ig) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ig' -func (t *ig) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ig' +func (t *ig) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ig_NG/ig_NG.go b/resources/locales/ig_NG/ig_NG.go index b1330af..e7350a8 100644 --- a/resources/locales/ig_NG/ig_NG.go +++ b/resources/locales/ig_NG/ig_NG.go @@ -1,6 +1,8 @@ package ig_NG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ig_NG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ig_NG' -func (t *ig_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ig_NG' +func (t *ig_NG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ii/ii.go b/resources/locales/ii/ii.go index 302c1b8..8d1dcbc 100644 --- a/resources/locales/ii/ii.go +++ b/resources/locales/ii/ii.go @@ -1,6 +1,8 @@ package ii import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ii) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ii' -func (t *ii) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ii' +func (t *ii) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ii_CN/ii_CN.go b/resources/locales/ii_CN/ii_CN.go index b5e3c71..762064b 100644 --- a/resources/locales/ii_CN/ii_CN.go +++ b/resources/locales/ii_CN/ii_CN.go @@ -1,6 +1,8 @@ package ii_CN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ii_CN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ii_CN' -func (t *ii_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ii_CN' +func (t *ii_CN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/is/is.go b/resources/locales/is/is.go index 6a4236a..af3af5b 100644 --- a/resources/locales/is/is.go +++ b/resources/locales/is/is.go @@ -1,6 +1,8 @@ package is import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,16 @@ func (t *is) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'is' -func (t *is) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'is' +func (t *is) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - t, err := locales.T(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + t := locales.T(n, v) if (t == 0 && i%10 == 1 && i%100 != 11) || (t != 0) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/is_IS/is_IS.go b/resources/locales/is_IS/is_IS.go index ab411c4..c160932 100644 --- a/resources/locales/is_IS/is_IS.go +++ b/resources/locales/is_IS/is_IS.go @@ -1,6 +1,8 @@ package is_IS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,16 @@ func (t *is_IS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'is_IS' -func (t *is_IS) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'is_IS' +func (t *is_IS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - t, err := locales.T(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + t := locales.T(n, v) if (t == 0 && i%10 == 1 && i%100 != 11) || (t != 0) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/it/it.go b/resources/locales/it/it.go index a80940e..530727a 100644 --- a/resources/locales/it/it.go +++ b/resources/locales/it/it.go @@ -1,6 +1,8 @@ package it import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *it) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'it' -func (t *it) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'it' +func (t *it) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/it_CH/it_CH.go b/resources/locales/it_CH/it_CH.go index 3c28bdc..5d924ab 100644 --- a/resources/locales/it_CH/it_CH.go +++ b/resources/locales/it_CH/it_CH.go @@ -1,6 +1,8 @@ package it_CH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *it_CH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'it_CH' -func (t *it_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'it_CH' +func (t *it_CH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/it_IT/it_IT.go b/resources/locales/it_IT/it_IT.go index b345bde..3928b8a 100644 --- a/resources/locales/it_IT/it_IT.go +++ b/resources/locales/it_IT/it_IT.go @@ -1,6 +1,8 @@ package it_IT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *it_IT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'it_IT' -func (t *it_IT) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'it_IT' +func (t *it_IT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/it_SM/it_SM.go b/resources/locales/it_SM/it_SM.go index d939a34..d897469 100644 --- a/resources/locales/it_SM/it_SM.go +++ b/resources/locales/it_SM/it_SM.go @@ -1,6 +1,8 @@ package it_SM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *it_SM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'it_SM' -func (t *it_SM) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'it_SM' +func (t *it_SM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ja/ja.go b/resources/locales/ja/ja.go index 1142dc0..76f2a1b 100644 --- a/resources/locales/ja/ja.go +++ b/resources/locales/ja/ja.go @@ -1,6 +1,8 @@ package ja import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ja) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ja' -func (t *ja) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ja' +func (t *ja) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ja_JP/ja_JP.go b/resources/locales/ja_JP/ja_JP.go index 4d15ace..be8f52d 100644 --- a/resources/locales/ja_JP/ja_JP.go +++ b/resources/locales/ja_JP/ja_JP.go @@ -1,6 +1,8 @@ package ja_JP import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ja_JP) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ja_JP' -func (t *ja_JP) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ja_JP' +func (t *ja_JP) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/jgo/jgo.go b/resources/locales/jgo/jgo.go index aa035d8..a0a1cc6 100644 --- a/resources/locales/jgo/jgo.go +++ b/resources/locales/jgo/jgo.go @@ -1,6 +1,8 @@ package jgo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *jgo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'jgo' -func (t *jgo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'jgo' +func (t *jgo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/jgo_CM/jgo_CM.go b/resources/locales/jgo_CM/jgo_CM.go index 8b32f67..c297ec7 100644 --- a/resources/locales/jgo_CM/jgo_CM.go +++ b/resources/locales/jgo_CM/jgo_CM.go @@ -1,6 +1,8 @@ package jgo_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *jgo_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'jgo_CM' -func (t *jgo_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'jgo_CM' +func (t *jgo_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/jmc/jmc.go b/resources/locales/jmc/jmc.go index 9b66c33..27e35a3 100644 --- a/resources/locales/jmc/jmc.go +++ b/resources/locales/jmc/jmc.go @@ -1,6 +1,8 @@ package jmc import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *jmc) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'jmc' -func (t *jmc) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'jmc' +func (t *jmc) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/jmc_TZ/jmc_TZ.go b/resources/locales/jmc_TZ/jmc_TZ.go index 154327f..03ada57 100644 --- a/resources/locales/jmc_TZ/jmc_TZ.go +++ b/resources/locales/jmc_TZ/jmc_TZ.go @@ -1,6 +1,8 @@ package jmc_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *jmc_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'jmc_TZ' -func (t *jmc_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'jmc_TZ' +func (t *jmc_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ka/ka.go b/resources/locales/ka/ka.go index 34d5e30..49ec928 100644 --- a/resources/locales/ka/ka.go +++ b/resources/locales/ka/ka.go @@ -1,6 +1,8 @@ package ka import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ka) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ka' -func (t *ka) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ka' +func (t *ka) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ka_GE/ka_GE.go b/resources/locales/ka_GE/ka_GE.go index 7c7a5a4..bfcad87 100644 --- a/resources/locales/ka_GE/ka_GE.go +++ b/resources/locales/ka_GE/ka_GE.go @@ -1,6 +1,8 @@ package ka_GE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ka_GE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ka_GE' -func (t *ka_GE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ka_GE' +func (t *ka_GE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kab/kab.go b/resources/locales/kab/kab.go index 61b866a..4ce1e1e 100644 --- a/resources/locales/kab/kab.go +++ b/resources/locales/kab/kab.go @@ -1,6 +1,8 @@ package kab import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *kab) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kab' -func (t *kab) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kab' +func (t *kab) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kab_DZ/kab_DZ.go b/resources/locales/kab_DZ/kab_DZ.go index 4beba1d..f214d88 100644 --- a/resources/locales/kab_DZ/kab_DZ.go +++ b/resources/locales/kab_DZ/kab_DZ.go @@ -1,6 +1,8 @@ package kab_DZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,15 @@ func (t *kab_DZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kab_DZ' -func (t *kab_DZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kab_DZ' +func (t *kab_DZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 0 || i == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kam/kam.go b/resources/locales/kam/kam.go index 51ab726..4932fa0 100644 --- a/resources/locales/kam/kam.go +++ b/resources/locales/kam/kam.go @@ -1,6 +1,8 @@ package kam import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *kam) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kam' -func (t *kam) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kam' +func (t *kam) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/kam_KE/kam_KE.go b/resources/locales/kam_KE/kam_KE.go index 18ffff7..acb32bd 100644 --- a/resources/locales/kam_KE/kam_KE.go +++ b/resources/locales/kam_KE/kam_KE.go @@ -1,6 +1,8 @@ package kam_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *kam_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kam_KE' -func (t *kam_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kam_KE' +func (t *kam_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/kde/kde.go b/resources/locales/kde/kde.go index f213053..0e4b96c 100644 --- a/resources/locales/kde/kde.go +++ b/resources/locales/kde/kde.go @@ -1,6 +1,8 @@ package kde import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *kde) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kde' -func (t *kde) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kde' +func (t *kde) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kde_TZ/kde_TZ.go b/resources/locales/kde_TZ/kde_TZ.go index d889b71..b90744a 100644 --- a/resources/locales/kde_TZ/kde_TZ.go +++ b/resources/locales/kde_TZ/kde_TZ.go @@ -1,6 +1,8 @@ package kde_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *kde_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kde_TZ' -func (t *kde_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kde_TZ' +func (t *kde_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kea/kea.go b/resources/locales/kea/kea.go index a81436a..657a587 100644 --- a/resources/locales/kea/kea.go +++ b/resources/locales/kea/kea.go @@ -1,6 +1,8 @@ package kea import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *kea) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kea' -func (t *kea) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kea' +func (t *kea) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kea_CV/kea_CV.go b/resources/locales/kea_CV/kea_CV.go index d58a497..14c0775 100644 --- a/resources/locales/kea_CV/kea_CV.go +++ b/resources/locales/kea_CV/kea_CV.go @@ -1,6 +1,8 @@ package kea_CV import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *kea_CV) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kea_CV' -func (t *kea_CV) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kea_CV' +func (t *kea_CV) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/khq/khq.go b/resources/locales/khq/khq.go index 5257dbe..6fdbacf 100644 --- a/resources/locales/khq/khq.go +++ b/resources/locales/khq/khq.go @@ -1,6 +1,8 @@ package khq import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *khq) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'khq' -func (t *khq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'khq' +func (t *khq) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/khq_ML/khq_ML.go b/resources/locales/khq_ML/khq_ML.go index 6c84373..9fd649f 100644 --- a/resources/locales/khq_ML/khq_ML.go +++ b/resources/locales/khq_ML/khq_ML.go @@ -1,6 +1,8 @@ package khq_ML import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *khq_ML) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'khq_ML' -func (t *khq_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'khq_ML' +func (t *khq_ML) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ki/ki.go b/resources/locales/ki/ki.go index d976cef..826cb2b 100644 --- a/resources/locales/ki/ki.go +++ b/resources/locales/ki/ki.go @@ -1,6 +1,8 @@ package ki import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *ki) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ki' -func (t *ki) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ki' +func (t *ki) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ki_KE/ki_KE.go b/resources/locales/ki_KE/ki_KE.go index 334dce4..121c56f 100644 --- a/resources/locales/ki_KE/ki_KE.go +++ b/resources/locales/ki_KE/ki_KE.go @@ -1,6 +1,8 @@ package ki_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *ki_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ki_KE' -func (t *ki_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ki_KE' +func (t *ki_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/kk/kk.go b/resources/locales/kk/kk.go index b295094..baf0a6b 100644 --- a/resources/locales/kk/kk.go +++ b/resources/locales/kk/kk.go @@ -1,6 +1,8 @@ package kk import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *kk) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kk' -func (t *kk) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kk' +func (t *kk) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kk_KZ/kk_KZ.go b/resources/locales/kk_KZ/kk_KZ.go index 9b12cfc..62c457d 100644 --- a/resources/locales/kk_KZ/kk_KZ.go +++ b/resources/locales/kk_KZ/kk_KZ.go @@ -1,6 +1,8 @@ package kk_KZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *kk_KZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kk_KZ' -func (t *kk_KZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kk_KZ' +func (t *kk_KZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kkj/kkj.go b/resources/locales/kkj/kkj.go index 9f5aeca..c662fb2 100644 --- a/resources/locales/kkj/kkj.go +++ b/resources/locales/kkj/kkj.go @@ -1,6 +1,8 @@ package kkj import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *kkj) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kkj' -func (t *kkj) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kkj' +func (t *kkj) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kkj_CM/kkj_CM.go b/resources/locales/kkj_CM/kkj_CM.go index 966c9a3..6c5ec23 100644 --- a/resources/locales/kkj_CM/kkj_CM.go +++ b/resources/locales/kkj_CM/kkj_CM.go @@ -1,6 +1,8 @@ package kkj_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *kkj_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kkj_CM' -func (t *kkj_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kkj_CM' +func (t *kkj_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kl/kl.go b/resources/locales/kl/kl.go index f097d2a..b0798ad 100644 --- a/resources/locales/kl/kl.go +++ b/resources/locales/kl/kl.go @@ -1,6 +1,8 @@ package kl import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *kl) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kl' -func (t *kl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kl' +func (t *kl) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kl_GL/kl_GL.go b/resources/locales/kl_GL/kl_GL.go index 39197ee..8b72976 100644 --- a/resources/locales/kl_GL/kl_GL.go +++ b/resources/locales/kl_GL/kl_GL.go @@ -1,6 +1,8 @@ package kl_GL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *kl_GL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kl_GL' -func (t *kl_GL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kl_GL' +func (t *kl_GL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kln/kln.go b/resources/locales/kln/kln.go index e2ee9b8..4d0adf8 100644 --- a/resources/locales/kln/kln.go +++ b/resources/locales/kln/kln.go @@ -1,6 +1,8 @@ package kln import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *kln) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kln' -func (t *kln) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kln' +func (t *kln) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/kln_KE/kln_KE.go b/resources/locales/kln_KE/kln_KE.go index 3a59b9b..697e5d7 100644 --- a/resources/locales/kln_KE/kln_KE.go +++ b/resources/locales/kln_KE/kln_KE.go @@ -1,6 +1,8 @@ package kln_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *kln_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kln_KE' -func (t *kln_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kln_KE' +func (t *kln_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/km/km.go b/resources/locales/km/km.go index 7d9a895..4d4637d 100644 --- a/resources/locales/km/km.go +++ b/resources/locales/km/km.go @@ -1,6 +1,8 @@ package km import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *km) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'km' -func (t *km) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'km' +func (t *km) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/km_KH/km_KH.go b/resources/locales/km_KH/km_KH.go index e4c94c2..76a09ff 100644 --- a/resources/locales/km_KH/km_KH.go +++ b/resources/locales/km_KH/km_KH.go @@ -1,6 +1,8 @@ package km_KH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *km_KH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'km_KH' -func (t *km_KH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'km_KH' +func (t *km_KH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kn/kn.go b/resources/locales/kn/kn.go index e3484ff..c3524f3 100644 --- a/resources/locales/kn/kn.go +++ b/resources/locales/kn/kn.go @@ -1,6 +1,8 @@ package kn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *kn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kn' -func (t *kn) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kn' +func (t *kn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kn_IN/kn_IN.go b/resources/locales/kn_IN/kn_IN.go index a28e9ab..c2f3f54 100644 --- a/resources/locales/kn_IN/kn_IN.go +++ b/resources/locales/kn_IN/kn_IN.go @@ -1,6 +1,8 @@ package kn_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *kn_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kn_IN' -func (t *kn_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kn_IN' +func (t *kn_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ko/ko.go b/resources/locales/ko/ko.go index e46b2dc..d309fef 100644 --- a/resources/locales/ko/ko.go +++ b/resources/locales/ko/ko.go @@ -1,6 +1,8 @@ package ko import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ko) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ko' -func (t *ko) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ko' +func (t *ko) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ko_KP/ko_KP.go b/resources/locales/ko_KP/ko_KP.go index e4e0b83..c0d1462 100644 --- a/resources/locales/ko_KP/ko_KP.go +++ b/resources/locales/ko_KP/ko_KP.go @@ -1,6 +1,8 @@ package ko_KP import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ko_KP) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ko_KP' -func (t *ko_KP) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ko_KP' +func (t *ko_KP) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ko_KR/ko_KR.go b/resources/locales/ko_KR/ko_KR.go index d24be91..93dec54 100644 --- a/resources/locales/ko_KR/ko_KR.go +++ b/resources/locales/ko_KR/ko_KR.go @@ -1,6 +1,8 @@ package ko_KR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ko_KR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ko_KR' -func (t *ko_KR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ko_KR' +func (t *ko_KR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kok/kok.go b/resources/locales/kok/kok.go index 79f5295..477bc1b 100644 --- a/resources/locales/kok/kok.go +++ b/resources/locales/kok/kok.go @@ -1,6 +1,8 @@ package kok import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *kok) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kok' -func (t *kok) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kok' +func (t *kok) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/kok_IN/kok_IN.go b/resources/locales/kok_IN/kok_IN.go index 9bf91ee..cf4fd62 100644 --- a/resources/locales/kok_IN/kok_IN.go +++ b/resources/locales/kok_IN/kok_IN.go @@ -1,6 +1,8 @@ package kok_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *kok_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kok_IN' -func (t *kok_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kok_IN' +func (t *kok_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ks/ks.go b/resources/locales/ks/ks.go index 6c447e4..e2cf610 100644 --- a/resources/locales/ks/ks.go +++ b/resources/locales/ks/ks.go @@ -1,6 +1,8 @@ package ks import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ks) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ks' -func (t *ks) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ks' +func (t *ks) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ks_IN/ks_IN.go b/resources/locales/ks_IN/ks_IN.go index ecd5aee..ebb3135 100644 --- a/resources/locales/ks_IN/ks_IN.go +++ b/resources/locales/ks_IN/ks_IN.go @@ -1,6 +1,8 @@ package ks_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ks_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ks_IN' -func (t *ks_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ks_IN' +func (t *ks_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ksb/ksb.go b/resources/locales/ksb/ksb.go index 6c0110e..48bc3b4 100644 --- a/resources/locales/ksb/ksb.go +++ b/resources/locales/ksb/ksb.go @@ -1,6 +1,8 @@ package ksb import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ksb) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ksb' -func (t *ksb) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ksb' +func (t *ksb) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ksb_TZ/ksb_TZ.go b/resources/locales/ksb_TZ/ksb_TZ.go index 6c5be17..90059f0 100644 --- a/resources/locales/ksb_TZ/ksb_TZ.go +++ b/resources/locales/ksb_TZ/ksb_TZ.go @@ -1,6 +1,8 @@ package ksb_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ksb_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ksb_TZ' -func (t *ksb_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ksb_TZ' +func (t *ksb_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ksf/ksf.go b/resources/locales/ksf/ksf.go index 8776e27..7184680 100644 --- a/resources/locales/ksf/ksf.go +++ b/resources/locales/ksf/ksf.go @@ -1,6 +1,8 @@ package ksf import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *ksf) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ksf' -func (t *ksf) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ksf' +func (t *ksf) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ksf_CM/ksf_CM.go b/resources/locales/ksf_CM/ksf_CM.go index 4685511..1fd162c 100644 --- a/resources/locales/ksf_CM/ksf_CM.go +++ b/resources/locales/ksf_CM/ksf_CM.go @@ -1,6 +1,8 @@ package ksf_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *ksf_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ksf_CM' -func (t *ksf_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ksf_CM' +func (t *ksf_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ksh/ksh.go b/resources/locales/ksh/ksh.go index 78f9296..a33d4ed 100644 --- a/resources/locales/ksh/ksh.go +++ b/resources/locales/ksh/ksh.go @@ -1,6 +1,8 @@ package ksh import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *ksh) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ksh' -func (t *ksh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ksh' +func (t *ksh) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ksh_DE/ksh_DE.go b/resources/locales/ksh_DE/ksh_DE.go index a2ef03b..d38467d 100644 --- a/resources/locales/ksh_DE/ksh_DE.go +++ b/resources/locales/ksh_DE/ksh_DE.go @@ -1,6 +1,8 @@ package ksh_DE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *ksh_DE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ksh_DE' -func (t *ksh_DE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ksh_DE' +func (t *ksh_DE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kw/kw.go b/resources/locales/kw/kw.go index 2b68467..b7e27ce 100644 --- a/resources/locales/kw/kw.go +++ b/resources/locales/kw/kw.go @@ -1,6 +1,8 @@ package kw import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *kw) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kw' -func (t *kw) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kw' +func (t *kw) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/kw_GB/kw_GB.go b/resources/locales/kw_GB/kw_GB.go index 1907dd5..2c88eba 100644 --- a/resources/locales/kw_GB/kw_GB.go +++ b/resources/locales/kw_GB/kw_GB.go @@ -1,6 +1,8 @@ package kw_GB import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *kw_GB) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'kw_GB' -func (t *kw_GB) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kw_GB' +func (t *kw_GB) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ky/ky.go b/resources/locales/ky/ky.go index a6592d6..ad74c26 100644 --- a/resources/locales/ky/ky.go +++ b/resources/locales/ky/ky.go @@ -1,6 +1,8 @@ package ky import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ky) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ky' -func (t *ky) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ky' +func (t *ky) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ky_KG/ky_KG.go b/resources/locales/ky_KG/ky_KG.go index 94df6ab..b435598 100644 --- a/resources/locales/ky_KG/ky_KG.go +++ b/resources/locales/ky_KG/ky_KG.go @@ -1,6 +1,8 @@ package ky_KG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ky_KG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ky_KG' -func (t *ky_KG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ky_KG' +func (t *ky_KG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lag/lag.go b/resources/locales/lag/lag.go index 54f11e7..37d9297 100644 --- a/resources/locales/lag/lag.go +++ b/resources/locales/lag/lag.go @@ -1,6 +1,8 @@ package lag import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,17 @@ func (t *lag) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lag' -func (t *lag) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lag' +func (t *lag) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if (i == 0 || i == 1) && n != 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lag_TZ/lag_TZ.go b/resources/locales/lag_TZ/lag_TZ.go index d2937cf..fcd27e6 100644 --- a/resources/locales/lag_TZ/lag_TZ.go +++ b/resources/locales/lag_TZ/lag_TZ.go @@ -1,6 +1,8 @@ package lag_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,17 @@ func (t *lag_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lag_TZ' -func (t *lag_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lag_TZ' +func (t *lag_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if n == 0 { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if (i == 0 || i == 1) && n != 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lb/lb.go b/resources/locales/lb/lb.go index fdd9b41..114f4aa 100644 --- a/resources/locales/lb/lb.go +++ b/resources/locales/lb/lb.go @@ -1,6 +1,8 @@ package lb import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *lb) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lb' -func (t *lb) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lb' +func (t *lb) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lb_LU/lb_LU.go b/resources/locales/lb_LU/lb_LU.go index 8f01c53..d0be2e9 100644 --- a/resources/locales/lb_LU/lb_LU.go +++ b/resources/locales/lb_LU/lb_LU.go @@ -1,6 +1,8 @@ package lb_LU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *lb_LU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lb_LU' -func (t *lb_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lb_LU' +func (t *lb_LU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lg/lg.go b/resources/locales/lg/lg.go index 656bfdd..e86db19 100644 --- a/resources/locales/lg/lg.go +++ b/resources/locales/lg/lg.go @@ -1,6 +1,8 @@ package lg import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *lg) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lg' -func (t *lg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lg' +func (t *lg) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lg_UG/lg_UG.go b/resources/locales/lg_UG/lg_UG.go index 87c6545..f0b3dd4 100644 --- a/resources/locales/lg_UG/lg_UG.go +++ b/resources/locales/lg_UG/lg_UG.go @@ -1,6 +1,8 @@ package lg_UG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *lg_UG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lg_UG' -func (t *lg_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lg_UG' +func (t *lg_UG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lkt/lkt.go b/resources/locales/lkt/lkt.go index 9d16e6e..7812a35 100644 --- a/resources/locales/lkt/lkt.go +++ b/resources/locales/lkt/lkt.go @@ -1,6 +1,8 @@ package lkt import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *lkt) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lkt' -func (t *lkt) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lkt' +func (t *lkt) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lkt_US/lkt_US.go b/resources/locales/lkt_US/lkt_US.go index bfd5606..83e20b0 100644 --- a/resources/locales/lkt_US/lkt_US.go +++ b/resources/locales/lkt_US/lkt_US.go @@ -1,6 +1,8 @@ package lkt_US import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *lkt_US) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lkt_US' -func (t *lkt_US) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lkt_US' +func (t *lkt_US) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ln/ln.go b/resources/locales/ln/ln.go index 04ae958..6741b0c 100644 --- a/resources/locales/ln/ln.go +++ b/resources/locales/ln/ln.go @@ -1,6 +1,8 @@ package ln import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ln) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ln' -func (t *ln) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ln' +func (t *ln) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ln_AO/ln_AO.go b/resources/locales/ln_AO/ln_AO.go index 0e4c963..583d77e 100644 --- a/resources/locales/ln_AO/ln_AO.go +++ b/resources/locales/ln_AO/ln_AO.go @@ -1,6 +1,8 @@ package ln_AO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ln_AO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ln_AO' -func (t *ln_AO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ln_AO' +func (t *ln_AO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ln_CD/ln_CD.go b/resources/locales/ln_CD/ln_CD.go index 5ae22b4..9023353 100644 --- a/resources/locales/ln_CD/ln_CD.go +++ b/resources/locales/ln_CD/ln_CD.go @@ -1,6 +1,8 @@ package ln_CD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ln_CD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ln_CD' -func (t *ln_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ln_CD' +func (t *ln_CD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ln_CF/ln_CF.go b/resources/locales/ln_CF/ln_CF.go index c01c752..0a1a215 100644 --- a/resources/locales/ln_CF/ln_CF.go +++ b/resources/locales/ln_CF/ln_CF.go @@ -1,6 +1,8 @@ package ln_CF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ln_CF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ln_CF' -func (t *ln_CF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ln_CF' +func (t *ln_CF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ln_CG/ln_CG.go b/resources/locales/ln_CG/ln_CG.go index 72ad83d..5d59af5 100644 --- a/resources/locales/ln_CG/ln_CG.go +++ b/resources/locales/ln_CG/ln_CG.go @@ -1,6 +1,8 @@ package ln_CG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ln_CG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ln_CG' -func (t *ln_CG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ln_CG' +func (t *ln_CG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lo/lo.go b/resources/locales/lo/lo.go index e862bcb..c804f35 100644 --- a/resources/locales/lo/lo.go +++ b/resources/locales/lo/lo.go @@ -1,6 +1,8 @@ package lo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *lo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lo' -func (t *lo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lo' +func (t *lo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lo_LA/lo_LA.go b/resources/locales/lo_LA/lo_LA.go index 99db8d0..9f0be36 100644 --- a/resources/locales/lo_LA/lo_LA.go +++ b/resources/locales/lo_LA/lo_LA.go @@ -1,6 +1,8 @@ package lo_LA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *lo_LA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lo_LA' -func (t *lo_LA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lo_LA' +func (t *lo_LA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/locale_info.go b/resources/locales/locale_info.go index 77ea695..1397410 100644 --- a/resources/locales/locale_info.go +++ b/resources/locales/locale_info.go @@ -1,24 +1,20 @@ package locales -import ( - "fmt" - "strconv" - "strings" -) +import "strconv" -// ErrBadNumberValue is returned when the number passed for -// plural rule determination cannot be parsed -type ErrBadNumberValue struct { - NumberValue string - InnerError error -} +// // ErrBadNumberValue is returned when the number passed for +// // plural rule determination cannot be parsed +// type ErrBadNumberValue struct { +// NumberValue string +// InnerError error +// } -// Error returns ErrBadNumberValue error string -func (e *ErrBadNumberValue) Error() string { - return fmt.Sprintf("Invalid Number Value '%s' %s", e.NumberValue, e.InnerError) -} +// // Error returns ErrBadNumberValue error string +// func (e *ErrBadNumberValue) Error() string { +// return fmt.Sprintf("Invalid Number Value '%s' %s", e.NumberValue, e.InnerError) +// } -var _ error = new(ErrBadNumberValue) +// var _ error = new(ErrBadNumberValue) // PluralRule denotes the type of plural rules type PluralRule int @@ -47,10 +43,6 @@ type Translator interface { // Plurals returns an array of plural rules associated // with this translator Plurals() []PluralRule - - // CardinalPluralRule returns the plural rule needed - // determined by the provided 'num' variable - CardinalPluralRule(num string) (PluralRule, error) } // String returns the string value of PluralRule @@ -74,107 +66,119 @@ func (p PluralRule) String() string { } } -// N returns the absolute value of the source number (integer and decimals). -func N(num string) (float64, error) { - - if num[0] == '-' { - num = num[1:] - } - - f, err := strconv.ParseFloat(num, 64) - if err != nil { - return 0, err - } - - return f, nil -} - -// I returns the integer digits of N. -func I(num string) (int64, error) { - - i, err := strconv.ParseInt(num, 10, 64) - if err != nil { - return 0, err - } - - return i, nil -} - -// V returns the number of visible fraction digits in N, with trailing zeros. -func V(num string) (v int64) { - - idx := strings.Index(num, ".") - - if idx != -1 { - v = int64(len(num[idx+1:])) - } - - return -} +// +// Precision Notes: +// +// must specify a precision >= 0, and here is why https://play.golang.org/p/LyL90U0Vyh +// +// v := float64(3.141) +// i := float64(int64(v)) +// +// fmt.Println(v - i) +// +// or +// +// s := strconv.FormatFloat(v-i, 'f', -1, 64) +// fmt.Println(s) +// +// these will not print what you'd expect: 0.14100000000000001 +// and so this library requires a precision to be specified, or +// inaccurate plural rules could be applied. +// +// +// +// n - absolute value of the source number (integer and decimals). +// i - integer digits of n. +// v - number of visible fraction digits in n, with trailing zeros. +// w - number of visible fraction digits in n, without trailing zeros. +// f - visible fractional digits in n, with trailing zeros. +// t - visible fractional digits in n, without trailing zeros. +// +// +// Func(num float64, v uint64) // v = digits/precision and prevents -1 as a special case as this can lead to very unexpected behaviour, see precision note's above. +// +// n := math.Abs(num) +// i := int64(n) +// v := v +// +// +// w := strconv.FormatFloat(num-float64(i), 'f', int(v), 64) // then parse backwards on string until no more zero's.... +// f := strconv.FormatFloat(n, 'f', int(v), 64) // then turn everything after decimal into an int64 +// t := strconv.FormatFloat(n, 'f', int(v), 64) // then parse backwards on string until no more zero's.... +// +// +// +// General Inclusion Rules +// - v will always be available inherently +// - all require n +// - w requires i +// // W returns the number of visible fraction digits in N, without trailing zeros. -func W(num string) (w int64, err error) { +func W(n float64, v uint64) (w int64) { - idx := strings.Index(num, ".") + s := strconv.FormatFloat(n-float64(int64(n)), 'f', int(v), 64) - if idx != -1 { + // with either be '0' or '0.xxxx', so if 1 then w will be zero + // otherwise need to parse + if len(s) != 1 { - idx++ - end := len(num[idx:]) + 1 + s = s[2:] + end := len(s) + 1 for i := end; i >= 0; i-- { - if num[i] != '0' { + if s[i] != '0' { end = i + 1 break } } - w = int64(len(num[idx:end])) + w = int64(len(s[:end])) } - return w, nil + return } // F returns the visible fractional digits in N, with trailing zeros. -func F(num string) (w int64, err error) { +func F(n float64, v uint64) (f int64) { - idx := strings.Index(num, ".") + s := strconv.FormatFloat(n-float64(int64(n)), 'f', int(v), 64) - if idx != -1 { + // with either be '0' or '0.xxxx', so if 1 then f will be zero + // otherwise need to parse + if len(s) != 1 { - w, err = strconv.ParseInt(num[idx+1:], 10, 64) - if err != nil { - return - } + // ignoring error, because it can't fail as we generated + // the string internally from a real number + f, _ = strconv.ParseInt(s[2:], 10, 64) } return } // T returns the visible fractional digits in N, without trailing zeros. -func T(num string) (t int64, err error) { +func T(n float64, v uint64) (t int64) { - idx := strings.Index(num, ".") + s := strconv.FormatFloat(n-float64(int64(n)), 'f', int(v), 64) - if idx != -1 { + // with either be '0' or '0.xxxx', so if 1 then t will be zero + // otherwise need to parse + if len(s) != 1 { - idx++ - end := len(num[idx:]) + 1 + s = s[2:] + end := len(s) + 1 for i := end; i >= 0; i-- { - if num[i] != '0' { + if s[i] != '0' { end = i + 1 break } } - t, err = strconv.ParseInt(num[idx:end], 10, 64) - if err != nil { - return - } - - t = int64(t) + // ignoring error, because it can't fail as we generated + // the string internally from a real number + t, _ = strconv.ParseInt(s[:end], 10, 64) } - return t, nil + return } diff --git a/resources/locales/lrc/lrc.go b/resources/locales/lrc/lrc.go index 07ac99f..6c24f93 100644 --- a/resources/locales/lrc/lrc.go +++ b/resources/locales/lrc/lrc.go @@ -1,6 +1,8 @@ package lrc import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *lrc) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lrc' -func (t *lrc) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lrc' +func (t *lrc) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/lrc_IQ/lrc_IQ.go b/resources/locales/lrc_IQ/lrc_IQ.go index cddcd02..85a4d3e 100644 --- a/resources/locales/lrc_IQ/lrc_IQ.go +++ b/resources/locales/lrc_IQ/lrc_IQ.go @@ -1,6 +1,8 @@ package lrc_IQ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *lrc_IQ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lrc_IQ' -func (t *lrc_IQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lrc_IQ' +func (t *lrc_IQ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/lrc_IR/lrc_IR.go b/resources/locales/lrc_IR/lrc_IR.go index c0b623d..94d2196 100644 --- a/resources/locales/lrc_IR/lrc_IR.go +++ b/resources/locales/lrc_IR/lrc_IR.go @@ -1,6 +1,8 @@ package lrc_IR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *lrc_IR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lrc_IR' -func (t *lrc_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lrc_IR' +func (t *lrc_IR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/lt/lt.go b/resources/locales/lt/lt.go index 9da0bc6..68a30ad 100644 --- a/resources/locales/lt/lt.go +++ b/resources/locales/lt/lt.go @@ -1,6 +1,8 @@ package lt import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,19 @@ func (t *lt) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lt' -func (t *lt) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lt' +func (t *lt) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + f := locales.F(n, v) if n%10 == 1 && n%100 < 11 && n%100 > 19 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n%10 >= 2 && n%10 <= 9 && n%100 < 11 && n%100 > 19 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if f != 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lt_LT/lt_LT.go b/resources/locales/lt_LT/lt_LT.go index 238be80..3e18db6 100644 --- a/resources/locales/lt_LT/lt_LT.go +++ b/resources/locales/lt_LT/lt_LT.go @@ -1,6 +1,8 @@ package lt_LT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,19 @@ func (t *lt_LT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lt_LT' -func (t *lt_LT) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lt_LT' +func (t *lt_LT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + f := locales.F(n, v) if n%10 == 1 && n%100 < 11 && n%100 > 19 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n%10 >= 2 && n%10 <= 9 && n%100 < 11 && n%100 > 19 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if f != 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lu/lu.go b/resources/locales/lu/lu.go index 0463c4d..27b62d8 100644 --- a/resources/locales/lu/lu.go +++ b/resources/locales/lu/lu.go @@ -1,6 +1,8 @@ package lu import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *lu) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lu' -func (t *lu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lu' +func (t *lu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/lu_CD/lu_CD.go b/resources/locales/lu_CD/lu_CD.go index c8ccf30..343b6d4 100644 --- a/resources/locales/lu_CD/lu_CD.go +++ b/resources/locales/lu_CD/lu_CD.go @@ -1,6 +1,8 @@ package lu_CD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *lu_CD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lu_CD' -func (t *lu_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lu_CD' +func (t *lu_CD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/luo/luo.go b/resources/locales/luo/luo.go index a406ba7..a21bcc3 100644 --- a/resources/locales/luo/luo.go +++ b/resources/locales/luo/luo.go @@ -1,6 +1,8 @@ package luo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *luo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'luo' -func (t *luo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'luo' +func (t *luo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/luo_KE/luo_KE.go b/resources/locales/luo_KE/luo_KE.go index 77a8006..69eaae9 100644 --- a/resources/locales/luo_KE/luo_KE.go +++ b/resources/locales/luo_KE/luo_KE.go @@ -1,6 +1,8 @@ package luo_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *luo_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'luo_KE' -func (t *luo_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'luo_KE' +func (t *luo_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/luy/luy.go b/resources/locales/luy/luy.go index 16db39b..7837157 100644 --- a/resources/locales/luy/luy.go +++ b/resources/locales/luy/luy.go @@ -1,6 +1,8 @@ package luy import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *luy) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'luy' -func (t *luy) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'luy' +func (t *luy) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/luy_KE/luy_KE.go b/resources/locales/luy_KE/luy_KE.go index 20b1269..9e1c4f5 100644 --- a/resources/locales/luy_KE/luy_KE.go +++ b/resources/locales/luy_KE/luy_KE.go @@ -1,6 +1,8 @@ package luy_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *luy_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'luy_KE' -func (t *luy_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'luy_KE' +func (t *luy_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/lv/lv.go b/resources/locales/lv/lv.go index 680b812..e0f4045 100644 --- a/resources/locales/lv/lv.go +++ b/resources/locales/lv/lv.go @@ -1,6 +1,8 @@ package lv import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,17 @@ func (t *lv) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lv' -func (t *lv) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lv' +func (t *lv) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + f := locales.F(n, v) if (n%10 == 0) || (n%100 >= 11 && n%100 <= 19) || (v == 2 && f%100 >= 11 && f%100 <= 19) { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if (n%10 == 1 && n%100 != 11) || (v == 2 && f%10 == 1 && f%100 != 11) || (v != 2 && f%10 == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/lv_LV/lv_LV.go b/resources/locales/lv_LV/lv_LV.go index 6f16268..a4f56c2 100644 --- a/resources/locales/lv_LV/lv_LV.go +++ b/resources/locales/lv_LV/lv_LV.go @@ -1,6 +1,8 @@ package lv_LV import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,17 @@ func (t *lv_LV) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'lv_LV' -func (t *lv_LV) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lv_LV' +func (t *lv_LV) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + f := locales.F(n, v) if (n%10 == 0) || (n%100 >= 11 && n%100 <= 19) || (v == 2 && f%100 >= 11 && f%100 <= 19) { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if (n%10 == 1 && n%100 != 11) || (v == 2 && f%10 == 1 && f%100 != 11) || (v != 2 && f%10 == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mas/mas.go b/resources/locales/mas/mas.go index 722b839..259a2df 100644 --- a/resources/locales/mas/mas.go +++ b/resources/locales/mas/mas.go @@ -1,6 +1,8 @@ package mas import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *mas) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mas' -func (t *mas) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mas' +func (t *mas) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mas_KE/mas_KE.go b/resources/locales/mas_KE/mas_KE.go index 9235527..2eedac4 100644 --- a/resources/locales/mas_KE/mas_KE.go +++ b/resources/locales/mas_KE/mas_KE.go @@ -1,6 +1,8 @@ package mas_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *mas_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mas_KE' -func (t *mas_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mas_KE' +func (t *mas_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mas_TZ/mas_TZ.go b/resources/locales/mas_TZ/mas_TZ.go index 3b6640e..c3c4e38 100644 --- a/resources/locales/mas_TZ/mas_TZ.go +++ b/resources/locales/mas_TZ/mas_TZ.go @@ -1,6 +1,8 @@ package mas_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *mas_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mas_TZ' -func (t *mas_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mas_TZ' +func (t *mas_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mer/mer.go b/resources/locales/mer/mer.go index b1e8952..a7d83cb 100644 --- a/resources/locales/mer/mer.go +++ b/resources/locales/mer/mer.go @@ -1,6 +1,8 @@ package mer import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *mer) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mer' -func (t *mer) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mer' +func (t *mer) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mer_KE/mer_KE.go b/resources/locales/mer_KE/mer_KE.go index 7ccc2a9..58a4c72 100644 --- a/resources/locales/mer_KE/mer_KE.go +++ b/resources/locales/mer_KE/mer_KE.go @@ -1,6 +1,8 @@ package mer_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *mer_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mer_KE' -func (t *mer_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mer_KE' +func (t *mer_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mfe/mfe.go b/resources/locales/mfe/mfe.go index e3d8b0e..868496d 100644 --- a/resources/locales/mfe/mfe.go +++ b/resources/locales/mfe/mfe.go @@ -1,6 +1,8 @@ package mfe import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *mfe) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mfe' -func (t *mfe) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mfe' +func (t *mfe) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mfe_MU/mfe_MU.go b/resources/locales/mfe_MU/mfe_MU.go index 38c582b..959caab 100644 --- a/resources/locales/mfe_MU/mfe_MU.go +++ b/resources/locales/mfe_MU/mfe_MU.go @@ -1,6 +1,8 @@ package mfe_MU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *mfe_MU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mfe_MU' -func (t *mfe_MU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mfe_MU' +func (t *mfe_MU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mg/mg.go b/resources/locales/mg/mg.go index 76b8454..02365e7 100644 --- a/resources/locales/mg/mg.go +++ b/resources/locales/mg/mg.go @@ -1,6 +1,8 @@ package mg import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *mg) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mg' -func (t *mg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mg' +func (t *mg) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mg_MG/mg_MG.go b/resources/locales/mg_MG/mg_MG.go index 6b2b87e..dac9239 100644 --- a/resources/locales/mg_MG/mg_MG.go +++ b/resources/locales/mg_MG/mg_MG.go @@ -1,6 +1,8 @@ package mg_MG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *mg_MG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mg_MG' -func (t *mg_MG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mg_MG' +func (t *mg_MG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mgh/mgh.go b/resources/locales/mgh/mgh.go index 64f5db8..80cd8a7 100644 --- a/resources/locales/mgh/mgh.go +++ b/resources/locales/mgh/mgh.go @@ -1,6 +1,8 @@ package mgh import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *mgh) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mgh' -func (t *mgh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mgh' +func (t *mgh) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mgh_MZ/mgh_MZ.go b/resources/locales/mgh_MZ/mgh_MZ.go index f484588..39542c2 100644 --- a/resources/locales/mgh_MZ/mgh_MZ.go +++ b/resources/locales/mgh_MZ/mgh_MZ.go @@ -1,6 +1,8 @@ package mgh_MZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *mgh_MZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mgh_MZ' -func (t *mgh_MZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mgh_MZ' +func (t *mgh_MZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mgo/mgo.go b/resources/locales/mgo/mgo.go index 036429a..ceaac11 100644 --- a/resources/locales/mgo/mgo.go +++ b/resources/locales/mgo/mgo.go @@ -1,6 +1,8 @@ package mgo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *mgo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mgo' -func (t *mgo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mgo' +func (t *mgo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mgo_CM/mgo_CM.go b/resources/locales/mgo_CM/mgo_CM.go index f725276..8269312 100644 --- a/resources/locales/mgo_CM/mgo_CM.go +++ b/resources/locales/mgo_CM/mgo_CM.go @@ -1,6 +1,8 @@ package mgo_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *mgo_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mgo_CM' -func (t *mgo_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mgo_CM' +func (t *mgo_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mk/mk.go b/resources/locales/mk/mk.go index 5d1465c..66dcccf 100644 --- a/resources/locales/mk/mk.go +++ b/resources/locales/mk/mk.go @@ -1,6 +1,8 @@ package mk import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,16 @@ func (t *mk) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mk' -func (t *mk) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mk' +func (t *mk) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1) || (f%10 == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mk_MK/mk_MK.go b/resources/locales/mk_MK/mk_MK.go index a4efb79..ca9f6e5 100644 --- a/resources/locales/mk_MK/mk_MK.go +++ b/resources/locales/mk_MK/mk_MK.go @@ -1,6 +1,8 @@ package mk_MK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,16 @@ func (t *mk_MK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mk_MK' -func (t *mk_MK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mk_MK' +func (t *mk_MK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1) || (f%10 == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ml/ml.go b/resources/locales/ml/ml.go index c6e69ab..ebb613f 100644 --- a/resources/locales/ml/ml.go +++ b/resources/locales/ml/ml.go @@ -1,6 +1,8 @@ package ml import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ml) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ml' -func (t *ml) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ml' +func (t *ml) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ml_IN/ml_IN.go b/resources/locales/ml_IN/ml_IN.go index e50bdf7..a7d1dcf 100644 --- a/resources/locales/ml_IN/ml_IN.go +++ b/resources/locales/ml_IN/ml_IN.go @@ -1,6 +1,8 @@ package ml_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ml_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ml_IN' -func (t *ml_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ml_IN' +func (t *ml_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mn/mn.go b/resources/locales/mn/mn.go index 28209d1..fa28c4f 100644 --- a/resources/locales/mn/mn.go +++ b/resources/locales/mn/mn.go @@ -1,6 +1,8 @@ package mn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *mn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mn' -func (t *mn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mn' +func (t *mn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mn_MN/mn_MN.go b/resources/locales/mn_MN/mn_MN.go index c0e12a6..c840bbb 100644 --- a/resources/locales/mn_MN/mn_MN.go +++ b/resources/locales/mn_MN/mn_MN.go @@ -1,6 +1,8 @@ package mn_MN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *mn_MN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mn_MN' -func (t *mn_MN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mn_MN' +func (t *mn_MN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mr/mr.go b/resources/locales/mr/mr.go index 57c3d9d..e25e47b 100644 --- a/resources/locales/mr/mr.go +++ b/resources/locales/mr/mr.go @@ -1,6 +1,8 @@ package mr import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *mr) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mr' -func (t *mr) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mr' +func (t *mr) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mr_IN/mr_IN.go b/resources/locales/mr_IN/mr_IN.go index 281ecbb..d6a6f01 100644 --- a/resources/locales/mr_IN/mr_IN.go +++ b/resources/locales/mr_IN/mr_IN.go @@ -1,6 +1,8 @@ package mr_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *mr_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mr_IN' -func (t *mr_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mr_IN' +func (t *mr_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ms/ms.go b/resources/locales/ms/ms.go index 7fb1857..aed55b1 100644 --- a/resources/locales/ms/ms.go +++ b/resources/locales/ms/ms.go @@ -1,6 +1,8 @@ package ms import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ms) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ms' -func (t *ms) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ms' +func (t *ms) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ms_BN/ms_BN.go b/resources/locales/ms_BN/ms_BN.go index 0a1d7a2..a461b52 100644 --- a/resources/locales/ms_BN/ms_BN.go +++ b/resources/locales/ms_BN/ms_BN.go @@ -1,6 +1,8 @@ package ms_BN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ms_BN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ms_BN' -func (t *ms_BN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ms_BN' +func (t *ms_BN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ms_MY/ms_MY.go b/resources/locales/ms_MY/ms_MY.go index 951bc3b..d41ba5c 100644 --- a/resources/locales/ms_MY/ms_MY.go +++ b/resources/locales/ms_MY/ms_MY.go @@ -1,6 +1,8 @@ package ms_MY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ms_MY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ms_MY' -func (t *ms_MY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ms_MY' +func (t *ms_MY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ms_SG/ms_SG.go b/resources/locales/ms_SG/ms_SG.go index 63b40ec..7d41f90 100644 --- a/resources/locales/ms_SG/ms_SG.go +++ b/resources/locales/ms_SG/ms_SG.go @@ -1,6 +1,8 @@ package ms_SG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ms_SG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ms_SG' -func (t *ms_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ms_SG' +func (t *ms_SG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mt/mt.go b/resources/locales/mt/mt.go index f7e53e9..192ddc3 100644 --- a/resources/locales/mt/mt.go +++ b/resources/locales/mt/mt.go @@ -1,6 +1,8 @@ package mt import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,21 +29,18 @@ func (t *mt) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mt' -func (t *mt) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mt' +func (t *mt) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (n == 0) || (n%100 >= 2 && n%100 <= 10) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 19 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mt_MT/mt_MT.go b/resources/locales/mt_MT/mt_MT.go index 6c5bc75..b80638b 100644 --- a/resources/locales/mt_MT/mt_MT.go +++ b/resources/locales/mt_MT/mt_MT.go @@ -1,6 +1,8 @@ package mt_MT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,21 +29,18 @@ func (t *mt_MT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mt_MT' -func (t *mt_MT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mt_MT' +func (t *mt_MT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (n == 0) || (n%100 >= 2 && n%100 <= 10) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if n%100 >= 11 && n%100 <= 19 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mua/mua.go b/resources/locales/mua/mua.go index 312eacb..86d0333 100644 --- a/resources/locales/mua/mua.go +++ b/resources/locales/mua/mua.go @@ -1,6 +1,8 @@ package mua import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *mua) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mua' -func (t *mua) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mua' +func (t *mua) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mua_CM/mua_CM.go b/resources/locales/mua_CM/mua_CM.go index 36b1750..9c5498b 100644 --- a/resources/locales/mua_CM/mua_CM.go +++ b/resources/locales/mua_CM/mua_CM.go @@ -1,6 +1,8 @@ package mua_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *mua_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mua_CM' -func (t *mua_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mua_CM' +func (t *mua_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/my/my.go b/resources/locales/my/my.go index dd23e2a..1b82825 100644 --- a/resources/locales/my/my.go +++ b/resources/locales/my/my.go @@ -1,6 +1,8 @@ package my import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *my) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'my' -func (t *my) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'my' +func (t *my) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/my_MM/my_MM.go b/resources/locales/my_MM/my_MM.go index 1d3ce8e..5f6b131 100644 --- a/resources/locales/my_MM/my_MM.go +++ b/resources/locales/my_MM/my_MM.go @@ -1,6 +1,8 @@ package my_MM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *my_MM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'my_MM' -func (t *my_MM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'my_MM' +func (t *my_MM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/mzn/mzn.go b/resources/locales/mzn/mzn.go index 1e316c1..3690a74 100644 --- a/resources/locales/mzn/mzn.go +++ b/resources/locales/mzn/mzn.go @@ -1,6 +1,8 @@ package mzn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *mzn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mzn' -func (t *mzn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mzn' +func (t *mzn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/mzn_IR/mzn_IR.go b/resources/locales/mzn_IR/mzn_IR.go index 99acb08..2fb8ea1 100644 --- a/resources/locales/mzn_IR/mzn_IR.go +++ b/resources/locales/mzn_IR/mzn_IR.go @@ -1,6 +1,8 @@ package mzn_IR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *mzn_IR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'mzn_IR' -func (t *mzn_IR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mzn_IR' +func (t *mzn_IR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/naq/naq.go b/resources/locales/naq/naq.go index 8306f74..259ac1a 100644 --- a/resources/locales/naq/naq.go +++ b/resources/locales/naq/naq.go @@ -1,6 +1,8 @@ package naq import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *naq) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'naq' -func (t *naq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'naq' +func (t *naq) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/naq_NA/naq_NA.go b/resources/locales/naq_NA/naq_NA.go index 9157d08..e739850 100644 --- a/resources/locales/naq_NA/naq_NA.go +++ b/resources/locales/naq_NA/naq_NA.go @@ -1,6 +1,8 @@ package naq_NA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *naq_NA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'naq_NA' -func (t *naq_NA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'naq_NA' +func (t *naq_NA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nb/nb.go b/resources/locales/nb/nb.go index d1bea85..899f2f1 100644 --- a/resources/locales/nb/nb.go +++ b/resources/locales/nb/nb.go @@ -1,6 +1,8 @@ package nb import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nb) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nb' -func (t *nb) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nb' +func (t *nb) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nb_NO/nb_NO.go b/resources/locales/nb_NO/nb_NO.go index 7ce5ad4..75a6034 100644 --- a/resources/locales/nb_NO/nb_NO.go +++ b/resources/locales/nb_NO/nb_NO.go @@ -1,6 +1,8 @@ package nb_NO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nb_NO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nb_NO' -func (t *nb_NO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nb_NO' +func (t *nb_NO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nb_SJ/nb_SJ.go b/resources/locales/nb_SJ/nb_SJ.go index 37d4fe7..8630507 100644 --- a/resources/locales/nb_SJ/nb_SJ.go +++ b/resources/locales/nb_SJ/nb_SJ.go @@ -1,6 +1,8 @@ package nb_SJ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nb_SJ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nb_SJ' -func (t *nb_SJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nb_SJ' +func (t *nb_SJ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nd/nd.go b/resources/locales/nd/nd.go index b92ada0..0bfe8c2 100644 --- a/resources/locales/nd/nd.go +++ b/resources/locales/nd/nd.go @@ -1,6 +1,8 @@ package nd import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nd) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nd' -func (t *nd) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nd' +func (t *nd) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nd_ZW/nd_ZW.go b/resources/locales/nd_ZW/nd_ZW.go index 262a799..6b08191 100644 --- a/resources/locales/nd_ZW/nd_ZW.go +++ b/resources/locales/nd_ZW/nd_ZW.go @@ -1,6 +1,8 @@ package nd_ZW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nd_ZW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nd_ZW' -func (t *nd_ZW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nd_ZW' +func (t *nd_ZW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ne/ne.go b/resources/locales/ne/ne.go index f6efcf6..24f3cb7 100644 --- a/resources/locales/ne/ne.go +++ b/resources/locales/ne/ne.go @@ -1,6 +1,8 @@ package ne import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ne) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ne' -func (t *ne) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ne' +func (t *ne) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ne_IN/ne_IN.go b/resources/locales/ne_IN/ne_IN.go index 5754103..45aec43 100644 --- a/resources/locales/ne_IN/ne_IN.go +++ b/resources/locales/ne_IN/ne_IN.go @@ -1,6 +1,8 @@ package ne_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ne_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ne_IN' -func (t *ne_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ne_IN' +func (t *ne_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ne_NP/ne_NP.go b/resources/locales/ne_NP/ne_NP.go index 83e1756..7a08392 100644 --- a/resources/locales/ne_NP/ne_NP.go +++ b/resources/locales/ne_NP/ne_NP.go @@ -1,6 +1,8 @@ package ne_NP import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ne_NP) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ne_NP' -func (t *ne_NP) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ne_NP' +func (t *ne_NP) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nl/nl.go b/resources/locales/nl/nl.go index b4343c9..c58161e 100644 --- a/resources/locales/nl/nl.go +++ b/resources/locales/nl/nl.go @@ -1,6 +1,8 @@ package nl import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *nl) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nl' -func (t *nl) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nl' +func (t *nl) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nl_AW/nl_AW.go b/resources/locales/nl_AW/nl_AW.go index a4dc1e8..dcf7356 100644 --- a/resources/locales/nl_AW/nl_AW.go +++ b/resources/locales/nl_AW/nl_AW.go @@ -1,6 +1,8 @@ package nl_AW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *nl_AW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nl_AW' -func (t *nl_AW) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nl_AW' +func (t *nl_AW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nl_BE/nl_BE.go b/resources/locales/nl_BE/nl_BE.go index 060b19d..60cbda0 100644 --- a/resources/locales/nl_BE/nl_BE.go +++ b/resources/locales/nl_BE/nl_BE.go @@ -1,6 +1,8 @@ package nl_BE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *nl_BE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nl_BE' -func (t *nl_BE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nl_BE' +func (t *nl_BE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nl_BQ/nl_BQ.go b/resources/locales/nl_BQ/nl_BQ.go index 03ce5e8..17afd21 100644 --- a/resources/locales/nl_BQ/nl_BQ.go +++ b/resources/locales/nl_BQ/nl_BQ.go @@ -1,6 +1,8 @@ package nl_BQ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *nl_BQ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nl_BQ' -func (t *nl_BQ) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nl_BQ' +func (t *nl_BQ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nl_CW/nl_CW.go b/resources/locales/nl_CW/nl_CW.go index c14ef3f..077348e 100644 --- a/resources/locales/nl_CW/nl_CW.go +++ b/resources/locales/nl_CW/nl_CW.go @@ -1,6 +1,8 @@ package nl_CW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *nl_CW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nl_CW' -func (t *nl_CW) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nl_CW' +func (t *nl_CW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nl_NL/nl_NL.go b/resources/locales/nl_NL/nl_NL.go index a8cb62f..ff3d3f3 100644 --- a/resources/locales/nl_NL/nl_NL.go +++ b/resources/locales/nl_NL/nl_NL.go @@ -1,6 +1,8 @@ package nl_NL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *nl_NL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nl_NL' -func (t *nl_NL) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nl_NL' +func (t *nl_NL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nl_SR/nl_SR.go b/resources/locales/nl_SR/nl_SR.go index 1b7fac3..8fb9969 100644 --- a/resources/locales/nl_SR/nl_SR.go +++ b/resources/locales/nl_SR/nl_SR.go @@ -1,6 +1,8 @@ package nl_SR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *nl_SR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nl_SR' -func (t *nl_SR) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nl_SR' +func (t *nl_SR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nl_SX/nl_SX.go b/resources/locales/nl_SX/nl_SX.go index 9cd24c0..bc0ada3 100644 --- a/resources/locales/nl_SX/nl_SX.go +++ b/resources/locales/nl_SX/nl_SX.go @@ -1,6 +1,8 @@ package nl_SX import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *nl_SX) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nl_SX' -func (t *nl_SX) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nl_SX' +func (t *nl_SX) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nmg/nmg.go b/resources/locales/nmg/nmg.go index 002dcb2..46f0a9e 100644 --- a/resources/locales/nmg/nmg.go +++ b/resources/locales/nmg/nmg.go @@ -1,6 +1,8 @@ package nmg import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *nmg) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nmg' -func (t *nmg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nmg' +func (t *nmg) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/nmg_CM/nmg_CM.go b/resources/locales/nmg_CM/nmg_CM.go index 63937fe..7de3b7d 100644 --- a/resources/locales/nmg_CM/nmg_CM.go +++ b/resources/locales/nmg_CM/nmg_CM.go @@ -1,6 +1,8 @@ package nmg_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *nmg_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nmg_CM' -func (t *nmg_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nmg_CM' +func (t *nmg_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/nn/nn.go b/resources/locales/nn/nn.go index 1ed6cc7..e084b24 100644 --- a/resources/locales/nn/nn.go +++ b/resources/locales/nn/nn.go @@ -1,6 +1,8 @@ package nn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nn' -func (t *nn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nn' +func (t *nn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nn_NO/nn_NO.go b/resources/locales/nn_NO/nn_NO.go index a0b00b7..164695d 100644 --- a/resources/locales/nn_NO/nn_NO.go +++ b/resources/locales/nn_NO/nn_NO.go @@ -1,6 +1,8 @@ package nn_NO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nn_NO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nn_NO' -func (t *nn_NO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nn_NO' +func (t *nn_NO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nnh/nnh.go b/resources/locales/nnh/nnh.go index af8d744..9731686 100644 --- a/resources/locales/nnh/nnh.go +++ b/resources/locales/nnh/nnh.go @@ -1,6 +1,8 @@ package nnh import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nnh) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nnh' -func (t *nnh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nnh' +func (t *nnh) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nnh_CM/nnh_CM.go b/resources/locales/nnh_CM/nnh_CM.go index 0c8db11..7023441 100644 --- a/resources/locales/nnh_CM/nnh_CM.go +++ b/resources/locales/nnh_CM/nnh_CM.go @@ -1,6 +1,8 @@ package nnh_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nnh_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nnh_CM' -func (t *nnh_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nnh_CM' +func (t *nnh_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nus/nus.go b/resources/locales/nus/nus.go index f120857..080d36e 100644 --- a/resources/locales/nus/nus.go +++ b/resources/locales/nus/nus.go @@ -1,6 +1,8 @@ package nus import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *nus) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nus' -func (t *nus) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nus' +func (t *nus) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/nus_SS/nus_SS.go b/resources/locales/nus_SS/nus_SS.go index 567d813..4bcd4e7 100644 --- a/resources/locales/nus_SS/nus_SS.go +++ b/resources/locales/nus_SS/nus_SS.go @@ -1,6 +1,8 @@ package nus_SS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *nus_SS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nus_SS' -func (t *nus_SS) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nus_SS' +func (t *nus_SS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/nyn/nyn.go b/resources/locales/nyn/nyn.go index e99ed7d..1f3c142 100644 --- a/resources/locales/nyn/nyn.go +++ b/resources/locales/nyn/nyn.go @@ -1,6 +1,8 @@ package nyn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nyn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nyn' -func (t *nyn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nyn' +func (t *nyn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/nyn_UG/nyn_UG.go b/resources/locales/nyn_UG/nyn_UG.go index b65ad9a..7dfd344 100644 --- a/resources/locales/nyn_UG/nyn_UG.go +++ b/resources/locales/nyn_UG/nyn_UG.go @@ -1,6 +1,8 @@ package nyn_UG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *nyn_UG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'nyn_UG' -func (t *nyn_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nyn_UG' +func (t *nyn_UG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/om/om.go b/resources/locales/om/om.go index 4b176bf..3c0f0b2 100644 --- a/resources/locales/om/om.go +++ b/resources/locales/om/om.go @@ -1,6 +1,8 @@ package om import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *om) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'om' -func (t *om) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'om' +func (t *om) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/om_ET/om_ET.go b/resources/locales/om_ET/om_ET.go index 239d24c..e4638d8 100644 --- a/resources/locales/om_ET/om_ET.go +++ b/resources/locales/om_ET/om_ET.go @@ -1,6 +1,8 @@ package om_ET import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *om_ET) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'om_ET' -func (t *om_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'om_ET' +func (t *om_ET) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/om_KE/om_KE.go b/resources/locales/om_KE/om_KE.go index b7baeb6..3654d43 100644 --- a/resources/locales/om_KE/om_KE.go +++ b/resources/locales/om_KE/om_KE.go @@ -1,6 +1,8 @@ package om_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *om_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'om_KE' -func (t *om_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'om_KE' +func (t *om_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/or/or.go b/resources/locales/or/or.go index 315b5b3..be24ff9 100644 --- a/resources/locales/or/or.go +++ b/resources/locales/or/or.go @@ -1,6 +1,8 @@ package or import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *or) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'or' -func (t *or) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'or' +func (t *or) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/or_IN/or_IN.go b/resources/locales/or_IN/or_IN.go index 20cdd17..66503c7 100644 --- a/resources/locales/or_IN/or_IN.go +++ b/resources/locales/or_IN/or_IN.go @@ -1,6 +1,8 @@ package or_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *or_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'or_IN' -func (t *or_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'or_IN' +func (t *or_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/os/os.go b/resources/locales/os/os.go index fffeb72..ea7982a 100644 --- a/resources/locales/os/os.go +++ b/resources/locales/os/os.go @@ -1,6 +1,8 @@ package os import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *os) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'os' -func (t *os) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'os' +func (t *os) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/os_GE/os_GE.go b/resources/locales/os_GE/os_GE.go index 4a8bb3e..f4856d9 100644 --- a/resources/locales/os_GE/os_GE.go +++ b/resources/locales/os_GE/os_GE.go @@ -1,6 +1,8 @@ package os_GE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *os_GE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'os_GE' -func (t *os_GE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'os_GE' +func (t *os_GE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/os_RU/os_RU.go b/resources/locales/os_RU/os_RU.go index 62c62f7..ee624e5 100644 --- a/resources/locales/os_RU/os_RU.go +++ b/resources/locales/os_RU/os_RU.go @@ -1,6 +1,8 @@ package os_RU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *os_RU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'os_RU' -func (t *os_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'os_RU' +func (t *os_RU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pa/pa.go b/resources/locales/pa/pa.go index 83276da..4d26bd5 100644 --- a/resources/locales/pa/pa.go +++ b/resources/locales/pa/pa.go @@ -1,6 +1,8 @@ package pa import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pa) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pa' -func (t *pa) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pa' +func (t *pa) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pa_Arab/pa_Arab.go b/resources/locales/pa_Arab/pa_Arab.go index 36ce20e..ed82c1d 100644 --- a/resources/locales/pa_Arab/pa_Arab.go +++ b/resources/locales/pa_Arab/pa_Arab.go @@ -1,6 +1,8 @@ package pa_Arab import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pa_Arab) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pa_Arab' -func (t *pa_Arab) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pa_Arab' +func (t *pa_Arab) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pa_Arab_PK/pa_Arab_PK.go b/resources/locales/pa_Arab_PK/pa_Arab_PK.go index 7f788eb..44364d8 100644 --- a/resources/locales/pa_Arab_PK/pa_Arab_PK.go +++ b/resources/locales/pa_Arab_PK/pa_Arab_PK.go @@ -1,6 +1,8 @@ package pa_Arab_PK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pa_Arab_PK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pa_Arab_PK' -func (t *pa_Arab_PK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pa_Arab_PK' +func (t *pa_Arab_PK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pa_Guru/pa_Guru.go b/resources/locales/pa_Guru/pa_Guru.go index 38185a0..55872f2 100644 --- a/resources/locales/pa_Guru/pa_Guru.go +++ b/resources/locales/pa_Guru/pa_Guru.go @@ -1,6 +1,8 @@ package pa_Guru import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pa_Guru) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pa_Guru' -func (t *pa_Guru) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pa_Guru' +func (t *pa_Guru) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pa_Guru_IN/pa_Guru_IN.go b/resources/locales/pa_Guru_IN/pa_Guru_IN.go index 78d4d18..20bbe21 100644 --- a/resources/locales/pa_Guru_IN/pa_Guru_IN.go +++ b/resources/locales/pa_Guru_IN/pa_Guru_IN.go @@ -1,6 +1,8 @@ package pa_Guru_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pa_Guru_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pa_Guru_IN' -func (t *pa_Guru_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pa_Guru_IN' +func (t *pa_Guru_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pl/pl.go b/resources/locales/pl/pl.go index 6493e28..272b7e0 100644 --- a/resources/locales/pl/pl.go +++ b/resources/locales/pl/pl.go @@ -1,6 +1,8 @@ package pl import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *pl) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pl' -func (t *pl) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pl' +func (t *pl) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i != 1 && i%10 >= 0 && i%10 <= 1) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 12 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pl_PL/pl_PL.go b/resources/locales/pl_PL/pl_PL.go index 85f1b2c..6d6ce75 100644 --- a/resources/locales/pl_PL/pl_PL.go +++ b/resources/locales/pl_PL/pl_PL.go @@ -1,6 +1,8 @@ package pl_PL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *pl_PL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pl_PL' -func (t *pl_PL) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pl_PL' +func (t *pl_PL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i != 1 && i%10 >= 0 && i%10 <= 1) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 12 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/prg/prg.go b/resources/locales/prg/prg.go index 232bd19..9474d54 100644 --- a/resources/locales/prg/prg.go +++ b/resources/locales/prg/prg.go @@ -1,6 +1,8 @@ package prg import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,17 @@ func (t *prg) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'prg' -func (t *prg) CardinalPluralRule(num string) (locales.PluralRule, error) { - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'prg' +func (t *prg) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + f := locales.F(n, v) if (n%10 == 0) || (n%100 >= 11 && n%100 <= 19) || (v == 2 && f%100 >= 11 && f%100 <= 19) { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if (n%10 == 1 && n%100 != 11) || (v == 2 && f%10 == 1 && f%100 != 11) || (v != 2 && f%10 == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/prg_001/prg_001.go b/resources/locales/prg_001/prg_001.go index f6b4bf9..f269b01 100644 --- a/resources/locales/prg_001/prg_001.go +++ b/resources/locales/prg_001/prg_001.go @@ -1,6 +1,8 @@ package prg_001 import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,17 @@ func (t *prg_001) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'prg_001' -func (t *prg_001) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'prg_001' +func (t *prg_001) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + f := locales.F(n, v) if (n%10 == 0) || (n%100 >= 11 && n%100 <= 19) || (v == 2 && f%100 >= 11 && f%100 <= 19) { - return locales.PluralRuleZero, nil + return locales.PluralRuleZero } else if (n%10 == 1 && n%100 != 11) || (v == 2 && f%10 == 1 && f%100 != 11) || (v != 2 && f%10 == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ps/ps.go b/resources/locales/ps/ps.go index 0d1282c..9454da6 100644 --- a/resources/locales/ps/ps.go +++ b/resources/locales/ps/ps.go @@ -1,6 +1,8 @@ package ps import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ps) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ps' -func (t *ps) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ps' +func (t *ps) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ps_AF/ps_AF.go b/resources/locales/ps_AF/ps_AF.go index 4308152..a19b032 100644 --- a/resources/locales/ps_AF/ps_AF.go +++ b/resources/locales/ps_AF/ps_AF.go @@ -1,6 +1,8 @@ package ps_AF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ps_AF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ps_AF' -func (t *ps_AF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ps_AF' +func (t *ps_AF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt/pt.go b/resources/locales/pt/pt.go index 4fda138..c90c941 100644 --- a/resources/locales/pt/pt.go +++ b/resources/locales/pt/pt.go @@ -1,6 +1,8 @@ package pt import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt' -func (t *pt) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt' +func (t *pt) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_AO/pt_AO.go b/resources/locales/pt_AO/pt_AO.go index 9c64be3..0304ee3 100644 --- a/resources/locales/pt_AO/pt_AO.go +++ b/resources/locales/pt_AO/pt_AO.go @@ -1,6 +1,8 @@ package pt_AO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_AO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_AO' -func (t *pt_AO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_AO' +func (t *pt_AO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_BR/pt_BR.go b/resources/locales/pt_BR/pt_BR.go index 9cbb35e..aaccca8 100644 --- a/resources/locales/pt_BR/pt_BR.go +++ b/resources/locales/pt_BR/pt_BR.go @@ -1,6 +1,8 @@ package pt_BR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_BR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_BR' -func (t *pt_BR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_BR' +func (t *pt_BR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_CH/pt_CH.go b/resources/locales/pt_CH/pt_CH.go index 5bd85fb..74ae3ad 100644 --- a/resources/locales/pt_CH/pt_CH.go +++ b/resources/locales/pt_CH/pt_CH.go @@ -1,6 +1,8 @@ package pt_CH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_CH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_CH' -func (t *pt_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_CH' +func (t *pt_CH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_CV/pt_CV.go b/resources/locales/pt_CV/pt_CV.go index 6d99b0b..8259d1d 100644 --- a/resources/locales/pt_CV/pt_CV.go +++ b/resources/locales/pt_CV/pt_CV.go @@ -1,6 +1,8 @@ package pt_CV import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_CV) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_CV' -func (t *pt_CV) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_CV' +func (t *pt_CV) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_GQ/pt_GQ.go b/resources/locales/pt_GQ/pt_GQ.go index 9797f3f..f2aecc2 100644 --- a/resources/locales/pt_GQ/pt_GQ.go +++ b/resources/locales/pt_GQ/pt_GQ.go @@ -1,6 +1,8 @@ package pt_GQ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_GQ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_GQ' -func (t *pt_GQ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_GQ' +func (t *pt_GQ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_GW/pt_GW.go b/resources/locales/pt_GW/pt_GW.go index 6adb01c..70b40ec 100644 --- a/resources/locales/pt_GW/pt_GW.go +++ b/resources/locales/pt_GW/pt_GW.go @@ -1,6 +1,8 @@ package pt_GW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_GW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_GW' -func (t *pt_GW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_GW' +func (t *pt_GW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_LU/pt_LU.go b/resources/locales/pt_LU/pt_LU.go index a79c5ab..ddc844c 100644 --- a/resources/locales/pt_LU/pt_LU.go +++ b/resources/locales/pt_LU/pt_LU.go @@ -1,6 +1,8 @@ package pt_LU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_LU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_LU' -func (t *pt_LU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_LU' +func (t *pt_LU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_MO/pt_MO.go b/resources/locales/pt_MO/pt_MO.go index 61c5a16..43a2849 100644 --- a/resources/locales/pt_MO/pt_MO.go +++ b/resources/locales/pt_MO/pt_MO.go @@ -1,6 +1,8 @@ package pt_MO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_MO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_MO' -func (t *pt_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_MO' +func (t *pt_MO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_MZ/pt_MZ.go b/resources/locales/pt_MZ/pt_MZ.go index 12e0995..09890b1 100644 --- a/resources/locales/pt_MZ/pt_MZ.go +++ b/resources/locales/pt_MZ/pt_MZ.go @@ -1,6 +1,8 @@ package pt_MZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_MZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_MZ' -func (t *pt_MZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_MZ' +func (t *pt_MZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_PT/pt_PT.go b/resources/locales/pt_PT/pt_PT.go index b923047..b27e1b7 100644 --- a/resources/locales/pt_PT/pt_PT.go +++ b/resources/locales/pt_PT/pt_PT.go @@ -1,6 +1,8 @@ package pt_PT import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_PT) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_PT' -func (t *pt_PT) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_PT' +func (t *pt_PT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_ST/pt_ST.go b/resources/locales/pt_ST/pt_ST.go index 2460c1e..1c42948 100644 --- a/resources/locales/pt_ST/pt_ST.go +++ b/resources/locales/pt_ST/pt_ST.go @@ -1,6 +1,8 @@ package pt_ST import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_ST) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_ST' -func (t *pt_ST) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_ST' +func (t *pt_ST) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/pt_TL/pt_TL.go b/resources/locales/pt_TL/pt_TL.go index 07dd3d5..0c7706a 100644 --- a/resources/locales/pt_TL/pt_TL.go +++ b/resources/locales/pt_TL/pt_TL.go @@ -1,6 +1,8 @@ package pt_TL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *pt_TL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'pt_TL' -func (t *pt_TL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'pt_TL' +func (t *pt_TL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 2 && n != 2 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/qu/qu.go b/resources/locales/qu/qu.go index 4e11ccc..f4a3dd8 100644 --- a/resources/locales/qu/qu.go +++ b/resources/locales/qu/qu.go @@ -1,6 +1,8 @@ package qu import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *qu) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'qu' -func (t *qu) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'qu' +func (t *qu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/qu_BO/qu_BO.go b/resources/locales/qu_BO/qu_BO.go index 26ae170..a3b5bdc 100644 --- a/resources/locales/qu_BO/qu_BO.go +++ b/resources/locales/qu_BO/qu_BO.go @@ -1,6 +1,8 @@ package qu_BO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *qu_BO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'qu_BO' -func (t *qu_BO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'qu_BO' +func (t *qu_BO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/qu_EC/qu_EC.go b/resources/locales/qu_EC/qu_EC.go index 6762b84..6e5297d 100644 --- a/resources/locales/qu_EC/qu_EC.go +++ b/resources/locales/qu_EC/qu_EC.go @@ -1,6 +1,8 @@ package qu_EC import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *qu_EC) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'qu_EC' -func (t *qu_EC) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'qu_EC' +func (t *qu_EC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/qu_PE/qu_PE.go b/resources/locales/qu_PE/qu_PE.go index e6760bb..afbe0e0 100644 --- a/resources/locales/qu_PE/qu_PE.go +++ b/resources/locales/qu_PE/qu_PE.go @@ -1,6 +1,8 @@ package qu_PE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *qu_PE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'qu_PE' -func (t *qu_PE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'qu_PE' +func (t *qu_PE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/rm/rm.go b/resources/locales/rm/rm.go index dbff856..c56e86c 100644 --- a/resources/locales/rm/rm.go +++ b/resources/locales/rm/rm.go @@ -1,6 +1,8 @@ package rm import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *rm) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'rm' -func (t *rm) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rm' +func (t *rm) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/rm_CH/rm_CH.go b/resources/locales/rm_CH/rm_CH.go index 7b334d0..0b29ef5 100644 --- a/resources/locales/rm_CH/rm_CH.go +++ b/resources/locales/rm_CH/rm_CH.go @@ -1,6 +1,8 @@ package rm_CH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *rm_CH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'rm_CH' -func (t *rm_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rm_CH' +func (t *rm_CH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/rn/rn.go b/resources/locales/rn/rn.go index d717ea8..d5b5ec0 100644 --- a/resources/locales/rn/rn.go +++ b/resources/locales/rn/rn.go @@ -1,6 +1,8 @@ package rn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *rn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'rn' -func (t *rn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rn' +func (t *rn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/rn_BI/rn_BI.go b/resources/locales/rn_BI/rn_BI.go index 12502fe..f65c342 100644 --- a/resources/locales/rn_BI/rn_BI.go +++ b/resources/locales/rn_BI/rn_BI.go @@ -1,6 +1,8 @@ package rn_BI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *rn_BI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'rn_BI' -func (t *rn_BI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rn_BI' +func (t *rn_BI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/ro/ro.go b/resources/locales/ro/ro.go index e909d62..53671f7 100644 --- a/resources/locales/ro/ro.go +++ b/resources/locales/ro/ro.go @@ -1,6 +1,8 @@ package ro import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,17 @@ func (t *ro) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ro' -func (t *ro) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ro' +func (t *ro) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v != 0) || (n == 0) || (n != 1 && n%100 >= 1 && n%100 <= 19) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ro_MD/ro_MD.go b/resources/locales/ro_MD/ro_MD.go index 70d89f0..e2407fc 100644 --- a/resources/locales/ro_MD/ro_MD.go +++ b/resources/locales/ro_MD/ro_MD.go @@ -1,6 +1,8 @@ package ro_MD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,17 @@ func (t *ro_MD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ro_MD' -func (t *ro_MD) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ro_MD' +func (t *ro_MD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v != 0) || (n == 0) || (n != 1 && n%100 >= 1 && n%100 <= 19) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ro_RO/ro_RO.go b/resources/locales/ro_RO/ro_RO.go index e40c152..52baba1 100644 --- a/resources/locales/ro_RO/ro_RO.go +++ b/resources/locales/ro_RO/ro_RO.go @@ -1,6 +1,8 @@ package ro_RO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,17 @@ func (t *ro_RO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ro_RO' -func (t *ro_RO) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ro_RO' +func (t *ro_RO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v != 0) || (n == 0) || (n != 1 && n%100 >= 1 && n%100 <= 19) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/rof/rof.go b/resources/locales/rof/rof.go index 228351c..aef2619 100644 --- a/resources/locales/rof/rof.go +++ b/resources/locales/rof/rof.go @@ -1,6 +1,8 @@ package rof import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *rof) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'rof' -func (t *rof) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rof' +func (t *rof) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/rof_TZ/rof_TZ.go b/resources/locales/rof_TZ/rof_TZ.go index 04c567d..b7b7fee 100644 --- a/resources/locales/rof_TZ/rof_TZ.go +++ b/resources/locales/rof_TZ/rof_TZ.go @@ -1,6 +1,8 @@ package rof_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *rof_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'rof_TZ' -func (t *rof_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rof_TZ' +func (t *rof_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/root/root.go b/resources/locales/root/root.go index a0048f6..5cdffe7 100644 --- a/resources/locales/root/root.go +++ b/resources/locales/root/root.go @@ -1,6 +1,8 @@ package root import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *root) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'root' -func (t *root) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'root' +func (t *root) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ru/ru.go b/resources/locales/ru/ru.go index f02e28b..447aa13 100644 --- a/resources/locales/ru/ru.go +++ b/resources/locales/ru/ru.go @@ -1,6 +1,8 @@ package ru import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *ru) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ru' -func (t *ru) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ru' +func (t *ru) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 && i%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i%10 == 0) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 11 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ru_BY/ru_BY.go b/resources/locales/ru_BY/ru_BY.go index 2533aff..b0109f3 100644 --- a/resources/locales/ru_BY/ru_BY.go +++ b/resources/locales/ru_BY/ru_BY.go @@ -1,6 +1,8 @@ package ru_BY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *ru_BY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ru_BY' -func (t *ru_BY) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ru_BY' +func (t *ru_BY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 && i%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i%10 == 0) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 11 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ru_KG/ru_KG.go b/resources/locales/ru_KG/ru_KG.go index 38e24c6..0c77b94 100644 --- a/resources/locales/ru_KG/ru_KG.go +++ b/resources/locales/ru_KG/ru_KG.go @@ -1,6 +1,8 @@ package ru_KG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *ru_KG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ru_KG' -func (t *ru_KG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ru_KG' +func (t *ru_KG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 && i%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i%10 == 0) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 11 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ru_KZ/ru_KZ.go b/resources/locales/ru_KZ/ru_KZ.go index 7a95322..33805e8 100644 --- a/resources/locales/ru_KZ/ru_KZ.go +++ b/resources/locales/ru_KZ/ru_KZ.go @@ -1,6 +1,8 @@ package ru_KZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *ru_KZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ru_KZ' -func (t *ru_KZ) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ru_KZ' +func (t *ru_KZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 && i%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i%10 == 0) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 11 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ru_MD/ru_MD.go b/resources/locales/ru_MD/ru_MD.go index 33ffa76..001b67e 100644 --- a/resources/locales/ru_MD/ru_MD.go +++ b/resources/locales/ru_MD/ru_MD.go @@ -1,6 +1,8 @@ package ru_MD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *ru_MD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ru_MD' -func (t *ru_MD) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ru_MD' +func (t *ru_MD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 && i%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i%10 == 0) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 11 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ru_RU/ru_RU.go b/resources/locales/ru_RU/ru_RU.go index f845bbb..e770960 100644 --- a/resources/locales/ru_RU/ru_RU.go +++ b/resources/locales/ru_RU/ru_RU.go @@ -1,6 +1,8 @@ package ru_RU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *ru_RU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ru_RU' -func (t *ru_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ru_RU' +func (t *ru_RU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 && i%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i%10 == 0) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 11 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ru_UA/ru_UA.go b/resources/locales/ru_UA/ru_UA.go index 4e14fba..04ab6cd 100644 --- a/resources/locales/ru_UA/ru_UA.go +++ b/resources/locales/ru_UA/ru_UA.go @@ -1,6 +1,8 @@ package ru_UA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *ru_UA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ru_UA' -func (t *ru_UA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ru_UA' +func (t *ru_UA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 && i%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i%10 == 0) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 11 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/rw/rw.go b/resources/locales/rw/rw.go index 2d671b9..98f89b5 100644 --- a/resources/locales/rw/rw.go +++ b/resources/locales/rw/rw.go @@ -1,6 +1,8 @@ package rw import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *rw) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'rw' -func (t *rw) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rw' +func (t *rw) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/rw_RW/rw_RW.go b/resources/locales/rw_RW/rw_RW.go index 7eaa0cf..64120fd 100644 --- a/resources/locales/rw_RW/rw_RW.go +++ b/resources/locales/rw_RW/rw_RW.go @@ -1,6 +1,8 @@ package rw_RW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *rw_RW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'rw_RW' -func (t *rw_RW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rw_RW' +func (t *rw_RW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/rwk/rwk.go b/resources/locales/rwk/rwk.go index f5a887c..c180133 100644 --- a/resources/locales/rwk/rwk.go +++ b/resources/locales/rwk/rwk.go @@ -1,6 +1,8 @@ package rwk import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *rwk) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'rwk' -func (t *rwk) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rwk' +func (t *rwk) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/rwk_TZ/rwk_TZ.go b/resources/locales/rwk_TZ/rwk_TZ.go index c336b52..77d5ac6 100644 --- a/resources/locales/rwk_TZ/rwk_TZ.go +++ b/resources/locales/rwk_TZ/rwk_TZ.go @@ -1,6 +1,8 @@ package rwk_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *rwk_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'rwk_TZ' -func (t *rwk_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rwk_TZ' +func (t *rwk_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sah/sah.go b/resources/locales/sah/sah.go index 0a85e52..a3922eb 100644 --- a/resources/locales/sah/sah.go +++ b/resources/locales/sah/sah.go @@ -1,6 +1,8 @@ package sah import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *sah) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sah' -func (t *sah) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sah' +func (t *sah) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sah_RU/sah_RU.go b/resources/locales/sah_RU/sah_RU.go index fab7e64..6e35017 100644 --- a/resources/locales/sah_RU/sah_RU.go +++ b/resources/locales/sah_RU/sah_RU.go @@ -1,6 +1,8 @@ package sah_RU import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *sah_RU) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sah_RU' -func (t *sah_RU) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sah_RU' +func (t *sah_RU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/saq/saq.go b/resources/locales/saq/saq.go index 78094e6..9dc76ad 100644 --- a/resources/locales/saq/saq.go +++ b/resources/locales/saq/saq.go @@ -1,6 +1,8 @@ package saq import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *saq) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'saq' -func (t *saq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'saq' +func (t *saq) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/saq_KE/saq_KE.go b/resources/locales/saq_KE/saq_KE.go index 119f2c5..8242bde 100644 --- a/resources/locales/saq_KE/saq_KE.go +++ b/resources/locales/saq_KE/saq_KE.go @@ -1,6 +1,8 @@ package saq_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *saq_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'saq_KE' -func (t *saq_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'saq_KE' +func (t *saq_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sbp/sbp.go b/resources/locales/sbp/sbp.go index bd76911..1767a2f 100644 --- a/resources/locales/sbp/sbp.go +++ b/resources/locales/sbp/sbp.go @@ -1,6 +1,8 @@ package sbp import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *sbp) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sbp' -func (t *sbp) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sbp' +func (t *sbp) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/sbp_TZ/sbp_TZ.go b/resources/locales/sbp_TZ/sbp_TZ.go index 78bfeaa..3de5719 100644 --- a/resources/locales/sbp_TZ/sbp_TZ.go +++ b/resources/locales/sbp_TZ/sbp_TZ.go @@ -1,6 +1,8 @@ package sbp_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *sbp_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sbp_TZ' -func (t *sbp_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sbp_TZ' +func (t *sbp_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/se/se.go b/resources/locales/se/se.go index 49dd74b..f100177 100644 --- a/resources/locales/se/se.go +++ b/resources/locales/se/se.go @@ -1,6 +1,8 @@ package se import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *se) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'se' -func (t *se) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'se' +func (t *se) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/se_FI/se_FI.go b/resources/locales/se_FI/se_FI.go index 3156e6b..4ff28d8 100644 --- a/resources/locales/se_FI/se_FI.go +++ b/resources/locales/se_FI/se_FI.go @@ -1,6 +1,8 @@ package se_FI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *se_FI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'se_FI' -func (t *se_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'se_FI' +func (t *se_FI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/se_NO/se_NO.go b/resources/locales/se_NO/se_NO.go index 5863a2d..1739b2c 100644 --- a/resources/locales/se_NO/se_NO.go +++ b/resources/locales/se_NO/se_NO.go @@ -1,6 +1,8 @@ package se_NO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *se_NO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'se_NO' -func (t *se_NO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'se_NO' +func (t *se_NO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/se_SE/se_SE.go b/resources/locales/se_SE/se_SE.go index 1466ee0..1cf0b83 100644 --- a/resources/locales/se_SE/se_SE.go +++ b/resources/locales/se_SE/se_SE.go @@ -1,6 +1,8 @@ package se_SE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *se_SE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'se_SE' -func (t *se_SE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'se_SE' +func (t *se_SE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/seh/seh.go b/resources/locales/seh/seh.go index fc55cc7..4256568 100644 --- a/resources/locales/seh/seh.go +++ b/resources/locales/seh/seh.go @@ -1,6 +1,8 @@ package seh import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *seh) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'seh' -func (t *seh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'seh' +func (t *seh) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/seh_MZ/seh_MZ.go b/resources/locales/seh_MZ/seh_MZ.go index 41701d7..a2e5a11 100644 --- a/resources/locales/seh_MZ/seh_MZ.go +++ b/resources/locales/seh_MZ/seh_MZ.go @@ -1,6 +1,8 @@ package seh_MZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *seh_MZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'seh_MZ' -func (t *seh_MZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'seh_MZ' +func (t *seh_MZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ses/ses.go b/resources/locales/ses/ses.go index 3a003e1..93aa1ea 100644 --- a/resources/locales/ses/ses.go +++ b/resources/locales/ses/ses.go @@ -1,6 +1,8 @@ package ses import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ses) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ses' -func (t *ses) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ses' +func (t *ses) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ses_ML/ses_ML.go b/resources/locales/ses_ML/ses_ML.go index 060411c..74f71fc 100644 --- a/resources/locales/ses_ML/ses_ML.go +++ b/resources/locales/ses_ML/ses_ML.go @@ -1,6 +1,8 @@ package ses_ML import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *ses_ML) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ses_ML' -func (t *ses_ML) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ses_ML' +func (t *ses_ML) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sg/sg.go b/resources/locales/sg/sg.go index c8c4d9a..3135c04 100644 --- a/resources/locales/sg/sg.go +++ b/resources/locales/sg/sg.go @@ -1,6 +1,8 @@ package sg import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *sg) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sg' -func (t *sg) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sg' +func (t *sg) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sg_CF/sg_CF.go b/resources/locales/sg_CF/sg_CF.go index 270fa3f..77ed4f2 100644 --- a/resources/locales/sg_CF/sg_CF.go +++ b/resources/locales/sg_CF/sg_CF.go @@ -1,6 +1,8 @@ package sg_CF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *sg_CF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sg_CF' -func (t *sg_CF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sg_CF' +func (t *sg_CF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/shi/shi.go b/resources/locales/shi/shi.go index 3a13e95..0e54cea 100644 --- a/resources/locales/shi/shi.go +++ b/resources/locales/shi/shi.go @@ -1,6 +1,8 @@ package shi import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,17 @@ func (t *shi) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'shi' -func (t *shi) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'shi' +func (t *shi) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n >= 2 && n <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/shi_Latn/shi_Latn.go b/resources/locales/shi_Latn/shi_Latn.go index ead5508..c115120 100644 --- a/resources/locales/shi_Latn/shi_Latn.go +++ b/resources/locales/shi_Latn/shi_Latn.go @@ -1,6 +1,8 @@ package shi_Latn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,17 @@ func (t *shi_Latn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'shi_Latn' -func (t *shi_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'shi_Latn' +func (t *shi_Latn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n >= 2 && n <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/shi_Latn_MA/shi_Latn_MA.go b/resources/locales/shi_Latn_MA/shi_Latn_MA.go index 454c3fa..f685b97 100644 --- a/resources/locales/shi_Latn_MA/shi_Latn_MA.go +++ b/resources/locales/shi_Latn_MA/shi_Latn_MA.go @@ -1,6 +1,8 @@ package shi_Latn_MA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,17 @@ func (t *shi_Latn_MA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'shi_Latn_MA' -func (t *shi_Latn_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'shi_Latn_MA' +func (t *shi_Latn_MA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n >= 2 && n <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/shi_Tfng/shi_Tfng.go b/resources/locales/shi_Tfng/shi_Tfng.go index 8ab6572..4232468 100644 --- a/resources/locales/shi_Tfng/shi_Tfng.go +++ b/resources/locales/shi_Tfng/shi_Tfng.go @@ -1,6 +1,8 @@ package shi_Tfng import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,17 @@ func (t *shi_Tfng) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'shi_Tfng' -func (t *shi_Tfng) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'shi_Tfng' +func (t *shi_Tfng) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n >= 2 && n <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go b/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go index a0547ff..14ba3af 100644 --- a/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go +++ b/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go @@ -1,6 +1,8 @@ package shi_Tfng_MA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,24 +29,17 @@ func (t *shi_Tfng_MA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'shi_Tfng_MA' -func (t *shi_Tfng_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'shi_Tfng_MA' +func (t *shi_Tfng_MA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n >= 2 && n <= 10 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/si/si.go b/resources/locales/si/si.go index 2c342a8..0abf277 100644 --- a/resources/locales/si/si.go +++ b/resources/locales/si/si.go @@ -1,6 +1,8 @@ package si import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,27 +29,16 @@ func (t *si) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'si' -func (t *si) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'si' +func (t *si) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (n == 0 || n == 1) || (i == 0 && f == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/si_LK/si_LK.go b/resources/locales/si_LK/si_LK.go index 02590d4..2e744e9 100644 --- a/resources/locales/si_LK/si_LK.go +++ b/resources/locales/si_LK/si_LK.go @@ -1,6 +1,8 @@ package si_LK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,27 +29,16 @@ func (t *si_LK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'si_LK' -func (t *si_LK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'si_LK' +func (t *si_LK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (n == 0 || n == 1) || (i == 0 && f == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sk/sk.go b/resources/locales/sk/sk.go index 8d86cda..cb2a1a6 100644 --- a/resources/locales/sk/sk.go +++ b/resources/locales/sk/sk.go @@ -1,6 +1,8 @@ package sk import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *sk) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sk' -func (t *sk) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sk' +func (t *sk) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if i >= 2 && i <= 4 && v == 0 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if v != 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sk_SK/sk_SK.go b/resources/locales/sk_SK/sk_SK.go index 3366933..bfecf2b 100644 --- a/resources/locales/sk_SK/sk_SK.go +++ b/resources/locales/sk_SK/sk_SK.go @@ -1,6 +1,8 @@ package sk_SK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *sk_SK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sk_SK' -func (t *sk_SK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sk_SK' +func (t *sk_SK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if i >= 2 && i <= 4 && v == 0 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if v != 0 { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sl/sl.go b/resources/locales/sl/sl.go index e18b0bf..4d513f4 100644 --- a/resources/locales/sl/sl.go +++ b/resources/locales/sl/sl.go @@ -1,6 +1,8 @@ package sl import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *sl) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sl' -func (t *sl) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sl' +func (t *sl) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%100 == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%100 == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if (v == 0 && i%100 >= 3 && i%100 <= 4) || (v != 0) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sl_SI/sl_SI.go b/resources/locales/sl_SI/sl_SI.go index 4d03608..df8d440 100644 --- a/resources/locales/sl_SI/sl_SI.go +++ b/resources/locales/sl_SI/sl_SI.go @@ -1,6 +1,8 @@ package sl_SI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *sl_SI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sl_SI' -func (t *sl_SI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sl_SI' +func (t *sl_SI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%100 == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%100 == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } else if (v == 0 && i%100 >= 3 && i%100 <= 4) || (v != 0) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/smn/smn.go b/resources/locales/smn/smn.go index 27abdb6..07c3d27 100644 --- a/resources/locales/smn/smn.go +++ b/resources/locales/smn/smn.go @@ -1,6 +1,8 @@ package smn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *smn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'smn' -func (t *smn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'smn' +func (t *smn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/smn_FI/smn_FI.go b/resources/locales/smn_FI/smn_FI.go index 3d4f5fb..4fa61c6 100644 --- a/resources/locales/smn_FI/smn_FI.go +++ b/resources/locales/smn_FI/smn_FI.go @@ -1,6 +1,8 @@ package smn_FI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,16 @@ func (t *smn_FI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'smn_FI' -func (t *smn_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'smn_FI' +func (t *smn_FI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if n == 2 { - return locales.PluralRuleTwo, nil + return locales.PluralRuleTwo } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sn/sn.go b/resources/locales/sn/sn.go index e4604db..1ddb7e5 100644 --- a/resources/locales/sn/sn.go +++ b/resources/locales/sn/sn.go @@ -1,6 +1,8 @@ package sn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *sn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sn' -func (t *sn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sn' +func (t *sn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sn_ZW/sn_ZW.go b/resources/locales/sn_ZW/sn_ZW.go index cbcd766..062c776 100644 --- a/resources/locales/sn_ZW/sn_ZW.go +++ b/resources/locales/sn_ZW/sn_ZW.go @@ -1,6 +1,8 @@ package sn_ZW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *sn_ZW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sn_ZW' -func (t *sn_ZW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sn_ZW' +func (t *sn_ZW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/so/so.go b/resources/locales/so/so.go index 7196689..50a16b3 100644 --- a/resources/locales/so/so.go +++ b/resources/locales/so/so.go @@ -1,6 +1,8 @@ package so import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *so) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'so' -func (t *so) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'so' +func (t *so) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/so_DJ/so_DJ.go b/resources/locales/so_DJ/so_DJ.go index 523c0b1..f1f286b 100644 --- a/resources/locales/so_DJ/so_DJ.go +++ b/resources/locales/so_DJ/so_DJ.go @@ -1,6 +1,8 @@ package so_DJ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *so_DJ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'so_DJ' -func (t *so_DJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'so_DJ' +func (t *so_DJ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/so_ET/so_ET.go b/resources/locales/so_ET/so_ET.go index e9bdf7b..bbd147d 100644 --- a/resources/locales/so_ET/so_ET.go +++ b/resources/locales/so_ET/so_ET.go @@ -1,6 +1,8 @@ package so_ET import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *so_ET) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'so_ET' -func (t *so_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'so_ET' +func (t *so_ET) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/so_KE/so_KE.go b/resources/locales/so_KE/so_KE.go index 44fd115..d6f3bd0 100644 --- a/resources/locales/so_KE/so_KE.go +++ b/resources/locales/so_KE/so_KE.go @@ -1,6 +1,8 @@ package so_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *so_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'so_KE' -func (t *so_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'so_KE' +func (t *so_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/so_SO/so_SO.go b/resources/locales/so_SO/so_SO.go index d590bad..750208d 100644 --- a/resources/locales/so_SO/so_SO.go +++ b/resources/locales/so_SO/so_SO.go @@ -1,6 +1,8 @@ package so_SO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *so_SO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'so_SO' -func (t *so_SO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'so_SO' +func (t *so_SO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sq/sq.go b/resources/locales/sq/sq.go index 0d70b8d..c2ae790 100644 --- a/resources/locales/sq/sq.go +++ b/resources/locales/sq/sq.go @@ -1,6 +1,8 @@ package sq import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *sq) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sq' -func (t *sq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sq' +func (t *sq) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sq_AL/sq_AL.go b/resources/locales/sq_AL/sq_AL.go index 3a47393..d5171fb 100644 --- a/resources/locales/sq_AL/sq_AL.go +++ b/resources/locales/sq_AL/sq_AL.go @@ -1,6 +1,8 @@ package sq_AL import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *sq_AL) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sq_AL' -func (t *sq_AL) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sq_AL' +func (t *sq_AL) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sq_MK/sq_MK.go b/resources/locales/sq_MK/sq_MK.go index 921c8a1..685c95a 100644 --- a/resources/locales/sq_MK/sq_MK.go +++ b/resources/locales/sq_MK/sq_MK.go @@ -1,6 +1,8 @@ package sq_MK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *sq_MK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sq_MK' -func (t *sq_MK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sq_MK' +func (t *sq_MK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sq_XK/sq_XK.go b/resources/locales/sq_XK/sq_XK.go index eea1cdc..7265bcc 100644 --- a/resources/locales/sq_XK/sq_XK.go +++ b/resources/locales/sq_XK/sq_XK.go @@ -1,6 +1,8 @@ package sq_XK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *sq_XK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sq_XK' -func (t *sq_XK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sq_XK' +func (t *sq_XK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr/sr.go b/resources/locales/sr/sr.go index a41c95b..5645d06 100644 --- a/resources/locales/sr/sr.go +++ b/resources/locales/sr/sr.go @@ -1,6 +1,8 @@ package sr import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr' -func (t *sr) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr' +func (t *sr) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr_Cyrl/sr_Cyrl.go b/resources/locales/sr_Cyrl/sr_Cyrl.go index 59a495b..278d31e 100644 --- a/resources/locales/sr_Cyrl/sr_Cyrl.go +++ b/resources/locales/sr_Cyrl/sr_Cyrl.go @@ -1,6 +1,8 @@ package sr_Cyrl import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr_Cyrl) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Cyrl' -func (t *sr_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr_Cyrl' +func (t *sr_Cyrl) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go b/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go index 71173b1..75a96a4 100644 --- a/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go +++ b/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go @@ -1,6 +1,8 @@ package sr_Cyrl_BA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr_Cyrl_BA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Cyrl_BA' -func (t *sr_Cyrl_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr_Cyrl_BA' +func (t *sr_Cyrl_BA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go b/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go index f19ea43..ba3867d 100644 --- a/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go +++ b/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go @@ -1,6 +1,8 @@ package sr_Cyrl_ME import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr_Cyrl_ME) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Cyrl_ME' -func (t *sr_Cyrl_ME) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr_Cyrl_ME' +func (t *sr_Cyrl_ME) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go b/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go index 8e2d086..469fe20 100644 --- a/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go +++ b/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go @@ -1,6 +1,8 @@ package sr_Cyrl_RS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr_Cyrl_RS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Cyrl_RS' -func (t *sr_Cyrl_RS) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr_Cyrl_RS' +func (t *sr_Cyrl_RS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go b/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go index c40ed09..a05829d 100644 --- a/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go +++ b/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go @@ -1,6 +1,8 @@ package sr_Cyrl_XK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr_Cyrl_XK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Cyrl_XK' -func (t *sr_Cyrl_XK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr_Cyrl_XK' +func (t *sr_Cyrl_XK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr_Latn/sr_Latn.go b/resources/locales/sr_Latn/sr_Latn.go index 07a498b..062b485 100644 --- a/resources/locales/sr_Latn/sr_Latn.go +++ b/resources/locales/sr_Latn/sr_Latn.go @@ -1,6 +1,8 @@ package sr_Latn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr_Latn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Latn' -func (t *sr_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr_Latn' +func (t *sr_Latn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr_Latn_BA/sr_Latn_BA.go b/resources/locales/sr_Latn_BA/sr_Latn_BA.go index 297b8b3..bd4d855 100644 --- a/resources/locales/sr_Latn_BA/sr_Latn_BA.go +++ b/resources/locales/sr_Latn_BA/sr_Latn_BA.go @@ -1,6 +1,8 @@ package sr_Latn_BA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr_Latn_BA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Latn_BA' -func (t *sr_Latn_BA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr_Latn_BA' +func (t *sr_Latn_BA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr_Latn_ME/sr_Latn_ME.go b/resources/locales/sr_Latn_ME/sr_Latn_ME.go index 19ff3d3..0215a66 100644 --- a/resources/locales/sr_Latn_ME/sr_Latn_ME.go +++ b/resources/locales/sr_Latn_ME/sr_Latn_ME.go @@ -1,6 +1,8 @@ package sr_Latn_ME import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr_Latn_ME) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Latn_ME' -func (t *sr_Latn_ME) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr_Latn_ME' +func (t *sr_Latn_ME) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr_Latn_RS/sr_Latn_RS.go b/resources/locales/sr_Latn_RS/sr_Latn_RS.go index 970fb5b..d38146b 100644 --- a/resources/locales/sr_Latn_RS/sr_Latn_RS.go +++ b/resources/locales/sr_Latn_RS/sr_Latn_RS.go @@ -1,6 +1,8 @@ package sr_Latn_RS import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr_Latn_RS) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Latn_RS' -func (t *sr_Latn_RS) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr_Latn_RS' +func (t *sr_Latn_RS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sr_Latn_XK/sr_Latn_XK.go b/resources/locales/sr_Latn_XK/sr_Latn_XK.go index 35cc6ac..2f7aeb0 100644 --- a/resources/locales/sr_Latn_XK/sr_Latn_XK.go +++ b/resources/locales/sr_Latn_XK/sr_Latn_XK.go @@ -1,6 +1,8 @@ package sr_Latn_XK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,26 +29,18 @@ func (t *sr_Latn_XK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sr_Latn_XK' -func (t *sr_Latn_XK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - f, err := locales.F(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sr_Latn_XK' +func (t *sr_Latn_XK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) + f := locales.F(n, v) if (v == 0 && i%10 == 1 && i%100 != 11) || (f%10 == 1 && f%100 != 11) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if (v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14) || (f%10 >= 2 && f%10 <= 4 && f%100 < 12 && f%100 > 14) { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sv/sv.go b/resources/locales/sv/sv.go index fc10cd5..cddb462 100644 --- a/resources/locales/sv/sv.go +++ b/resources/locales/sv/sv.go @@ -1,6 +1,8 @@ package sv import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *sv) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sv' -func (t *sv) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sv' +func (t *sv) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sv_AX/sv_AX.go b/resources/locales/sv_AX/sv_AX.go index 765e4a7..fb33dc9 100644 --- a/resources/locales/sv_AX/sv_AX.go +++ b/resources/locales/sv_AX/sv_AX.go @@ -1,6 +1,8 @@ package sv_AX import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *sv_AX) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sv_AX' -func (t *sv_AX) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sv_AX' +func (t *sv_AX) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sv_FI/sv_FI.go b/resources/locales/sv_FI/sv_FI.go index 3957dd7..552c600 100644 --- a/resources/locales/sv_FI/sv_FI.go +++ b/resources/locales/sv_FI/sv_FI.go @@ -1,6 +1,8 @@ package sv_FI import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *sv_FI) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sv_FI' -func (t *sv_FI) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sv_FI' +func (t *sv_FI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sv_SE/sv_SE.go b/resources/locales/sv_SE/sv_SE.go index a68e09d..5207af4 100644 --- a/resources/locales/sv_SE/sv_SE.go +++ b/resources/locales/sv_SE/sv_SE.go @@ -1,6 +1,8 @@ package sv_SE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *sv_SE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sv_SE' -func (t *sv_SE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sv_SE' +func (t *sv_SE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sw/sw.go b/resources/locales/sw/sw.go index 115cbcd..8d9609d 100644 --- a/resources/locales/sw/sw.go +++ b/resources/locales/sw/sw.go @@ -1,6 +1,8 @@ package sw import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *sw) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sw' -func (t *sw) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sw' +func (t *sw) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sw_CD/sw_CD.go b/resources/locales/sw_CD/sw_CD.go index e6dcc60..e2e1593 100644 --- a/resources/locales/sw_CD/sw_CD.go +++ b/resources/locales/sw_CD/sw_CD.go @@ -1,6 +1,8 @@ package sw_CD import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *sw_CD) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sw_CD' -func (t *sw_CD) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sw_CD' +func (t *sw_CD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sw_KE/sw_KE.go b/resources/locales/sw_KE/sw_KE.go index ba7c68e..1083be7 100644 --- a/resources/locales/sw_KE/sw_KE.go +++ b/resources/locales/sw_KE/sw_KE.go @@ -1,6 +1,8 @@ package sw_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *sw_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sw_KE' -func (t *sw_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sw_KE' +func (t *sw_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sw_TZ/sw_TZ.go b/resources/locales/sw_TZ/sw_TZ.go index cff37a2..32adc77 100644 --- a/resources/locales/sw_TZ/sw_TZ.go +++ b/resources/locales/sw_TZ/sw_TZ.go @@ -1,6 +1,8 @@ package sw_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *sw_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sw_TZ' -func (t *sw_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sw_TZ' +func (t *sw_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/sw_UG/sw_UG.go b/resources/locales/sw_UG/sw_UG.go index f03be97..ffd639a 100644 --- a/resources/locales/sw_UG/sw_UG.go +++ b/resources/locales/sw_UG/sw_UG.go @@ -1,6 +1,8 @@ package sw_UG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *sw_UG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'sw_UG' -func (t *sw_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sw_UG' +func (t *sw_UG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ta/ta.go b/resources/locales/ta/ta.go index 8c2bd69..9b4cf21 100644 --- a/resources/locales/ta/ta.go +++ b/resources/locales/ta/ta.go @@ -1,6 +1,8 @@ package ta import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ta) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ta' -func (t *ta) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ta' +func (t *ta) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ta_IN/ta_IN.go b/resources/locales/ta_IN/ta_IN.go index b5e0422..5665918 100644 --- a/resources/locales/ta_IN/ta_IN.go +++ b/resources/locales/ta_IN/ta_IN.go @@ -1,6 +1,8 @@ package ta_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ta_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ta_IN' -func (t *ta_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ta_IN' +func (t *ta_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ta_LK/ta_LK.go b/resources/locales/ta_LK/ta_LK.go index f4a23c9..eeeab14 100644 --- a/resources/locales/ta_LK/ta_LK.go +++ b/resources/locales/ta_LK/ta_LK.go @@ -1,6 +1,8 @@ package ta_LK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ta_LK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ta_LK' -func (t *ta_LK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ta_LK' +func (t *ta_LK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ta_MY/ta_MY.go b/resources/locales/ta_MY/ta_MY.go index f2b1679..244e31c 100644 --- a/resources/locales/ta_MY/ta_MY.go +++ b/resources/locales/ta_MY/ta_MY.go @@ -1,6 +1,8 @@ package ta_MY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ta_MY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ta_MY' -func (t *ta_MY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ta_MY' +func (t *ta_MY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ta_SG/ta_SG.go b/resources/locales/ta_SG/ta_SG.go index 2ef9f35..2b86ccf 100644 --- a/resources/locales/ta_SG/ta_SG.go +++ b/resources/locales/ta_SG/ta_SG.go @@ -1,6 +1,8 @@ package ta_SG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ta_SG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ta_SG' -func (t *ta_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ta_SG' +func (t *ta_SG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/te/te.go b/resources/locales/te/te.go index 5862da9..5aaa40a 100644 --- a/resources/locales/te/te.go +++ b/resources/locales/te/te.go @@ -1,6 +1,8 @@ package te import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *te) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'te' -func (t *te) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'te' +func (t *te) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/te_IN/te_IN.go b/resources/locales/te_IN/te_IN.go index 23f4ab8..c257311 100644 --- a/resources/locales/te_IN/te_IN.go +++ b/resources/locales/te_IN/te_IN.go @@ -1,6 +1,8 @@ package te_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *te_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'te_IN' -func (t *te_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'te_IN' +func (t *te_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/teo/teo.go b/resources/locales/teo/teo.go index 480ce21..c4de182 100644 --- a/resources/locales/teo/teo.go +++ b/resources/locales/teo/teo.go @@ -1,6 +1,8 @@ package teo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *teo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'teo' -func (t *teo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'teo' +func (t *teo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/teo_KE/teo_KE.go b/resources/locales/teo_KE/teo_KE.go index cb8d92b..50c3448 100644 --- a/resources/locales/teo_KE/teo_KE.go +++ b/resources/locales/teo_KE/teo_KE.go @@ -1,6 +1,8 @@ package teo_KE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *teo_KE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'teo_KE' -func (t *teo_KE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'teo_KE' +func (t *teo_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/teo_UG/teo_UG.go b/resources/locales/teo_UG/teo_UG.go index 0c6bbaf..1cac8d0 100644 --- a/resources/locales/teo_UG/teo_UG.go +++ b/resources/locales/teo_UG/teo_UG.go @@ -1,6 +1,8 @@ package teo_UG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *teo_UG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'teo_UG' -func (t *teo_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'teo_UG' +func (t *teo_UG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/th/th.go b/resources/locales/th/th.go index 5d53f2f..3f110c0 100644 --- a/resources/locales/th/th.go +++ b/resources/locales/th/th.go @@ -1,6 +1,8 @@ package th import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *th) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'th' -func (t *th) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'th' +func (t *th) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/th_TH/th_TH.go b/resources/locales/th_TH/th_TH.go index ed8dd76..1500a88 100644 --- a/resources/locales/th_TH/th_TH.go +++ b/resources/locales/th_TH/th_TH.go @@ -1,6 +1,8 @@ package th_TH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *th_TH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'th_TH' -func (t *th_TH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'th_TH' +func (t *th_TH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ti/ti.go b/resources/locales/ti/ti.go index 8dd9f9e..f9f2d76 100644 --- a/resources/locales/ti/ti.go +++ b/resources/locales/ti/ti.go @@ -1,6 +1,8 @@ package ti import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ti) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ti' -func (t *ti) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ti' +func (t *ti) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ti_ER/ti_ER.go b/resources/locales/ti_ER/ti_ER.go index f56cb59..df0d458 100644 --- a/resources/locales/ti_ER/ti_ER.go +++ b/resources/locales/ti_ER/ti_ER.go @@ -1,6 +1,8 @@ package ti_ER import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ti_ER) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ti_ER' -func (t *ti_ER) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ti_ER' +func (t *ti_ER) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ti_ET/ti_ET.go b/resources/locales/ti_ET/ti_ET.go index 54dba55..7123cb1 100644 --- a/resources/locales/ti_ET/ti_ET.go +++ b/resources/locales/ti_ET/ti_ET.go @@ -1,6 +1,8 @@ package ti_ET import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ti_ET) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ti_ET' -func (t *ti_ET) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ti_ET' +func (t *ti_ET) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n >= 0 && n <= 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/tk/tk.go b/resources/locales/tk/tk.go index a7a3357..1920e40 100644 --- a/resources/locales/tk/tk.go +++ b/resources/locales/tk/tk.go @@ -1,6 +1,8 @@ package tk import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *tk) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'tk' -func (t *tk) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'tk' +func (t *tk) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/tk_TM/tk_TM.go b/resources/locales/tk_TM/tk_TM.go index 2797563..38e21b2 100644 --- a/resources/locales/tk_TM/tk_TM.go +++ b/resources/locales/tk_TM/tk_TM.go @@ -1,6 +1,8 @@ package tk_TM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *tk_TM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'tk_TM' -func (t *tk_TM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'tk_TM' +func (t *tk_TM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/to/to.go b/resources/locales/to/to.go index 8958f17..8d0e886 100644 --- a/resources/locales/to/to.go +++ b/resources/locales/to/to.go @@ -1,6 +1,8 @@ package to import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *to) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'to' -func (t *to) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'to' +func (t *to) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/to_TO/to_TO.go b/resources/locales/to_TO/to_TO.go index d098999..c275661 100644 --- a/resources/locales/to_TO/to_TO.go +++ b/resources/locales/to_TO/to_TO.go @@ -1,6 +1,8 @@ package to_TO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *to_TO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'to_TO' -func (t *to_TO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'to_TO' +func (t *to_TO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/tr/tr.go b/resources/locales/tr/tr.go index 1a15c94..10c64ac 100644 --- a/resources/locales/tr/tr.go +++ b/resources/locales/tr/tr.go @@ -1,6 +1,8 @@ package tr import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *tr) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'tr' -func (t *tr) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'tr' +func (t *tr) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/tr_CY/tr_CY.go b/resources/locales/tr_CY/tr_CY.go index 800edf2..6a34c1f 100644 --- a/resources/locales/tr_CY/tr_CY.go +++ b/resources/locales/tr_CY/tr_CY.go @@ -1,6 +1,8 @@ package tr_CY import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *tr_CY) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'tr_CY' -func (t *tr_CY) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'tr_CY' +func (t *tr_CY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/tr_TR/tr_TR.go b/resources/locales/tr_TR/tr_TR.go index 293bc02..b757694 100644 --- a/resources/locales/tr_TR/tr_TR.go +++ b/resources/locales/tr_TR/tr_TR.go @@ -1,6 +1,8 @@ package tr_TR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *tr_TR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'tr_TR' -func (t *tr_TR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'tr_TR' +func (t *tr_TR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/twq/twq.go b/resources/locales/twq/twq.go index 92f95df..9b5d0a1 100644 --- a/resources/locales/twq/twq.go +++ b/resources/locales/twq/twq.go @@ -1,6 +1,8 @@ package twq import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *twq) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'twq' -func (t *twq) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'twq' +func (t *twq) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/twq_NE/twq_NE.go b/resources/locales/twq_NE/twq_NE.go index 33eaed9..e4acf2f 100644 --- a/resources/locales/twq_NE/twq_NE.go +++ b/resources/locales/twq_NE/twq_NE.go @@ -1,6 +1,8 @@ package twq_NE import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *twq_NE) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'twq_NE' -func (t *twq_NE) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'twq_NE' +func (t *twq_NE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/tzm/tzm.go b/resources/locales/tzm/tzm.go index 4d37fef..f774a90 100644 --- a/resources/locales/tzm/tzm.go +++ b/resources/locales/tzm/tzm.go @@ -1,6 +1,8 @@ package tzm import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *tzm) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'tzm' -func (t *tzm) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'tzm' +func (t *tzm) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if (n >= 0 && n <= 1) || (n >= 11 && n <= 99) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/tzm_MA/tzm_MA.go b/resources/locales/tzm_MA/tzm_MA.go index 9072117..de0742e 100644 --- a/resources/locales/tzm_MA/tzm_MA.go +++ b/resources/locales/tzm_MA/tzm_MA.go @@ -1,6 +1,8 @@ package tzm_MA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *tzm_MA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'tzm_MA' -func (t *tzm_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'tzm_MA' +func (t *tzm_MA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if (n >= 0 && n <= 1) || (n >= 11 && n <= 99) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ug/ug.go b/resources/locales/ug/ug.go index 5e9dcf5..2d9e7fa 100644 --- a/resources/locales/ug/ug.go +++ b/resources/locales/ug/ug.go @@ -1,6 +1,8 @@ package ug import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ug) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ug' -func (t *ug) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ug' +func (t *ug) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ug_CN/ug_CN.go b/resources/locales/ug_CN/ug_CN.go index 307fc55..70a4794 100644 --- a/resources/locales/ug_CN/ug_CN.go +++ b/resources/locales/ug_CN/ug_CN.go @@ -1,6 +1,8 @@ package ug_CN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *ug_CN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ug_CN' -func (t *ug_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ug_CN' +func (t *ug_CN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/uk/uk.go b/resources/locales/uk/uk.go index 1871e18..7fe5225 100644 --- a/resources/locales/uk/uk.go +++ b/resources/locales/uk/uk.go @@ -1,6 +1,8 @@ package uk import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *uk) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'uk' -func (t *uk) CardinalPluralRule(num string) (locales.PluralRule, error) { - - v := locales.V(num) +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'uk' +func (t *uk) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 && i%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i%10 == 0) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 11 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/uk_UA/uk_UA.go b/resources/locales/uk_UA/uk_UA.go index d1a7cd4..6bfdaaf 100644 --- a/resources/locales/uk_UA/uk_UA.go +++ b/resources/locales/uk_UA/uk_UA.go @@ -1,6 +1,8 @@ package uk_UA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,23 +29,19 @@ func (t *uk_UA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'uk_UA' -func (t *uk_UA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'uk_UA' +func (t *uk_UA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if v == 0 && i%10 == 1 && i%100 != 11 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } else if v == 0 && i%10 >= 2 && i%10 <= 4 && i%100 < 12 && i%100 > 14 { - return locales.PluralRuleFew, nil + return locales.PluralRuleFew } else if (v == 0 && i%10 == 0) || (v == 0 && i%10 >= 5 && i%10 <= 9) || (v == 0 && i%100 >= 11 && i%100 <= 14) { - return locales.PluralRuleMany, nil + return locales.PluralRuleMany } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ur/ur.go b/resources/locales/ur/ur.go index c492777..e243d3c 100644 --- a/resources/locales/ur/ur.go +++ b/resources/locales/ur/ur.go @@ -1,6 +1,8 @@ package ur import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ur) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ur' -func (t *ur) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ur' +func (t *ur) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ur_IN/ur_IN.go b/resources/locales/ur_IN/ur_IN.go index 8ce711c..0ba61be 100644 --- a/resources/locales/ur_IN/ur_IN.go +++ b/resources/locales/ur_IN/ur_IN.go @@ -1,6 +1,8 @@ package ur_IN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ur_IN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ur_IN' -func (t *ur_IN) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ur_IN' +func (t *ur_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/ur_PK/ur_PK.go b/resources/locales/ur_PK/ur_PK.go index 6a22afc..b05dd24 100644 --- a/resources/locales/ur_PK/ur_PK.go +++ b/resources/locales/ur_PK/ur_PK.go @@ -1,6 +1,8 @@ package ur_PK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *ur_PK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'ur_PK' -func (t *ur_PK) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ur_PK' +func (t *ur_PK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/uz/uz.go b/resources/locales/uz/uz.go index c2729bd..565d3e1 100644 --- a/resources/locales/uz/uz.go +++ b/resources/locales/uz/uz.go @@ -1,6 +1,8 @@ package uz import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *uz) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'uz' -func (t *uz) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'uz' +func (t *uz) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/uz_Arab/uz_Arab.go b/resources/locales/uz_Arab/uz_Arab.go index 92fe363..7d93a6f 100644 --- a/resources/locales/uz_Arab/uz_Arab.go +++ b/resources/locales/uz_Arab/uz_Arab.go @@ -1,6 +1,8 @@ package uz_Arab import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *uz_Arab) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Arab' -func (t *uz_Arab) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'uz_Arab' +func (t *uz_Arab) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/uz_Arab_AF/uz_Arab_AF.go b/resources/locales/uz_Arab_AF/uz_Arab_AF.go index 4be7a5d..9000409 100644 --- a/resources/locales/uz_Arab_AF/uz_Arab_AF.go +++ b/resources/locales/uz_Arab_AF/uz_Arab_AF.go @@ -1,6 +1,8 @@ package uz_Arab_AF import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *uz_Arab_AF) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Arab_AF' -func (t *uz_Arab_AF) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'uz_Arab_AF' +func (t *uz_Arab_AF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/uz_Cyrl/uz_Cyrl.go b/resources/locales/uz_Cyrl/uz_Cyrl.go index bd8fa25..bdb15d9 100644 --- a/resources/locales/uz_Cyrl/uz_Cyrl.go +++ b/resources/locales/uz_Cyrl/uz_Cyrl.go @@ -1,6 +1,8 @@ package uz_Cyrl import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *uz_Cyrl) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Cyrl' -func (t *uz_Cyrl) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'uz_Cyrl' +func (t *uz_Cyrl) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go b/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go index 11ae05e..1479840 100644 --- a/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go +++ b/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go @@ -1,6 +1,8 @@ package uz_Cyrl_UZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *uz_Cyrl_UZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Cyrl_UZ' -func (t *uz_Cyrl_UZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'uz_Cyrl_UZ' +func (t *uz_Cyrl_UZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/uz_Latn/uz_Latn.go b/resources/locales/uz_Latn/uz_Latn.go index 0e33be3..3a49f83 100644 --- a/resources/locales/uz_Latn/uz_Latn.go +++ b/resources/locales/uz_Latn/uz_Latn.go @@ -1,6 +1,8 @@ package uz_Latn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *uz_Latn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Latn' -func (t *uz_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'uz_Latn' +func (t *uz_Latn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go b/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go index 56d7b5a..f240532 100644 --- a/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go +++ b/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go @@ -1,6 +1,8 @@ package uz_Latn_UZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *uz_Latn_UZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'uz_Latn_UZ' -func (t *uz_Latn_UZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'uz_Latn_UZ' +func (t *uz_Latn_UZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/vai/vai.go b/resources/locales/vai/vai.go index 857c241..8b639cf 100644 --- a/resources/locales/vai/vai.go +++ b/resources/locales/vai/vai.go @@ -1,6 +1,8 @@ package vai import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *vai) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vai' -func (t *vai) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vai' +func (t *vai) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/vai_Latn/vai_Latn.go b/resources/locales/vai_Latn/vai_Latn.go index 6167aed..52ee5d6 100644 --- a/resources/locales/vai_Latn/vai_Latn.go +++ b/resources/locales/vai_Latn/vai_Latn.go @@ -1,6 +1,8 @@ package vai_Latn import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *vai_Latn) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vai_Latn' -func (t *vai_Latn) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vai_Latn' +func (t *vai_Latn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/vai_Latn_LR/vai_Latn_LR.go b/resources/locales/vai_Latn_LR/vai_Latn_LR.go index 0b2e6c1..8d571d4 100644 --- a/resources/locales/vai_Latn_LR/vai_Latn_LR.go +++ b/resources/locales/vai_Latn_LR/vai_Latn_LR.go @@ -1,6 +1,8 @@ package vai_Latn_LR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *vai_Latn_LR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vai_Latn_LR' -func (t *vai_Latn_LR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vai_Latn_LR' +func (t *vai_Latn_LR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/vai_Vaii/vai_Vaii.go b/resources/locales/vai_Vaii/vai_Vaii.go index fa28062..c203404 100644 --- a/resources/locales/vai_Vaii/vai_Vaii.go +++ b/resources/locales/vai_Vaii/vai_Vaii.go @@ -1,6 +1,8 @@ package vai_Vaii import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *vai_Vaii) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vai_Vaii' -func (t *vai_Vaii) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vai_Vaii' +func (t *vai_Vaii) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go b/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go index f7d15ce..2fdf019 100644 --- a/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go +++ b/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go @@ -1,6 +1,8 @@ package vai_Vaii_LR import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *vai_Vaii_LR) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vai_Vaii_LR' -func (t *vai_Vaii_LR) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vai_Vaii_LR' +func (t *vai_Vaii_LR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/vi/vi.go b/resources/locales/vi/vi.go index 9080f77..7d9d326 100644 --- a/resources/locales/vi/vi.go +++ b/resources/locales/vi/vi.go @@ -1,6 +1,8 @@ package vi import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *vi) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vi' -func (t *vi) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vi' +func (t *vi) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/vi_VN/vi_VN.go b/resources/locales/vi_VN/vi_VN.go index abe1009..67196d0 100644 --- a/resources/locales/vi_VN/vi_VN.go +++ b/resources/locales/vi_VN/vi_VN.go @@ -1,6 +1,8 @@ package vi_VN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *vi_VN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vi_VN' -func (t *vi_VN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vi_VN' +func (t *vi_VN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/vo/vo.go b/resources/locales/vo/vo.go index 35a8892..46ef635 100644 --- a/resources/locales/vo/vo.go +++ b/resources/locales/vo/vo.go @@ -1,6 +1,8 @@ package vo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *vo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vo' -func (t *vo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vo' +func (t *vo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/vo_001/vo_001.go b/resources/locales/vo_001/vo_001.go index a28f980..a2d677f 100644 --- a/resources/locales/vo_001/vo_001.go +++ b/resources/locales/vo_001/vo_001.go @@ -1,6 +1,8 @@ package vo_001 import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *vo_001) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vo_001' -func (t *vo_001) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vo_001' +func (t *vo_001) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/vun/vun.go b/resources/locales/vun/vun.go index e716896..80eb885 100644 --- a/resources/locales/vun/vun.go +++ b/resources/locales/vun/vun.go @@ -1,6 +1,8 @@ package vun import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *vun) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vun' -func (t *vun) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vun' +func (t *vun) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/vun_TZ/vun_TZ.go b/resources/locales/vun_TZ/vun_TZ.go index a279a83..b61627f 100644 --- a/resources/locales/vun_TZ/vun_TZ.go +++ b/resources/locales/vun_TZ/vun_TZ.go @@ -1,6 +1,8 @@ package vun_TZ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *vun_TZ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'vun_TZ' -func (t *vun_TZ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vun_TZ' +func (t *vun_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/wae/wae.go b/resources/locales/wae/wae.go index 46a3580..385c51c 100644 --- a/resources/locales/wae/wae.go +++ b/resources/locales/wae/wae.go @@ -1,6 +1,8 @@ package wae import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *wae) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'wae' -func (t *wae) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'wae' +func (t *wae) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/wae_CH/wae_CH.go b/resources/locales/wae_CH/wae_CH.go index e91ed57..5e35b34 100644 --- a/resources/locales/wae_CH/wae_CH.go +++ b/resources/locales/wae_CH/wae_CH.go @@ -1,6 +1,8 @@ package wae_CH import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *wae_CH) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'wae_CH' -func (t *wae_CH) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'wae_CH' +func (t *wae_CH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/xog/xog.go b/resources/locales/xog/xog.go index 9a8e7f2..6f5505d 100644 --- a/resources/locales/xog/xog.go +++ b/resources/locales/xog/xog.go @@ -1,6 +1,8 @@ package xog import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *xog) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'xog' -func (t *xog) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'xog' +func (t *xog) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/xog_UG/xog_UG.go b/resources/locales/xog_UG/xog_UG.go index ca65563..a79f6ef 100644 --- a/resources/locales/xog_UG/xog_UG.go +++ b/resources/locales/xog_UG/xog_UG.go @@ -1,6 +1,8 @@ package xog_UG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,17 +29,14 @@ func (t *xog_UG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'xog_UG' -func (t *xog_UG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'xog_UG' +func (t *xog_UG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) if n == 1 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/yav/yav.go b/resources/locales/yav/yav.go index 85cbab6..2e5edae 100644 --- a/resources/locales/yav/yav.go +++ b/resources/locales/yav/yav.go @@ -1,6 +1,8 @@ package yav import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *yav) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'yav' -func (t *yav) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yav' +func (t *yav) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/yav_CM/yav_CM.go b/resources/locales/yav_CM/yav_CM.go index a7605f9..a447ae4 100644 --- a/resources/locales/yav_CM/yav_CM.go +++ b/resources/locales/yav_CM/yav_CM.go @@ -1,6 +1,8 @@ package yav_CM import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *yav_CM) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'yav_CM' -func (t *yav_CM) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yav_CM' +func (t *yav_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/yi/yi.go b/resources/locales/yi/yi.go index 35c5fbc..1f0972c 100644 --- a/resources/locales/yi/yi.go +++ b/resources/locales/yi/yi.go @@ -1,6 +1,8 @@ package yi import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *yi) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'yi' -func (t *yi) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yi' +func (t *yi) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/yi_001/yi_001.go b/resources/locales/yi_001/yi_001.go index b591c04..efe2b9e 100644 --- a/resources/locales/yi_001/yi_001.go +++ b/resources/locales/yi_001/yi_001.go @@ -1,6 +1,8 @@ package yi_001 import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,19 +29,15 @@ func (t *yi_001) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'yi_001' -func (t *yi_001) CardinalPluralRule(num string) (locales.PluralRule, error) { - - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yi_001' +func (t *yi_001) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - v := locales.V(num) + n := math.Abs(num) + i := int64(n) if i == 1 && v == 0 { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/yo/yo.go b/resources/locales/yo/yo.go index 2d15be5..fec4244 100644 --- a/resources/locales/yo/yo.go +++ b/resources/locales/yo/yo.go @@ -1,6 +1,8 @@ package yo import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *yo) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'yo' -func (t *yo) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yo' +func (t *yo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/yo_BJ/yo_BJ.go b/resources/locales/yo_BJ/yo_BJ.go index 42e33b4..a683485 100644 --- a/resources/locales/yo_BJ/yo_BJ.go +++ b/resources/locales/yo_BJ/yo_BJ.go @@ -1,6 +1,8 @@ package yo_BJ import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *yo_BJ) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'yo_BJ' -func (t *yo_BJ) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yo_BJ' +func (t *yo_BJ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/yo_NG/yo_NG.go b/resources/locales/yo_NG/yo_NG.go index 143b4de..e5f7216 100644 --- a/resources/locales/yo_NG/yo_NG.go +++ b/resources/locales/yo_NG/yo_NG.go @@ -1,6 +1,8 @@ package yo_NG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *yo_NG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'yo_NG' -func (t *yo_NG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yo_NG' +func (t *yo_NG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/yue/yue.go b/resources/locales/yue/yue.go index 55c7be3..409f2a0 100644 --- a/resources/locales/yue/yue.go +++ b/resources/locales/yue/yue.go @@ -1,6 +1,8 @@ package yue import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *yue) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'yue' -func (t *yue) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yue' +func (t *yue) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/yue_HK/yue_HK.go b/resources/locales/yue_HK/yue_HK.go index bb5dd32..c1b8077 100644 --- a/resources/locales/yue_HK/yue_HK.go +++ b/resources/locales/yue_HK/yue_HK.go @@ -1,6 +1,8 @@ package yue_HK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *yue_HK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'yue_HK' -func (t *yue_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yue_HK' +func (t *yue_HK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/zgh/zgh.go b/resources/locales/zgh/zgh.go index f5d9fee..cea0d8e 100644 --- a/resources/locales/zgh/zgh.go +++ b/resources/locales/zgh/zgh.go @@ -1,6 +1,8 @@ package zgh import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *zgh) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zgh' -func (t *zgh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zgh' +func (t *zgh) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/zgh_MA/zgh_MA.go b/resources/locales/zgh_MA/zgh_MA.go index 27ccc45..33de810 100644 --- a/resources/locales/zgh_MA/zgh_MA.go +++ b/resources/locales/zgh_MA/zgh_MA.go @@ -1,6 +1,8 @@ package zgh_MA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,7 +29,7 @@ func (t *zgh_MA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zgh_MA' -func (t *zgh_MA) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zgh_MA' +func (t *zgh_MA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { return locales.PluralRuleUnknown, nil } diff --git a/resources/locales/zh/zh.go b/resources/locales/zh/zh.go index e845ced..e74ecee 100644 --- a/resources/locales/zh/zh.go +++ b/resources/locales/zh/zh.go @@ -1,6 +1,8 @@ package zh import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *zh) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zh' -func (t *zh) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh' +func (t *zh) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hans/zh_Hans.go b/resources/locales/zh_Hans/zh_Hans.go index 9b760ed..d44608d 100644 --- a/resources/locales/zh_Hans/zh_Hans.go +++ b/resources/locales/zh_Hans/zh_Hans.go @@ -1,6 +1,8 @@ package zh_Hans import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *zh_Hans) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hans' -func (t *zh_Hans) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hans' +func (t *zh_Hans) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hans_CN/zh_Hans_CN.go b/resources/locales/zh_Hans_CN/zh_Hans_CN.go index 218047b..fd239b9 100644 --- a/resources/locales/zh_Hans_CN/zh_Hans_CN.go +++ b/resources/locales/zh_Hans_CN/zh_Hans_CN.go @@ -1,6 +1,8 @@ package zh_Hans_CN import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *zh_Hans_CN) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hans_CN' -func (t *zh_Hans_CN) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hans_CN' +func (t *zh_Hans_CN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hans_HK/zh_Hans_HK.go b/resources/locales/zh_Hans_HK/zh_Hans_HK.go index 5b96db1..26825c5 100644 --- a/resources/locales/zh_Hans_HK/zh_Hans_HK.go +++ b/resources/locales/zh_Hans_HK/zh_Hans_HK.go @@ -1,6 +1,8 @@ package zh_Hans_HK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *zh_Hans_HK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hans_HK' -func (t *zh_Hans_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hans_HK' +func (t *zh_Hans_HK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hans_MO/zh_Hans_MO.go b/resources/locales/zh_Hans_MO/zh_Hans_MO.go index 59195a2..f8890b8 100644 --- a/resources/locales/zh_Hans_MO/zh_Hans_MO.go +++ b/resources/locales/zh_Hans_MO/zh_Hans_MO.go @@ -1,6 +1,8 @@ package zh_Hans_MO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *zh_Hans_MO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hans_MO' -func (t *zh_Hans_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hans_MO' +func (t *zh_Hans_MO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hans_SG/zh_Hans_SG.go b/resources/locales/zh_Hans_SG/zh_Hans_SG.go index 3f659a8..a7b9158 100644 --- a/resources/locales/zh_Hans_SG/zh_Hans_SG.go +++ b/resources/locales/zh_Hans_SG/zh_Hans_SG.go @@ -1,6 +1,8 @@ package zh_Hans_SG import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *zh_Hans_SG) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hans_SG' -func (t *zh_Hans_SG) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hans_SG' +func (t *zh_Hans_SG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hant/zh_Hant.go b/resources/locales/zh_Hant/zh_Hant.go index 7f6a811..55eccce 100644 --- a/resources/locales/zh_Hant/zh_Hant.go +++ b/resources/locales/zh_Hant/zh_Hant.go @@ -1,6 +1,8 @@ package zh_Hant import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *zh_Hant) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hant' -func (t *zh_Hant) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hant' +func (t *zh_Hant) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hant_HK/zh_Hant_HK.go b/resources/locales/zh_Hant_HK/zh_Hant_HK.go index b6c8343..9524311 100644 --- a/resources/locales/zh_Hant_HK/zh_Hant_HK.go +++ b/resources/locales/zh_Hant_HK/zh_Hant_HK.go @@ -1,6 +1,8 @@ package zh_Hant_HK import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *zh_Hant_HK) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hant_HK' -func (t *zh_Hant_HK) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hant_HK' +func (t *zh_Hant_HK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hant_MO/zh_Hant_MO.go b/resources/locales/zh_Hant_MO/zh_Hant_MO.go index 082df9f..be2df32 100644 --- a/resources/locales/zh_Hant_MO/zh_Hant_MO.go +++ b/resources/locales/zh_Hant_MO/zh_Hant_MO.go @@ -1,6 +1,8 @@ package zh_Hant_MO import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *zh_Hant_MO) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hant_MO' -func (t *zh_Hant_MO) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hant_MO' +func (t *zh_Hant_MO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hant_TW/zh_Hant_TW.go b/resources/locales/zh_Hant_TW/zh_Hant_TW.go index d9cf021..e91b1fc 100644 --- a/resources/locales/zh_Hant_TW/zh_Hant_TW.go +++ b/resources/locales/zh_Hant_TW/zh_Hant_TW.go @@ -1,6 +1,8 @@ package zh_Hant_TW import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,8 +29,10 @@ func (t *zh_Hant_TW) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zh_Hant_TW' -func (t *zh_Hant_TW) CardinalPluralRule(num string) (locales.PluralRule, error) { +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hant_TW' +func (t *zh_Hant_TW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { + + n := math.Abs(num) - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zu/zu.go b/resources/locales/zu/zu.go index 1fb258b..690d8c5 100644 --- a/resources/locales/zu/zu.go +++ b/resources/locales/zu/zu.go @@ -1,6 +1,8 @@ package zu import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *zu) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zu' -func (t *zu) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zu' +func (t *zu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } diff --git a/resources/locales/zu_ZA/zu_ZA.go b/resources/locales/zu_ZA/zu_ZA.go index 987ab6b..b2a38e1 100644 --- a/resources/locales/zu_ZA/zu_ZA.go +++ b/resources/locales/zu_ZA/zu_ZA.go @@ -1,6 +1,8 @@ package zu_ZA import ( + "math" + "github.com/go-playground/universal-translator/resources/locales" ) @@ -27,22 +29,15 @@ func (t *zu_ZA) Plurals() []locales.PluralRule { return t.plurals } -// CardinalPluralRule returns the PluralRule given 'num' for 'zu_ZA' -func (t *zu_ZA) CardinalPluralRule(num string) (locales.PluralRule, error) { - - n, err := locales.N(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } +// cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zu_ZA' +func (t *zu_ZA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - i, err := locales.I(num) - if err != nil { - return locales.PluralRuleUnknown, &locales.ErrBadNumberValue{NumberValue: num, InnerError: err} - } + n := math.Abs(num) + i := int64(n) if (i == 0) || (n == 1) { - return locales.PluralRuleOne, nil + return locales.PluralRuleOne } - return locales.PluralRuleOther, nil + return locales.PluralRuleOther } From 301720042f85eb1479f600c4bacca10df931ff73 Mon Sep 17 00:00:00 2001 From: joeybloggs Date: Tue, 9 Aug 2016 22:03:53 -0400 Subject: [PATCH 3/3] reworked pre + post processing structure to handle the currencies coming next. --- cmd/resources/generate_resources.go | 308 ++++++++++++++---- cmd/resources/translator.tmpl | 20 +- resources/locales/af/af.go | 20 +- resources/locales/af_NA/af_NA.go | 20 +- resources/locales/af_ZA/af_ZA.go | 20 +- resources/locales/agq/agq.go | 28 +- resources/locales/agq_CM/agq_CM.go | 28 +- resources/locales/ak/ak.go | 20 +- resources/locales/ak_GH/ak_GH.go | 20 +- resources/locales/am/am.go | 20 +- resources/locales/am_ET/am_ET.go | 20 +- resources/locales/ar/ar.go | 20 +- resources/locales/ar_001/ar_001.go | 20 +- resources/locales/ar_AE/ar_AE.go | 20 +- resources/locales/ar_BH/ar_BH.go | 20 +- resources/locales/ar_DJ/ar_DJ.go | 20 +- resources/locales/ar_DZ/ar_DZ.go | 20 +- resources/locales/ar_EG/ar_EG.go | 20 +- resources/locales/ar_EH/ar_EH.go | 20 +- resources/locales/ar_ER/ar_ER.go | 20 +- resources/locales/ar_IL/ar_IL.go | 20 +- resources/locales/ar_IQ/ar_IQ.go | 20 +- resources/locales/ar_JO/ar_JO.go | 20 +- resources/locales/ar_KM/ar_KM.go | 20 +- resources/locales/ar_KW/ar_KW.go | 20 +- resources/locales/ar_LB/ar_LB.go | 20 +- resources/locales/ar_LY/ar_LY.go | 20 +- resources/locales/ar_MA/ar_MA.go | 20 +- resources/locales/ar_MR/ar_MR.go | 20 +- resources/locales/ar_OM/ar_OM.go | 20 +- resources/locales/ar_PS/ar_PS.go | 20 +- resources/locales/ar_QA/ar_QA.go | 20 +- resources/locales/ar_SA/ar_SA.go | 20 +- resources/locales/ar_SD/ar_SD.go | 20 +- resources/locales/ar_SO/ar_SO.go | 20 +- resources/locales/ar_SS/ar_SS.go | 20 +- resources/locales/ar_SY/ar_SY.go | 20 +- resources/locales/ar_TD/ar_TD.go | 20 +- resources/locales/ar_TN/ar_TN.go | 20 +- resources/locales/ar_YE/ar_YE.go | 20 +- resources/locales/as/as.go | 20 +- resources/locales/as_IN/as_IN.go | 20 +- resources/locales/asa/asa.go | 20 +- resources/locales/asa_TZ/asa_TZ.go | 20 +- resources/locales/ast/ast.go | 20 +- resources/locales/ast_ES/ast_ES.go | 20 +- resources/locales/az/az.go | 20 +- resources/locales/az_Cyrl/az_Cyrl.go | 20 +- resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go | 20 +- resources/locales/az_Latn/az_Latn.go | 20 +- resources/locales/az_Latn_AZ/az_Latn_AZ.go | 20 +- resources/locales/bas/bas.go | 28 +- resources/locales/bas_CM/bas_CM.go | 28 +- resources/locales/be/be.go | 20 +- resources/locales/be_BY/be_BY.go | 20 +- resources/locales/bem/bem.go | 20 +- resources/locales/bem_ZM/bem_ZM.go | 20 +- resources/locales/bez/bez.go | 20 +- resources/locales/bez_TZ/bez_TZ.go | 20 +- resources/locales/bg/bg.go | 20 +- resources/locales/bg_BG/bg_BG.go | 20 +- resources/locales/bm/bm.go | 29 +- resources/locales/bm_ML/bm_ML.go | 29 +- resources/locales/bn/bn.go | 20 +- resources/locales/bn_BD/bn_BD.go | 20 +- resources/locales/bn_IN/bn_IN.go | 20 +- resources/locales/bo/bo.go | 29 +- resources/locales/bo_CN/bo_CN.go | 29 +- resources/locales/bo_IN/bo_IN.go | 29 +- resources/locales/br/br.go | 20 +- resources/locales/br_FR/br_FR.go | 20 +- resources/locales/brx/brx.go | 20 +- resources/locales/brx_IN/brx_IN.go | 20 +- resources/locales/bs/bs.go | 20 +- resources/locales/bs_Cyrl/bs_Cyrl.go | 20 +- resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go | 20 +- resources/locales/bs_Latn/bs_Latn.go | 20 +- resources/locales/bs_Latn_BA/bs_Latn_BA.go | 20 +- resources/locales/ca/ca.go | 20 +- resources/locales/ca_AD/ca_AD.go | 20 +- resources/locales/ca_ES/ca_ES.go | 20 +- .../locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go | 20 +- resources/locales/ca_FR/ca_FR.go | 20 +- resources/locales/ca_IT/ca_IT.go | 20 +- resources/locales/ce/ce.go | 20 +- resources/locales/ce_RU/ce_RU.go | 20 +- resources/locales/cgg/cgg.go | 20 +- resources/locales/cgg_UG/cgg_UG.go | 20 +- resources/locales/chr/chr.go | 20 +- resources/locales/chr_US/chr_US.go | 20 +- resources/locales/ckb/ckb.go | 20 +- resources/locales/ckb_IQ/ckb_IQ.go | 20 +- resources/locales/ckb_IR/ckb_IR.go | 20 +- resources/locales/cs/cs.go | 20 +- resources/locales/cs_CZ/cs_CZ.go | 20 +- resources/locales/cu/cu.go | 28 +- resources/locales/cu_RU/cu_RU.go | 28 +- resources/locales/cy/cy.go | 20 +- resources/locales/cy_GB/cy_GB.go | 20 +- resources/locales/da/da.go | 20 +- resources/locales/da_DK/da_DK.go | 20 +- resources/locales/da_GL/da_GL.go | 20 +- resources/locales/dav/dav.go | 28 +- resources/locales/dav_KE/dav_KE.go | 28 +- resources/locales/de/de.go | 20 +- resources/locales/de_AT/de_AT.go | 20 +- resources/locales/de_BE/de_BE.go | 20 +- resources/locales/de_CH/de_CH.go | 20 +- resources/locales/de_DE/de_DE.go | 20 +- resources/locales/de_LI/de_LI.go | 20 +- resources/locales/de_LU/de_LU.go | 20 +- resources/locales/dje/dje.go | 28 +- resources/locales/dje_NE/dje_NE.go | 28 +- resources/locales/dsb/dsb.go | 20 +- resources/locales/dsb_DE/dsb_DE.go | 20 +- resources/locales/dua/dua.go | 28 +- resources/locales/dua_CM/dua_CM.go | 28 +- resources/locales/dyo/dyo.go | 28 +- resources/locales/dyo_SN/dyo_SN.go | 28 +- resources/locales/dz/dz.go | 29 +- resources/locales/dz_BT/dz_BT.go | 29 +- resources/locales/ebu/ebu.go | 28 +- resources/locales/ebu_KE/ebu_KE.go | 28 +- resources/locales/ee/ee.go | 20 +- resources/locales/ee_GH/ee_GH.go | 20 +- resources/locales/ee_TG/ee_TG.go | 20 +- resources/locales/el/el.go | 20 +- resources/locales/el_CY/el_CY.go | 20 +- resources/locales/el_GR/el_GR.go | 20 +- resources/locales/en/en.go | 20 +- resources/locales/en_001/en_001.go | 20 +- resources/locales/en_150/en_150.go | 20 +- resources/locales/en_AG/en_AG.go | 20 +- resources/locales/en_AI/en_AI.go | 20 +- resources/locales/en_AS/en_AS.go | 20 +- resources/locales/en_AT/en_AT.go | 20 +- resources/locales/en_AU/en_AU.go | 20 +- resources/locales/en_BB/en_BB.go | 20 +- resources/locales/en_BE/en_BE.go | 20 +- resources/locales/en_BI/en_BI.go | 20 +- resources/locales/en_BM/en_BM.go | 20 +- resources/locales/en_BS/en_BS.go | 20 +- resources/locales/en_BW/en_BW.go | 20 +- resources/locales/en_BZ/en_BZ.go | 20 +- resources/locales/en_CA/en_CA.go | 20 +- resources/locales/en_CC/en_CC.go | 20 +- resources/locales/en_CH/en_CH.go | 20 +- resources/locales/en_CK/en_CK.go | 20 +- resources/locales/en_CM/en_CM.go | 20 +- resources/locales/en_CX/en_CX.go | 20 +- resources/locales/en_CY/en_CY.go | 20 +- resources/locales/en_DE/en_DE.go | 20 +- resources/locales/en_DG/en_DG.go | 20 +- resources/locales/en_DK/en_DK.go | 20 +- resources/locales/en_DM/en_DM.go | 20 +- resources/locales/en_ER/en_ER.go | 20 +- resources/locales/en_FI/en_FI.go | 20 +- resources/locales/en_FJ/en_FJ.go | 20 +- resources/locales/en_FK/en_FK.go | 20 +- resources/locales/en_FM/en_FM.go | 20 +- resources/locales/en_GB/en_GB.go | 20 +- resources/locales/en_GD/en_GD.go | 20 +- resources/locales/en_GG/en_GG.go | 20 +- resources/locales/en_GH/en_GH.go | 20 +- resources/locales/en_GI/en_GI.go | 20 +- resources/locales/en_GM/en_GM.go | 20 +- resources/locales/en_GU/en_GU.go | 20 +- resources/locales/en_GY/en_GY.go | 20 +- resources/locales/en_HK/en_HK.go | 20 +- resources/locales/en_IE/en_IE.go | 20 +- resources/locales/en_IL/en_IL.go | 20 +- resources/locales/en_IM/en_IM.go | 20 +- resources/locales/en_IN/en_IN.go | 20 +- resources/locales/en_IO/en_IO.go | 20 +- resources/locales/en_JE/en_JE.go | 20 +- resources/locales/en_JM/en_JM.go | 20 +- resources/locales/en_KE/en_KE.go | 20 +- resources/locales/en_KI/en_KI.go | 20 +- resources/locales/en_KN/en_KN.go | 20 +- resources/locales/en_KY/en_KY.go | 20 +- resources/locales/en_LC/en_LC.go | 20 +- resources/locales/en_LR/en_LR.go | 20 +- resources/locales/en_LS/en_LS.go | 20 +- resources/locales/en_MG/en_MG.go | 20 +- resources/locales/en_MH/en_MH.go | 20 +- resources/locales/en_MO/en_MO.go | 20 +- resources/locales/en_MP/en_MP.go | 20 +- resources/locales/en_MS/en_MS.go | 20 +- resources/locales/en_MT/en_MT.go | 20 +- resources/locales/en_MU/en_MU.go | 20 +- resources/locales/en_MW/en_MW.go | 20 +- resources/locales/en_MY/en_MY.go | 20 +- resources/locales/en_NA/en_NA.go | 20 +- resources/locales/en_NF/en_NF.go | 20 +- resources/locales/en_NG/en_NG.go | 20 +- resources/locales/en_NL/en_NL.go | 20 +- resources/locales/en_NR/en_NR.go | 20 +- resources/locales/en_NU/en_NU.go | 20 +- resources/locales/en_NZ/en_NZ.go | 20 +- resources/locales/en_PG/en_PG.go | 20 +- resources/locales/en_PH/en_PH.go | 20 +- resources/locales/en_PK/en_PK.go | 20 +- resources/locales/en_PN/en_PN.go | 20 +- resources/locales/en_PR/en_PR.go | 20 +- resources/locales/en_PW/en_PW.go | 20 +- resources/locales/en_RW/en_RW.go | 20 +- resources/locales/en_SB/en_SB.go | 20 +- resources/locales/en_SC/en_SC.go | 20 +- resources/locales/en_SD/en_SD.go | 20 +- resources/locales/en_SE/en_SE.go | 20 +- resources/locales/en_SG/en_SG.go | 20 +- resources/locales/en_SH/en_SH.go | 20 +- resources/locales/en_SI/en_SI.go | 20 +- resources/locales/en_SL/en_SL.go | 20 +- resources/locales/en_SS/en_SS.go | 20 +- resources/locales/en_SX/en_SX.go | 20 +- resources/locales/en_SZ/en_SZ.go | 20 +- resources/locales/en_TC/en_TC.go | 20 +- resources/locales/en_TK/en_TK.go | 20 +- resources/locales/en_TO/en_TO.go | 20 +- resources/locales/en_TT/en_TT.go | 20 +- resources/locales/en_TV/en_TV.go | 20 +- resources/locales/en_TZ/en_TZ.go | 20 +- resources/locales/en_UG/en_UG.go | 20 +- resources/locales/en_UM/en_UM.go | 20 +- resources/locales/en_US/en_US.go | 20 +- resources/locales/en_US_POSIX/en_US_POSIX.go | 20 +- resources/locales/en_VC/en_VC.go | 20 +- resources/locales/en_VG/en_VG.go | 20 +- resources/locales/en_VI/en_VI.go | 20 +- resources/locales/en_VU/en_VU.go | 20 +- resources/locales/en_WS/en_WS.go | 20 +- resources/locales/en_ZA/en_ZA.go | 20 +- resources/locales/en_ZM/en_ZM.go | 20 +- resources/locales/en_ZW/en_ZW.go | 20 +- resources/locales/eo/eo.go | 20 +- resources/locales/eo_001/eo_001.go | 20 +- resources/locales/es/es.go | 20 +- resources/locales/es_419/es_419.go | 20 +- resources/locales/es_AR/es_AR.go | 20 +- resources/locales/es_BO/es_BO.go | 20 +- resources/locales/es_BR/es_BR.go | 20 +- resources/locales/es_CL/es_CL.go | 20 +- resources/locales/es_CO/es_CO.go | 20 +- resources/locales/es_CR/es_CR.go | 20 +- resources/locales/es_CU/es_CU.go | 20 +- resources/locales/es_DO/es_DO.go | 20 +- resources/locales/es_EA/es_EA.go | 20 +- resources/locales/es_EC/es_EC.go | 20 +- resources/locales/es_ES/es_ES.go | 20 +- resources/locales/es_GQ/es_GQ.go | 20 +- resources/locales/es_GT/es_GT.go | 20 +- resources/locales/es_HN/es_HN.go | 20 +- resources/locales/es_IC/es_IC.go | 20 +- resources/locales/es_MX/es_MX.go | 20 +- resources/locales/es_NI/es_NI.go | 20 +- resources/locales/es_PA/es_PA.go | 20 +- resources/locales/es_PE/es_PE.go | 20 +- resources/locales/es_PH/es_PH.go | 20 +- resources/locales/es_PR/es_PR.go | 20 +- resources/locales/es_PY/es_PY.go | 20 +- resources/locales/es_SV/es_SV.go | 20 +- resources/locales/es_US/es_US.go | 20 +- resources/locales/es_UY/es_UY.go | 20 +- resources/locales/es_VE/es_VE.go | 20 +- resources/locales/et/et.go | 20 +- resources/locales/et_EE/et_EE.go | 20 +- resources/locales/eu/eu.go | 20 +- resources/locales/eu_ES/eu_ES.go | 20 +- resources/locales/ewo/ewo.go | 28 +- resources/locales/ewo_CM/ewo_CM.go | 28 +- resources/locales/fa/fa.go | 20 +- resources/locales/fa_AF/fa_AF.go | 20 +- resources/locales/fa_IR/fa_IR.go | 20 +- resources/locales/ff/ff.go | 20 +- resources/locales/ff_CM/ff_CM.go | 20 +- resources/locales/ff_GN/ff_GN.go | 20 +- resources/locales/ff_MR/ff_MR.go | 20 +- resources/locales/ff_SN/ff_SN.go | 20 +- resources/locales/fi/fi.go | 20 +- resources/locales/fi_FI/fi_FI.go | 20 +- resources/locales/fil/fil.go | 20 +- resources/locales/fil_PH/fil_PH.go | 20 +- resources/locales/fo/fo.go | 20 +- resources/locales/fo_DK/fo_DK.go | 20 +- resources/locales/fo_FO/fo_FO.go | 20 +- resources/locales/fr/fr.go | 20 +- resources/locales/fr_BE/fr_BE.go | 20 +- resources/locales/fr_BF/fr_BF.go | 20 +- resources/locales/fr_BI/fr_BI.go | 20 +- resources/locales/fr_BJ/fr_BJ.go | 20 +- resources/locales/fr_BL/fr_BL.go | 20 +- resources/locales/fr_CA/fr_CA.go | 20 +- resources/locales/fr_CD/fr_CD.go | 20 +- resources/locales/fr_CF/fr_CF.go | 20 +- resources/locales/fr_CG/fr_CG.go | 20 +- resources/locales/fr_CH/fr_CH.go | 20 +- resources/locales/fr_CI/fr_CI.go | 20 +- resources/locales/fr_CM/fr_CM.go | 20 +- resources/locales/fr_DJ/fr_DJ.go | 20 +- resources/locales/fr_DZ/fr_DZ.go | 20 +- resources/locales/fr_FR/fr_FR.go | 20 +- resources/locales/fr_GA/fr_GA.go | 20 +- resources/locales/fr_GF/fr_GF.go | 20 +- resources/locales/fr_GN/fr_GN.go | 20 +- resources/locales/fr_GP/fr_GP.go | 20 +- resources/locales/fr_GQ/fr_GQ.go | 20 +- resources/locales/fr_HT/fr_HT.go | 20 +- resources/locales/fr_KM/fr_KM.go | 20 +- resources/locales/fr_LU/fr_LU.go | 20 +- resources/locales/fr_MA/fr_MA.go | 20 +- resources/locales/fr_MC/fr_MC.go | 20 +- resources/locales/fr_MF/fr_MF.go | 20 +- resources/locales/fr_MG/fr_MG.go | 20 +- resources/locales/fr_ML/fr_ML.go | 20 +- resources/locales/fr_MQ/fr_MQ.go | 20 +- resources/locales/fr_MR/fr_MR.go | 20 +- resources/locales/fr_MU/fr_MU.go | 20 +- resources/locales/fr_NC/fr_NC.go | 20 +- resources/locales/fr_NE/fr_NE.go | 20 +- resources/locales/fr_PF/fr_PF.go | 20 +- resources/locales/fr_PM/fr_PM.go | 20 +- resources/locales/fr_RE/fr_RE.go | 20 +- resources/locales/fr_RW/fr_RW.go | 20 +- resources/locales/fr_SC/fr_SC.go | 20 +- resources/locales/fr_SN/fr_SN.go | 20 +- resources/locales/fr_SY/fr_SY.go | 20 +- resources/locales/fr_TD/fr_TD.go | 20 +- resources/locales/fr_TG/fr_TG.go | 20 +- resources/locales/fr_TN/fr_TN.go | 20 +- resources/locales/fr_VU/fr_VU.go | 20 +- resources/locales/fr_WF/fr_WF.go | 20 +- resources/locales/fr_YT/fr_YT.go | 20 +- resources/locales/fur/fur.go | 20 +- resources/locales/fur_IT/fur_IT.go | 20 +- resources/locales/fy/fy.go | 20 +- resources/locales/fy_NL/fy_NL.go | 20 +- resources/locales/ga/ga.go | 20 +- resources/locales/ga_IE/ga_IE.go | 20 +- resources/locales/gd/gd.go | 20 +- resources/locales/gd_GB/gd_GB.go | 20 +- resources/locales/gl/gl.go | 20 +- resources/locales/gl_ES/gl_ES.go | 20 +- resources/locales/gsw/gsw.go | 20 +- resources/locales/gsw_CH/gsw_CH.go | 20 +- resources/locales/gsw_FR/gsw_FR.go | 20 +- resources/locales/gsw_LI/gsw_LI.go | 20 +- resources/locales/gu/gu.go | 20 +- resources/locales/gu_IN/gu_IN.go | 20 +- resources/locales/guz/guz.go | 28 +- resources/locales/guz_KE/guz_KE.go | 28 +- resources/locales/gv/gv.go | 20 +- resources/locales/gv_IM/gv_IM.go | 20 +- resources/locales/ha/ha.go | 20 +- resources/locales/ha_GH/ha_GH.go | 20 +- resources/locales/ha_NE/ha_NE.go | 20 +- resources/locales/ha_NG/ha_NG.go | 20 +- resources/locales/haw/haw.go | 20 +- resources/locales/haw_US/haw_US.go | 20 +- resources/locales/he/he.go | 20 +- resources/locales/he_IL/he_IL.go | 20 +- resources/locales/hi/hi.go | 20 +- resources/locales/hi_IN/hi_IN.go | 20 +- resources/locales/hr/hr.go | 20 +- resources/locales/hr_BA/hr_BA.go | 20 +- resources/locales/hr_HR/hr_HR.go | 20 +- resources/locales/hsb/hsb.go | 20 +- resources/locales/hsb_DE/hsb_DE.go | 20 +- resources/locales/hu/hu.go | 20 +- resources/locales/hu_HU/hu_HU.go | 20 +- resources/locales/hy/hy.go | 20 +- resources/locales/hy_AM/hy_AM.go | 20 +- resources/locales/id/id.go | 29 +- resources/locales/id_ID/id_ID.go | 29 +- resources/locales/ig/ig.go | 29 +- resources/locales/ig_NG/ig_NG.go | 29 +- resources/locales/ii/ii.go | 29 +- resources/locales/ii_CN/ii_CN.go | 29 +- resources/locales/is/is.go | 20 +- resources/locales/is_IS/is_IS.go | 20 +- resources/locales/it/it.go | 20 +- resources/locales/it_CH/it_CH.go | 20 +- resources/locales/it_IT/it_IT.go | 20 +- resources/locales/it_SM/it_SM.go | 20 +- resources/locales/ja/ja.go | 29 +- resources/locales/ja_JP/ja_JP.go | 29 +- resources/locales/jgo/jgo.go | 20 +- resources/locales/jgo_CM/jgo_CM.go | 20 +- resources/locales/jmc/jmc.go | 20 +- resources/locales/jmc_TZ/jmc_TZ.go | 20 +- resources/locales/ka/ka.go | 20 +- resources/locales/ka_GE/ka_GE.go | 20 +- resources/locales/kab/kab.go | 20 +- resources/locales/kab_DZ/kab_DZ.go | 20 +- resources/locales/kam/kam.go | 28 +- resources/locales/kam_KE/kam_KE.go | 28 +- resources/locales/kde/kde.go | 29 +- resources/locales/kde_TZ/kde_TZ.go | 29 +- resources/locales/kea/kea.go | 29 +- resources/locales/kea_CV/kea_CV.go | 29 +- resources/locales/khq/khq.go | 28 +- resources/locales/khq_ML/khq_ML.go | 28 +- resources/locales/ki/ki.go | 28 +- resources/locales/ki_KE/ki_KE.go | 28 +- resources/locales/kk/kk.go | 20 +- resources/locales/kk_KZ/kk_KZ.go | 20 +- resources/locales/kkj/kkj.go | 20 +- resources/locales/kkj_CM/kkj_CM.go | 20 +- resources/locales/kl/kl.go | 20 +- resources/locales/kl_GL/kl_GL.go | 20 +- resources/locales/kln/kln.go | 28 +- resources/locales/kln_KE/kln_KE.go | 28 +- resources/locales/km/km.go | 29 +- resources/locales/km_KH/km_KH.go | 29 +- resources/locales/kn/kn.go | 20 +- resources/locales/kn_IN/kn_IN.go | 20 +- resources/locales/ko/ko.go | 29 +- resources/locales/ko_KP/ko_KP.go | 29 +- resources/locales/ko_KR/ko_KR.go | 29 +- resources/locales/kok/kok.go | 28 +- resources/locales/kok_IN/kok_IN.go | 28 +- resources/locales/ks/ks.go | 20 +- resources/locales/ks_IN/ks_IN.go | 20 +- resources/locales/ksb/ksb.go | 20 +- resources/locales/ksb_TZ/ksb_TZ.go | 20 +- resources/locales/ksf/ksf.go | 28 +- resources/locales/ksf_CM/ksf_CM.go | 28 +- resources/locales/ksh/ksh.go | 20 +- resources/locales/ksh_DE/ksh_DE.go | 20 +- resources/locales/kw/kw.go | 20 +- resources/locales/kw_GB/kw_GB.go | 20 +- resources/locales/ky/ky.go | 20 +- resources/locales/ky_KG/ky_KG.go | 20 +- resources/locales/lag/lag.go | 20 +- resources/locales/lag_TZ/lag_TZ.go | 20 +- resources/locales/lb/lb.go | 20 +- resources/locales/lb_LU/lb_LU.go | 20 +- resources/locales/lg/lg.go | 20 +- resources/locales/lg_UG/lg_UG.go | 20 +- resources/locales/lkt/lkt.go | 29 +- resources/locales/lkt_US/lkt_US.go | 29 +- resources/locales/ln/ln.go | 20 +- resources/locales/ln_AO/ln_AO.go | 20 +- resources/locales/ln_CD/ln_CD.go | 20 +- resources/locales/ln_CF/ln_CF.go | 20 +- resources/locales/ln_CG/ln_CG.go | 20 +- resources/locales/lo/lo.go | 29 +- resources/locales/lo_LA/lo_LA.go | 29 +- resources/locales/lrc/lrc.go | 28 +- resources/locales/lrc_IQ/lrc_IQ.go | 28 +- resources/locales/lrc_IR/lrc_IR.go | 28 +- resources/locales/lt/lt.go | 20 +- resources/locales/lt_LT/lt_LT.go | 20 +- resources/locales/lu/lu.go | 28 +- resources/locales/lu_CD/lu_CD.go | 28 +- resources/locales/luo/luo.go | 28 +- resources/locales/luo_KE/luo_KE.go | 28 +- resources/locales/luy/luy.go | 28 +- resources/locales/luy_KE/luy_KE.go | 28 +- resources/locales/lv/lv.go | 20 +- resources/locales/lv_LV/lv_LV.go | 20 +- resources/locales/mas/mas.go | 20 +- resources/locales/mas_KE/mas_KE.go | 20 +- resources/locales/mas_TZ/mas_TZ.go | 20 +- resources/locales/mer/mer.go | 28 +- resources/locales/mer_KE/mer_KE.go | 28 +- resources/locales/mfe/mfe.go | 28 +- resources/locales/mfe_MU/mfe_MU.go | 28 +- resources/locales/mg/mg.go | 20 +- resources/locales/mg_MG/mg_MG.go | 20 +- resources/locales/mgh/mgh.go | 28 +- resources/locales/mgh_MZ/mgh_MZ.go | 28 +- resources/locales/mgo/mgo.go | 20 +- resources/locales/mgo_CM/mgo_CM.go | 20 +- resources/locales/mk/mk.go | 20 +- resources/locales/mk_MK/mk_MK.go | 20 +- resources/locales/ml/ml.go | 20 +- resources/locales/ml_IN/ml_IN.go | 20 +- resources/locales/mn/mn.go | 20 +- resources/locales/mn_MN/mn_MN.go | 20 +- resources/locales/mr/mr.go | 20 +- resources/locales/mr_IN/mr_IN.go | 20 +- resources/locales/ms/ms.go | 29 +- resources/locales/ms_BN/ms_BN.go | 29 +- resources/locales/ms_MY/ms_MY.go | 29 +- resources/locales/ms_SG/ms_SG.go | 29 +- resources/locales/mt/mt.go | 20 +- resources/locales/mt_MT/mt_MT.go | 20 +- resources/locales/mua/mua.go | 28 +- resources/locales/mua_CM/mua_CM.go | 28 +- resources/locales/my/my.go | 29 +- resources/locales/my_MM/my_MM.go | 29 +- resources/locales/mzn/mzn.go | 28 +- resources/locales/mzn_IR/mzn_IR.go | 28 +- resources/locales/naq/naq.go | 20 +- resources/locales/naq_NA/naq_NA.go | 20 +- resources/locales/nb/nb.go | 20 +- resources/locales/nb_NO/nb_NO.go | 20 +- resources/locales/nb_SJ/nb_SJ.go | 20 +- resources/locales/nd/nd.go | 20 +- resources/locales/nd_ZW/nd_ZW.go | 20 +- resources/locales/ne/ne.go | 20 +- resources/locales/ne_IN/ne_IN.go | 20 +- resources/locales/ne_NP/ne_NP.go | 20 +- resources/locales/nl/nl.go | 20 +- resources/locales/nl_AW/nl_AW.go | 20 +- resources/locales/nl_BE/nl_BE.go | 20 +- resources/locales/nl_BQ/nl_BQ.go | 20 +- resources/locales/nl_CW/nl_CW.go | 20 +- resources/locales/nl_NL/nl_NL.go | 20 +- resources/locales/nl_SR/nl_SR.go | 20 +- resources/locales/nl_SX/nl_SX.go | 20 +- resources/locales/nmg/nmg.go | 28 +- resources/locales/nmg_CM/nmg_CM.go | 28 +- resources/locales/nn/nn.go | 20 +- resources/locales/nn_NO/nn_NO.go | 20 +- resources/locales/nnh/nnh.go | 20 +- resources/locales/nnh_CM/nnh_CM.go | 20 +- resources/locales/nus/nus.go | 28 +- resources/locales/nus_SS/nus_SS.go | 28 +- resources/locales/nyn/nyn.go | 20 +- resources/locales/nyn_UG/nyn_UG.go | 20 +- resources/locales/om/om.go | 20 +- resources/locales/om_ET/om_ET.go | 20 +- resources/locales/om_KE/om_KE.go | 20 +- resources/locales/or/or.go | 20 +- resources/locales/or_IN/or_IN.go | 20 +- resources/locales/os/os.go | 20 +- resources/locales/os_GE/os_GE.go | 20 +- resources/locales/os_RU/os_RU.go | 20 +- resources/locales/pa/pa.go | 20 +- resources/locales/pa_Arab/pa_Arab.go | 20 +- resources/locales/pa_Arab_PK/pa_Arab_PK.go | 20 +- resources/locales/pa_Guru/pa_Guru.go | 20 +- resources/locales/pa_Guru_IN/pa_Guru_IN.go | 20 +- resources/locales/pl/pl.go | 20 +- resources/locales/pl_PL/pl_PL.go | 20 +- resources/locales/prg/prg.go | 20 +- resources/locales/prg_001/prg_001.go | 20 +- resources/locales/ps/ps.go | 20 +- resources/locales/ps_AF/ps_AF.go | 20 +- resources/locales/pt/pt.go | 20 +- resources/locales/pt_AO/pt_AO.go | 20 +- resources/locales/pt_BR/pt_BR.go | 20 +- resources/locales/pt_CH/pt_CH.go | 20 +- resources/locales/pt_CV/pt_CV.go | 20 +- resources/locales/pt_GQ/pt_GQ.go | 20 +- resources/locales/pt_GW/pt_GW.go | 20 +- resources/locales/pt_LU/pt_LU.go | 20 +- resources/locales/pt_MO/pt_MO.go | 20 +- resources/locales/pt_MZ/pt_MZ.go | 20 +- resources/locales/pt_PT/pt_PT.go | 20 +- resources/locales/pt_ST/pt_ST.go | 20 +- resources/locales/pt_TL/pt_TL.go | 20 +- resources/locales/qu/qu.go | 28 +- resources/locales/qu_BO/qu_BO.go | 28 +- resources/locales/qu_EC/qu_EC.go | 28 +- resources/locales/qu_PE/qu_PE.go | 28 +- resources/locales/rm/rm.go | 20 +- resources/locales/rm_CH/rm_CH.go | 20 +- resources/locales/rn/rn.go | 28 +- resources/locales/rn_BI/rn_BI.go | 28 +- resources/locales/ro/ro.go | 20 +- resources/locales/ro_MD/ro_MD.go | 20 +- resources/locales/ro_RO/ro_RO.go | 20 +- resources/locales/rof/rof.go | 20 +- resources/locales/rof_TZ/rof_TZ.go | 20 +- resources/locales/root/root.go | 29 +- resources/locales/ru/ru.go | 20 +- resources/locales/ru_BY/ru_BY.go | 20 +- resources/locales/ru_KG/ru_KG.go | 20 +- resources/locales/ru_KZ/ru_KZ.go | 20 +- resources/locales/ru_MD/ru_MD.go | 20 +- resources/locales/ru_RU/ru_RU.go | 20 +- resources/locales/ru_UA/ru_UA.go | 20 +- resources/locales/rw/rw.go | 28 +- resources/locales/rw_RW/rw_RW.go | 28 +- resources/locales/rwk/rwk.go | 20 +- resources/locales/rwk_TZ/rwk_TZ.go | 20 +- resources/locales/sah/sah.go | 29 +- resources/locales/sah_RU/sah_RU.go | 29 +- resources/locales/saq/saq.go | 20 +- resources/locales/saq_KE/saq_KE.go | 20 +- resources/locales/sbp/sbp.go | 28 +- resources/locales/sbp_TZ/sbp_TZ.go | 28 +- resources/locales/se/se.go | 20 +- resources/locales/se_FI/se_FI.go | 20 +- resources/locales/se_NO/se_NO.go | 20 +- resources/locales/se_SE/se_SE.go | 20 +- resources/locales/seh/seh.go | 20 +- resources/locales/seh_MZ/seh_MZ.go | 20 +- resources/locales/ses/ses.go | 29 +- resources/locales/ses_ML/ses_ML.go | 29 +- resources/locales/sg/sg.go | 29 +- resources/locales/sg_CF/sg_CF.go | 29 +- resources/locales/shi/shi.go | 20 +- resources/locales/shi_Latn/shi_Latn.go | 20 +- resources/locales/shi_Latn_MA/shi_Latn_MA.go | 20 +- resources/locales/shi_Tfng/shi_Tfng.go | 20 +- resources/locales/shi_Tfng_MA/shi_Tfng_MA.go | 20 +- resources/locales/si/si.go | 20 +- resources/locales/si_LK/si_LK.go | 20 +- resources/locales/sk/sk.go | 20 +- resources/locales/sk_SK/sk_SK.go | 20 +- resources/locales/sl/sl.go | 20 +- resources/locales/sl_SI/sl_SI.go | 20 +- resources/locales/smn/smn.go | 20 +- resources/locales/smn_FI/smn_FI.go | 20 +- resources/locales/sn/sn.go | 20 +- resources/locales/sn_ZW/sn_ZW.go | 20 +- resources/locales/so/so.go | 20 +- resources/locales/so_DJ/so_DJ.go | 20 +- resources/locales/so_ET/so_ET.go | 20 +- resources/locales/so_KE/so_KE.go | 20 +- resources/locales/so_SO/so_SO.go | 20 +- resources/locales/sq/sq.go | 20 +- resources/locales/sq_AL/sq_AL.go | 20 +- resources/locales/sq_MK/sq_MK.go | 20 +- resources/locales/sq_XK/sq_XK.go | 20 +- resources/locales/sr/sr.go | 20 +- resources/locales/sr_Cyrl/sr_Cyrl.go | 20 +- resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go | 20 +- resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go | 20 +- resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go | 20 +- resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go | 20 +- resources/locales/sr_Latn/sr_Latn.go | 20 +- resources/locales/sr_Latn_BA/sr_Latn_BA.go | 20 +- resources/locales/sr_Latn_ME/sr_Latn_ME.go | 20 +- resources/locales/sr_Latn_RS/sr_Latn_RS.go | 20 +- resources/locales/sr_Latn_XK/sr_Latn_XK.go | 20 +- resources/locales/sv/sv.go | 20 +- resources/locales/sv_AX/sv_AX.go | 20 +- resources/locales/sv_FI/sv_FI.go | 20 +- resources/locales/sv_SE/sv_SE.go | 20 +- resources/locales/sw/sw.go | 20 +- resources/locales/sw_CD/sw_CD.go | 20 +- resources/locales/sw_KE/sw_KE.go | 20 +- resources/locales/sw_TZ/sw_TZ.go | 20 +- resources/locales/sw_UG/sw_UG.go | 20 +- resources/locales/ta/ta.go | 20 +- resources/locales/ta_IN/ta_IN.go | 20 +- resources/locales/ta_LK/ta_LK.go | 20 +- resources/locales/ta_MY/ta_MY.go | 20 +- resources/locales/ta_SG/ta_SG.go | 20 +- resources/locales/te/te.go | 20 +- resources/locales/te_IN/te_IN.go | 20 +- resources/locales/teo/teo.go | 20 +- resources/locales/teo_KE/teo_KE.go | 20 +- resources/locales/teo_UG/teo_UG.go | 20 +- resources/locales/th/th.go | 29 +- resources/locales/th_TH/th_TH.go | 29 +- resources/locales/ti/ti.go | 20 +- resources/locales/ti_ER/ti_ER.go | 20 +- resources/locales/ti_ET/ti_ET.go | 20 +- resources/locales/tk/tk.go | 20 +- resources/locales/tk_TM/tk_TM.go | 20 +- resources/locales/to/to.go | 29 +- resources/locales/to_TO/to_TO.go | 29 +- resources/locales/tr/tr.go | 20 +- resources/locales/tr_CY/tr_CY.go | 20 +- resources/locales/tr_TR/tr_TR.go | 20 +- resources/locales/twq/twq.go | 28 +- resources/locales/twq_NE/twq_NE.go | 28 +- resources/locales/tzm/tzm.go | 20 +- resources/locales/tzm_MA/tzm_MA.go | 20 +- resources/locales/ug/ug.go | 20 +- resources/locales/ug_CN/ug_CN.go | 20 +- resources/locales/uk/uk.go | 20 +- resources/locales/uk_UA/uk_UA.go | 20 +- resources/locales/ur/ur.go | 20 +- resources/locales/ur_IN/ur_IN.go | 20 +- resources/locales/ur_PK/ur_PK.go | 20 +- resources/locales/uz/uz.go | 20 +- resources/locales/uz_Arab/uz_Arab.go | 20 +- resources/locales/uz_Arab_AF/uz_Arab_AF.go | 20 +- resources/locales/uz_Cyrl/uz_Cyrl.go | 20 +- resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go | 20 +- resources/locales/uz_Latn/uz_Latn.go | 20 +- resources/locales/uz_Latn_UZ/uz_Latn_UZ.go | 20 +- resources/locales/vai/vai.go | 28 +- resources/locales/vai_Latn/vai_Latn.go | 28 +- resources/locales/vai_Latn_LR/vai_Latn_LR.go | 28 +- resources/locales/vai_Vaii/vai_Vaii.go | 28 +- resources/locales/vai_Vaii_LR/vai_Vaii_LR.go | 28 +- resources/locales/vi/vi.go | 29 +- resources/locales/vi_VN/vi_VN.go | 29 +- resources/locales/vo/vo.go | 20 +- resources/locales/vo_001/vo_001.go | 20 +- resources/locales/vun/vun.go | 20 +- resources/locales/vun_TZ/vun_TZ.go | 20 +- resources/locales/wae/wae.go | 20 +- resources/locales/wae_CH/wae_CH.go | 20 +- resources/locales/xog/xog.go | 20 +- resources/locales/xog_UG/xog_UG.go | 20 +- resources/locales/yav/yav.go | 28 +- resources/locales/yav_CM/yav_CM.go | 28 +- resources/locales/yi/yi.go | 20 +- resources/locales/yi_001/yi_001.go | 20 +- resources/locales/yo/yo.go | 29 +- resources/locales/yo_BJ/yo_BJ.go | 29 +- resources/locales/yo_NG/yo_NG.go | 29 +- resources/locales/yue/yue.go | 28 +- resources/locales/yue_HK/yue_HK.go | 28 +- resources/locales/zgh/zgh.go | 28 +- resources/locales/zgh_MA/zgh_MA.go | 28 +- resources/locales/zh/zh.go | 29 +- resources/locales/zh_Hans/zh_Hans.go | 29 +- resources/locales/zh_Hans_CN/zh_Hans_CN.go | 29 +- resources/locales/zh_Hans_HK/zh_Hans_HK.go | 29 +- resources/locales/zh_Hans_MO/zh_Hans_MO.go | 29 +- resources/locales/zh_Hans_SG/zh_Hans_SG.go | 29 +- resources/locales/zh_Hant/zh_Hant.go | 29 +- resources/locales/zh_Hant_HK/zh_Hant_HK.go | 29 +- resources/locales/zh_Hant_MO/zh_Hant_MO.go | 29 +- resources/locales/zh_Hant_TW/zh_Hant_TW.go | 29 +- resources/locales/zu/zu.go | 20 +- resources/locales/zu_ZA/zu_ZA.go | 20 +- 717 files changed, 11917 insertions(+), 3875 deletions(-) diff --git a/cmd/resources/generate_resources.go b/cmd/resources/generate_resources.go index 25bc96d..2700ba1 100644 --- a/cmd/resources/generate_resources.go +++ b/cmd/resources/generate_resources.go @@ -58,16 +58,35 @@ var ( "f": "f := locales.F(n, v)\n", "t": "t := locales.T(n, v)\n", } + + translators = make(map[string]*translator) + baseTranslators = make(map[string]*translator) + tmpl *template.Template ) type translator struct { Locale string + BaseLocale string Plurals string CardinalFunc string + Decimal string + Group string + Minus string + Percent string + PerMille string + Symbol string + // Currency string + // CurrencyAbbrev string + // decimal string + // group string + // minus string + // percent string + // perMille string + // currency string + // currencyName string + // currencyAbbrev string } -var tmpl *template.Template - func main() { var err error @@ -80,98 +99,258 @@ func main() { // load CLDR recourses var decoder cldr.Decoder + cldr, err := decoder.DecodePath("data/core") if err != nil { panic(err) } - for _, l := range cldr.Locales() { + preProcess(cldr) + postProcess(cldr) - fmt.Println(l) + for _, trans := range translators { - baseLocale := strings.SplitN(l, "_", 2)[0] + fmt.Println("Writing Data:", trans.Locale) - trans := &translator{ - Locale: l, + if err = os.MkdirAll(fmt.Sprintf(locDir, trans.Locale), 0777); err != nil { + log.Fatal(err) + } + + filename := fmt.Sprintf(locFilename, trans.Locale, trans.Locale) + + output, err := os.Create(filename) + if err != nil { + log.Fatal(err) } + defer output.Close() + + if err := tmpl.ExecuteTemplate(output, "translator", trans); err != nil { + log.Fatal(err) + } + + output.Close() + + // after file written run gofmt on file to ensure best formatting + cmd := exec.Command("goimports", "-w", filename) + if err = cmd.Run(); err != nil { + log.Panic(err) + } + } +} + +func postProcess(cldr *cldr.CLDR) { + + var base *translator + var found bool + + for _, trans := range translators { + + fmt.Println("Post Processing:", trans.Locale) // plural rules - trans.CardinalFunc, trans.Plurals = parseCardinalPluralRuleFunc(cldr, baseLocale) + trans.CardinalFunc, trans.Plurals = parseCardinalPluralRuleFunc(cldr, trans.BaseLocale) + + // ignore base locales + if trans.BaseLocale == trans.Locale { + found = false + } else { - // // number values - // ldml := cldr.RawLDML(l) + base, found = baseTranslators[trans.BaseLocale] + } - // var decimal, group, minus, percent, permille string + // Numbers - // // some just have no data... - // if ldml.Numbers != nil { + if len(trans.Decimal) == 0 { - // symbol := ldml.Numbers.Symbols[0] + if found { + trans.Decimal = fmt.Sprintf("%#v", []byte(base.Decimal)) + } - // if len(symbol.Decimal) > 0 { - // decimal = symbol.Decimal[0].Data() - // } - // if len(symbol.Group) > 0 { - // group = symbol.Group[0].Data() - // } - // if len(symbol.MinusSign) > 0 { - // minus = symbol.MinusSign[0].Data() - // } - // if len(symbol.PercentSign) > 0 { - // percent = symbol.PercentSign[0].Data() - // } - // if len(symbol.PerMille) > 0 { - // permille = symbol.PerMille[0].Data() - // } - // } + if len(trans.Decimal) == 0 { + trans.Decimal = "[]byte{}" + } + } - // var decimalFormat, currencyFormat, currencyAccountingFormat, percentageFormat string + if len(trans.Group) == 0 { - // if len(ldml.Numbers.DecimalFormats) > 0 && len(ldml.Numbers.DecimalFormats[0].DecimalFormatLength) > 0 { - // decimalFormat = ldml.Numbers.DecimalFormats[0].DecimalFormatLength[0].DecimalFormat[0].Pattern[0].Data() - // } + if found { + trans.Group = fmt.Sprintf("%#v", []byte(base.Group)) + } - // if len(ldml.Numbers.CurrencyFormats) > 0 && len(ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength) > 0 { + if len(trans.Group) == 0 { + trans.Group = "[]byte{}" + } + } - // currencyFormat = ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength[0].CurrencyFormat[0].Pattern[0].Data() - // currencyAccountingFormat = currencyFormat + if len(trans.Minus) == 0 { - // if len(ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength[0].CurrencyFormat) > 1 { - // currencyAccountingFormat = ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength[0].CurrencyFormat[1].Pattern[0].Data() + if found { + trans.Minus = fmt.Sprintf("%#v", []byte(base.Minus)) + } + + if len(trans.Minus) == 0 { + trans.Minus = "[]byte{}" + } + } + + if len(trans.Percent) == 0 { + + if found { + trans.Percent = fmt.Sprintf("%#v", []byte(base.Percent)) + } + + if len(trans.Percent) == 0 { + trans.Percent = "[]byte{}" + } + } + + if len(trans.PerMille) == 0 { + + if found { + trans.PerMille = fmt.Sprintf("%#v", []byte(base.PerMille)) + } + + if len(trans.PerMille) == 0 { + trans.PerMille = "[]byte{}" + } + } + + // Currency + + if len(trans.Symbol) == 0 { + + if found { + trans.Symbol = fmt.Sprintf("%#v", []byte(base.Symbol)) + } + + if len(trans.Symbol) == 0 { + trans.Symbol = "[]byte{}" + } + } + + // if len(trans.Currency) == 0 { + + // if found { + // trans.Currency = fmt.Sprintf("%#v", []byte(base.Currency)) // } - // } - // if len(ldml.Numbers.PercentFormats) > 0 && len(ldml.Numbers.PercentFormats[0].PercentFormatLength) > 0 { - // percentageFormat = ldml.Numbers.PercentFormats[0].PercentFormatLength[0].PercentFormat[0].Pattern[0].Data() + // if len(trans.Currency) == 0 { + // trans.Currency = "[]byte{}" + // } // } + } +} - // // parse Number values - // parseNumbers(decimal, group, minus, percent, permille, decimalFormat, currencyFormat, currencyAccountingFormat, percentageFormat) +// preprocesses maps, array etc... just requires multiple passes no choice.... +func preProcess(cldr *cldr.CLDR) { - // end number values + for _, l := range cldr.Locales() { - if err = os.MkdirAll(fmt.Sprintf(locDir, l), 0777); err != nil { - log.Fatal(err) - } + fmt.Println("Pre Processing:", l) - filename := fmt.Sprintf(locFilename, l, l) + split := strings.SplitN(l, "_", 2) + baseLocale := split[0] - output, err := os.Create(filename) - if err != nil { - log.Fatal(err) + trans := &translator{ + Locale: l, + BaseLocale: baseLocale, } - defer output.Close() - if err := tmpl.ExecuteTemplate(output, "translator", trans); err != nil { - log.Fatal(err) + // if is a base locale + if len(split) == 1 { + baseTranslators[baseLocale] = trans } - output.Close() + translators[l] = trans - // after file written run gofmt on file to ensure best formatting - cmd := exec.Command("gofmt", "-s", "-w", filename) - if err = cmd.Run(); err != nil { - log.Panic(err) + // get number, currency and datetime symbols + + // number values + ldml := cldr.RawLDML(l) + + // some just have no data... + if ldml.Numbers != nil && len(ldml.Numbers.Symbols) > 0 { + + symbol := ldml.Numbers.Symbols[0] + + if len(symbol.Decimal) > 0 { + trans.Decimal = fmt.Sprintf("%#v", []byte(symbol.Decimal[0].Data())) + } + if len(symbol.Group) > 0 { + trans.Group = fmt.Sprintf("%#v", []byte(symbol.Group[0].Data())) + } + if len(symbol.MinusSign) > 0 { + trans.Minus = fmt.Sprintf("%#v", []byte(symbol.MinusSign[0].Data())) + } + if len(symbol.PercentSign) > 0 { + trans.Percent = fmt.Sprintf("%#v", []byte(symbol.PercentSign[0].Data())) + } + if len(symbol.PerMille) > 0 { + trans.PerMille = fmt.Sprintf("%#v", []byte(symbol.PerMille[0].Data())) + } + + // if ldml.Numbers.Currencies != nil { + + // for _, currency := range ldml.Numbers.Currencies.Currency { + + // if len(currency.Symbol) == 0 { + // continue + // } + + // trans.Symbol = currency.Symbol[0].Data() + + // if len(trans.Currency) == 0 { + // continue + // } + + // trans.Currency = fmt.Sprintf("%#v", []byte(currency.Type)) + + // // if len(currency.DisplayName) > 0 { + // // trans.CurrencyName = fmt.Sprintf("%#v", []byte(currency.DisplayName[0].Data())) + // // } else { + // // trans.CurrencyName = "[]byte{}" + // // } + + // // var c i18n.Currency + + // // c.Currency = currency.Type + + // // if len(currency.DisplayName) > 0 { + // // c.DisplayName = currency.DisplayName[0].Data() + // // } + + // // if len(currency.Symbol) > 0 { + // // c.Symbol = currency.Symbol[0].Data() + // // } + + // // number.Currencies[c.Currency] = c + // } + // } + + // var decimalFormat, currencyFormat, currencyAccountingFormat, percentageFormat string + + // if len(ldml.Numbers.DecimalFormats) > 0 && len(ldml.Numbers.DecimalFormats[0].DecimalFormatLength) > 0 { + // decimalFormat = ldml.Numbers.DecimalFormats[0].DecimalFormatLength[0].DecimalFormat[0].Pattern[0].Data() + // } + + // if len(ldml.Numbers.CurrencyFormats) > 0 && len(ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength) > 0 { + + // currencyFormat = ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength[0].CurrencyFormat[0].Pattern[0].Data() + // currencyAccountingFormat = currencyFormat + + // if len(ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength[0].CurrencyFormat) > 1 { + // currencyAccountingFormat = ldml.Numbers.CurrencyFormats[0].CurrencyFormatLength[0].CurrencyFormat[1].Pattern[0].Data() + // } + // } + + // if len(ldml.Numbers.PercentFormats) > 0 && len(ldml.Numbers.PercentFormats[0].PercentFormatLength) > 0 { + // percentageFormat = ldml.Numbers.PercentFormats[0].PercentFormatLength[0].PercentFormat[0].Pattern[0].Data() + // } + + // // parse Number values + // parseNumbers(decimal, group, minus, percent, permille, decimalFormat, currencyFormat, currencyAccountingFormat, percentageFormat) + + // end number values } } } @@ -337,7 +516,7 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results // no plural rules for locale if prCardinal == nil { plurals = "nil" - results = "return locales.PluralRuleUnknown,nil" + results = "return locales.PluralRuleUnknown" return } @@ -567,9 +746,12 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results if len(results) == 0 { results = "return locales.PluralRuleUnknown" - } + } else { - results = pre + results + if !strings.HasPrefix(results, "return") { + results = pre + results + } + } if len(pluralArr) == 0 { plurals = "nil" diff --git a/cmd/resources/translator.tmpl b/cmd/resources/translator.tmpl index 8147d74..bfdb638 100644 --- a/cmd/resources/translator.tmpl +++ b/cmd/resources/translator.tmpl @@ -8,15 +8,27 @@ import ( ) type {{ .Locale }} struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the '{{ .Locale }}' locale func New() locales.Translator { return &{{ .Locale }}{ - locale: "{{ .Locale }}", - plurals: {{ .Plurals }}, + locale: "{{ .Locale }}", + plurals: {{ .Plurals }}, + decimal: {{ .Decimal }}, + group: {{ .Group }}, + minus: {{ .Minus }}, + percent: {{ .Percent }}, + perMille: {{ .PerMille }}, + symbol: {{ .Symbol }}, } } diff --git a/resources/locales/af/af.go b/resources/locales/af/af.go index b18c199..0611efd 100644 --- a/resources/locales/af/af.go +++ b/resources/locales/af/af.go @@ -7,15 +7,27 @@ import ( ) type af struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'af' locale func New() locales.Translator { return &af{ - locale: "af", - plurals: []locales.PluralRule{2, 6}, + locale: "af", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/af_NA/af_NA.go b/resources/locales/af_NA/af_NA.go index e8194c0..de69911 100644 --- a/resources/locales/af_NA/af_NA.go +++ b/resources/locales/af_NA/af_NA.go @@ -7,15 +7,27 @@ import ( ) type af_NA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'af_NA' locale func New() locales.Translator { return &af_NA{ - locale: "af_NA", - plurals: []locales.PluralRule{2, 6}, + locale: "af_NA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/af_ZA/af_ZA.go b/resources/locales/af_ZA/af_ZA.go index c870816..9e7f9db 100644 --- a/resources/locales/af_ZA/af_ZA.go +++ b/resources/locales/af_ZA/af_ZA.go @@ -7,15 +7,27 @@ import ( ) type af_ZA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'af_ZA' locale func New() locales.Translator { return &af_ZA{ - locale: "af_ZA", - plurals: []locales.PluralRule{2, 6}, + locale: "af_ZA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/agq/agq.go b/resources/locales/agq/agq.go index 434d3ba..415f82c 100644 --- a/resources/locales/agq/agq.go +++ b/resources/locales/agq/agq.go @@ -1,21 +1,29 @@ package agq -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type agq struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'agq' locale func New() locales.Translator { return &agq{ - locale: "agq", - plurals: nil, + locale: "agq", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *agq) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'agq' func (t *agq) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/agq_CM/agq_CM.go b/resources/locales/agq_CM/agq_CM.go index deb14ab..5e735f5 100644 --- a/resources/locales/agq_CM/agq_CM.go +++ b/resources/locales/agq_CM/agq_CM.go @@ -1,21 +1,29 @@ package agq_CM -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type agq_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'agq_CM' locale func New() locales.Translator { return &agq_CM{ - locale: "agq_CM", - plurals: nil, + locale: "agq_CM", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *agq_CM) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'agq_CM' func (t *agq_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/ak/ak.go b/resources/locales/ak/ak.go index 9b9b8af..cca84f1 100644 --- a/resources/locales/ak/ak.go +++ b/resources/locales/ak/ak.go @@ -7,15 +7,27 @@ import ( ) type ak struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ak' locale func New() locales.Translator { return &ak{ - locale: "ak", - plurals: []locales.PluralRule{2, 6}, + locale: "ak", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ak_GH/ak_GH.go b/resources/locales/ak_GH/ak_GH.go index d020dd2..7977d7c 100644 --- a/resources/locales/ak_GH/ak_GH.go +++ b/resources/locales/ak_GH/ak_GH.go @@ -7,15 +7,27 @@ import ( ) type ak_GH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ak_GH' locale func New() locales.Translator { return &ak_GH{ - locale: "ak_GH", - plurals: []locales.PluralRule{2, 6}, + locale: "ak_GH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/am/am.go b/resources/locales/am/am.go index 6515547..45abbea 100644 --- a/resources/locales/am/am.go +++ b/resources/locales/am/am.go @@ -7,15 +7,27 @@ import ( ) type am struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'am' locale func New() locales.Translator { return &am{ - locale: "am", - plurals: []locales.PluralRule{2, 6}, + locale: "am", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/am_ET/am_ET.go b/resources/locales/am_ET/am_ET.go index 17ed4fb..3a9e5a4 100644 --- a/resources/locales/am_ET/am_ET.go +++ b/resources/locales/am_ET/am_ET.go @@ -7,15 +7,27 @@ import ( ) type am_ET struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'am_ET' locale func New() locales.Translator { return &am_ET{ - locale: "am_ET", - plurals: []locales.PluralRule{2, 6}, + locale: "am_ET", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar/ar.go b/resources/locales/ar/ar.go index 20fccd3..e502fbf 100644 --- a/resources/locales/ar/ar.go +++ b/resources/locales/ar/ar.go @@ -7,15 +7,27 @@ import ( ) type ar struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar' locale func New() locales.Translator { return &ar{ - locale: "ar", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0xd9, 0xac}, + minus: []byte{0xe2, 0x80, 0x8f, 0x2d}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{0xd8, 0x89}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_001/ar_001.go b/resources/locales/ar_001/ar_001.go index 2786890..e8eee6c 100644 --- a/resources/locales/ar_001/ar_001.go +++ b/resources/locales/ar_001/ar_001.go @@ -7,15 +7,27 @@ import ( ) type ar_001 struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_001' locale func New() locales.Translator { return &ar_001{ - locale: "ar_001", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_001", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_AE/ar_AE.go b/resources/locales/ar_AE/ar_AE.go index 17b8a62..047ffa8 100644 --- a/resources/locales/ar_AE/ar_AE.go +++ b/resources/locales/ar_AE/ar_AE.go @@ -7,15 +7,27 @@ import ( ) type ar_AE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_AE' locale func New() locales.Translator { return &ar_AE{ - locale: "ar_AE", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_AE", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_BH/ar_BH.go b/resources/locales/ar_BH/ar_BH.go index 4e89138..9655e8f 100644 --- a/resources/locales/ar_BH/ar_BH.go +++ b/resources/locales/ar_BH/ar_BH.go @@ -7,15 +7,27 @@ import ( ) type ar_BH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_BH' locale func New() locales.Translator { return &ar_BH{ - locale: "ar_BH", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_BH", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_DJ/ar_DJ.go b/resources/locales/ar_DJ/ar_DJ.go index 2f5c886..5ad444f 100644 --- a/resources/locales/ar_DJ/ar_DJ.go +++ b/resources/locales/ar_DJ/ar_DJ.go @@ -7,15 +7,27 @@ import ( ) type ar_DJ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_DJ' locale func New() locales.Translator { return &ar_DJ{ - locale: "ar_DJ", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_DJ", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_DZ/ar_DZ.go b/resources/locales/ar_DZ/ar_DZ.go index 0122b09..2fc7678 100644 --- a/resources/locales/ar_DZ/ar_DZ.go +++ b/resources/locales/ar_DZ/ar_DZ.go @@ -7,15 +7,27 @@ import ( ) type ar_DZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_DZ' locale func New() locales.Translator { return &ar_DZ{ - locale: "ar_DZ", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_DZ", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_EG/ar_EG.go b/resources/locales/ar_EG/ar_EG.go index 34e80e9..2e6b2c0 100644 --- a/resources/locales/ar_EG/ar_EG.go +++ b/resources/locales/ar_EG/ar_EG.go @@ -7,15 +7,27 @@ import ( ) type ar_EG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_EG' locale func New() locales.Translator { return &ar_EG{ - locale: "ar_EG", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_EG", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_EH/ar_EH.go b/resources/locales/ar_EH/ar_EH.go index 9538313..ce99ce8 100644 --- a/resources/locales/ar_EH/ar_EH.go +++ b/resources/locales/ar_EH/ar_EH.go @@ -7,15 +7,27 @@ import ( ) type ar_EH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_EH' locale func New() locales.Translator { return &ar_EH{ - locale: "ar_EH", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_EH", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_ER/ar_ER.go b/resources/locales/ar_ER/ar_ER.go index 631b43c..a6ce04f 100644 --- a/resources/locales/ar_ER/ar_ER.go +++ b/resources/locales/ar_ER/ar_ER.go @@ -7,15 +7,27 @@ import ( ) type ar_ER struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_ER' locale func New() locales.Translator { return &ar_ER{ - locale: "ar_ER", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_ER", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_IL/ar_IL.go b/resources/locales/ar_IL/ar_IL.go index d2d52a7..a96427e 100644 --- a/resources/locales/ar_IL/ar_IL.go +++ b/resources/locales/ar_IL/ar_IL.go @@ -7,15 +7,27 @@ import ( ) type ar_IL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_IL' locale func New() locales.Translator { return &ar_IL{ - locale: "ar_IL", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_IL", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_IQ/ar_IQ.go b/resources/locales/ar_IQ/ar_IQ.go index eb12614..d10d4ce 100644 --- a/resources/locales/ar_IQ/ar_IQ.go +++ b/resources/locales/ar_IQ/ar_IQ.go @@ -7,15 +7,27 @@ import ( ) type ar_IQ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_IQ' locale func New() locales.Translator { return &ar_IQ{ - locale: "ar_IQ", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_IQ", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_JO/ar_JO.go b/resources/locales/ar_JO/ar_JO.go index 15917c0..b2aa37e 100644 --- a/resources/locales/ar_JO/ar_JO.go +++ b/resources/locales/ar_JO/ar_JO.go @@ -7,15 +7,27 @@ import ( ) type ar_JO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_JO' locale func New() locales.Translator { return &ar_JO{ - locale: "ar_JO", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_JO", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_KM/ar_KM.go b/resources/locales/ar_KM/ar_KM.go index 3dc8a16..bfcd426 100644 --- a/resources/locales/ar_KM/ar_KM.go +++ b/resources/locales/ar_KM/ar_KM.go @@ -7,15 +7,27 @@ import ( ) type ar_KM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_KM' locale func New() locales.Translator { return &ar_KM{ - locale: "ar_KM", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_KM", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_KW/ar_KW.go b/resources/locales/ar_KW/ar_KW.go index fe5ca04..0e744fe 100644 --- a/resources/locales/ar_KW/ar_KW.go +++ b/resources/locales/ar_KW/ar_KW.go @@ -7,15 +7,27 @@ import ( ) type ar_KW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_KW' locale func New() locales.Translator { return &ar_KW{ - locale: "ar_KW", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_KW", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_LB/ar_LB.go b/resources/locales/ar_LB/ar_LB.go index a9d9492..6c2ce1d 100644 --- a/resources/locales/ar_LB/ar_LB.go +++ b/resources/locales/ar_LB/ar_LB.go @@ -7,15 +7,27 @@ import ( ) type ar_LB struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_LB' locale func New() locales.Translator { return &ar_LB{ - locale: "ar_LB", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_LB", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_LY/ar_LY.go b/resources/locales/ar_LY/ar_LY.go index ad37003..b56b54c 100644 --- a/resources/locales/ar_LY/ar_LY.go +++ b/resources/locales/ar_LY/ar_LY.go @@ -7,15 +7,27 @@ import ( ) type ar_LY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_LY' locale func New() locales.Translator { return &ar_LY{ - locale: "ar_LY", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_LY", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_MA/ar_MA.go b/resources/locales/ar_MA/ar_MA.go index 25c124c..7d81eda 100644 --- a/resources/locales/ar_MA/ar_MA.go +++ b/resources/locales/ar_MA/ar_MA.go @@ -7,15 +7,27 @@ import ( ) type ar_MA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_MA' locale func New() locales.Translator { return &ar_MA{ - locale: "ar_MA", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_MA", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_MR/ar_MR.go b/resources/locales/ar_MR/ar_MR.go index c5f4fc9..d4ba1a7 100644 --- a/resources/locales/ar_MR/ar_MR.go +++ b/resources/locales/ar_MR/ar_MR.go @@ -7,15 +7,27 @@ import ( ) type ar_MR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_MR' locale func New() locales.Translator { return &ar_MR{ - locale: "ar_MR", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_MR", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_OM/ar_OM.go b/resources/locales/ar_OM/ar_OM.go index e6e8d98..c7b0f93 100644 --- a/resources/locales/ar_OM/ar_OM.go +++ b/resources/locales/ar_OM/ar_OM.go @@ -7,15 +7,27 @@ import ( ) type ar_OM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_OM' locale func New() locales.Translator { return &ar_OM{ - locale: "ar_OM", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_OM", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_PS/ar_PS.go b/resources/locales/ar_PS/ar_PS.go index 382e140..189f55b 100644 --- a/resources/locales/ar_PS/ar_PS.go +++ b/resources/locales/ar_PS/ar_PS.go @@ -7,15 +7,27 @@ import ( ) type ar_PS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_PS' locale func New() locales.Translator { return &ar_PS{ - locale: "ar_PS", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_PS", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_QA/ar_QA.go b/resources/locales/ar_QA/ar_QA.go index 06edb8c..fb749c7 100644 --- a/resources/locales/ar_QA/ar_QA.go +++ b/resources/locales/ar_QA/ar_QA.go @@ -7,15 +7,27 @@ import ( ) type ar_QA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_QA' locale func New() locales.Translator { return &ar_QA{ - locale: "ar_QA", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_QA", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_SA/ar_SA.go b/resources/locales/ar_SA/ar_SA.go index 3fd9032..e7a530f 100644 --- a/resources/locales/ar_SA/ar_SA.go +++ b/resources/locales/ar_SA/ar_SA.go @@ -7,15 +7,27 @@ import ( ) type ar_SA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_SA' locale func New() locales.Translator { return &ar_SA{ - locale: "ar_SA", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_SA", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_SD/ar_SD.go b/resources/locales/ar_SD/ar_SD.go index 656ce59..288e716 100644 --- a/resources/locales/ar_SD/ar_SD.go +++ b/resources/locales/ar_SD/ar_SD.go @@ -7,15 +7,27 @@ import ( ) type ar_SD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_SD' locale func New() locales.Translator { return &ar_SD{ - locale: "ar_SD", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_SD", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_SO/ar_SO.go b/resources/locales/ar_SO/ar_SO.go index 62d9ac1..02167c3 100644 --- a/resources/locales/ar_SO/ar_SO.go +++ b/resources/locales/ar_SO/ar_SO.go @@ -7,15 +7,27 @@ import ( ) type ar_SO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_SO' locale func New() locales.Translator { return &ar_SO{ - locale: "ar_SO", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_SO", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ar_SS/ar_SS.go b/resources/locales/ar_SS/ar_SS.go index ac4a44d..ff56659 100644 --- a/resources/locales/ar_SS/ar_SS.go +++ b/resources/locales/ar_SS/ar_SS.go @@ -7,15 +7,27 @@ import ( ) type ar_SS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_SS' locale func New() locales.Translator { return &ar_SS{ - locale: "ar_SS", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_SS", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_SY/ar_SY.go b/resources/locales/ar_SY/ar_SY.go index 2c55389..193c8bf 100644 --- a/resources/locales/ar_SY/ar_SY.go +++ b/resources/locales/ar_SY/ar_SY.go @@ -7,15 +7,27 @@ import ( ) type ar_SY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_SY' locale func New() locales.Translator { return &ar_SY{ - locale: "ar_SY", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_SY", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_TD/ar_TD.go b/resources/locales/ar_TD/ar_TD.go index dfffffa..ca46614 100644 --- a/resources/locales/ar_TD/ar_TD.go +++ b/resources/locales/ar_TD/ar_TD.go @@ -7,15 +7,27 @@ import ( ) type ar_TD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_TD' locale func New() locales.Translator { return &ar_TD{ - locale: "ar_TD", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_TD", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_TN/ar_TN.go b/resources/locales/ar_TN/ar_TN.go index 4953088..6eb26fc 100644 --- a/resources/locales/ar_TN/ar_TN.go +++ b/resources/locales/ar_TN/ar_TN.go @@ -7,15 +7,27 @@ import ( ) type ar_TN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_TN' locale func New() locales.Translator { return &ar_TN{ - locale: "ar_TN", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_TN", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ar_YE/ar_YE.go b/resources/locales/ar_YE/ar_YE.go index 4105161..4900236 100644 --- a/resources/locales/ar_YE/ar_YE.go +++ b/resources/locales/ar_YE/ar_YE.go @@ -7,15 +7,27 @@ import ( ) type ar_YE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ar_YE' locale func New() locales.Translator { return &ar_YE{ - locale: "ar_YE", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "ar_YE", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/as/as.go b/resources/locales/as/as.go index 9fb469c..0f33916 100644 --- a/resources/locales/as/as.go +++ b/resources/locales/as/as.go @@ -7,15 +7,27 @@ import ( ) type as struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'as' locale func New() locales.Translator { return &as{ - locale: "as", - plurals: []locales.PluralRule{2, 6}, + locale: "as", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/as_IN/as_IN.go b/resources/locales/as_IN/as_IN.go index 3d32163..5da0dfc 100644 --- a/resources/locales/as_IN/as_IN.go +++ b/resources/locales/as_IN/as_IN.go @@ -7,15 +7,27 @@ import ( ) type as_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'as_IN' locale func New() locales.Translator { return &as_IN{ - locale: "as_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "as_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/asa/asa.go b/resources/locales/asa/asa.go index ad1ef83..1dc73e6 100644 --- a/resources/locales/asa/asa.go +++ b/resources/locales/asa/asa.go @@ -7,15 +7,27 @@ import ( ) type asa struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'asa' locale func New() locales.Translator { return &asa{ - locale: "asa", - plurals: []locales.PluralRule{2, 6}, + locale: "asa", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/asa_TZ/asa_TZ.go b/resources/locales/asa_TZ/asa_TZ.go index 6281d31..3c3354f 100644 --- a/resources/locales/asa_TZ/asa_TZ.go +++ b/resources/locales/asa_TZ/asa_TZ.go @@ -7,15 +7,27 @@ import ( ) type asa_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'asa_TZ' locale func New() locales.Translator { return &asa_TZ{ - locale: "asa_TZ", - plurals: []locales.PluralRule{2, 6}, + locale: "asa_TZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ast/ast.go b/resources/locales/ast/ast.go index c3c735f..be47d79 100644 --- a/resources/locales/ast/ast.go +++ b/resources/locales/ast/ast.go @@ -7,15 +7,27 @@ import ( ) type ast struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ast' locale func New() locales.Translator { return &ast{ - locale: "ast", - plurals: []locales.PluralRule{2, 6}, + locale: "ast", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0xd9, 0xac}, + minus: []byte{0xe2, 0x80, 0x8f, 0x2d}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{0xd8, 0x89}, + symbol: []byte{}, } } diff --git a/resources/locales/ast_ES/ast_ES.go b/resources/locales/ast_ES/ast_ES.go index 46d3a4a..5f095b9 100644 --- a/resources/locales/ast_ES/ast_ES.go +++ b/resources/locales/ast_ES/ast_ES.go @@ -7,15 +7,27 @@ import ( ) type ast_ES struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ast_ES' locale func New() locales.Translator { return &ast_ES{ - locale: "ast_ES", - plurals: []locales.PluralRule{2, 6}, + locale: "ast_ES", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/az/az.go b/resources/locales/az/az.go index 1f104dc..72a2f72 100644 --- a/resources/locales/az/az.go +++ b/resources/locales/az/az.go @@ -7,15 +7,27 @@ import ( ) type az struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'az' locale func New() locales.Translator { return &az{ - locale: "az", - plurals: []locales.PluralRule{2, 6}, + locale: "az", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/az_Cyrl/az_Cyrl.go b/resources/locales/az_Cyrl/az_Cyrl.go index 401f6b2..ae3e053 100644 --- a/resources/locales/az_Cyrl/az_Cyrl.go +++ b/resources/locales/az_Cyrl/az_Cyrl.go @@ -7,15 +7,27 @@ import ( ) type az_Cyrl struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'az_Cyrl' locale func New() locales.Translator { return &az_Cyrl{ - locale: "az_Cyrl", - plurals: []locales.PluralRule{2, 6}, + locale: "az_Cyrl", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go b/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go index 76657cf..d57c6cc 100644 --- a/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go +++ b/resources/locales/az_Cyrl_AZ/az_Cyrl_AZ.go @@ -7,15 +7,27 @@ import ( ) type az_Cyrl_AZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'az_Cyrl_AZ' locale func New() locales.Translator { return &az_Cyrl_AZ{ - locale: "az_Cyrl_AZ", - plurals: []locales.PluralRule{2, 6}, + locale: "az_Cyrl_AZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/az_Latn/az_Latn.go b/resources/locales/az_Latn/az_Latn.go index d0545fa..9eda150 100644 --- a/resources/locales/az_Latn/az_Latn.go +++ b/resources/locales/az_Latn/az_Latn.go @@ -7,15 +7,27 @@ import ( ) type az_Latn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'az_Latn' locale func New() locales.Translator { return &az_Latn{ - locale: "az_Latn", - plurals: []locales.PluralRule{2, 6}, + locale: "az_Latn", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/az_Latn_AZ/az_Latn_AZ.go b/resources/locales/az_Latn_AZ/az_Latn_AZ.go index 08ff77a..23728ed 100644 --- a/resources/locales/az_Latn_AZ/az_Latn_AZ.go +++ b/resources/locales/az_Latn_AZ/az_Latn_AZ.go @@ -7,15 +7,27 @@ import ( ) type az_Latn_AZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'az_Latn_AZ' locale func New() locales.Translator { return &az_Latn_AZ{ - locale: "az_Latn_AZ", - plurals: []locales.PluralRule{2, 6}, + locale: "az_Latn_AZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/bas/bas.go b/resources/locales/bas/bas.go index ba60904..8f76d72 100644 --- a/resources/locales/bas/bas.go +++ b/resources/locales/bas/bas.go @@ -1,21 +1,29 @@ package bas -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type bas struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bas' locale func New() locales.Translator { return &bas{ - locale: "bas", - plurals: nil, + locale: "bas", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *bas) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bas' func (t *bas) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/bas_CM/bas_CM.go b/resources/locales/bas_CM/bas_CM.go index b1a72c5..67dab62 100644 --- a/resources/locales/bas_CM/bas_CM.go +++ b/resources/locales/bas_CM/bas_CM.go @@ -1,21 +1,29 @@ package bas_CM -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type bas_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bas_CM' locale func New() locales.Translator { return &bas_CM{ - locale: "bas_CM", - plurals: nil, + locale: "bas_CM", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *bas_CM) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bas_CM' func (t *bas_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/be/be.go b/resources/locales/be/be.go index cdefd27..0559af9 100644 --- a/resources/locales/be/be.go +++ b/resources/locales/be/be.go @@ -7,15 +7,27 @@ import ( ) type be struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'be' locale func New() locales.Translator { return &be{ - locale: "be", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "be", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/be_BY/be_BY.go b/resources/locales/be_BY/be_BY.go index d93f5f7..0d38e85 100644 --- a/resources/locales/be_BY/be_BY.go +++ b/resources/locales/be_BY/be_BY.go @@ -7,15 +7,27 @@ import ( ) type be_BY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'be_BY' locale func New() locales.Translator { return &be_BY{ - locale: "be_BY", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "be_BY", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/bem/bem.go b/resources/locales/bem/bem.go index a3c0e84..1a87b39 100644 --- a/resources/locales/bem/bem.go +++ b/resources/locales/bem/bem.go @@ -7,15 +7,27 @@ import ( ) type bem struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bem' locale func New() locales.Translator { return &bem{ - locale: "bem", - plurals: []locales.PluralRule{2, 6}, + locale: "bem", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/bem_ZM/bem_ZM.go b/resources/locales/bem_ZM/bem_ZM.go index 67ddb90..d679bbf 100644 --- a/resources/locales/bem_ZM/bem_ZM.go +++ b/resources/locales/bem_ZM/bem_ZM.go @@ -7,15 +7,27 @@ import ( ) type bem_ZM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bem_ZM' locale func New() locales.Translator { return &bem_ZM{ - locale: "bem_ZM", - plurals: []locales.PluralRule{2, 6}, + locale: "bem_ZM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/bez/bez.go b/resources/locales/bez/bez.go index b799a99..ef4eb9d 100644 --- a/resources/locales/bez/bez.go +++ b/resources/locales/bez/bez.go @@ -7,15 +7,27 @@ import ( ) type bez struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bez' locale func New() locales.Translator { return &bez{ - locale: "bez", - plurals: []locales.PluralRule{2, 6}, + locale: "bez", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/bez_TZ/bez_TZ.go b/resources/locales/bez_TZ/bez_TZ.go index b10b9b0..51a00f4 100644 --- a/resources/locales/bez_TZ/bez_TZ.go +++ b/resources/locales/bez_TZ/bez_TZ.go @@ -7,15 +7,27 @@ import ( ) type bez_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bez_TZ' locale func New() locales.Translator { return &bez_TZ{ - locale: "bez_TZ", - plurals: []locales.PluralRule{2, 6}, + locale: "bez_TZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/bg/bg.go b/resources/locales/bg/bg.go index 10d2823..c2d317a 100644 --- a/resources/locales/bg/bg.go +++ b/resources/locales/bg/bg.go @@ -7,15 +7,27 @@ import ( ) type bg struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bg' locale func New() locales.Translator { return &bg{ - locale: "bg", - plurals: []locales.PluralRule{2, 6}, + locale: "bg", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/bg_BG/bg_BG.go b/resources/locales/bg_BG/bg_BG.go index 526586f..0444f88 100644 --- a/resources/locales/bg_BG/bg_BG.go +++ b/resources/locales/bg_BG/bg_BG.go @@ -7,15 +7,27 @@ import ( ) type bg_BG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bg_BG' locale func New() locales.Translator { return &bg_BG{ - locale: "bg_BG", - plurals: []locales.PluralRule{2, 6}, + locale: "bg_BG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/bm/bm.go b/resources/locales/bm/bm.go index 190146d..c5f2827 100644 --- a/resources/locales/bm/bm.go +++ b/resources/locales/bm/bm.go @@ -1,21 +1,29 @@ package bm -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type bm struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bm' locale func New() locales.Translator { return &bm{ - locale: "bm", - plurals: []locales.PluralRule{6}, + locale: "bm", + plurals: []locales.PluralRule{6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *bm) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bm' func (t *bm) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/bm_ML/bm_ML.go b/resources/locales/bm_ML/bm_ML.go index ca81075..cca69b4 100644 --- a/resources/locales/bm_ML/bm_ML.go +++ b/resources/locales/bm_ML/bm_ML.go @@ -1,21 +1,29 @@ package bm_ML -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type bm_ML struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bm_ML' locale func New() locales.Translator { return &bm_ML{ - locale: "bm_ML", - plurals: []locales.PluralRule{6}, + locale: "bm_ML", + plurals: []locales.PluralRule{6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *bm_ML) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bm_ML' func (t *bm_ML) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/bn/bn.go b/resources/locales/bn/bn.go index 906a923..824ce6a 100644 --- a/resources/locales/bn/bn.go +++ b/resources/locales/bn/bn.go @@ -7,15 +7,27 @@ import ( ) type bn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bn' locale func New() locales.Translator { return &bn{ - locale: "bn", - plurals: []locales.PluralRule{2, 6}, + locale: "bn", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/bn_BD/bn_BD.go b/resources/locales/bn_BD/bn_BD.go index c1ee83f..0398320 100644 --- a/resources/locales/bn_BD/bn_BD.go +++ b/resources/locales/bn_BD/bn_BD.go @@ -7,15 +7,27 @@ import ( ) type bn_BD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bn_BD' locale func New() locales.Translator { return &bn_BD{ - locale: "bn_BD", - plurals: []locales.PluralRule{2, 6}, + locale: "bn_BD", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/bn_IN/bn_IN.go b/resources/locales/bn_IN/bn_IN.go index 88d84df..9795720 100644 --- a/resources/locales/bn_IN/bn_IN.go +++ b/resources/locales/bn_IN/bn_IN.go @@ -7,15 +7,27 @@ import ( ) type bn_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bn_IN' locale func New() locales.Translator { return &bn_IN{ - locale: "bn_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "bn_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/bo/bo.go b/resources/locales/bo/bo.go index 3929137..8d803f1 100644 --- a/resources/locales/bo/bo.go +++ b/resources/locales/bo/bo.go @@ -1,21 +1,29 @@ package bo -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type bo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bo' locale func New() locales.Translator { return &bo{ - locale: "bo", - plurals: []locales.PluralRule{6}, + locale: "bo", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *bo) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bo' func (t *bo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/bo_CN/bo_CN.go b/resources/locales/bo_CN/bo_CN.go index 00f1baf..b7caff4 100644 --- a/resources/locales/bo_CN/bo_CN.go +++ b/resources/locales/bo_CN/bo_CN.go @@ -1,21 +1,29 @@ package bo_CN -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type bo_CN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bo_CN' locale func New() locales.Translator { return &bo_CN{ - locale: "bo_CN", - plurals: []locales.PluralRule{6}, + locale: "bo_CN", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *bo_CN) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bo_CN' func (t *bo_CN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/bo_IN/bo_IN.go b/resources/locales/bo_IN/bo_IN.go index 369d249..a5349ea 100644 --- a/resources/locales/bo_IN/bo_IN.go +++ b/resources/locales/bo_IN/bo_IN.go @@ -1,21 +1,29 @@ package bo_IN -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type bo_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bo_IN' locale func New() locales.Translator { return &bo_IN{ - locale: "bo_IN", - plurals: []locales.PluralRule{6}, + locale: "bo_IN", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *bo_IN) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'bo_IN' func (t *bo_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/br/br.go b/resources/locales/br/br.go index be69007..881d6ca 100644 --- a/resources/locales/br/br.go +++ b/resources/locales/br/br.go @@ -7,15 +7,27 @@ import ( ) type br struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'br' locale func New() locales.Translator { return &br{ - locale: "br", - plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + locale: "br", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/br_FR/br_FR.go b/resources/locales/br_FR/br_FR.go index 00748e2..3254cda 100644 --- a/resources/locales/br_FR/br_FR.go +++ b/resources/locales/br_FR/br_FR.go @@ -7,15 +7,27 @@ import ( ) type br_FR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'br_FR' locale func New() locales.Translator { return &br_FR{ - locale: "br_FR", - plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + locale: "br_FR", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/brx/brx.go b/resources/locales/brx/brx.go index 4ca5143..dedf05d 100644 --- a/resources/locales/brx/brx.go +++ b/resources/locales/brx/brx.go @@ -7,15 +7,27 @@ import ( ) type brx struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'brx' locale func New() locales.Translator { return &brx{ - locale: "brx", - plurals: []locales.PluralRule{2, 6}, + locale: "brx", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/brx_IN/brx_IN.go b/resources/locales/brx_IN/brx_IN.go index 848029f..0723ae0 100644 --- a/resources/locales/brx_IN/brx_IN.go +++ b/resources/locales/brx_IN/brx_IN.go @@ -7,15 +7,27 @@ import ( ) type brx_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'brx_IN' locale func New() locales.Translator { return &brx_IN{ - locale: "brx_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "brx_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/bs/bs.go b/resources/locales/bs/bs.go index 5c6e8c2..53f62e6 100644 --- a/resources/locales/bs/bs.go +++ b/resources/locales/bs/bs.go @@ -7,15 +7,27 @@ import ( ) type bs struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bs' locale func New() locales.Translator { return &bs{ - locale: "bs", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "bs", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/bs_Cyrl/bs_Cyrl.go b/resources/locales/bs_Cyrl/bs_Cyrl.go index 395d349..dfe9e2b 100644 --- a/resources/locales/bs_Cyrl/bs_Cyrl.go +++ b/resources/locales/bs_Cyrl/bs_Cyrl.go @@ -7,15 +7,27 @@ import ( ) type bs_Cyrl struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bs_Cyrl' locale func New() locales.Translator { return &bs_Cyrl{ - locale: "bs_Cyrl", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "bs_Cyrl", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go b/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go index d9386ac..f74f308 100644 --- a/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go +++ b/resources/locales/bs_Cyrl_BA/bs_Cyrl_BA.go @@ -7,15 +7,27 @@ import ( ) type bs_Cyrl_BA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bs_Cyrl_BA' locale func New() locales.Translator { return &bs_Cyrl_BA{ - locale: "bs_Cyrl_BA", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "bs_Cyrl_BA", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/bs_Latn/bs_Latn.go b/resources/locales/bs_Latn/bs_Latn.go index 5687888..03ee47d 100644 --- a/resources/locales/bs_Latn/bs_Latn.go +++ b/resources/locales/bs_Latn/bs_Latn.go @@ -7,15 +7,27 @@ import ( ) type bs_Latn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bs_Latn' locale func New() locales.Translator { return &bs_Latn{ - locale: "bs_Latn", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "bs_Latn", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/bs_Latn_BA/bs_Latn_BA.go b/resources/locales/bs_Latn_BA/bs_Latn_BA.go index 460f9a3..56728e1 100644 --- a/resources/locales/bs_Latn_BA/bs_Latn_BA.go +++ b/resources/locales/bs_Latn_BA/bs_Latn_BA.go @@ -7,15 +7,27 @@ import ( ) type bs_Latn_BA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'bs_Latn_BA' locale func New() locales.Translator { return &bs_Latn_BA{ - locale: "bs_Latn_BA", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "bs_Latn_BA", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ca/ca.go b/resources/locales/ca/ca.go index 6f93d70..9ea5b25 100644 --- a/resources/locales/ca/ca.go +++ b/resources/locales/ca/ca.go @@ -7,15 +7,27 @@ import ( ) type ca struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ca' locale func New() locales.Translator { return &ca{ - locale: "ca", - plurals: []locales.PluralRule{2, 6}, + locale: "ca", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ca_AD/ca_AD.go b/resources/locales/ca_AD/ca_AD.go index ae3adab..60ec909 100644 --- a/resources/locales/ca_AD/ca_AD.go +++ b/resources/locales/ca_AD/ca_AD.go @@ -7,15 +7,27 @@ import ( ) type ca_AD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ca_AD' locale func New() locales.Translator { return &ca_AD{ - locale: "ca_AD", - plurals: []locales.PluralRule{2, 6}, + locale: "ca_AD", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ca_ES/ca_ES.go b/resources/locales/ca_ES/ca_ES.go index ffefadd..28fda82 100644 --- a/resources/locales/ca_ES/ca_ES.go +++ b/resources/locales/ca_ES/ca_ES.go @@ -7,15 +7,27 @@ import ( ) type ca_ES struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ca_ES' locale func New() locales.Translator { return &ca_ES{ - locale: "ca_ES", - plurals: []locales.PluralRule{2, 6}, + locale: "ca_ES", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go b/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go index 90f226f..39822db 100644 --- a/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go +++ b/resources/locales/ca_ES_VALENCIA/ca_ES_VALENCIA.go @@ -7,15 +7,27 @@ import ( ) type ca_ES_VALENCIA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ca_ES_VALENCIA' locale func New() locales.Translator { return &ca_ES_VALENCIA{ - locale: "ca_ES_VALENCIA", - plurals: []locales.PluralRule{2, 6}, + locale: "ca_ES_VALENCIA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ca_FR/ca_FR.go b/resources/locales/ca_FR/ca_FR.go index 39b8091..ad80d0c 100644 --- a/resources/locales/ca_FR/ca_FR.go +++ b/resources/locales/ca_FR/ca_FR.go @@ -7,15 +7,27 @@ import ( ) type ca_FR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ca_FR' locale func New() locales.Translator { return &ca_FR{ - locale: "ca_FR", - plurals: []locales.PluralRule{2, 6}, + locale: "ca_FR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ca_IT/ca_IT.go b/resources/locales/ca_IT/ca_IT.go index 5606509..47c8ee7 100644 --- a/resources/locales/ca_IT/ca_IT.go +++ b/resources/locales/ca_IT/ca_IT.go @@ -7,15 +7,27 @@ import ( ) type ca_IT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ca_IT' locale func New() locales.Translator { return &ca_IT{ - locale: "ca_IT", - plurals: []locales.PluralRule{2, 6}, + locale: "ca_IT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ce/ce.go b/resources/locales/ce/ce.go index a55631a..3dbba7a 100644 --- a/resources/locales/ce/ce.go +++ b/resources/locales/ce/ce.go @@ -7,15 +7,27 @@ import ( ) type ce struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ce' locale func New() locales.Translator { return &ce{ - locale: "ce", - plurals: []locales.PluralRule{2, 6}, + locale: "ce", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ce_RU/ce_RU.go b/resources/locales/ce_RU/ce_RU.go index 2adff0f..8f268a9 100644 --- a/resources/locales/ce_RU/ce_RU.go +++ b/resources/locales/ce_RU/ce_RU.go @@ -7,15 +7,27 @@ import ( ) type ce_RU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ce_RU' locale func New() locales.Translator { return &ce_RU{ - locale: "ce_RU", - plurals: []locales.PluralRule{2, 6}, + locale: "ce_RU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/cgg/cgg.go b/resources/locales/cgg/cgg.go index 791301d..62724d5 100644 --- a/resources/locales/cgg/cgg.go +++ b/resources/locales/cgg/cgg.go @@ -7,15 +7,27 @@ import ( ) type cgg struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'cgg' locale func New() locales.Translator { return &cgg{ - locale: "cgg", - plurals: []locales.PluralRule{2, 6}, + locale: "cgg", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/cgg_UG/cgg_UG.go b/resources/locales/cgg_UG/cgg_UG.go index 5d0c4d9..94b7803 100644 --- a/resources/locales/cgg_UG/cgg_UG.go +++ b/resources/locales/cgg_UG/cgg_UG.go @@ -7,15 +7,27 @@ import ( ) type cgg_UG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'cgg_UG' locale func New() locales.Translator { return &cgg_UG{ - locale: "cgg_UG", - plurals: []locales.PluralRule{2, 6}, + locale: "cgg_UG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/chr/chr.go b/resources/locales/chr/chr.go index 91efb63..f4d3083 100644 --- a/resources/locales/chr/chr.go +++ b/resources/locales/chr/chr.go @@ -7,15 +7,27 @@ import ( ) type chr struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'chr' locale func New() locales.Translator { return &chr{ - locale: "chr", - plurals: []locales.PluralRule{2, 6}, + locale: "chr", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/chr_US/chr_US.go b/resources/locales/chr_US/chr_US.go index 7d4cfcb..20d7d82 100644 --- a/resources/locales/chr_US/chr_US.go +++ b/resources/locales/chr_US/chr_US.go @@ -7,15 +7,27 @@ import ( ) type chr_US struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'chr_US' locale func New() locales.Translator { return &chr_US{ - locale: "chr_US", - plurals: []locales.PluralRule{2, 6}, + locale: "chr_US", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ckb/ckb.go b/resources/locales/ckb/ckb.go index aa11887..5975cee 100644 --- a/resources/locales/ckb/ckb.go +++ b/resources/locales/ckb/ckb.go @@ -7,15 +7,27 @@ import ( ) type ckb struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ckb' locale func New() locales.Translator { return &ckb{ - locale: "ckb", - plurals: []locales.PluralRule{2, 6}, + locale: "ckb", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{0xe2, 0x80, 0x8e, 0x2d}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ckb_IQ/ckb_IQ.go b/resources/locales/ckb_IQ/ckb_IQ.go index 1d6736b..e2538cb 100644 --- a/resources/locales/ckb_IQ/ckb_IQ.go +++ b/resources/locales/ckb_IQ/ckb_IQ.go @@ -7,15 +7,27 @@ import ( ) type ckb_IQ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ckb_IQ' locale func New() locales.Translator { return &ckb_IQ{ - locale: "ckb_IQ", - plurals: []locales.PluralRule{2, 6}, + locale: "ckb_IQ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x65, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ckb_IR/ckb_IR.go b/resources/locales/ckb_IR/ckb_IR.go index d0dd93a..1ad33fc 100644 --- a/resources/locales/ckb_IR/ckb_IR.go +++ b/resources/locales/ckb_IR/ckb_IR.go @@ -7,15 +7,27 @@ import ( ) type ckb_IR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ckb_IR' locale func New() locales.Translator { return &ckb_IR{ - locale: "ckb_IR", - plurals: []locales.PluralRule{2, 6}, + locale: "ckb_IR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x65, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/cs/cs.go b/resources/locales/cs/cs.go index 773054d..0b49a2c 100644 --- a/resources/locales/cs/cs.go +++ b/resources/locales/cs/cs.go @@ -7,15 +7,27 @@ import ( ) type cs struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'cs' locale func New() locales.Translator { return &cs{ - locale: "cs", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "cs", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/cs_CZ/cs_CZ.go b/resources/locales/cs_CZ/cs_CZ.go index c0a847c..a5744f8 100644 --- a/resources/locales/cs_CZ/cs_CZ.go +++ b/resources/locales/cs_CZ/cs_CZ.go @@ -7,15 +7,27 @@ import ( ) type cs_CZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'cs_CZ' locale func New() locales.Translator { return &cs_CZ{ - locale: "cs_CZ", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "cs_CZ", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/cu/cu.go b/resources/locales/cu/cu.go index ecaa98d..0c23691 100644 --- a/resources/locales/cu/cu.go +++ b/resources/locales/cu/cu.go @@ -1,21 +1,29 @@ package cu -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type cu struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'cu' locale func New() locales.Translator { return &cu{ - locale: "cu", - plurals: nil, + locale: "cu", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *cu) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'cu' func (t *cu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/cu_RU/cu_RU.go b/resources/locales/cu_RU/cu_RU.go index f00e79e..7820b14 100644 --- a/resources/locales/cu_RU/cu_RU.go +++ b/resources/locales/cu_RU/cu_RU.go @@ -1,21 +1,29 @@ package cu_RU -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type cu_RU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'cu_RU' locale func New() locales.Translator { return &cu_RU{ - locale: "cu_RU", - plurals: nil, + locale: "cu_RU", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *cu_RU) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'cu_RU' func (t *cu_RU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/cy/cy.go b/resources/locales/cy/cy.go index 37c81a5..9ea464f 100644 --- a/resources/locales/cy/cy.go +++ b/resources/locales/cy/cy.go @@ -7,15 +7,27 @@ import ( ) type cy struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'cy' locale func New() locales.Translator { return &cy{ - locale: "cy", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "cy", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/cy_GB/cy_GB.go b/resources/locales/cy_GB/cy_GB.go index 8330278..ef6225c 100644 --- a/resources/locales/cy_GB/cy_GB.go +++ b/resources/locales/cy_GB/cy_GB.go @@ -7,15 +7,27 @@ import ( ) type cy_GB struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'cy_GB' locale func New() locales.Translator { return &cy_GB{ - locale: "cy_GB", - plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + locale: "cy_GB", + plurals: []locales.PluralRule{1, 2, 3, 4, 5, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/da/da.go b/resources/locales/da/da.go index cd2aee2..78e3450 100644 --- a/resources/locales/da/da.go +++ b/resources/locales/da/da.go @@ -7,15 +7,27 @@ import ( ) type da struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'da' locale func New() locales.Translator { return &da{ - locale: "da", - plurals: []locales.PluralRule{2, 6}, + locale: "da", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/da_DK/da_DK.go b/resources/locales/da_DK/da_DK.go index 5ff3719..fea9180 100644 --- a/resources/locales/da_DK/da_DK.go +++ b/resources/locales/da_DK/da_DK.go @@ -7,15 +7,27 @@ import ( ) type da_DK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'da_DK' locale func New() locales.Translator { return &da_DK{ - locale: "da_DK", - plurals: []locales.PluralRule{2, 6}, + locale: "da_DK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/da_GL/da_GL.go b/resources/locales/da_GL/da_GL.go index 6096a3f..ce20fd7 100644 --- a/resources/locales/da_GL/da_GL.go +++ b/resources/locales/da_GL/da_GL.go @@ -7,15 +7,27 @@ import ( ) type da_GL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'da_GL' locale func New() locales.Translator { return &da_GL{ - locale: "da_GL", - plurals: []locales.PluralRule{2, 6}, + locale: "da_GL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/dav/dav.go b/resources/locales/dav/dav.go index 64a4372..a84ee2e 100644 --- a/resources/locales/dav/dav.go +++ b/resources/locales/dav/dav.go @@ -1,21 +1,29 @@ package dav -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type dav struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dav' locale func New() locales.Translator { return &dav{ - locale: "dav", - plurals: nil, + locale: "dav", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *dav) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dav' func (t *dav) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/dav_KE/dav_KE.go b/resources/locales/dav_KE/dav_KE.go index e11b79e..bfb3a25 100644 --- a/resources/locales/dav_KE/dav_KE.go +++ b/resources/locales/dav_KE/dav_KE.go @@ -1,21 +1,29 @@ package dav_KE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type dav_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dav_KE' locale func New() locales.Translator { return &dav_KE{ - locale: "dav_KE", - plurals: nil, + locale: "dav_KE", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *dav_KE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dav_KE' func (t *dav_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/de/de.go b/resources/locales/de/de.go index aa6c7d0..0617af8 100644 --- a/resources/locales/de/de.go +++ b/resources/locales/de/de.go @@ -7,15 +7,27 @@ import ( ) type de struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'de' locale func New() locales.Translator { return &de{ - locale: "de", - plurals: []locales.PluralRule{2, 6}, + locale: "de", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/de_AT/de_AT.go b/resources/locales/de_AT/de_AT.go index 26f8ae6..6a2106e 100644 --- a/resources/locales/de_AT/de_AT.go +++ b/resources/locales/de_AT/de_AT.go @@ -7,15 +7,27 @@ import ( ) type de_AT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'de_AT' locale func New() locales.Translator { return &de_AT{ - locale: "de_AT", - plurals: []locales.PluralRule{2, 6}, + locale: "de_AT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/de_BE/de_BE.go b/resources/locales/de_BE/de_BE.go index 4f8c3db..d098072 100644 --- a/resources/locales/de_BE/de_BE.go +++ b/resources/locales/de_BE/de_BE.go @@ -7,15 +7,27 @@ import ( ) type de_BE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'de_BE' locale func New() locales.Translator { return &de_BE{ - locale: "de_BE", - plurals: []locales.PluralRule{2, 6}, + locale: "de_BE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/de_CH/de_CH.go b/resources/locales/de_CH/de_CH.go index 29767b1..355586a 100644 --- a/resources/locales/de_CH/de_CH.go +++ b/resources/locales/de_CH/de_CH.go @@ -7,15 +7,27 @@ import ( ) type de_CH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'de_CH' locale func New() locales.Translator { return &de_CH{ - locale: "de_CH", - plurals: []locales.PluralRule{2, 6}, + locale: "de_CH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x27}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/de_DE/de_DE.go b/resources/locales/de_DE/de_DE.go index 40d2096..6da6938 100644 --- a/resources/locales/de_DE/de_DE.go +++ b/resources/locales/de_DE/de_DE.go @@ -7,15 +7,27 @@ import ( ) type de_DE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'de_DE' locale func New() locales.Translator { return &de_DE{ - locale: "de_DE", - plurals: []locales.PluralRule{2, 6}, + locale: "de_DE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/de_LI/de_LI.go b/resources/locales/de_LI/de_LI.go index 12a3284..07b53df 100644 --- a/resources/locales/de_LI/de_LI.go +++ b/resources/locales/de_LI/de_LI.go @@ -7,15 +7,27 @@ import ( ) type de_LI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'de_LI' locale func New() locales.Translator { return &de_LI{ - locale: "de_LI", - plurals: []locales.PluralRule{2, 6}, + locale: "de_LI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x27}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/de_LU/de_LU.go b/resources/locales/de_LU/de_LU.go index d2ddfc3..824b4c4 100644 --- a/resources/locales/de_LU/de_LU.go +++ b/resources/locales/de_LU/de_LU.go @@ -7,15 +7,27 @@ import ( ) type de_LU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'de_LU' locale func New() locales.Translator { return &de_LU{ - locale: "de_LU", - plurals: []locales.PluralRule{2, 6}, + locale: "de_LU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/dje/dje.go b/resources/locales/dje/dje.go index f2a2560..ed4ac64 100644 --- a/resources/locales/dje/dje.go +++ b/resources/locales/dje/dje.go @@ -1,21 +1,29 @@ package dje -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type dje struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dje' locale func New() locales.Translator { return &dje{ - locale: "dje", - plurals: nil, + locale: "dje", + plurals: nil, + decimal: []byte{0x2e}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *dje) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dje' func (t *dje) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/dje_NE/dje_NE.go b/resources/locales/dje_NE/dje_NE.go index 4591e31..e3c6b05 100644 --- a/resources/locales/dje_NE/dje_NE.go +++ b/resources/locales/dje_NE/dje_NE.go @@ -1,21 +1,29 @@ package dje_NE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type dje_NE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dje_NE' locale func New() locales.Translator { return &dje_NE{ - locale: "dje_NE", - plurals: nil, + locale: "dje_NE", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *dje_NE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dje_NE' func (t *dje_NE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/dsb/dsb.go b/resources/locales/dsb/dsb.go index 3c1a8e1..280a0f3 100644 --- a/resources/locales/dsb/dsb.go +++ b/resources/locales/dsb/dsb.go @@ -7,15 +7,27 @@ import ( ) type dsb struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dsb' locale func New() locales.Translator { return &dsb{ - locale: "dsb", - plurals: []locales.PluralRule{2, 3, 4, 6}, + locale: "dsb", + plurals: []locales.PluralRule{2, 3, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/dsb_DE/dsb_DE.go b/resources/locales/dsb_DE/dsb_DE.go index 6cfc898..d9cac9e 100644 --- a/resources/locales/dsb_DE/dsb_DE.go +++ b/resources/locales/dsb_DE/dsb_DE.go @@ -7,15 +7,27 @@ import ( ) type dsb_DE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dsb_DE' locale func New() locales.Translator { return &dsb_DE{ - locale: "dsb_DE", - plurals: []locales.PluralRule{2, 3, 4, 6}, + locale: "dsb_DE", + plurals: []locales.PluralRule{2, 3, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/dua/dua.go b/resources/locales/dua/dua.go index deecb8f..99d4973 100644 --- a/resources/locales/dua/dua.go +++ b/resources/locales/dua/dua.go @@ -1,21 +1,29 @@ package dua -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type dua struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dua' locale func New() locales.Translator { return &dua{ - locale: "dua", - plurals: nil, + locale: "dua", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *dua) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dua' func (t *dua) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/dua_CM/dua_CM.go b/resources/locales/dua_CM/dua_CM.go index 3ce2424..dd223d2 100644 --- a/resources/locales/dua_CM/dua_CM.go +++ b/resources/locales/dua_CM/dua_CM.go @@ -1,21 +1,29 @@ package dua_CM -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type dua_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dua_CM' locale func New() locales.Translator { return &dua_CM{ - locale: "dua_CM", - plurals: nil, + locale: "dua_CM", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *dua_CM) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dua_CM' func (t *dua_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/dyo/dyo.go b/resources/locales/dyo/dyo.go index 37da024..384fdc6 100644 --- a/resources/locales/dyo/dyo.go +++ b/resources/locales/dyo/dyo.go @@ -1,21 +1,29 @@ package dyo -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type dyo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dyo' locale func New() locales.Translator { return &dyo{ - locale: "dyo", - plurals: nil, + locale: "dyo", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *dyo) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dyo' func (t *dyo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/dyo_SN/dyo_SN.go b/resources/locales/dyo_SN/dyo_SN.go index febd5cd..82afddd 100644 --- a/resources/locales/dyo_SN/dyo_SN.go +++ b/resources/locales/dyo_SN/dyo_SN.go @@ -1,21 +1,29 @@ package dyo_SN -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type dyo_SN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dyo_SN' locale func New() locales.Translator { return &dyo_SN{ - locale: "dyo_SN", - plurals: nil, + locale: "dyo_SN", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *dyo_SN) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dyo_SN' func (t *dyo_SN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/dz/dz.go b/resources/locales/dz/dz.go index 58d620d..b244fa6 100644 --- a/resources/locales/dz/dz.go +++ b/resources/locales/dz/dz.go @@ -1,21 +1,29 @@ package dz -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type dz struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dz' locale func New() locales.Translator { return &dz{ - locale: "dz", - plurals: []locales.PluralRule{6}, + locale: "dz", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *dz) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dz' func (t *dz) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/dz_BT/dz_BT.go b/resources/locales/dz_BT/dz_BT.go index c98f7db..28a8b34 100644 --- a/resources/locales/dz_BT/dz_BT.go +++ b/resources/locales/dz_BT/dz_BT.go @@ -1,21 +1,29 @@ package dz_BT -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type dz_BT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'dz_BT' locale func New() locales.Translator { return &dz_BT{ - locale: "dz_BT", - plurals: []locales.PluralRule{6}, + locale: "dz_BT", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *dz_BT) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'dz_BT' func (t *dz_BT) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ebu/ebu.go b/resources/locales/ebu/ebu.go index 319d83a..911a620 100644 --- a/resources/locales/ebu/ebu.go +++ b/resources/locales/ebu/ebu.go @@ -1,21 +1,29 @@ package ebu -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ebu struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ebu' locale func New() locales.Translator { return &ebu{ - locale: "ebu", - plurals: nil, + locale: "ebu", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *ebu) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ebu' func (t *ebu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/ebu_KE/ebu_KE.go b/resources/locales/ebu_KE/ebu_KE.go index 6256d6b..1f45d46 100644 --- a/resources/locales/ebu_KE/ebu_KE.go +++ b/resources/locales/ebu_KE/ebu_KE.go @@ -1,21 +1,29 @@ package ebu_KE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ebu_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ebu_KE' locale func New() locales.Translator { return &ebu_KE{ - locale: "ebu_KE", - plurals: nil, + locale: "ebu_KE", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *ebu_KE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ebu_KE' func (t *ebu_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/ee/ee.go b/resources/locales/ee/ee.go index 3a9c158..ac1b60e 100644 --- a/resources/locales/ee/ee.go +++ b/resources/locales/ee/ee.go @@ -7,15 +7,27 @@ import ( ) type ee struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ee' locale func New() locales.Translator { return &ee{ - locale: "ee", - plurals: []locales.PluralRule{2, 6}, + locale: "ee", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ee_GH/ee_GH.go b/resources/locales/ee_GH/ee_GH.go index 563dfa4..d018d54 100644 --- a/resources/locales/ee_GH/ee_GH.go +++ b/resources/locales/ee_GH/ee_GH.go @@ -7,15 +7,27 @@ import ( ) type ee_GH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ee_GH' locale func New() locales.Translator { return &ee_GH{ - locale: "ee_GH", - plurals: []locales.PluralRule{2, 6}, + locale: "ee_GH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ee_TG/ee_TG.go b/resources/locales/ee_TG/ee_TG.go index 9bc2dd2..8afacb9 100644 --- a/resources/locales/ee_TG/ee_TG.go +++ b/resources/locales/ee_TG/ee_TG.go @@ -7,15 +7,27 @@ import ( ) type ee_TG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ee_TG' locale func New() locales.Translator { return &ee_TG{ - locale: "ee_TG", - plurals: []locales.PluralRule{2, 6}, + locale: "ee_TG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/el/el.go b/resources/locales/el/el.go index 0b6ad12..3e8203e 100644 --- a/resources/locales/el/el.go +++ b/resources/locales/el/el.go @@ -7,15 +7,27 @@ import ( ) type el struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'el' locale func New() locales.Translator { return &el{ - locale: "el", - plurals: []locales.PluralRule{2, 6}, + locale: "el", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/el_CY/el_CY.go b/resources/locales/el_CY/el_CY.go index 9dc4e30..4c1ba6e 100644 --- a/resources/locales/el_CY/el_CY.go +++ b/resources/locales/el_CY/el_CY.go @@ -7,15 +7,27 @@ import ( ) type el_CY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'el_CY' locale func New() locales.Translator { return &el_CY{ - locale: "el_CY", - plurals: []locales.PluralRule{2, 6}, + locale: "el_CY", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/el_GR/el_GR.go b/resources/locales/el_GR/el_GR.go index b11946a..650f737 100644 --- a/resources/locales/el_GR/el_GR.go +++ b/resources/locales/el_GR/el_GR.go @@ -7,15 +7,27 @@ import ( ) type el_GR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'el_GR' locale func New() locales.Translator { return &el_GR{ - locale: "el_GR", - plurals: []locales.PluralRule{2, 6}, + locale: "el_GR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en/en.go b/resources/locales/en/en.go index afdbdb8..20d7a74 100644 --- a/resources/locales/en/en.go +++ b/resources/locales/en/en.go @@ -7,15 +7,27 @@ import ( ) type en struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en' locale func New() locales.Translator { return &en{ - locale: "en", - plurals: []locales.PluralRule{2, 6}, + locale: "en", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/en_001/en_001.go b/resources/locales/en_001/en_001.go index 6633ffb..bd4b997 100644 --- a/resources/locales/en_001/en_001.go +++ b/resources/locales/en_001/en_001.go @@ -7,15 +7,27 @@ import ( ) type en_001 struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_001' locale func New() locales.Translator { return &en_001{ - locale: "en_001", - plurals: []locales.PluralRule{2, 6}, + locale: "en_001", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_150/en_150.go b/resources/locales/en_150/en_150.go index c707f1f..5b00120 100644 --- a/resources/locales/en_150/en_150.go +++ b/resources/locales/en_150/en_150.go @@ -7,15 +7,27 @@ import ( ) type en_150 struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_150' locale func New() locales.Translator { return &en_150{ - locale: "en_150", - plurals: []locales.PluralRule{2, 6}, + locale: "en_150", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_AG/en_AG.go b/resources/locales/en_AG/en_AG.go index de6173e..8fda796 100644 --- a/resources/locales/en_AG/en_AG.go +++ b/resources/locales/en_AG/en_AG.go @@ -7,15 +7,27 @@ import ( ) type en_AG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_AG' locale func New() locales.Translator { return &en_AG{ - locale: "en_AG", - plurals: []locales.PluralRule{2, 6}, + locale: "en_AG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_AI/en_AI.go b/resources/locales/en_AI/en_AI.go index a5f2742..ea5a496 100644 --- a/resources/locales/en_AI/en_AI.go +++ b/resources/locales/en_AI/en_AI.go @@ -7,15 +7,27 @@ import ( ) type en_AI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_AI' locale func New() locales.Translator { return &en_AI{ - locale: "en_AI", - plurals: []locales.PluralRule{2, 6}, + locale: "en_AI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_AS/en_AS.go b/resources/locales/en_AS/en_AS.go index 974f49d..ff19085 100644 --- a/resources/locales/en_AS/en_AS.go +++ b/resources/locales/en_AS/en_AS.go @@ -7,15 +7,27 @@ import ( ) type en_AS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_AS' locale func New() locales.Translator { return &en_AS{ - locale: "en_AS", - plurals: []locales.PluralRule{2, 6}, + locale: "en_AS", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_AT/en_AT.go b/resources/locales/en_AT/en_AT.go index 3c2e461..d1a35f8 100644 --- a/resources/locales/en_AT/en_AT.go +++ b/resources/locales/en_AT/en_AT.go @@ -7,15 +7,27 @@ import ( ) type en_AT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_AT' locale func New() locales.Translator { return &en_AT{ - locale: "en_AT", - plurals: []locales.PluralRule{2, 6}, + locale: "en_AT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_AU/en_AU.go b/resources/locales/en_AU/en_AU.go index 42fc90f..a411038 100644 --- a/resources/locales/en_AU/en_AU.go +++ b/resources/locales/en_AU/en_AU.go @@ -7,15 +7,27 @@ import ( ) type en_AU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_AU' locale func New() locales.Translator { return &en_AU{ - locale: "en_AU", - plurals: []locales.PluralRule{2, 6}, + locale: "en_AU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_BB/en_BB.go b/resources/locales/en_BB/en_BB.go index 27c1cd3..ccf6075 100644 --- a/resources/locales/en_BB/en_BB.go +++ b/resources/locales/en_BB/en_BB.go @@ -7,15 +7,27 @@ import ( ) type en_BB struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_BB' locale func New() locales.Translator { return &en_BB{ - locale: "en_BB", - plurals: []locales.PluralRule{2, 6}, + locale: "en_BB", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_BE/en_BE.go b/resources/locales/en_BE/en_BE.go index a4d4e4a..4a5d461 100644 --- a/resources/locales/en_BE/en_BE.go +++ b/resources/locales/en_BE/en_BE.go @@ -7,15 +7,27 @@ import ( ) type en_BE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_BE' locale func New() locales.Translator { return &en_BE{ - locale: "en_BE", - plurals: []locales.PluralRule{2, 6}, + locale: "en_BE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_BI/en_BI.go b/resources/locales/en_BI/en_BI.go index d3b9601..18c7d15 100644 --- a/resources/locales/en_BI/en_BI.go +++ b/resources/locales/en_BI/en_BI.go @@ -7,15 +7,27 @@ import ( ) type en_BI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_BI' locale func New() locales.Translator { return &en_BI{ - locale: "en_BI", - plurals: []locales.PluralRule{2, 6}, + locale: "en_BI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_BM/en_BM.go b/resources/locales/en_BM/en_BM.go index c61bb03..be3c900 100644 --- a/resources/locales/en_BM/en_BM.go +++ b/resources/locales/en_BM/en_BM.go @@ -7,15 +7,27 @@ import ( ) type en_BM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_BM' locale func New() locales.Translator { return &en_BM{ - locale: "en_BM", - plurals: []locales.PluralRule{2, 6}, + locale: "en_BM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_BS/en_BS.go b/resources/locales/en_BS/en_BS.go index d056ce3..9d4975f 100644 --- a/resources/locales/en_BS/en_BS.go +++ b/resources/locales/en_BS/en_BS.go @@ -7,15 +7,27 @@ import ( ) type en_BS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_BS' locale func New() locales.Translator { return &en_BS{ - locale: "en_BS", - plurals: []locales.PluralRule{2, 6}, + locale: "en_BS", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_BW/en_BW.go b/resources/locales/en_BW/en_BW.go index a23bfe2..aca947d 100644 --- a/resources/locales/en_BW/en_BW.go +++ b/resources/locales/en_BW/en_BW.go @@ -7,15 +7,27 @@ import ( ) type en_BW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_BW' locale func New() locales.Translator { return &en_BW{ - locale: "en_BW", - plurals: []locales.PluralRule{2, 6}, + locale: "en_BW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_BZ/en_BZ.go b/resources/locales/en_BZ/en_BZ.go index d5bc0fc..4f4e6bb 100644 --- a/resources/locales/en_BZ/en_BZ.go +++ b/resources/locales/en_BZ/en_BZ.go @@ -7,15 +7,27 @@ import ( ) type en_BZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_BZ' locale func New() locales.Translator { return &en_BZ{ - locale: "en_BZ", - plurals: []locales.PluralRule{2, 6}, + locale: "en_BZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_CA/en_CA.go b/resources/locales/en_CA/en_CA.go index 3fdf322..519b27e 100644 --- a/resources/locales/en_CA/en_CA.go +++ b/resources/locales/en_CA/en_CA.go @@ -7,15 +7,27 @@ import ( ) type en_CA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_CA' locale func New() locales.Translator { return &en_CA{ - locale: "en_CA", - plurals: []locales.PluralRule{2, 6}, + locale: "en_CA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_CC/en_CC.go b/resources/locales/en_CC/en_CC.go index 6bfc272..e0cc64e 100644 --- a/resources/locales/en_CC/en_CC.go +++ b/resources/locales/en_CC/en_CC.go @@ -7,15 +7,27 @@ import ( ) type en_CC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_CC' locale func New() locales.Translator { return &en_CC{ - locale: "en_CC", - plurals: []locales.PluralRule{2, 6}, + locale: "en_CC", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_CH/en_CH.go b/resources/locales/en_CH/en_CH.go index 166ac8c..138a572 100644 --- a/resources/locales/en_CH/en_CH.go +++ b/resources/locales/en_CH/en_CH.go @@ -7,15 +7,27 @@ import ( ) type en_CH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_CH' locale func New() locales.Translator { return &en_CH{ - locale: "en_CH", - plurals: []locales.PluralRule{2, 6}, + locale: "en_CH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_CK/en_CK.go b/resources/locales/en_CK/en_CK.go index 7d12687..e5fb394 100644 --- a/resources/locales/en_CK/en_CK.go +++ b/resources/locales/en_CK/en_CK.go @@ -7,15 +7,27 @@ import ( ) type en_CK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_CK' locale func New() locales.Translator { return &en_CK{ - locale: "en_CK", - plurals: []locales.PluralRule{2, 6}, + locale: "en_CK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_CM/en_CM.go b/resources/locales/en_CM/en_CM.go index 7e9deee..9ca727e 100644 --- a/resources/locales/en_CM/en_CM.go +++ b/resources/locales/en_CM/en_CM.go @@ -7,15 +7,27 @@ import ( ) type en_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_CM' locale func New() locales.Translator { return &en_CM{ - locale: "en_CM", - plurals: []locales.PluralRule{2, 6}, + locale: "en_CM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_CX/en_CX.go b/resources/locales/en_CX/en_CX.go index 15d434d..8340148 100644 --- a/resources/locales/en_CX/en_CX.go +++ b/resources/locales/en_CX/en_CX.go @@ -7,15 +7,27 @@ import ( ) type en_CX struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_CX' locale func New() locales.Translator { return &en_CX{ - locale: "en_CX", - plurals: []locales.PluralRule{2, 6}, + locale: "en_CX", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_CY/en_CY.go b/resources/locales/en_CY/en_CY.go index a5fa67d..a65e6f0 100644 --- a/resources/locales/en_CY/en_CY.go +++ b/resources/locales/en_CY/en_CY.go @@ -7,15 +7,27 @@ import ( ) type en_CY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_CY' locale func New() locales.Translator { return &en_CY{ - locale: "en_CY", - plurals: []locales.PluralRule{2, 6}, + locale: "en_CY", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_DE/en_DE.go b/resources/locales/en_DE/en_DE.go index 791aa3d..8b821c7 100644 --- a/resources/locales/en_DE/en_DE.go +++ b/resources/locales/en_DE/en_DE.go @@ -7,15 +7,27 @@ import ( ) type en_DE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_DE' locale func New() locales.Translator { return &en_DE{ - locale: "en_DE", - plurals: []locales.PluralRule{2, 6}, + locale: "en_DE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_DG/en_DG.go b/resources/locales/en_DG/en_DG.go index e9ddf72..53ef753 100644 --- a/resources/locales/en_DG/en_DG.go +++ b/resources/locales/en_DG/en_DG.go @@ -7,15 +7,27 @@ import ( ) type en_DG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_DG' locale func New() locales.Translator { return &en_DG{ - locale: "en_DG", - plurals: []locales.PluralRule{2, 6}, + locale: "en_DG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_DK/en_DK.go b/resources/locales/en_DK/en_DK.go index 29c5553..72504d0 100644 --- a/resources/locales/en_DK/en_DK.go +++ b/resources/locales/en_DK/en_DK.go @@ -7,15 +7,27 @@ import ( ) type en_DK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_DK' locale func New() locales.Translator { return &en_DK{ - locale: "en_DK", - plurals: []locales.PluralRule{2, 6}, + locale: "en_DK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_DM/en_DM.go b/resources/locales/en_DM/en_DM.go index aecb6d6..c577801 100644 --- a/resources/locales/en_DM/en_DM.go +++ b/resources/locales/en_DM/en_DM.go @@ -7,15 +7,27 @@ import ( ) type en_DM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_DM' locale func New() locales.Translator { return &en_DM{ - locale: "en_DM", - plurals: []locales.PluralRule{2, 6}, + locale: "en_DM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_ER/en_ER.go b/resources/locales/en_ER/en_ER.go index 63fa764..3f510d1 100644 --- a/resources/locales/en_ER/en_ER.go +++ b/resources/locales/en_ER/en_ER.go @@ -7,15 +7,27 @@ import ( ) type en_ER struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_ER' locale func New() locales.Translator { return &en_ER{ - locale: "en_ER", - plurals: []locales.PluralRule{2, 6}, + locale: "en_ER", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_FI/en_FI.go b/resources/locales/en_FI/en_FI.go index 818168f..5a75b87 100644 --- a/resources/locales/en_FI/en_FI.go +++ b/resources/locales/en_FI/en_FI.go @@ -7,15 +7,27 @@ import ( ) type en_FI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_FI' locale func New() locales.Translator { return &en_FI{ - locale: "en_FI", - plurals: []locales.PluralRule{2, 6}, + locale: "en_FI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_FJ/en_FJ.go b/resources/locales/en_FJ/en_FJ.go index 4e380be..480c3a9 100644 --- a/resources/locales/en_FJ/en_FJ.go +++ b/resources/locales/en_FJ/en_FJ.go @@ -7,15 +7,27 @@ import ( ) type en_FJ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_FJ' locale func New() locales.Translator { return &en_FJ{ - locale: "en_FJ", - plurals: []locales.PluralRule{2, 6}, + locale: "en_FJ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_FK/en_FK.go b/resources/locales/en_FK/en_FK.go index b86dc96..4e35cb0 100644 --- a/resources/locales/en_FK/en_FK.go +++ b/resources/locales/en_FK/en_FK.go @@ -7,15 +7,27 @@ import ( ) type en_FK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_FK' locale func New() locales.Translator { return &en_FK{ - locale: "en_FK", - plurals: []locales.PluralRule{2, 6}, + locale: "en_FK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_FM/en_FM.go b/resources/locales/en_FM/en_FM.go index cfe05f5..a3b0d37 100644 --- a/resources/locales/en_FM/en_FM.go +++ b/resources/locales/en_FM/en_FM.go @@ -7,15 +7,27 @@ import ( ) type en_FM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_FM' locale func New() locales.Translator { return &en_FM{ - locale: "en_FM", - plurals: []locales.PluralRule{2, 6}, + locale: "en_FM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_GB/en_GB.go b/resources/locales/en_GB/en_GB.go index b6cd4a7..364b42f 100644 --- a/resources/locales/en_GB/en_GB.go +++ b/resources/locales/en_GB/en_GB.go @@ -7,15 +7,27 @@ import ( ) type en_GB struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_GB' locale func New() locales.Translator { return &en_GB{ - locale: "en_GB", - plurals: []locales.PluralRule{2, 6}, + locale: "en_GB", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_GD/en_GD.go b/resources/locales/en_GD/en_GD.go index 716edde..fcd9867 100644 --- a/resources/locales/en_GD/en_GD.go +++ b/resources/locales/en_GD/en_GD.go @@ -7,15 +7,27 @@ import ( ) type en_GD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_GD' locale func New() locales.Translator { return &en_GD{ - locale: "en_GD", - plurals: []locales.PluralRule{2, 6}, + locale: "en_GD", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_GG/en_GG.go b/resources/locales/en_GG/en_GG.go index 9b60b57..79dd5bf 100644 --- a/resources/locales/en_GG/en_GG.go +++ b/resources/locales/en_GG/en_GG.go @@ -7,15 +7,27 @@ import ( ) type en_GG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_GG' locale func New() locales.Translator { return &en_GG{ - locale: "en_GG", - plurals: []locales.PluralRule{2, 6}, + locale: "en_GG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_GH/en_GH.go b/resources/locales/en_GH/en_GH.go index 4bc4522..07f6920 100644 --- a/resources/locales/en_GH/en_GH.go +++ b/resources/locales/en_GH/en_GH.go @@ -7,15 +7,27 @@ import ( ) type en_GH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_GH' locale func New() locales.Translator { return &en_GH{ - locale: "en_GH", - plurals: []locales.PluralRule{2, 6}, + locale: "en_GH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_GI/en_GI.go b/resources/locales/en_GI/en_GI.go index e888b4d..231b55b 100644 --- a/resources/locales/en_GI/en_GI.go +++ b/resources/locales/en_GI/en_GI.go @@ -7,15 +7,27 @@ import ( ) type en_GI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_GI' locale func New() locales.Translator { return &en_GI{ - locale: "en_GI", - plurals: []locales.PluralRule{2, 6}, + locale: "en_GI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_GM/en_GM.go b/resources/locales/en_GM/en_GM.go index 6afa50d..86fb053 100644 --- a/resources/locales/en_GM/en_GM.go +++ b/resources/locales/en_GM/en_GM.go @@ -7,15 +7,27 @@ import ( ) type en_GM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_GM' locale func New() locales.Translator { return &en_GM{ - locale: "en_GM", - plurals: []locales.PluralRule{2, 6}, + locale: "en_GM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_GU/en_GU.go b/resources/locales/en_GU/en_GU.go index 48ee464..79d2f73 100644 --- a/resources/locales/en_GU/en_GU.go +++ b/resources/locales/en_GU/en_GU.go @@ -7,15 +7,27 @@ import ( ) type en_GU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_GU' locale func New() locales.Translator { return &en_GU{ - locale: "en_GU", - plurals: []locales.PluralRule{2, 6}, + locale: "en_GU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_GY/en_GY.go b/resources/locales/en_GY/en_GY.go index 3e2ed29..a28f4a2 100644 --- a/resources/locales/en_GY/en_GY.go +++ b/resources/locales/en_GY/en_GY.go @@ -7,15 +7,27 @@ import ( ) type en_GY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_GY' locale func New() locales.Translator { return &en_GY{ - locale: "en_GY", - plurals: []locales.PluralRule{2, 6}, + locale: "en_GY", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_HK/en_HK.go b/resources/locales/en_HK/en_HK.go index 3c38839..634567c 100644 --- a/resources/locales/en_HK/en_HK.go +++ b/resources/locales/en_HK/en_HK.go @@ -7,15 +7,27 @@ import ( ) type en_HK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_HK' locale func New() locales.Translator { return &en_HK{ - locale: "en_HK", - plurals: []locales.PluralRule{2, 6}, + locale: "en_HK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_IE/en_IE.go b/resources/locales/en_IE/en_IE.go index 7e0a4c6..fd0b9d8 100644 --- a/resources/locales/en_IE/en_IE.go +++ b/resources/locales/en_IE/en_IE.go @@ -7,15 +7,27 @@ import ( ) type en_IE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_IE' locale func New() locales.Translator { return &en_IE{ - locale: "en_IE", - plurals: []locales.PluralRule{2, 6}, + locale: "en_IE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_IL/en_IL.go b/resources/locales/en_IL/en_IL.go index 23f9668..62a5f79 100644 --- a/resources/locales/en_IL/en_IL.go +++ b/resources/locales/en_IL/en_IL.go @@ -7,15 +7,27 @@ import ( ) type en_IL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_IL' locale func New() locales.Translator { return &en_IL{ - locale: "en_IL", - plurals: []locales.PluralRule{2, 6}, + locale: "en_IL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_IM/en_IM.go b/resources/locales/en_IM/en_IM.go index daad31e..0f65388 100644 --- a/resources/locales/en_IM/en_IM.go +++ b/resources/locales/en_IM/en_IM.go @@ -7,15 +7,27 @@ import ( ) type en_IM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_IM' locale func New() locales.Translator { return &en_IM{ - locale: "en_IM", - plurals: []locales.PluralRule{2, 6}, + locale: "en_IM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_IN/en_IN.go b/resources/locales/en_IN/en_IN.go index d19f7c8..5d07ac4 100644 --- a/resources/locales/en_IN/en_IN.go +++ b/resources/locales/en_IN/en_IN.go @@ -7,15 +7,27 @@ import ( ) type en_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_IN' locale func New() locales.Translator { return &en_IN{ - locale: "en_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "en_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_IO/en_IO.go b/resources/locales/en_IO/en_IO.go index 76b7dd8..ff2a20d 100644 --- a/resources/locales/en_IO/en_IO.go +++ b/resources/locales/en_IO/en_IO.go @@ -7,15 +7,27 @@ import ( ) type en_IO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_IO' locale func New() locales.Translator { return &en_IO{ - locale: "en_IO", - plurals: []locales.PluralRule{2, 6}, + locale: "en_IO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_JE/en_JE.go b/resources/locales/en_JE/en_JE.go index 093f5e3..4a337e5 100644 --- a/resources/locales/en_JE/en_JE.go +++ b/resources/locales/en_JE/en_JE.go @@ -7,15 +7,27 @@ import ( ) type en_JE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_JE' locale func New() locales.Translator { return &en_JE{ - locale: "en_JE", - plurals: []locales.PluralRule{2, 6}, + locale: "en_JE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_JM/en_JM.go b/resources/locales/en_JM/en_JM.go index 340780b..4831e00 100644 --- a/resources/locales/en_JM/en_JM.go +++ b/resources/locales/en_JM/en_JM.go @@ -7,15 +7,27 @@ import ( ) type en_JM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_JM' locale func New() locales.Translator { return &en_JM{ - locale: "en_JM", - plurals: []locales.PluralRule{2, 6}, + locale: "en_JM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_KE/en_KE.go b/resources/locales/en_KE/en_KE.go index 41b6ff8..7b37244 100644 --- a/resources/locales/en_KE/en_KE.go +++ b/resources/locales/en_KE/en_KE.go @@ -7,15 +7,27 @@ import ( ) type en_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_KE' locale func New() locales.Translator { return &en_KE{ - locale: "en_KE", - plurals: []locales.PluralRule{2, 6}, + locale: "en_KE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_KI/en_KI.go b/resources/locales/en_KI/en_KI.go index 557b99e..0367c0a 100644 --- a/resources/locales/en_KI/en_KI.go +++ b/resources/locales/en_KI/en_KI.go @@ -7,15 +7,27 @@ import ( ) type en_KI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_KI' locale func New() locales.Translator { return &en_KI{ - locale: "en_KI", - plurals: []locales.PluralRule{2, 6}, + locale: "en_KI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_KN/en_KN.go b/resources/locales/en_KN/en_KN.go index f9fb7b5..7a5e203 100644 --- a/resources/locales/en_KN/en_KN.go +++ b/resources/locales/en_KN/en_KN.go @@ -7,15 +7,27 @@ import ( ) type en_KN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_KN' locale func New() locales.Translator { return &en_KN{ - locale: "en_KN", - plurals: []locales.PluralRule{2, 6}, + locale: "en_KN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_KY/en_KY.go b/resources/locales/en_KY/en_KY.go index 2d5073b..ebfe316 100644 --- a/resources/locales/en_KY/en_KY.go +++ b/resources/locales/en_KY/en_KY.go @@ -7,15 +7,27 @@ import ( ) type en_KY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_KY' locale func New() locales.Translator { return &en_KY{ - locale: "en_KY", - plurals: []locales.PluralRule{2, 6}, + locale: "en_KY", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_LC/en_LC.go b/resources/locales/en_LC/en_LC.go index 9cff49d..a85f699 100644 --- a/resources/locales/en_LC/en_LC.go +++ b/resources/locales/en_LC/en_LC.go @@ -7,15 +7,27 @@ import ( ) type en_LC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_LC' locale func New() locales.Translator { return &en_LC{ - locale: "en_LC", - plurals: []locales.PluralRule{2, 6}, + locale: "en_LC", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_LR/en_LR.go b/resources/locales/en_LR/en_LR.go index d2c9871..f9ab78a 100644 --- a/resources/locales/en_LR/en_LR.go +++ b/resources/locales/en_LR/en_LR.go @@ -7,15 +7,27 @@ import ( ) type en_LR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_LR' locale func New() locales.Translator { return &en_LR{ - locale: "en_LR", - plurals: []locales.PluralRule{2, 6}, + locale: "en_LR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_LS/en_LS.go b/resources/locales/en_LS/en_LS.go index 79fe793..1fc47fe 100644 --- a/resources/locales/en_LS/en_LS.go +++ b/resources/locales/en_LS/en_LS.go @@ -7,15 +7,27 @@ import ( ) type en_LS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_LS' locale func New() locales.Translator { return &en_LS{ - locale: "en_LS", - plurals: []locales.PluralRule{2, 6}, + locale: "en_LS", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_MG/en_MG.go b/resources/locales/en_MG/en_MG.go index 2e8bfb1..360c3a3 100644 --- a/resources/locales/en_MG/en_MG.go +++ b/resources/locales/en_MG/en_MG.go @@ -7,15 +7,27 @@ import ( ) type en_MG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_MG' locale func New() locales.Translator { return &en_MG{ - locale: "en_MG", - plurals: []locales.PluralRule{2, 6}, + locale: "en_MG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_MH/en_MH.go b/resources/locales/en_MH/en_MH.go index 9bec029..8fc7fe4 100644 --- a/resources/locales/en_MH/en_MH.go +++ b/resources/locales/en_MH/en_MH.go @@ -7,15 +7,27 @@ import ( ) type en_MH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_MH' locale func New() locales.Translator { return &en_MH{ - locale: "en_MH", - plurals: []locales.PluralRule{2, 6}, + locale: "en_MH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_MO/en_MO.go b/resources/locales/en_MO/en_MO.go index 8329c7a..9532d3e 100644 --- a/resources/locales/en_MO/en_MO.go +++ b/resources/locales/en_MO/en_MO.go @@ -7,15 +7,27 @@ import ( ) type en_MO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_MO' locale func New() locales.Translator { return &en_MO{ - locale: "en_MO", - plurals: []locales.PluralRule{2, 6}, + locale: "en_MO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_MP/en_MP.go b/resources/locales/en_MP/en_MP.go index e9fc31e..b6262a1 100644 --- a/resources/locales/en_MP/en_MP.go +++ b/resources/locales/en_MP/en_MP.go @@ -7,15 +7,27 @@ import ( ) type en_MP struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_MP' locale func New() locales.Translator { return &en_MP{ - locale: "en_MP", - plurals: []locales.PluralRule{2, 6}, + locale: "en_MP", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_MS/en_MS.go b/resources/locales/en_MS/en_MS.go index 90e4f69..86edbcc 100644 --- a/resources/locales/en_MS/en_MS.go +++ b/resources/locales/en_MS/en_MS.go @@ -7,15 +7,27 @@ import ( ) type en_MS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_MS' locale func New() locales.Translator { return &en_MS{ - locale: "en_MS", - plurals: []locales.PluralRule{2, 6}, + locale: "en_MS", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_MT/en_MT.go b/resources/locales/en_MT/en_MT.go index 5db51f4..954661e 100644 --- a/resources/locales/en_MT/en_MT.go +++ b/resources/locales/en_MT/en_MT.go @@ -7,15 +7,27 @@ import ( ) type en_MT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_MT' locale func New() locales.Translator { return &en_MT{ - locale: "en_MT", - plurals: []locales.PluralRule{2, 6}, + locale: "en_MT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_MU/en_MU.go b/resources/locales/en_MU/en_MU.go index 4348fa7..be8eae1 100644 --- a/resources/locales/en_MU/en_MU.go +++ b/resources/locales/en_MU/en_MU.go @@ -7,15 +7,27 @@ import ( ) type en_MU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_MU' locale func New() locales.Translator { return &en_MU{ - locale: "en_MU", - plurals: []locales.PluralRule{2, 6}, + locale: "en_MU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_MW/en_MW.go b/resources/locales/en_MW/en_MW.go index 8c2ed5c..d65f95c 100644 --- a/resources/locales/en_MW/en_MW.go +++ b/resources/locales/en_MW/en_MW.go @@ -7,15 +7,27 @@ import ( ) type en_MW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_MW' locale func New() locales.Translator { return &en_MW{ - locale: "en_MW", - plurals: []locales.PluralRule{2, 6}, + locale: "en_MW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_MY/en_MY.go b/resources/locales/en_MY/en_MY.go index 8af1d03..6790317 100644 --- a/resources/locales/en_MY/en_MY.go +++ b/resources/locales/en_MY/en_MY.go @@ -7,15 +7,27 @@ import ( ) type en_MY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_MY' locale func New() locales.Translator { return &en_MY{ - locale: "en_MY", - plurals: []locales.PluralRule{2, 6}, + locale: "en_MY", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_NA/en_NA.go b/resources/locales/en_NA/en_NA.go index 9a9d0a3..d581548 100644 --- a/resources/locales/en_NA/en_NA.go +++ b/resources/locales/en_NA/en_NA.go @@ -7,15 +7,27 @@ import ( ) type en_NA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_NA' locale func New() locales.Translator { return &en_NA{ - locale: "en_NA", - plurals: []locales.PluralRule{2, 6}, + locale: "en_NA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_NF/en_NF.go b/resources/locales/en_NF/en_NF.go index e8de3bf..c15dd5a 100644 --- a/resources/locales/en_NF/en_NF.go +++ b/resources/locales/en_NF/en_NF.go @@ -7,15 +7,27 @@ import ( ) type en_NF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_NF' locale func New() locales.Translator { return &en_NF{ - locale: "en_NF", - plurals: []locales.PluralRule{2, 6}, + locale: "en_NF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_NG/en_NG.go b/resources/locales/en_NG/en_NG.go index 94207ba..5c24561 100644 --- a/resources/locales/en_NG/en_NG.go +++ b/resources/locales/en_NG/en_NG.go @@ -7,15 +7,27 @@ import ( ) type en_NG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_NG' locale func New() locales.Translator { return &en_NG{ - locale: "en_NG", - plurals: []locales.PluralRule{2, 6}, + locale: "en_NG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_NL/en_NL.go b/resources/locales/en_NL/en_NL.go index b020867..cead218 100644 --- a/resources/locales/en_NL/en_NL.go +++ b/resources/locales/en_NL/en_NL.go @@ -7,15 +7,27 @@ import ( ) type en_NL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_NL' locale func New() locales.Translator { return &en_NL{ - locale: "en_NL", - plurals: []locales.PluralRule{2, 6}, + locale: "en_NL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_NR/en_NR.go b/resources/locales/en_NR/en_NR.go index 3356f7d..caa5ef9 100644 --- a/resources/locales/en_NR/en_NR.go +++ b/resources/locales/en_NR/en_NR.go @@ -7,15 +7,27 @@ import ( ) type en_NR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_NR' locale func New() locales.Translator { return &en_NR{ - locale: "en_NR", - plurals: []locales.PluralRule{2, 6}, + locale: "en_NR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_NU/en_NU.go b/resources/locales/en_NU/en_NU.go index b4cad7b..6002c09 100644 --- a/resources/locales/en_NU/en_NU.go +++ b/resources/locales/en_NU/en_NU.go @@ -7,15 +7,27 @@ import ( ) type en_NU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_NU' locale func New() locales.Translator { return &en_NU{ - locale: "en_NU", - plurals: []locales.PluralRule{2, 6}, + locale: "en_NU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_NZ/en_NZ.go b/resources/locales/en_NZ/en_NZ.go index 98797e2..083ff4d 100644 --- a/resources/locales/en_NZ/en_NZ.go +++ b/resources/locales/en_NZ/en_NZ.go @@ -7,15 +7,27 @@ import ( ) type en_NZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_NZ' locale func New() locales.Translator { return &en_NZ{ - locale: "en_NZ", - plurals: []locales.PluralRule{2, 6}, + locale: "en_NZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_PG/en_PG.go b/resources/locales/en_PG/en_PG.go index 05d2641..e78a9bd 100644 --- a/resources/locales/en_PG/en_PG.go +++ b/resources/locales/en_PG/en_PG.go @@ -7,15 +7,27 @@ import ( ) type en_PG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_PG' locale func New() locales.Translator { return &en_PG{ - locale: "en_PG", - plurals: []locales.PluralRule{2, 6}, + locale: "en_PG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_PH/en_PH.go b/resources/locales/en_PH/en_PH.go index b299a27..d1d97f9 100644 --- a/resources/locales/en_PH/en_PH.go +++ b/resources/locales/en_PH/en_PH.go @@ -7,15 +7,27 @@ import ( ) type en_PH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_PH' locale func New() locales.Translator { return &en_PH{ - locale: "en_PH", - plurals: []locales.PluralRule{2, 6}, + locale: "en_PH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_PK/en_PK.go b/resources/locales/en_PK/en_PK.go index 1bb35eb..f0d360f 100644 --- a/resources/locales/en_PK/en_PK.go +++ b/resources/locales/en_PK/en_PK.go @@ -7,15 +7,27 @@ import ( ) type en_PK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_PK' locale func New() locales.Translator { return &en_PK{ - locale: "en_PK", - plurals: []locales.PluralRule{2, 6}, + locale: "en_PK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_PN/en_PN.go b/resources/locales/en_PN/en_PN.go index 4297405..8d906ad 100644 --- a/resources/locales/en_PN/en_PN.go +++ b/resources/locales/en_PN/en_PN.go @@ -7,15 +7,27 @@ import ( ) type en_PN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_PN' locale func New() locales.Translator { return &en_PN{ - locale: "en_PN", - plurals: []locales.PluralRule{2, 6}, + locale: "en_PN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_PR/en_PR.go b/resources/locales/en_PR/en_PR.go index 0be0269..dc8861f 100644 --- a/resources/locales/en_PR/en_PR.go +++ b/resources/locales/en_PR/en_PR.go @@ -7,15 +7,27 @@ import ( ) type en_PR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_PR' locale func New() locales.Translator { return &en_PR{ - locale: "en_PR", - plurals: []locales.PluralRule{2, 6}, + locale: "en_PR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_PW/en_PW.go b/resources/locales/en_PW/en_PW.go index aadb888..ce53889 100644 --- a/resources/locales/en_PW/en_PW.go +++ b/resources/locales/en_PW/en_PW.go @@ -7,15 +7,27 @@ import ( ) type en_PW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_PW' locale func New() locales.Translator { return &en_PW{ - locale: "en_PW", - plurals: []locales.PluralRule{2, 6}, + locale: "en_PW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_RW/en_RW.go b/resources/locales/en_RW/en_RW.go index 0fbf956..6285180 100644 --- a/resources/locales/en_RW/en_RW.go +++ b/resources/locales/en_RW/en_RW.go @@ -7,15 +7,27 @@ import ( ) type en_RW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_RW' locale func New() locales.Translator { return &en_RW{ - locale: "en_RW", - plurals: []locales.PluralRule{2, 6}, + locale: "en_RW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SB/en_SB.go b/resources/locales/en_SB/en_SB.go index 73306f9..5357dce 100644 --- a/resources/locales/en_SB/en_SB.go +++ b/resources/locales/en_SB/en_SB.go @@ -7,15 +7,27 @@ import ( ) type en_SB struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SB' locale func New() locales.Translator { return &en_SB{ - locale: "en_SB", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SB", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SC/en_SC.go b/resources/locales/en_SC/en_SC.go index ac19c06..49a0108 100644 --- a/resources/locales/en_SC/en_SC.go +++ b/resources/locales/en_SC/en_SC.go @@ -7,15 +7,27 @@ import ( ) type en_SC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SC' locale func New() locales.Translator { return &en_SC{ - locale: "en_SC", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SC", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SD/en_SD.go b/resources/locales/en_SD/en_SD.go index 21f5862..20cbc43 100644 --- a/resources/locales/en_SD/en_SD.go +++ b/resources/locales/en_SD/en_SD.go @@ -7,15 +7,27 @@ import ( ) type en_SD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SD' locale func New() locales.Translator { return &en_SD{ - locale: "en_SD", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SD", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SE/en_SE.go b/resources/locales/en_SE/en_SE.go index ce2c2d8..45b3223 100644 --- a/resources/locales/en_SE/en_SE.go +++ b/resources/locales/en_SE/en_SE.go @@ -7,15 +7,27 @@ import ( ) type en_SE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SE' locale func New() locales.Translator { return &en_SE{ - locale: "en_SE", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SG/en_SG.go b/resources/locales/en_SG/en_SG.go index 7e17cdf..a0357eb 100644 --- a/resources/locales/en_SG/en_SG.go +++ b/resources/locales/en_SG/en_SG.go @@ -7,15 +7,27 @@ import ( ) type en_SG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SG' locale func New() locales.Translator { return &en_SG{ - locale: "en_SG", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SH/en_SH.go b/resources/locales/en_SH/en_SH.go index be33b12..45ad4dc 100644 --- a/resources/locales/en_SH/en_SH.go +++ b/resources/locales/en_SH/en_SH.go @@ -7,15 +7,27 @@ import ( ) type en_SH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SH' locale func New() locales.Translator { return &en_SH{ - locale: "en_SH", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SI/en_SI.go b/resources/locales/en_SI/en_SI.go index 9f6efa0..7ae50d0 100644 --- a/resources/locales/en_SI/en_SI.go +++ b/resources/locales/en_SI/en_SI.go @@ -7,15 +7,27 @@ import ( ) type en_SI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SI' locale func New() locales.Translator { return &en_SI{ - locale: "en_SI", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SL/en_SL.go b/resources/locales/en_SL/en_SL.go index 3f8f9a5..cf6dc82 100644 --- a/resources/locales/en_SL/en_SL.go +++ b/resources/locales/en_SL/en_SL.go @@ -7,15 +7,27 @@ import ( ) type en_SL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SL' locale func New() locales.Translator { return &en_SL{ - locale: "en_SL", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SS/en_SS.go b/resources/locales/en_SS/en_SS.go index 9a7eae1..4b0c1c5 100644 --- a/resources/locales/en_SS/en_SS.go +++ b/resources/locales/en_SS/en_SS.go @@ -7,15 +7,27 @@ import ( ) type en_SS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SS' locale func New() locales.Translator { return &en_SS{ - locale: "en_SS", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SS", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SX/en_SX.go b/resources/locales/en_SX/en_SX.go index 7b891e8..7d0f45c 100644 --- a/resources/locales/en_SX/en_SX.go +++ b/resources/locales/en_SX/en_SX.go @@ -7,15 +7,27 @@ import ( ) type en_SX struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SX' locale func New() locales.Translator { return &en_SX{ - locale: "en_SX", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SX", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_SZ/en_SZ.go b/resources/locales/en_SZ/en_SZ.go index 250c115..ab00dea 100644 --- a/resources/locales/en_SZ/en_SZ.go +++ b/resources/locales/en_SZ/en_SZ.go @@ -7,15 +7,27 @@ import ( ) type en_SZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_SZ' locale func New() locales.Translator { return &en_SZ{ - locale: "en_SZ", - plurals: []locales.PluralRule{2, 6}, + locale: "en_SZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_TC/en_TC.go b/resources/locales/en_TC/en_TC.go index b52ec8b..3ce9504 100644 --- a/resources/locales/en_TC/en_TC.go +++ b/resources/locales/en_TC/en_TC.go @@ -7,15 +7,27 @@ import ( ) type en_TC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_TC' locale func New() locales.Translator { return &en_TC{ - locale: "en_TC", - plurals: []locales.PluralRule{2, 6}, + locale: "en_TC", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_TK/en_TK.go b/resources/locales/en_TK/en_TK.go index 63def71..3641713 100644 --- a/resources/locales/en_TK/en_TK.go +++ b/resources/locales/en_TK/en_TK.go @@ -7,15 +7,27 @@ import ( ) type en_TK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_TK' locale func New() locales.Translator { return &en_TK{ - locale: "en_TK", - plurals: []locales.PluralRule{2, 6}, + locale: "en_TK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_TO/en_TO.go b/resources/locales/en_TO/en_TO.go index b9a1dec..9cc14ac 100644 --- a/resources/locales/en_TO/en_TO.go +++ b/resources/locales/en_TO/en_TO.go @@ -7,15 +7,27 @@ import ( ) type en_TO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_TO' locale func New() locales.Translator { return &en_TO{ - locale: "en_TO", - plurals: []locales.PluralRule{2, 6}, + locale: "en_TO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_TT/en_TT.go b/resources/locales/en_TT/en_TT.go index 9741b19..7f2f8c0 100644 --- a/resources/locales/en_TT/en_TT.go +++ b/resources/locales/en_TT/en_TT.go @@ -7,15 +7,27 @@ import ( ) type en_TT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_TT' locale func New() locales.Translator { return &en_TT{ - locale: "en_TT", - plurals: []locales.PluralRule{2, 6}, + locale: "en_TT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_TV/en_TV.go b/resources/locales/en_TV/en_TV.go index 7bbfa35..9d41c2d 100644 --- a/resources/locales/en_TV/en_TV.go +++ b/resources/locales/en_TV/en_TV.go @@ -7,15 +7,27 @@ import ( ) type en_TV struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_TV' locale func New() locales.Translator { return &en_TV{ - locale: "en_TV", - plurals: []locales.PluralRule{2, 6}, + locale: "en_TV", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_TZ/en_TZ.go b/resources/locales/en_TZ/en_TZ.go index 1132a00..1dcd070 100644 --- a/resources/locales/en_TZ/en_TZ.go +++ b/resources/locales/en_TZ/en_TZ.go @@ -7,15 +7,27 @@ import ( ) type en_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_TZ' locale func New() locales.Translator { return &en_TZ{ - locale: "en_TZ", - plurals: []locales.PluralRule{2, 6}, + locale: "en_TZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_UG/en_UG.go b/resources/locales/en_UG/en_UG.go index f8ceffe..1ed8653 100644 --- a/resources/locales/en_UG/en_UG.go +++ b/resources/locales/en_UG/en_UG.go @@ -7,15 +7,27 @@ import ( ) type en_UG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_UG' locale func New() locales.Translator { return &en_UG{ - locale: "en_UG", - plurals: []locales.PluralRule{2, 6}, + locale: "en_UG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_UM/en_UM.go b/resources/locales/en_UM/en_UM.go index b19d03b..b4ffe73 100644 --- a/resources/locales/en_UM/en_UM.go +++ b/resources/locales/en_UM/en_UM.go @@ -7,15 +7,27 @@ import ( ) type en_UM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_UM' locale func New() locales.Translator { return &en_UM{ - locale: "en_UM", - plurals: []locales.PluralRule{2, 6}, + locale: "en_UM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_US/en_US.go b/resources/locales/en_US/en_US.go index 96d4f3b..5848258 100644 --- a/resources/locales/en_US/en_US.go +++ b/resources/locales/en_US/en_US.go @@ -7,15 +7,27 @@ import ( ) type en_US struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_US' locale func New() locales.Translator { return &en_US{ - locale: "en_US", - plurals: []locales.PluralRule{2, 6}, + locale: "en_US", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/en_US_POSIX/en_US_POSIX.go b/resources/locales/en_US_POSIX/en_US_POSIX.go index e26625d..0aeab0b 100644 --- a/resources/locales/en_US_POSIX/en_US_POSIX.go +++ b/resources/locales/en_US_POSIX/en_US_POSIX.go @@ -7,15 +7,27 @@ import ( ) type en_US_POSIX struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_US_POSIX' locale func New() locales.Translator { return &en_US_POSIX{ - locale: "en_US_POSIX", - plurals: []locales.PluralRule{2, 6}, + locale: "en_US_POSIX", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x30, 0x2f, 0x30, 0x30}, + symbol: []byte{}, } } diff --git a/resources/locales/en_VC/en_VC.go b/resources/locales/en_VC/en_VC.go index 3ac8d93..eff67e9 100644 --- a/resources/locales/en_VC/en_VC.go +++ b/resources/locales/en_VC/en_VC.go @@ -7,15 +7,27 @@ import ( ) type en_VC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_VC' locale func New() locales.Translator { return &en_VC{ - locale: "en_VC", - plurals: []locales.PluralRule{2, 6}, + locale: "en_VC", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_VG/en_VG.go b/resources/locales/en_VG/en_VG.go index 6293cee..f812c16 100644 --- a/resources/locales/en_VG/en_VG.go +++ b/resources/locales/en_VG/en_VG.go @@ -7,15 +7,27 @@ import ( ) type en_VG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_VG' locale func New() locales.Translator { return &en_VG{ - locale: "en_VG", - plurals: []locales.PluralRule{2, 6}, + locale: "en_VG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_VI/en_VI.go b/resources/locales/en_VI/en_VI.go index fb0cc7f..121c237 100644 --- a/resources/locales/en_VI/en_VI.go +++ b/resources/locales/en_VI/en_VI.go @@ -7,15 +7,27 @@ import ( ) type en_VI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_VI' locale func New() locales.Translator { return &en_VI{ - locale: "en_VI", - plurals: []locales.PluralRule{2, 6}, + locale: "en_VI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_VU/en_VU.go b/resources/locales/en_VU/en_VU.go index 7d768a4..689951d 100644 --- a/resources/locales/en_VU/en_VU.go +++ b/resources/locales/en_VU/en_VU.go @@ -7,15 +7,27 @@ import ( ) type en_VU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_VU' locale func New() locales.Translator { return &en_VU{ - locale: "en_VU", - plurals: []locales.PluralRule{2, 6}, + locale: "en_VU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_WS/en_WS.go b/resources/locales/en_WS/en_WS.go index 70771af..3cf4ff5 100644 --- a/resources/locales/en_WS/en_WS.go +++ b/resources/locales/en_WS/en_WS.go @@ -7,15 +7,27 @@ import ( ) type en_WS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_WS' locale func New() locales.Translator { return &en_WS{ - locale: "en_WS", - plurals: []locales.PluralRule{2, 6}, + locale: "en_WS", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_ZA/en_ZA.go b/resources/locales/en_ZA/en_ZA.go index 3555e05..eac64c5 100644 --- a/resources/locales/en_ZA/en_ZA.go +++ b/resources/locales/en_ZA/en_ZA.go @@ -7,15 +7,27 @@ import ( ) type en_ZA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_ZA' locale func New() locales.Translator { return &en_ZA{ - locale: "en_ZA", - plurals: []locales.PluralRule{2, 6}, + locale: "en_ZA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_ZM/en_ZM.go b/resources/locales/en_ZM/en_ZM.go index 4fd8a29..48bd251 100644 --- a/resources/locales/en_ZM/en_ZM.go +++ b/resources/locales/en_ZM/en_ZM.go @@ -7,15 +7,27 @@ import ( ) type en_ZM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_ZM' locale func New() locales.Translator { return &en_ZM{ - locale: "en_ZM", - plurals: []locales.PluralRule{2, 6}, + locale: "en_ZM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/en_ZW/en_ZW.go b/resources/locales/en_ZW/en_ZW.go index 0020339..ae45174 100644 --- a/resources/locales/en_ZW/en_ZW.go +++ b/resources/locales/en_ZW/en_ZW.go @@ -7,15 +7,27 @@ import ( ) type en_ZW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'en_ZW' locale func New() locales.Translator { return &en_ZW{ - locale: "en_ZW", - plurals: []locales.PluralRule{2, 6}, + locale: "en_ZW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/eo/eo.go b/resources/locales/eo/eo.go index 068f13a..c44b7b4 100644 --- a/resources/locales/eo/eo.go +++ b/resources/locales/eo/eo.go @@ -7,15 +7,27 @@ import ( ) type eo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'eo' locale func New() locales.Translator { return &eo{ - locale: "eo", - plurals: []locales.PluralRule{2, 6}, + locale: "eo", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/eo_001/eo_001.go b/resources/locales/eo_001/eo_001.go index 10ac892..e4123f5 100644 --- a/resources/locales/eo_001/eo_001.go +++ b/resources/locales/eo_001/eo_001.go @@ -7,15 +7,27 @@ import ( ) type eo_001 struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'eo_001' locale func New() locales.Translator { return &eo_001{ - locale: "eo_001", - plurals: []locales.PluralRule{2, 6}, + locale: "eo_001", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es/es.go b/resources/locales/es/es.go index 661ac85..25abe1d 100644 --- a/resources/locales/es/es.go +++ b/resources/locales/es/es.go @@ -7,15 +7,27 @@ import ( ) type es struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es' locale func New() locales.Translator { return &es{ - locale: "es", - plurals: []locales.PluralRule{2, 6}, + locale: "es", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/es_419/es_419.go b/resources/locales/es_419/es_419.go index 725ecb0..e099f7d 100644 --- a/resources/locales/es_419/es_419.go +++ b/resources/locales/es_419/es_419.go @@ -7,15 +7,27 @@ import ( ) type es_419 struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_419' locale func New() locales.Translator { return &es_419{ - locale: "es_419", - plurals: []locales.PluralRule{2, 6}, + locale: "es_419", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_AR/es_AR.go b/resources/locales/es_AR/es_AR.go index d04a733..c4a9be5 100644 --- a/resources/locales/es_AR/es_AR.go +++ b/resources/locales/es_AR/es_AR.go @@ -7,15 +7,27 @@ import ( ) type es_AR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_AR' locale func New() locales.Translator { return &es_AR{ - locale: "es_AR", - plurals: []locales.PluralRule{2, 6}, + locale: "es_AR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_BO/es_BO.go b/resources/locales/es_BO/es_BO.go index ac1545b..933e456 100644 --- a/resources/locales/es_BO/es_BO.go +++ b/resources/locales/es_BO/es_BO.go @@ -7,15 +7,27 @@ import ( ) type es_BO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_BO' locale func New() locales.Translator { return &es_BO{ - locale: "es_BO", - plurals: []locales.PluralRule{2, 6}, + locale: "es_BO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_BR/es_BR.go b/resources/locales/es_BR/es_BR.go index 129153d..b04acca 100644 --- a/resources/locales/es_BR/es_BR.go +++ b/resources/locales/es_BR/es_BR.go @@ -7,15 +7,27 @@ import ( ) type es_BR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_BR' locale func New() locales.Translator { return &es_BR{ - locale: "es_BR", - plurals: []locales.PluralRule{2, 6}, + locale: "es_BR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_CL/es_CL.go b/resources/locales/es_CL/es_CL.go index 428779e..36a2696 100644 --- a/resources/locales/es_CL/es_CL.go +++ b/resources/locales/es_CL/es_CL.go @@ -7,15 +7,27 @@ import ( ) type es_CL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_CL' locale func New() locales.Translator { return &es_CL{ - locale: "es_CL", - plurals: []locales.PluralRule{2, 6}, + locale: "es_CL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_CO/es_CO.go b/resources/locales/es_CO/es_CO.go index 39da299..8b809b9 100644 --- a/resources/locales/es_CO/es_CO.go +++ b/resources/locales/es_CO/es_CO.go @@ -7,15 +7,27 @@ import ( ) type es_CO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_CO' locale func New() locales.Translator { return &es_CO{ - locale: "es_CO", - plurals: []locales.PluralRule{2, 6}, + locale: "es_CO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_CR/es_CR.go b/resources/locales/es_CR/es_CR.go index 5daa481..e932e60 100644 --- a/resources/locales/es_CR/es_CR.go +++ b/resources/locales/es_CR/es_CR.go @@ -7,15 +7,27 @@ import ( ) type es_CR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_CR' locale func New() locales.Translator { return &es_CR{ - locale: "es_CR", - plurals: []locales.PluralRule{2, 6}, + locale: "es_CR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_CU/es_CU.go b/resources/locales/es_CU/es_CU.go index d17a7bb..93ac6ff 100644 --- a/resources/locales/es_CU/es_CU.go +++ b/resources/locales/es_CU/es_CU.go @@ -7,15 +7,27 @@ import ( ) type es_CU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_CU' locale func New() locales.Translator { return &es_CU{ - locale: "es_CU", - plurals: []locales.PluralRule{2, 6}, + locale: "es_CU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_DO/es_DO.go b/resources/locales/es_DO/es_DO.go index ebafeca..7c60bea 100644 --- a/resources/locales/es_DO/es_DO.go +++ b/resources/locales/es_DO/es_DO.go @@ -7,15 +7,27 @@ import ( ) type es_DO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_DO' locale func New() locales.Translator { return &es_DO{ - locale: "es_DO", - plurals: []locales.PluralRule{2, 6}, + locale: "es_DO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_EA/es_EA.go b/resources/locales/es_EA/es_EA.go index 69649b3..e650e1b 100644 --- a/resources/locales/es_EA/es_EA.go +++ b/resources/locales/es_EA/es_EA.go @@ -7,15 +7,27 @@ import ( ) type es_EA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_EA' locale func New() locales.Translator { return &es_EA{ - locale: "es_EA", - plurals: []locales.PluralRule{2, 6}, + locale: "es_EA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_EC/es_EC.go b/resources/locales/es_EC/es_EC.go index 3013024..de1a373 100644 --- a/resources/locales/es_EC/es_EC.go +++ b/resources/locales/es_EC/es_EC.go @@ -7,15 +7,27 @@ import ( ) type es_EC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_EC' locale func New() locales.Translator { return &es_EC{ - locale: "es_EC", - plurals: []locales.PluralRule{2, 6}, + locale: "es_EC", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_ES/es_ES.go b/resources/locales/es_ES/es_ES.go index c245054..620e75f 100644 --- a/resources/locales/es_ES/es_ES.go +++ b/resources/locales/es_ES/es_ES.go @@ -7,15 +7,27 @@ import ( ) type es_ES struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_ES' locale func New() locales.Translator { return &es_ES{ - locale: "es_ES", - plurals: []locales.PluralRule{2, 6}, + locale: "es_ES", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_GQ/es_GQ.go b/resources/locales/es_GQ/es_GQ.go index 4830743..3538f7b 100644 --- a/resources/locales/es_GQ/es_GQ.go +++ b/resources/locales/es_GQ/es_GQ.go @@ -7,15 +7,27 @@ import ( ) type es_GQ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_GQ' locale func New() locales.Translator { return &es_GQ{ - locale: "es_GQ", - plurals: []locales.PluralRule{2, 6}, + locale: "es_GQ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_GT/es_GT.go b/resources/locales/es_GT/es_GT.go index 39bdd7c..a704edf 100644 --- a/resources/locales/es_GT/es_GT.go +++ b/resources/locales/es_GT/es_GT.go @@ -7,15 +7,27 @@ import ( ) type es_GT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_GT' locale func New() locales.Translator { return &es_GT{ - locale: "es_GT", - plurals: []locales.PluralRule{2, 6}, + locale: "es_GT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_HN/es_HN.go b/resources/locales/es_HN/es_HN.go index 81cd474..da85e7c 100644 --- a/resources/locales/es_HN/es_HN.go +++ b/resources/locales/es_HN/es_HN.go @@ -7,15 +7,27 @@ import ( ) type es_HN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_HN' locale func New() locales.Translator { return &es_HN{ - locale: "es_HN", - plurals: []locales.PluralRule{2, 6}, + locale: "es_HN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_IC/es_IC.go b/resources/locales/es_IC/es_IC.go index f79a0d1..24f5a32 100644 --- a/resources/locales/es_IC/es_IC.go +++ b/resources/locales/es_IC/es_IC.go @@ -7,15 +7,27 @@ import ( ) type es_IC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_IC' locale func New() locales.Translator { return &es_IC{ - locale: "es_IC", - plurals: []locales.PluralRule{2, 6}, + locale: "es_IC", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_MX/es_MX.go b/resources/locales/es_MX/es_MX.go index e07b450..cdb2fd6 100644 --- a/resources/locales/es_MX/es_MX.go +++ b/resources/locales/es_MX/es_MX.go @@ -7,15 +7,27 @@ import ( ) type es_MX struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_MX' locale func New() locales.Translator { return &es_MX{ - locale: "es_MX", - plurals: []locales.PluralRule{2, 6}, + locale: "es_MX", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_NI/es_NI.go b/resources/locales/es_NI/es_NI.go index aa53e46..b9d9814 100644 --- a/resources/locales/es_NI/es_NI.go +++ b/resources/locales/es_NI/es_NI.go @@ -7,15 +7,27 @@ import ( ) type es_NI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_NI' locale func New() locales.Translator { return &es_NI{ - locale: "es_NI", - plurals: []locales.PluralRule{2, 6}, + locale: "es_NI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_PA/es_PA.go b/resources/locales/es_PA/es_PA.go index 276181f..414ac2c 100644 --- a/resources/locales/es_PA/es_PA.go +++ b/resources/locales/es_PA/es_PA.go @@ -7,15 +7,27 @@ import ( ) type es_PA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_PA' locale func New() locales.Translator { return &es_PA{ - locale: "es_PA", - plurals: []locales.PluralRule{2, 6}, + locale: "es_PA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_PE/es_PE.go b/resources/locales/es_PE/es_PE.go index 0ac4d5e..909ea53 100644 --- a/resources/locales/es_PE/es_PE.go +++ b/resources/locales/es_PE/es_PE.go @@ -7,15 +7,27 @@ import ( ) type es_PE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_PE' locale func New() locales.Translator { return &es_PE{ - locale: "es_PE", - plurals: []locales.PluralRule{2, 6}, + locale: "es_PE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_PH/es_PH.go b/resources/locales/es_PH/es_PH.go index 42137cd..69113e1 100644 --- a/resources/locales/es_PH/es_PH.go +++ b/resources/locales/es_PH/es_PH.go @@ -7,15 +7,27 @@ import ( ) type es_PH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_PH' locale func New() locales.Translator { return &es_PH{ - locale: "es_PH", - plurals: []locales.PluralRule{2, 6}, + locale: "es_PH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_PR/es_PR.go b/resources/locales/es_PR/es_PR.go index 090c7bd..278d546 100644 --- a/resources/locales/es_PR/es_PR.go +++ b/resources/locales/es_PR/es_PR.go @@ -7,15 +7,27 @@ import ( ) type es_PR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_PR' locale func New() locales.Translator { return &es_PR{ - locale: "es_PR", - plurals: []locales.PluralRule{2, 6}, + locale: "es_PR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/es_PY/es_PY.go b/resources/locales/es_PY/es_PY.go index 92d28a8..10a4c0e 100644 --- a/resources/locales/es_PY/es_PY.go +++ b/resources/locales/es_PY/es_PY.go @@ -7,15 +7,27 @@ import ( ) type es_PY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_PY' locale func New() locales.Translator { return &es_PY{ - locale: "es_PY", - plurals: []locales.PluralRule{2, 6}, + locale: "es_PY", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_SV/es_SV.go b/resources/locales/es_SV/es_SV.go index 31e4663..1c08ddb 100644 --- a/resources/locales/es_SV/es_SV.go +++ b/resources/locales/es_SV/es_SV.go @@ -7,15 +7,27 @@ import ( ) type es_SV struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_SV' locale func New() locales.Translator { return &es_SV{ - locale: "es_SV", - plurals: []locales.PluralRule{2, 6}, + locale: "es_SV", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_US/es_US.go b/resources/locales/es_US/es_US.go index b933870..6d93641 100644 --- a/resources/locales/es_US/es_US.go +++ b/resources/locales/es_US/es_US.go @@ -7,15 +7,27 @@ import ( ) type es_US struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_US' locale func New() locales.Translator { return &es_US{ - locale: "es_US", - plurals: []locales.PluralRule{2, 6}, + locale: "es_US", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_UY/es_UY.go b/resources/locales/es_UY/es_UY.go index 8c8cb28..7046f90 100644 --- a/resources/locales/es_UY/es_UY.go +++ b/resources/locales/es_UY/es_UY.go @@ -7,15 +7,27 @@ import ( ) type es_UY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_UY' locale func New() locales.Translator { return &es_UY{ - locale: "es_UY", - plurals: []locales.PluralRule{2, 6}, + locale: "es_UY", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/es_VE/es_VE.go b/resources/locales/es_VE/es_VE.go index c5739ac..db43875 100644 --- a/resources/locales/es_VE/es_VE.go +++ b/resources/locales/es_VE/es_VE.go @@ -7,15 +7,27 @@ import ( ) type es_VE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'es_VE' locale func New() locales.Translator { return &es_VE{ - locale: "es_VE", - plurals: []locales.PluralRule{2, 6}, + locale: "es_VE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/et/et.go b/resources/locales/et/et.go index 468facf..e11aff0 100644 --- a/resources/locales/et/et.go +++ b/resources/locales/et/et.go @@ -7,15 +7,27 @@ import ( ) type et struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'et' locale func New() locales.Translator { return &et{ - locale: "et", - plurals: []locales.PluralRule{2, 6}, + locale: "et", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/et_EE/et_EE.go b/resources/locales/et_EE/et_EE.go index fc8dd39..3eaa8e6 100644 --- a/resources/locales/et_EE/et_EE.go +++ b/resources/locales/et_EE/et_EE.go @@ -7,15 +7,27 @@ import ( ) type et_EE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'et_EE' locale func New() locales.Translator { return &et_EE{ - locale: "et_EE", - plurals: []locales.PluralRule{2, 6}, + locale: "et_EE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/eu/eu.go b/resources/locales/eu/eu.go index 5c7ab38..ce4ebec 100644 --- a/resources/locales/eu/eu.go +++ b/resources/locales/eu/eu.go @@ -7,15 +7,27 @@ import ( ) type eu struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'eu' locale func New() locales.Translator { return &eu{ - locale: "eu", - plurals: []locales.PluralRule{2, 6}, + locale: "eu", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/eu_ES/eu_ES.go b/resources/locales/eu_ES/eu_ES.go index c232506..7ba5fd3 100644 --- a/resources/locales/eu_ES/eu_ES.go +++ b/resources/locales/eu_ES/eu_ES.go @@ -7,15 +7,27 @@ import ( ) type eu_ES struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'eu_ES' locale func New() locales.Translator { return &eu_ES{ - locale: "eu_ES", - plurals: []locales.PluralRule{2, 6}, + locale: "eu_ES", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ewo/ewo.go b/resources/locales/ewo/ewo.go index 69d6e87..76c360d 100644 --- a/resources/locales/ewo/ewo.go +++ b/resources/locales/ewo/ewo.go @@ -1,21 +1,29 @@ package ewo -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ewo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ewo' locale func New() locales.Translator { return &ewo{ - locale: "ewo", - plurals: nil, + locale: "ewo", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *ewo) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ewo' func (t *ewo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/ewo_CM/ewo_CM.go b/resources/locales/ewo_CM/ewo_CM.go index b608b8a..f3a2fc6 100644 --- a/resources/locales/ewo_CM/ewo_CM.go +++ b/resources/locales/ewo_CM/ewo_CM.go @@ -1,21 +1,29 @@ package ewo_CM -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ewo_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ewo_CM' locale func New() locales.Translator { return &ewo_CM{ - locale: "ewo_CM", - plurals: nil, + locale: "ewo_CM", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *ewo_CM) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ewo_CM' func (t *ewo_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/fa/fa.go b/resources/locales/fa/fa.go index 6fdbd59..92ab6c1 100644 --- a/resources/locales/fa/fa.go +++ b/resources/locales/fa/fa.go @@ -7,15 +7,27 @@ import ( ) type fa struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fa' locale func New() locales.Translator { return &fa{ - locale: "fa", - plurals: []locales.PluralRule{2, 6}, + locale: "fa", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0xd9, 0xac}, + minus: []byte{}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{0xd8, 0x89}, + symbol: []byte{}, } } diff --git a/resources/locales/fa_AF/fa_AF.go b/resources/locales/fa_AF/fa_AF.go index ace06b4..4a58629 100644 --- a/resources/locales/fa_AF/fa_AF.go +++ b/resources/locales/fa_AF/fa_AF.go @@ -7,15 +7,27 @@ import ( ) type fa_AF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fa_AF' locale func New() locales.Translator { return &fa_AF{ - locale: "fa_AF", - plurals: []locales.PluralRule{2, 6}, + locale: "fa_AF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fa_IR/fa_IR.go b/resources/locales/fa_IR/fa_IR.go index c929004..aa6057c 100644 --- a/resources/locales/fa_IR/fa_IR.go +++ b/resources/locales/fa_IR/fa_IR.go @@ -7,15 +7,27 @@ import ( ) type fa_IR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fa_IR' locale func New() locales.Translator { return &fa_IR{ - locale: "fa_IR", - plurals: []locales.PluralRule{2, 6}, + locale: "fa_IR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ff/ff.go b/resources/locales/ff/ff.go index 4a3899a..0c201ce 100644 --- a/resources/locales/ff/ff.go +++ b/resources/locales/ff/ff.go @@ -7,15 +7,27 @@ import ( ) type ff struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ff' locale func New() locales.Translator { return &ff{ - locale: "ff", - plurals: []locales.PluralRule{2, 6}, + locale: "ff", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ff_CM/ff_CM.go b/resources/locales/ff_CM/ff_CM.go index d918280..efc82f9 100644 --- a/resources/locales/ff_CM/ff_CM.go +++ b/resources/locales/ff_CM/ff_CM.go @@ -7,15 +7,27 @@ import ( ) type ff_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ff_CM' locale func New() locales.Translator { return &ff_CM{ - locale: "ff_CM", - plurals: []locales.PluralRule{2, 6}, + locale: "ff_CM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ff_GN/ff_GN.go b/resources/locales/ff_GN/ff_GN.go index d4727c1..8179741 100644 --- a/resources/locales/ff_GN/ff_GN.go +++ b/resources/locales/ff_GN/ff_GN.go @@ -7,15 +7,27 @@ import ( ) type ff_GN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ff_GN' locale func New() locales.Translator { return &ff_GN{ - locale: "ff_GN", - plurals: []locales.PluralRule{2, 6}, + locale: "ff_GN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ff_MR/ff_MR.go b/resources/locales/ff_MR/ff_MR.go index 422d407..a58af90 100644 --- a/resources/locales/ff_MR/ff_MR.go +++ b/resources/locales/ff_MR/ff_MR.go @@ -7,15 +7,27 @@ import ( ) type ff_MR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ff_MR' locale func New() locales.Translator { return &ff_MR{ - locale: "ff_MR", - plurals: []locales.PluralRule{2, 6}, + locale: "ff_MR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ff_SN/ff_SN.go b/resources/locales/ff_SN/ff_SN.go index 1d69860..816f1c4 100644 --- a/resources/locales/ff_SN/ff_SN.go +++ b/resources/locales/ff_SN/ff_SN.go @@ -7,15 +7,27 @@ import ( ) type ff_SN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ff_SN' locale func New() locales.Translator { return &ff_SN{ - locale: "ff_SN", - plurals: []locales.PluralRule{2, 6}, + locale: "ff_SN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fi/fi.go b/resources/locales/fi/fi.go index 70dac6c..aeb8395 100644 --- a/resources/locales/fi/fi.go +++ b/resources/locales/fi/fi.go @@ -7,15 +7,27 @@ import ( ) type fi struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fi' locale func New() locales.Translator { return &fi{ - locale: "fi", - plurals: []locales.PluralRule{2, 6}, + locale: "fi", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/fi_FI/fi_FI.go b/resources/locales/fi_FI/fi_FI.go index ada6069..835645c 100644 --- a/resources/locales/fi_FI/fi_FI.go +++ b/resources/locales/fi_FI/fi_FI.go @@ -7,15 +7,27 @@ import ( ) type fi_FI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fi_FI' locale func New() locales.Translator { return &fi_FI{ - locale: "fi_FI", - plurals: []locales.PluralRule{2, 6}, + locale: "fi_FI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/fil/fil.go b/resources/locales/fil/fil.go index 1db5bd6..003de05 100644 --- a/resources/locales/fil/fil.go +++ b/resources/locales/fil/fil.go @@ -7,15 +7,27 @@ import ( ) type fil struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fil' locale func New() locales.Translator { return &fil{ - locale: "fil", - plurals: []locales.PluralRule{2, 6}, + locale: "fil", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/fil_PH/fil_PH.go b/resources/locales/fil_PH/fil_PH.go index 6cab000..6df8c7d 100644 --- a/resources/locales/fil_PH/fil_PH.go +++ b/resources/locales/fil_PH/fil_PH.go @@ -7,15 +7,27 @@ import ( ) type fil_PH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fil_PH' locale func New() locales.Translator { return &fil_PH{ - locale: "fil_PH", - plurals: []locales.PluralRule{2, 6}, + locale: "fil_PH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/fo/fo.go b/resources/locales/fo/fo.go index 867c63e..4a9e4eb 100644 --- a/resources/locales/fo/fo.go +++ b/resources/locales/fo/fo.go @@ -7,15 +7,27 @@ import ( ) type fo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fo' locale func New() locales.Translator { return &fo{ - locale: "fo", - plurals: []locales.PluralRule{2, 6}, + locale: "fo", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/fo_DK/fo_DK.go b/resources/locales/fo_DK/fo_DK.go index 74af2e4..745cb65 100644 --- a/resources/locales/fo_DK/fo_DK.go +++ b/resources/locales/fo_DK/fo_DK.go @@ -7,15 +7,27 @@ import ( ) type fo_DK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fo_DK' locale func New() locales.Translator { return &fo_DK{ - locale: "fo_DK", - plurals: []locales.PluralRule{2, 6}, + locale: "fo_DK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/fo_FO/fo_FO.go b/resources/locales/fo_FO/fo_FO.go index 290c216..83b6939 100644 --- a/resources/locales/fo_FO/fo_FO.go +++ b/resources/locales/fo_FO/fo_FO.go @@ -7,15 +7,27 @@ import ( ) type fo_FO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fo_FO' locale func New() locales.Translator { return &fo_FO{ - locale: "fo_FO", - plurals: []locales.PluralRule{2, 6}, + locale: "fo_FO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/fr/fr.go b/resources/locales/fr/fr.go index 1e624e9..4dd3d0b 100644 --- a/resources/locales/fr/fr.go +++ b/resources/locales/fr/fr.go @@ -7,15 +7,27 @@ import ( ) type fr struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr' locale func New() locales.Translator { return &fr{ - locale: "fr", - plurals: []locales.PluralRule{2, 6}, + locale: "fr", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0xd9, 0xac}, + minus: []byte{0xe2, 0x80, 0x8f, 0xe2, 0x88, 0x92}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{0xd8, 0x89}, + symbol: []byte{}, } } diff --git a/resources/locales/fr_BE/fr_BE.go b/resources/locales/fr_BE/fr_BE.go index 64b5ccc..8314449 100644 --- a/resources/locales/fr_BE/fr_BE.go +++ b/resources/locales/fr_BE/fr_BE.go @@ -7,15 +7,27 @@ import ( ) type fr_BE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_BE' locale func New() locales.Translator { return &fr_BE{ - locale: "fr_BE", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_BE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_BF/fr_BF.go b/resources/locales/fr_BF/fr_BF.go index bc0f244..ed77bef 100644 --- a/resources/locales/fr_BF/fr_BF.go +++ b/resources/locales/fr_BF/fr_BF.go @@ -7,15 +7,27 @@ import ( ) type fr_BF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_BF' locale func New() locales.Translator { return &fr_BF{ - locale: "fr_BF", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_BF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_BI/fr_BI.go b/resources/locales/fr_BI/fr_BI.go index d7e6bba..2eea025 100644 --- a/resources/locales/fr_BI/fr_BI.go +++ b/resources/locales/fr_BI/fr_BI.go @@ -7,15 +7,27 @@ import ( ) type fr_BI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_BI' locale func New() locales.Translator { return &fr_BI{ - locale: "fr_BI", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_BI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_BJ/fr_BJ.go b/resources/locales/fr_BJ/fr_BJ.go index dd55776..a303170 100644 --- a/resources/locales/fr_BJ/fr_BJ.go +++ b/resources/locales/fr_BJ/fr_BJ.go @@ -7,15 +7,27 @@ import ( ) type fr_BJ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_BJ' locale func New() locales.Translator { return &fr_BJ{ - locale: "fr_BJ", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_BJ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_BL/fr_BL.go b/resources/locales/fr_BL/fr_BL.go index 1d8ccde..1014bad 100644 --- a/resources/locales/fr_BL/fr_BL.go +++ b/resources/locales/fr_BL/fr_BL.go @@ -7,15 +7,27 @@ import ( ) type fr_BL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_BL' locale func New() locales.Translator { return &fr_BL{ - locale: "fr_BL", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_BL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_CA/fr_CA.go b/resources/locales/fr_CA/fr_CA.go index 6f992c0..5fd18ff 100644 --- a/resources/locales/fr_CA/fr_CA.go +++ b/resources/locales/fr_CA/fr_CA.go @@ -7,15 +7,27 @@ import ( ) type fr_CA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_CA' locale func New() locales.Translator { return &fr_CA{ - locale: "fr_CA", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_CA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_CD/fr_CD.go b/resources/locales/fr_CD/fr_CD.go index 4088fa5..5eaf6a4 100644 --- a/resources/locales/fr_CD/fr_CD.go +++ b/resources/locales/fr_CD/fr_CD.go @@ -7,15 +7,27 @@ import ( ) type fr_CD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_CD' locale func New() locales.Translator { return &fr_CD{ - locale: "fr_CD", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_CD", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/fr_CF/fr_CF.go b/resources/locales/fr_CF/fr_CF.go index dce9520..7a0376c 100644 --- a/resources/locales/fr_CF/fr_CF.go +++ b/resources/locales/fr_CF/fr_CF.go @@ -7,15 +7,27 @@ import ( ) type fr_CF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_CF' locale func New() locales.Translator { return &fr_CF{ - locale: "fr_CF", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_CF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_CG/fr_CG.go b/resources/locales/fr_CG/fr_CG.go index ec3e2a0..94ae1f2 100644 --- a/resources/locales/fr_CG/fr_CG.go +++ b/resources/locales/fr_CG/fr_CG.go @@ -7,15 +7,27 @@ import ( ) type fr_CG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_CG' locale func New() locales.Translator { return &fr_CG{ - locale: "fr_CG", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_CG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_CH/fr_CH.go b/resources/locales/fr_CH/fr_CH.go index 7ac1ed8..f55d82e 100644 --- a/resources/locales/fr_CH/fr_CH.go +++ b/resources/locales/fr_CH/fr_CH.go @@ -7,15 +7,27 @@ import ( ) type fr_CH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_CH' locale func New() locales.Translator { return &fr_CH{ - locale: "fr_CH", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_CH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_CI/fr_CI.go b/resources/locales/fr_CI/fr_CI.go index cad3e6b..4bef7a1 100644 --- a/resources/locales/fr_CI/fr_CI.go +++ b/resources/locales/fr_CI/fr_CI.go @@ -7,15 +7,27 @@ import ( ) type fr_CI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_CI' locale func New() locales.Translator { return &fr_CI{ - locale: "fr_CI", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_CI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/fr_CM/fr_CM.go b/resources/locales/fr_CM/fr_CM.go index 621b81b..eb7f837 100644 --- a/resources/locales/fr_CM/fr_CM.go +++ b/resources/locales/fr_CM/fr_CM.go @@ -7,15 +7,27 @@ import ( ) type fr_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_CM' locale func New() locales.Translator { return &fr_CM{ - locale: "fr_CM", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_CM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_DJ/fr_DJ.go b/resources/locales/fr_DJ/fr_DJ.go index 7c1849e..c1906a0 100644 --- a/resources/locales/fr_DJ/fr_DJ.go +++ b/resources/locales/fr_DJ/fr_DJ.go @@ -7,15 +7,27 @@ import ( ) type fr_DJ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_DJ' locale func New() locales.Translator { return &fr_DJ{ - locale: "fr_DJ", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_DJ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_DZ/fr_DZ.go b/resources/locales/fr_DZ/fr_DZ.go index b30bd50..616d991 100644 --- a/resources/locales/fr_DZ/fr_DZ.go +++ b/resources/locales/fr_DZ/fr_DZ.go @@ -7,15 +7,27 @@ import ( ) type fr_DZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_DZ' locale func New() locales.Translator { return &fr_DZ{ - locale: "fr_DZ", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_DZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_FR/fr_FR.go b/resources/locales/fr_FR/fr_FR.go index 0841c85..84b1d2d 100644 --- a/resources/locales/fr_FR/fr_FR.go +++ b/resources/locales/fr_FR/fr_FR.go @@ -7,15 +7,27 @@ import ( ) type fr_FR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_FR' locale func New() locales.Translator { return &fr_FR{ - locale: "fr_FR", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_FR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_GA/fr_GA.go b/resources/locales/fr_GA/fr_GA.go index bfd22fc..da6f113 100644 --- a/resources/locales/fr_GA/fr_GA.go +++ b/resources/locales/fr_GA/fr_GA.go @@ -7,15 +7,27 @@ import ( ) type fr_GA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_GA' locale func New() locales.Translator { return &fr_GA{ - locale: "fr_GA", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_GA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_GF/fr_GF.go b/resources/locales/fr_GF/fr_GF.go index 693162a..b0a04a3 100644 --- a/resources/locales/fr_GF/fr_GF.go +++ b/resources/locales/fr_GF/fr_GF.go @@ -7,15 +7,27 @@ import ( ) type fr_GF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_GF' locale func New() locales.Translator { return &fr_GF{ - locale: "fr_GF", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_GF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_GN/fr_GN.go b/resources/locales/fr_GN/fr_GN.go index 16f310d..1accb72 100644 --- a/resources/locales/fr_GN/fr_GN.go +++ b/resources/locales/fr_GN/fr_GN.go @@ -7,15 +7,27 @@ import ( ) type fr_GN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_GN' locale func New() locales.Translator { return &fr_GN{ - locale: "fr_GN", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_GN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_GP/fr_GP.go b/resources/locales/fr_GP/fr_GP.go index 53cf876..447cf28 100644 --- a/resources/locales/fr_GP/fr_GP.go +++ b/resources/locales/fr_GP/fr_GP.go @@ -7,15 +7,27 @@ import ( ) type fr_GP struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_GP' locale func New() locales.Translator { return &fr_GP{ - locale: "fr_GP", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_GP", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_GQ/fr_GQ.go b/resources/locales/fr_GQ/fr_GQ.go index f8c6e3f..657e09f 100644 --- a/resources/locales/fr_GQ/fr_GQ.go +++ b/resources/locales/fr_GQ/fr_GQ.go @@ -7,15 +7,27 @@ import ( ) type fr_GQ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_GQ' locale func New() locales.Translator { return &fr_GQ{ - locale: "fr_GQ", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_GQ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_HT/fr_HT.go b/resources/locales/fr_HT/fr_HT.go index 7bc59f0..126672c 100644 --- a/resources/locales/fr_HT/fr_HT.go +++ b/resources/locales/fr_HT/fr_HT.go @@ -7,15 +7,27 @@ import ( ) type fr_HT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_HT' locale func New() locales.Translator { return &fr_HT{ - locale: "fr_HT", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_HT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_KM/fr_KM.go b/resources/locales/fr_KM/fr_KM.go index c9b01d0..216c011 100644 --- a/resources/locales/fr_KM/fr_KM.go +++ b/resources/locales/fr_KM/fr_KM.go @@ -7,15 +7,27 @@ import ( ) type fr_KM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_KM' locale func New() locales.Translator { return &fr_KM{ - locale: "fr_KM", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_KM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_LU/fr_LU.go b/resources/locales/fr_LU/fr_LU.go index d48cc32..3ff6294 100644 --- a/resources/locales/fr_LU/fr_LU.go +++ b/resources/locales/fr_LU/fr_LU.go @@ -7,15 +7,27 @@ import ( ) type fr_LU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_LU' locale func New() locales.Translator { return &fr_LU{ - locale: "fr_LU", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_LU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_MA/fr_MA.go b/resources/locales/fr_MA/fr_MA.go index f2c31d9..4372941 100644 --- a/resources/locales/fr_MA/fr_MA.go +++ b/resources/locales/fr_MA/fr_MA.go @@ -7,15 +7,27 @@ import ( ) type fr_MA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_MA' locale func New() locales.Translator { return &fr_MA{ - locale: "fr_MA", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_MA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_MC/fr_MC.go b/resources/locales/fr_MC/fr_MC.go index 4b9f1b6..5b4b6cb 100644 --- a/resources/locales/fr_MC/fr_MC.go +++ b/resources/locales/fr_MC/fr_MC.go @@ -7,15 +7,27 @@ import ( ) type fr_MC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_MC' locale func New() locales.Translator { return &fr_MC{ - locale: "fr_MC", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_MC", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_MF/fr_MF.go b/resources/locales/fr_MF/fr_MF.go index a505da0..375e80f 100644 --- a/resources/locales/fr_MF/fr_MF.go +++ b/resources/locales/fr_MF/fr_MF.go @@ -7,15 +7,27 @@ import ( ) type fr_MF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_MF' locale func New() locales.Translator { return &fr_MF{ - locale: "fr_MF", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_MF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_MG/fr_MG.go b/resources/locales/fr_MG/fr_MG.go index 7ef5f01..3e85d57 100644 --- a/resources/locales/fr_MG/fr_MG.go +++ b/resources/locales/fr_MG/fr_MG.go @@ -7,15 +7,27 @@ import ( ) type fr_MG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_MG' locale func New() locales.Translator { return &fr_MG{ - locale: "fr_MG", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_MG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_ML/fr_ML.go b/resources/locales/fr_ML/fr_ML.go index e3abc1f..4671036 100644 --- a/resources/locales/fr_ML/fr_ML.go +++ b/resources/locales/fr_ML/fr_ML.go @@ -7,15 +7,27 @@ import ( ) type fr_ML struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_ML' locale func New() locales.Translator { return &fr_ML{ - locale: "fr_ML", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_ML", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_MQ/fr_MQ.go b/resources/locales/fr_MQ/fr_MQ.go index 62d215c..fbd73da 100644 --- a/resources/locales/fr_MQ/fr_MQ.go +++ b/resources/locales/fr_MQ/fr_MQ.go @@ -7,15 +7,27 @@ import ( ) type fr_MQ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_MQ' locale func New() locales.Translator { return &fr_MQ{ - locale: "fr_MQ", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_MQ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_MR/fr_MR.go b/resources/locales/fr_MR/fr_MR.go index ec652fc..34eebe8 100644 --- a/resources/locales/fr_MR/fr_MR.go +++ b/resources/locales/fr_MR/fr_MR.go @@ -7,15 +7,27 @@ import ( ) type fr_MR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_MR' locale func New() locales.Translator { return &fr_MR{ - locale: "fr_MR", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_MR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_MU/fr_MU.go b/resources/locales/fr_MU/fr_MU.go index 715b72c..0d5d85b 100644 --- a/resources/locales/fr_MU/fr_MU.go +++ b/resources/locales/fr_MU/fr_MU.go @@ -7,15 +7,27 @@ import ( ) type fr_MU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_MU' locale func New() locales.Translator { return &fr_MU{ - locale: "fr_MU", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_MU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_NC/fr_NC.go b/resources/locales/fr_NC/fr_NC.go index bf877bc..4b37259 100644 --- a/resources/locales/fr_NC/fr_NC.go +++ b/resources/locales/fr_NC/fr_NC.go @@ -7,15 +7,27 @@ import ( ) type fr_NC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_NC' locale func New() locales.Translator { return &fr_NC{ - locale: "fr_NC", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_NC", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_NE/fr_NE.go b/resources/locales/fr_NE/fr_NE.go index 0606e14..221c113 100644 --- a/resources/locales/fr_NE/fr_NE.go +++ b/resources/locales/fr_NE/fr_NE.go @@ -7,15 +7,27 @@ import ( ) type fr_NE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_NE' locale func New() locales.Translator { return &fr_NE{ - locale: "fr_NE", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_NE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_PF/fr_PF.go b/resources/locales/fr_PF/fr_PF.go index 6b37d55..ff60bb1 100644 --- a/resources/locales/fr_PF/fr_PF.go +++ b/resources/locales/fr_PF/fr_PF.go @@ -7,15 +7,27 @@ import ( ) type fr_PF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_PF' locale func New() locales.Translator { return &fr_PF{ - locale: "fr_PF", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_PF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_PM/fr_PM.go b/resources/locales/fr_PM/fr_PM.go index c1dd028..f5ea808 100644 --- a/resources/locales/fr_PM/fr_PM.go +++ b/resources/locales/fr_PM/fr_PM.go @@ -7,15 +7,27 @@ import ( ) type fr_PM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_PM' locale func New() locales.Translator { return &fr_PM{ - locale: "fr_PM", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_PM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_RE/fr_RE.go b/resources/locales/fr_RE/fr_RE.go index 2dfa88d..0ddfb66 100644 --- a/resources/locales/fr_RE/fr_RE.go +++ b/resources/locales/fr_RE/fr_RE.go @@ -7,15 +7,27 @@ import ( ) type fr_RE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_RE' locale func New() locales.Translator { return &fr_RE{ - locale: "fr_RE", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_RE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_RW/fr_RW.go b/resources/locales/fr_RW/fr_RW.go index fe66e2b..29f7d87 100644 --- a/resources/locales/fr_RW/fr_RW.go +++ b/resources/locales/fr_RW/fr_RW.go @@ -7,15 +7,27 @@ import ( ) type fr_RW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_RW' locale func New() locales.Translator { return &fr_RW{ - locale: "fr_RW", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_RW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/fr_SC/fr_SC.go b/resources/locales/fr_SC/fr_SC.go index 41d4f1e..63b9a76 100644 --- a/resources/locales/fr_SC/fr_SC.go +++ b/resources/locales/fr_SC/fr_SC.go @@ -7,15 +7,27 @@ import ( ) type fr_SC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_SC' locale func New() locales.Translator { return &fr_SC{ - locale: "fr_SC", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_SC", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_SN/fr_SN.go b/resources/locales/fr_SN/fr_SN.go index e8a3f78..8f74dd9 100644 --- a/resources/locales/fr_SN/fr_SN.go +++ b/resources/locales/fr_SN/fr_SN.go @@ -7,15 +7,27 @@ import ( ) type fr_SN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_SN' locale func New() locales.Translator { return &fr_SN{ - locale: "fr_SN", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_SN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_SY/fr_SY.go b/resources/locales/fr_SY/fr_SY.go index 20efb63..75e9ab7 100644 --- a/resources/locales/fr_SY/fr_SY.go +++ b/resources/locales/fr_SY/fr_SY.go @@ -7,15 +7,27 @@ import ( ) type fr_SY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_SY' locale func New() locales.Translator { return &fr_SY{ - locale: "fr_SY", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_SY", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_TD/fr_TD.go b/resources/locales/fr_TD/fr_TD.go index f3b9159..03ae8f8 100644 --- a/resources/locales/fr_TD/fr_TD.go +++ b/resources/locales/fr_TD/fr_TD.go @@ -7,15 +7,27 @@ import ( ) type fr_TD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_TD' locale func New() locales.Translator { return &fr_TD{ - locale: "fr_TD", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_TD", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_TG/fr_TG.go b/resources/locales/fr_TG/fr_TG.go index a1dd1c0..45bdf8b 100644 --- a/resources/locales/fr_TG/fr_TG.go +++ b/resources/locales/fr_TG/fr_TG.go @@ -7,15 +7,27 @@ import ( ) type fr_TG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_TG' locale func New() locales.Translator { return &fr_TG{ - locale: "fr_TG", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_TG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/fr_TN/fr_TN.go b/resources/locales/fr_TN/fr_TN.go index b4fc135..bbfd875 100644 --- a/resources/locales/fr_TN/fr_TN.go +++ b/resources/locales/fr_TN/fr_TN.go @@ -7,15 +7,27 @@ import ( ) type fr_TN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_TN' locale func New() locales.Translator { return &fr_TN{ - locale: "fr_TN", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_TN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/fr_VU/fr_VU.go b/resources/locales/fr_VU/fr_VU.go index 959e3ac..9ff4ed1 100644 --- a/resources/locales/fr_VU/fr_VU.go +++ b/resources/locales/fr_VU/fr_VU.go @@ -7,15 +7,27 @@ import ( ) type fr_VU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_VU' locale func New() locales.Translator { return &fr_VU{ - locale: "fr_VU", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_VU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_WF/fr_WF.go b/resources/locales/fr_WF/fr_WF.go index 930239b..b870335 100644 --- a/resources/locales/fr_WF/fr_WF.go +++ b/resources/locales/fr_WF/fr_WF.go @@ -7,15 +7,27 @@ import ( ) type fr_WF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_WF' locale func New() locales.Translator { return &fr_WF{ - locale: "fr_WF", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_WF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fr_YT/fr_YT.go b/resources/locales/fr_YT/fr_YT.go index 392a293..bbb58b7 100644 --- a/resources/locales/fr_YT/fr_YT.go +++ b/resources/locales/fr_YT/fr_YT.go @@ -7,15 +7,27 @@ import ( ) type fr_YT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fr_YT' locale func New() locales.Translator { return &fr_YT{ - locale: "fr_YT", - plurals: []locales.PluralRule{2, 6}, + locale: "fr_YT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/fur/fur.go b/resources/locales/fur/fur.go index 347469c..690cc45 100644 --- a/resources/locales/fur/fur.go +++ b/resources/locales/fur/fur.go @@ -7,15 +7,27 @@ import ( ) type fur struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fur' locale func New() locales.Translator { return &fur{ - locale: "fur", - plurals: []locales.PluralRule{2, 6}, + locale: "fur", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/fur_IT/fur_IT.go b/resources/locales/fur_IT/fur_IT.go index dfe83dd..a7536b3 100644 --- a/resources/locales/fur_IT/fur_IT.go +++ b/resources/locales/fur_IT/fur_IT.go @@ -7,15 +7,27 @@ import ( ) type fur_IT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fur_IT' locale func New() locales.Translator { return &fur_IT{ - locale: "fur_IT", - plurals: []locales.PluralRule{2, 6}, + locale: "fur_IT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/fy/fy.go b/resources/locales/fy/fy.go index 6786b98..a9fa657 100644 --- a/resources/locales/fy/fy.go +++ b/resources/locales/fy/fy.go @@ -7,15 +7,27 @@ import ( ) type fy struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fy' locale func New() locales.Translator { return &fy{ - locale: "fy", - plurals: []locales.PluralRule{2, 6}, + locale: "fy", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/fy_NL/fy_NL.go b/resources/locales/fy_NL/fy_NL.go index 291c0fb..4156354 100644 --- a/resources/locales/fy_NL/fy_NL.go +++ b/resources/locales/fy_NL/fy_NL.go @@ -7,15 +7,27 @@ import ( ) type fy_NL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'fy_NL' locale func New() locales.Translator { return &fy_NL{ - locale: "fy_NL", - plurals: []locales.PluralRule{2, 6}, + locale: "fy_NL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ga/ga.go b/resources/locales/ga/ga.go index 4ebd4cb..a206f4b 100644 --- a/resources/locales/ga/ga.go +++ b/resources/locales/ga/ga.go @@ -7,15 +7,27 @@ import ( ) type ga struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ga' locale func New() locales.Translator { return &ga{ - locale: "ga", - plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + locale: "ga", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ga_IE/ga_IE.go b/resources/locales/ga_IE/ga_IE.go index 5162b68..07a4c19 100644 --- a/resources/locales/ga_IE/ga_IE.go +++ b/resources/locales/ga_IE/ga_IE.go @@ -7,15 +7,27 @@ import ( ) type ga_IE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ga_IE' locale func New() locales.Translator { return &ga_IE{ - locale: "ga_IE", - plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + locale: "ga_IE", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/gd/gd.go b/resources/locales/gd/gd.go index 5f092f6..3a65acf 100644 --- a/resources/locales/gd/gd.go +++ b/resources/locales/gd/gd.go @@ -7,15 +7,27 @@ import ( ) type gd struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gd' locale func New() locales.Translator { return &gd{ - locale: "gd", - plurals: []locales.PluralRule{2, 3, 4, 6}, + locale: "gd", + plurals: []locales.PluralRule{2, 3, 4, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0xd9, 0xac}, + minus: []byte{0xe2, 0x80, 0x8f, 0x2d}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{0xd8, 0x89}, + symbol: []byte{}, } } diff --git a/resources/locales/gd_GB/gd_GB.go b/resources/locales/gd_GB/gd_GB.go index e0b5184..8389c59 100644 --- a/resources/locales/gd_GB/gd_GB.go +++ b/resources/locales/gd_GB/gd_GB.go @@ -7,15 +7,27 @@ import ( ) type gd_GB struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gd_GB' locale func New() locales.Translator { return &gd_GB{ - locale: "gd_GB", - plurals: []locales.PluralRule{2, 3, 4, 6}, + locale: "gd_GB", + plurals: []locales.PluralRule{2, 3, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/gl/gl.go b/resources/locales/gl/gl.go index e4c54c5..a9f7857 100644 --- a/resources/locales/gl/gl.go +++ b/resources/locales/gl/gl.go @@ -7,15 +7,27 @@ import ( ) type gl struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gl' locale func New() locales.Translator { return &gl{ - locale: "gl", - plurals: []locales.PluralRule{2, 6}, + locale: "gl", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/gl_ES/gl_ES.go b/resources/locales/gl_ES/gl_ES.go index a96aa95..a260ce9 100644 --- a/resources/locales/gl_ES/gl_ES.go +++ b/resources/locales/gl_ES/gl_ES.go @@ -7,15 +7,27 @@ import ( ) type gl_ES struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gl_ES' locale func New() locales.Translator { return &gl_ES{ - locale: "gl_ES", - plurals: []locales.PluralRule{2, 6}, + locale: "gl_ES", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/gsw/gsw.go b/resources/locales/gsw/gsw.go index a1a9df4..a1726f3 100644 --- a/resources/locales/gsw/gsw.go +++ b/resources/locales/gsw/gsw.go @@ -7,15 +7,27 @@ import ( ) type gsw struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gsw' locale func New() locales.Translator { return &gsw{ - locale: "gsw", - plurals: []locales.PluralRule{2, 6}, + locale: "gsw", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0xe2, 0x80, 0x99}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/gsw_CH/gsw_CH.go b/resources/locales/gsw_CH/gsw_CH.go index e33817e..65b4138 100644 --- a/resources/locales/gsw_CH/gsw_CH.go +++ b/resources/locales/gsw_CH/gsw_CH.go @@ -7,15 +7,27 @@ import ( ) type gsw_CH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gsw_CH' locale func New() locales.Translator { return &gsw_CH{ - locale: "gsw_CH", - plurals: []locales.PluralRule{2, 6}, + locale: "gsw_CH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x39, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/gsw_FR/gsw_FR.go b/resources/locales/gsw_FR/gsw_FR.go index f29478d..d39666b 100644 --- a/resources/locales/gsw_FR/gsw_FR.go +++ b/resources/locales/gsw_FR/gsw_FR.go @@ -7,15 +7,27 @@ import ( ) type gsw_FR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gsw_FR' locale func New() locales.Translator { return &gsw_FR{ - locale: "gsw_FR", - plurals: []locales.PluralRule{2, 6}, + locale: "gsw_FR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x39, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/gsw_LI/gsw_LI.go b/resources/locales/gsw_LI/gsw_LI.go index 39fa3ad..698e7f1 100644 --- a/resources/locales/gsw_LI/gsw_LI.go +++ b/resources/locales/gsw_LI/gsw_LI.go @@ -7,15 +7,27 @@ import ( ) type gsw_LI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gsw_LI' locale func New() locales.Translator { return &gsw_LI{ - locale: "gsw_LI", - plurals: []locales.PluralRule{2, 6}, + locale: "gsw_LI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x39, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/gu/gu.go b/resources/locales/gu/gu.go index 17835f5..cfa2ce2 100644 --- a/resources/locales/gu/gu.go +++ b/resources/locales/gu/gu.go @@ -7,15 +7,27 @@ import ( ) type gu struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gu' locale func New() locales.Translator { return &gu{ - locale: "gu", - plurals: []locales.PluralRule{2, 6}, + locale: "gu", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/gu_IN/gu_IN.go b/resources/locales/gu_IN/gu_IN.go index 13b9946..89be69b 100644 --- a/resources/locales/gu_IN/gu_IN.go +++ b/resources/locales/gu_IN/gu_IN.go @@ -7,15 +7,27 @@ import ( ) type gu_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gu_IN' locale func New() locales.Translator { return &gu_IN{ - locale: "gu_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "gu_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/guz/guz.go b/resources/locales/guz/guz.go index 9383a36..2591701 100644 --- a/resources/locales/guz/guz.go +++ b/resources/locales/guz/guz.go @@ -1,21 +1,29 @@ package guz -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type guz struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'guz' locale func New() locales.Translator { return &guz{ - locale: "guz", - plurals: nil, + locale: "guz", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *guz) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'guz' func (t *guz) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/guz_KE/guz_KE.go b/resources/locales/guz_KE/guz_KE.go index f2635c8..e48b1aa 100644 --- a/resources/locales/guz_KE/guz_KE.go +++ b/resources/locales/guz_KE/guz_KE.go @@ -1,21 +1,29 @@ package guz_KE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type guz_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'guz_KE' locale func New() locales.Translator { return &guz_KE{ - locale: "guz_KE", - plurals: nil, + locale: "guz_KE", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *guz_KE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'guz_KE' func (t *guz_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/gv/gv.go b/resources/locales/gv/gv.go index cd6d03f..085c3d3 100644 --- a/resources/locales/gv/gv.go +++ b/resources/locales/gv/gv.go @@ -7,15 +7,27 @@ import ( ) type gv struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gv' locale func New() locales.Translator { return &gv{ - locale: "gv", - plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + locale: "gv", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/gv_IM/gv_IM.go b/resources/locales/gv_IM/gv_IM.go index 9d62fe7..3025992 100644 --- a/resources/locales/gv_IM/gv_IM.go +++ b/resources/locales/gv_IM/gv_IM.go @@ -7,15 +7,27 @@ import ( ) type gv_IM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'gv_IM' locale func New() locales.Translator { return &gv_IM{ - locale: "gv_IM", - plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + locale: "gv_IM", + plurals: []locales.PluralRule{2, 3, 4, 5, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ha/ha.go b/resources/locales/ha/ha.go index 66c0b96..81d8731 100644 --- a/resources/locales/ha/ha.go +++ b/resources/locales/ha/ha.go @@ -7,15 +7,27 @@ import ( ) type ha struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ha' locale func New() locales.Translator { return &ha{ - locale: "ha", - plurals: []locales.PluralRule{2, 6}, + locale: "ha", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ha_GH/ha_GH.go b/resources/locales/ha_GH/ha_GH.go index 12706b4..a97cf31 100644 --- a/resources/locales/ha_GH/ha_GH.go +++ b/resources/locales/ha_GH/ha_GH.go @@ -7,15 +7,27 @@ import ( ) type ha_GH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ha_GH' locale func New() locales.Translator { return &ha_GH{ - locale: "ha_GH", - plurals: []locales.PluralRule{2, 6}, + locale: "ha_GH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ha_NE/ha_NE.go b/resources/locales/ha_NE/ha_NE.go index 7bf6043..eef8abd 100644 --- a/resources/locales/ha_NE/ha_NE.go +++ b/resources/locales/ha_NE/ha_NE.go @@ -7,15 +7,27 @@ import ( ) type ha_NE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ha_NE' locale func New() locales.Translator { return &ha_NE{ - locale: "ha_NE", - plurals: []locales.PluralRule{2, 6}, + locale: "ha_NE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ha_NG/ha_NG.go b/resources/locales/ha_NG/ha_NG.go index b274a67..d6b919a 100644 --- a/resources/locales/ha_NG/ha_NG.go +++ b/resources/locales/ha_NG/ha_NG.go @@ -7,15 +7,27 @@ import ( ) type ha_NG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ha_NG' locale func New() locales.Translator { return &ha_NG{ - locale: "ha_NG", - plurals: []locales.PluralRule{2, 6}, + locale: "ha_NG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/haw/haw.go b/resources/locales/haw/haw.go index f148293..6e3850a 100644 --- a/resources/locales/haw/haw.go +++ b/resources/locales/haw/haw.go @@ -7,15 +7,27 @@ import ( ) type haw struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'haw' locale func New() locales.Translator { return &haw{ - locale: "haw", - plurals: []locales.PluralRule{2, 6}, + locale: "haw", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/haw_US/haw_US.go b/resources/locales/haw_US/haw_US.go index cc49ba4..3484e7f 100644 --- a/resources/locales/haw_US/haw_US.go +++ b/resources/locales/haw_US/haw_US.go @@ -7,15 +7,27 @@ import ( ) type haw_US struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'haw_US' locale func New() locales.Translator { return &haw_US{ - locale: "haw_US", - plurals: []locales.PluralRule{2, 6}, + locale: "haw_US", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/he/he.go b/resources/locales/he/he.go index 2e98fb0..7ef521d 100644 --- a/resources/locales/he/he.go +++ b/resources/locales/he/he.go @@ -7,15 +7,27 @@ import ( ) type he struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'he' locale func New() locales.Translator { return &he{ - locale: "he", - plurals: []locales.PluralRule{2, 3, 5, 6}, + locale: "he", + plurals: []locales.PluralRule{2, 3, 5, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0xe2, 0x80, 0x8e, 0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/he_IL/he_IL.go b/resources/locales/he_IL/he_IL.go index 9c300f3..bb47e82 100644 --- a/resources/locales/he_IL/he_IL.go +++ b/resources/locales/he_IL/he_IL.go @@ -7,15 +7,27 @@ import ( ) type he_IL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'he_IL' locale func New() locales.Translator { return &he_IL{ - locale: "he_IL", - plurals: []locales.PluralRule{2, 3, 5, 6}, + locale: "he_IL", + plurals: []locales.PluralRule{2, 3, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x65, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/hi/hi.go b/resources/locales/hi/hi.go index cb9b519..a48d7b0 100644 --- a/resources/locales/hi/hi.go +++ b/resources/locales/hi/hi.go @@ -7,15 +7,27 @@ import ( ) type hi struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hi' locale func New() locales.Translator { return &hi{ - locale: "hi", - plurals: []locales.PluralRule{2, 6}, + locale: "hi", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/hi_IN/hi_IN.go b/resources/locales/hi_IN/hi_IN.go index 03e90e7..b623409 100644 --- a/resources/locales/hi_IN/hi_IN.go +++ b/resources/locales/hi_IN/hi_IN.go @@ -7,15 +7,27 @@ import ( ) type hi_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hi_IN' locale func New() locales.Translator { return &hi_IN{ - locale: "hi_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "hi_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/hr/hr.go b/resources/locales/hr/hr.go index fa73c11..fe09729 100644 --- a/resources/locales/hr/hr.go +++ b/resources/locales/hr/hr.go @@ -7,15 +7,27 @@ import ( ) type hr struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hr' locale func New() locales.Translator { return &hr{ - locale: "hr", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "hr", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/hr_BA/hr_BA.go b/resources/locales/hr_BA/hr_BA.go index c71cec0..3b7ad8e 100644 --- a/resources/locales/hr_BA/hr_BA.go +++ b/resources/locales/hr_BA/hr_BA.go @@ -7,15 +7,27 @@ import ( ) type hr_BA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hr_BA' locale func New() locales.Translator { return &hr_BA{ - locale: "hr_BA", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "hr_BA", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/hr_HR/hr_HR.go b/resources/locales/hr_HR/hr_HR.go index 34a1460..7b3544d 100644 --- a/resources/locales/hr_HR/hr_HR.go +++ b/resources/locales/hr_HR/hr_HR.go @@ -7,15 +7,27 @@ import ( ) type hr_HR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hr_HR' locale func New() locales.Translator { return &hr_HR{ - locale: "hr_HR", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "hr_HR", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/hsb/hsb.go b/resources/locales/hsb/hsb.go index 5946603..d77da1d 100644 --- a/resources/locales/hsb/hsb.go +++ b/resources/locales/hsb/hsb.go @@ -7,15 +7,27 @@ import ( ) type hsb struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hsb' locale func New() locales.Translator { return &hsb{ - locale: "hsb", - plurals: []locales.PluralRule{2, 3, 4, 6}, + locale: "hsb", + plurals: []locales.PluralRule{2, 3, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/hsb_DE/hsb_DE.go b/resources/locales/hsb_DE/hsb_DE.go index c00b765..3cca5b5 100644 --- a/resources/locales/hsb_DE/hsb_DE.go +++ b/resources/locales/hsb_DE/hsb_DE.go @@ -7,15 +7,27 @@ import ( ) type hsb_DE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hsb_DE' locale func New() locales.Translator { return &hsb_DE{ - locale: "hsb_DE", - plurals: []locales.PluralRule{2, 3, 4, 6}, + locale: "hsb_DE", + plurals: []locales.PluralRule{2, 3, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/hu/hu.go b/resources/locales/hu/hu.go index f5a71d2..09b032b 100644 --- a/resources/locales/hu/hu.go +++ b/resources/locales/hu/hu.go @@ -7,15 +7,27 @@ import ( ) type hu struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hu' locale func New() locales.Translator { return &hu{ - locale: "hu", - plurals: []locales.PluralRule{2, 6}, + locale: "hu", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/hu_HU/hu_HU.go b/resources/locales/hu_HU/hu_HU.go index 2b0399e..f517115 100644 --- a/resources/locales/hu_HU/hu_HU.go +++ b/resources/locales/hu_HU/hu_HU.go @@ -7,15 +7,27 @@ import ( ) type hu_HU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hu_HU' locale func New() locales.Translator { return &hu_HU{ - locale: "hu_HU", - plurals: []locales.PluralRule{2, 6}, + locale: "hu_HU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/hy/hy.go b/resources/locales/hy/hy.go index ab3c091..5459e02 100644 --- a/resources/locales/hy/hy.go +++ b/resources/locales/hy/hy.go @@ -7,15 +7,27 @@ import ( ) type hy struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hy' locale func New() locales.Translator { return &hy{ - locale: "hy", - plurals: []locales.PluralRule{2, 6}, + locale: "hy", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/hy_AM/hy_AM.go b/resources/locales/hy_AM/hy_AM.go index 736dff1..605454b 100644 --- a/resources/locales/hy_AM/hy_AM.go +++ b/resources/locales/hy_AM/hy_AM.go @@ -7,15 +7,27 @@ import ( ) type hy_AM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'hy_AM' locale func New() locales.Translator { return &hy_AM{ - locale: "hy_AM", - plurals: []locales.PluralRule{2, 6}, + locale: "hy_AM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/id/id.go b/resources/locales/id/id.go index 944007f..871da8d 100644 --- a/resources/locales/id/id.go +++ b/resources/locales/id/id.go @@ -1,21 +1,29 @@ package id -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type id struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'id' locale func New() locales.Translator { return &id{ - locale: "id", - plurals: []locales.PluralRule{6}, + locale: "id", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *id) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'id' func (t *id) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/id_ID/id_ID.go b/resources/locales/id_ID/id_ID.go index e5fca4f..e9e8825 100644 --- a/resources/locales/id_ID/id_ID.go +++ b/resources/locales/id_ID/id_ID.go @@ -1,21 +1,29 @@ package id_ID -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type id_ID struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'id_ID' locale func New() locales.Translator { return &id_ID{ - locale: "id_ID", - plurals: []locales.PluralRule{6}, + locale: "id_ID", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *id_ID) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'id_ID' func (t *id_ID) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ig/ig.go b/resources/locales/ig/ig.go index 43ec687..e3a3981 100644 --- a/resources/locales/ig/ig.go +++ b/resources/locales/ig/ig.go @@ -1,21 +1,29 @@ package ig -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ig struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ig' locale func New() locales.Translator { return &ig{ - locale: "ig", - plurals: []locales.PluralRule{6}, + locale: "ig", + plurals: []locales.PluralRule{6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *ig) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ig' func (t *ig) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ig_NG/ig_NG.go b/resources/locales/ig_NG/ig_NG.go index e7350a8..6a6f2a8 100644 --- a/resources/locales/ig_NG/ig_NG.go +++ b/resources/locales/ig_NG/ig_NG.go @@ -1,21 +1,29 @@ package ig_NG -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ig_NG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ig_NG' locale func New() locales.Translator { return &ig_NG{ - locale: "ig_NG", - plurals: []locales.PluralRule{6}, + locale: "ig_NG", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *ig_NG) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ig_NG' func (t *ig_NG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ii/ii.go b/resources/locales/ii/ii.go index 8d1dcbc..7e2cf62 100644 --- a/resources/locales/ii/ii.go +++ b/resources/locales/ii/ii.go @@ -1,21 +1,29 @@ package ii -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ii struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ii' locale func New() locales.Translator { return &ii{ - locale: "ii", - plurals: []locales.PluralRule{6}, + locale: "ii", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *ii) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ii' func (t *ii) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ii_CN/ii_CN.go b/resources/locales/ii_CN/ii_CN.go index 762064b..d7a7637 100644 --- a/resources/locales/ii_CN/ii_CN.go +++ b/resources/locales/ii_CN/ii_CN.go @@ -1,21 +1,29 @@ package ii_CN -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ii_CN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ii_CN' locale func New() locales.Translator { return &ii_CN{ - locale: "ii_CN", - plurals: []locales.PluralRule{6}, + locale: "ii_CN", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *ii_CN) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ii_CN' func (t *ii_CN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/is/is.go b/resources/locales/is/is.go index af3af5b..0ebd749 100644 --- a/resources/locales/is/is.go +++ b/resources/locales/is/is.go @@ -7,15 +7,27 @@ import ( ) type is struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'is' locale func New() locales.Translator { return &is{ - locale: "is", - plurals: []locales.PluralRule{2, 6}, + locale: "is", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/is_IS/is_IS.go b/resources/locales/is_IS/is_IS.go index c160932..907190b 100644 --- a/resources/locales/is_IS/is_IS.go +++ b/resources/locales/is_IS/is_IS.go @@ -7,15 +7,27 @@ import ( ) type is_IS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'is_IS' locale func New() locales.Translator { return &is_IS{ - locale: "is_IS", - plurals: []locales.PluralRule{2, 6}, + locale: "is_IS", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/it/it.go b/resources/locales/it/it.go index 530727a..e8d9bde 100644 --- a/resources/locales/it/it.go +++ b/resources/locales/it/it.go @@ -7,15 +7,27 @@ import ( ) type it struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'it' locale func New() locales.Translator { return &it{ - locale: "it", - plurals: []locales.PluralRule{2, 6}, + locale: "it", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/it_CH/it_CH.go b/resources/locales/it_CH/it_CH.go index 5d924ab..44b373e 100644 --- a/resources/locales/it_CH/it_CH.go +++ b/resources/locales/it_CH/it_CH.go @@ -7,15 +7,27 @@ import ( ) type it_CH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'it_CH' locale func New() locales.Translator { return &it_CH{ - locale: "it_CH", - plurals: []locales.PluralRule{2, 6}, + locale: "it_CH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x27}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/it_IT/it_IT.go b/resources/locales/it_IT/it_IT.go index 3928b8a..10edd4f 100644 --- a/resources/locales/it_IT/it_IT.go +++ b/resources/locales/it_IT/it_IT.go @@ -7,15 +7,27 @@ import ( ) type it_IT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'it_IT' locale func New() locales.Translator { return &it_IT{ - locale: "it_IT", - plurals: []locales.PluralRule{2, 6}, + locale: "it_IT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/it_SM/it_SM.go b/resources/locales/it_SM/it_SM.go index d897469..46caeb1 100644 --- a/resources/locales/it_SM/it_SM.go +++ b/resources/locales/it_SM/it_SM.go @@ -7,15 +7,27 @@ import ( ) type it_SM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'it_SM' locale func New() locales.Translator { return &it_SM{ - locale: "it_SM", - plurals: []locales.PluralRule{2, 6}, + locale: "it_SM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ja/ja.go b/resources/locales/ja/ja.go index 76f2a1b..6987360 100644 --- a/resources/locales/ja/ja.go +++ b/resources/locales/ja/ja.go @@ -1,21 +1,29 @@ package ja -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ja struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ja' locale func New() locales.Translator { return &ja{ - locale: "ja", - plurals: []locales.PluralRule{6}, + locale: "ja", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *ja) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ja' func (t *ja) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ja_JP/ja_JP.go b/resources/locales/ja_JP/ja_JP.go index be8f52d..106d92c 100644 --- a/resources/locales/ja_JP/ja_JP.go +++ b/resources/locales/ja_JP/ja_JP.go @@ -1,21 +1,29 @@ package ja_JP -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ja_JP struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ja_JP' locale func New() locales.Translator { return &ja_JP{ - locale: "ja_JP", - plurals: []locales.PluralRule{6}, + locale: "ja_JP", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *ja_JP) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ja_JP' func (t *ja_JP) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/jgo/jgo.go b/resources/locales/jgo/jgo.go index a0a1cc6..18b22fa 100644 --- a/resources/locales/jgo/jgo.go +++ b/resources/locales/jgo/jgo.go @@ -7,15 +7,27 @@ import ( ) type jgo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'jgo' locale func New() locales.Translator { return &jgo{ - locale: "jgo", - plurals: []locales.PluralRule{2, 6}, + locale: "jgo", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/jgo_CM/jgo_CM.go b/resources/locales/jgo_CM/jgo_CM.go index c297ec7..6a93f4e 100644 --- a/resources/locales/jgo_CM/jgo_CM.go +++ b/resources/locales/jgo_CM/jgo_CM.go @@ -7,15 +7,27 @@ import ( ) type jgo_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'jgo_CM' locale func New() locales.Translator { return &jgo_CM{ - locale: "jgo_CM", - plurals: []locales.PluralRule{2, 6}, + locale: "jgo_CM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/jmc/jmc.go b/resources/locales/jmc/jmc.go index 27e35a3..2e420b0 100644 --- a/resources/locales/jmc/jmc.go +++ b/resources/locales/jmc/jmc.go @@ -7,15 +7,27 @@ import ( ) type jmc struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'jmc' locale func New() locales.Translator { return &jmc{ - locale: "jmc", - plurals: []locales.PluralRule{2, 6}, + locale: "jmc", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/jmc_TZ/jmc_TZ.go b/resources/locales/jmc_TZ/jmc_TZ.go index 03ada57..33625f3 100644 --- a/resources/locales/jmc_TZ/jmc_TZ.go +++ b/resources/locales/jmc_TZ/jmc_TZ.go @@ -7,15 +7,27 @@ import ( ) type jmc_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'jmc_TZ' locale func New() locales.Translator { return &jmc_TZ{ - locale: "jmc_TZ", - plurals: []locales.PluralRule{2, 6}, + locale: "jmc_TZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ka/ka.go b/resources/locales/ka/ka.go index 49ec928..6c55b44 100644 --- a/resources/locales/ka/ka.go +++ b/resources/locales/ka/ka.go @@ -7,15 +7,27 @@ import ( ) type ka struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ka' locale func New() locales.Translator { return &ka{ - locale: "ka", - plurals: []locales.PluralRule{2, 6}, + locale: "ka", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ka_GE/ka_GE.go b/resources/locales/ka_GE/ka_GE.go index bfcad87..82382d6 100644 --- a/resources/locales/ka_GE/ka_GE.go +++ b/resources/locales/ka_GE/ka_GE.go @@ -7,15 +7,27 @@ import ( ) type ka_GE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ka_GE' locale func New() locales.Translator { return &ka_GE{ - locale: "ka_GE", - plurals: []locales.PluralRule{2, 6}, + locale: "ka_GE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/kab/kab.go b/resources/locales/kab/kab.go index 4ce1e1e..893bb47 100644 --- a/resources/locales/kab/kab.go +++ b/resources/locales/kab/kab.go @@ -7,15 +7,27 @@ import ( ) type kab struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kab' locale func New() locales.Translator { return &kab{ - locale: "kab", - plurals: []locales.PluralRule{2, 6}, + locale: "kab", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/kab_DZ/kab_DZ.go b/resources/locales/kab_DZ/kab_DZ.go index f214d88..945e41a 100644 --- a/resources/locales/kab_DZ/kab_DZ.go +++ b/resources/locales/kab_DZ/kab_DZ.go @@ -7,15 +7,27 @@ import ( ) type kab_DZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kab_DZ' locale func New() locales.Translator { return &kab_DZ{ - locale: "kab_DZ", - plurals: []locales.PluralRule{2, 6}, + locale: "kab_DZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/kam/kam.go b/resources/locales/kam/kam.go index 4932fa0..4845861 100644 --- a/resources/locales/kam/kam.go +++ b/resources/locales/kam/kam.go @@ -1,21 +1,29 @@ package kam -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type kam struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kam' locale func New() locales.Translator { return &kam{ - locale: "kam", - plurals: nil, + locale: "kam", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *kam) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kam' func (t *kam) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/kam_KE/kam_KE.go b/resources/locales/kam_KE/kam_KE.go index acb32bd..1eb3db4 100644 --- a/resources/locales/kam_KE/kam_KE.go +++ b/resources/locales/kam_KE/kam_KE.go @@ -1,21 +1,29 @@ package kam_KE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type kam_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kam_KE' locale func New() locales.Translator { return &kam_KE{ - locale: "kam_KE", - plurals: nil, + locale: "kam_KE", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *kam_KE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kam_KE' func (t *kam_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/kde/kde.go b/resources/locales/kde/kde.go index 0e4b96c..cab15f1 100644 --- a/resources/locales/kde/kde.go +++ b/resources/locales/kde/kde.go @@ -1,21 +1,29 @@ package kde -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type kde struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kde' locale func New() locales.Translator { return &kde{ - locale: "kde", - plurals: []locales.PluralRule{6}, + locale: "kde", + plurals: []locales.PluralRule{6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *kde) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kde' func (t *kde) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/kde_TZ/kde_TZ.go b/resources/locales/kde_TZ/kde_TZ.go index b90744a..f196ddc 100644 --- a/resources/locales/kde_TZ/kde_TZ.go +++ b/resources/locales/kde_TZ/kde_TZ.go @@ -1,21 +1,29 @@ package kde_TZ -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type kde_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kde_TZ' locale func New() locales.Translator { return &kde_TZ{ - locale: "kde_TZ", - plurals: []locales.PluralRule{6}, + locale: "kde_TZ", + plurals: []locales.PluralRule{6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *kde_TZ) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kde_TZ' func (t *kde_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/kea/kea.go b/resources/locales/kea/kea.go index 657a587..f3a7cf1 100644 --- a/resources/locales/kea/kea.go +++ b/resources/locales/kea/kea.go @@ -1,21 +1,29 @@ package kea -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type kea struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kea' locale func New() locales.Translator { return &kea{ - locale: "kea", - plurals: []locales.PluralRule{6}, + locale: "kea", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *kea) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kea' func (t *kea) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/kea_CV/kea_CV.go b/resources/locales/kea_CV/kea_CV.go index 14c0775..56255f6 100644 --- a/resources/locales/kea_CV/kea_CV.go +++ b/resources/locales/kea_CV/kea_CV.go @@ -1,21 +1,29 @@ package kea_CV -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type kea_CV struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kea_CV' locale func New() locales.Translator { return &kea_CV{ - locale: "kea_CV", - plurals: []locales.PluralRule{6}, + locale: "kea_CV", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *kea_CV) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kea_CV' func (t *kea_CV) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/khq/khq.go b/resources/locales/khq/khq.go index 6fdbacf..6c34028 100644 --- a/resources/locales/khq/khq.go +++ b/resources/locales/khq/khq.go @@ -1,21 +1,29 @@ package khq -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type khq struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'khq' locale func New() locales.Translator { return &khq{ - locale: "khq", - plurals: nil, + locale: "khq", + plurals: nil, + decimal: []byte{}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *khq) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'khq' func (t *khq) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/khq_ML/khq_ML.go b/resources/locales/khq_ML/khq_ML.go index 9fd649f..795067d 100644 --- a/resources/locales/khq_ML/khq_ML.go +++ b/resources/locales/khq_ML/khq_ML.go @@ -1,21 +1,29 @@ package khq_ML -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type khq_ML struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'khq_ML' locale func New() locales.Translator { return &khq_ML{ - locale: "khq_ML", - plurals: nil, + locale: "khq_ML", + plurals: nil, + decimal: []byte{}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *khq_ML) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'khq_ML' func (t *khq_ML) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/ki/ki.go b/resources/locales/ki/ki.go index 826cb2b..898b7b2 100644 --- a/resources/locales/ki/ki.go +++ b/resources/locales/ki/ki.go @@ -1,21 +1,29 @@ package ki -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ki struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ki' locale func New() locales.Translator { return &ki{ - locale: "ki", - plurals: nil, + locale: "ki", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *ki) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ki' func (t *ki) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/ki_KE/ki_KE.go b/resources/locales/ki_KE/ki_KE.go index 121c56f..cbf219e 100644 --- a/resources/locales/ki_KE/ki_KE.go +++ b/resources/locales/ki_KE/ki_KE.go @@ -1,21 +1,29 @@ package ki_KE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ki_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ki_KE' locale func New() locales.Translator { return &ki_KE{ - locale: "ki_KE", - plurals: nil, + locale: "ki_KE", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *ki_KE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ki_KE' func (t *ki_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/kk/kk.go b/resources/locales/kk/kk.go index baf0a6b..b5840f8 100644 --- a/resources/locales/kk/kk.go +++ b/resources/locales/kk/kk.go @@ -7,15 +7,27 @@ import ( ) type kk struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kk' locale func New() locales.Translator { return &kk{ - locale: "kk", - plurals: []locales.PluralRule{2, 6}, + locale: "kk", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/kk_KZ/kk_KZ.go b/resources/locales/kk_KZ/kk_KZ.go index 62c457d..904df39 100644 --- a/resources/locales/kk_KZ/kk_KZ.go +++ b/resources/locales/kk_KZ/kk_KZ.go @@ -7,15 +7,27 @@ import ( ) type kk_KZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kk_KZ' locale func New() locales.Translator { return &kk_KZ{ - locale: "kk_KZ", - plurals: []locales.PluralRule{2, 6}, + locale: "kk_KZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/kkj/kkj.go b/resources/locales/kkj/kkj.go index c662fb2..0ef7db0 100644 --- a/resources/locales/kkj/kkj.go +++ b/resources/locales/kkj/kkj.go @@ -7,15 +7,27 @@ import ( ) type kkj struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kkj' locale func New() locales.Translator { return &kkj{ - locale: "kkj", - plurals: []locales.PluralRule{2, 6}, + locale: "kkj", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/kkj_CM/kkj_CM.go b/resources/locales/kkj_CM/kkj_CM.go index 6c5ec23..19121f8 100644 --- a/resources/locales/kkj_CM/kkj_CM.go +++ b/resources/locales/kkj_CM/kkj_CM.go @@ -7,15 +7,27 @@ import ( ) type kkj_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kkj_CM' locale func New() locales.Translator { return &kkj_CM{ - locale: "kkj_CM", - plurals: []locales.PluralRule{2, 6}, + locale: "kkj_CM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/kl/kl.go b/resources/locales/kl/kl.go index b0798ad..32c6a47 100644 --- a/resources/locales/kl/kl.go +++ b/resources/locales/kl/kl.go @@ -7,15 +7,27 @@ import ( ) type kl struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kl' locale func New() locales.Translator { return &kl{ - locale: "kl", - plurals: []locales.PluralRule{2, 6}, + locale: "kl", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/kl_GL/kl_GL.go b/resources/locales/kl_GL/kl_GL.go index 8b72976..f94b470 100644 --- a/resources/locales/kl_GL/kl_GL.go +++ b/resources/locales/kl_GL/kl_GL.go @@ -7,15 +7,27 @@ import ( ) type kl_GL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kl_GL' locale func New() locales.Translator { return &kl_GL{ - locale: "kl_GL", - plurals: []locales.PluralRule{2, 6}, + locale: "kl_GL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/kln/kln.go b/resources/locales/kln/kln.go index 4d0adf8..a260378 100644 --- a/resources/locales/kln/kln.go +++ b/resources/locales/kln/kln.go @@ -1,21 +1,29 @@ package kln -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type kln struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kln' locale func New() locales.Translator { return &kln{ - locale: "kln", - plurals: nil, + locale: "kln", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *kln) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kln' func (t *kln) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/kln_KE/kln_KE.go b/resources/locales/kln_KE/kln_KE.go index 697e5d7..6fd081e 100644 --- a/resources/locales/kln_KE/kln_KE.go +++ b/resources/locales/kln_KE/kln_KE.go @@ -1,21 +1,29 @@ package kln_KE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type kln_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kln_KE' locale func New() locales.Translator { return &kln_KE{ - locale: "kln_KE", - plurals: nil, + locale: "kln_KE", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *kln_KE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kln_KE' func (t *kln_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/km/km.go b/resources/locales/km/km.go index 4d4637d..e1c7156 100644 --- a/resources/locales/km/km.go +++ b/resources/locales/km/km.go @@ -1,21 +1,29 @@ package km -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type km struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'km' locale func New() locales.Translator { return &km{ - locale: "km", - plurals: []locales.PluralRule{6}, + locale: "km", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *km) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'km' func (t *km) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/km_KH/km_KH.go b/resources/locales/km_KH/km_KH.go index 76a09ff..23e3d44 100644 --- a/resources/locales/km_KH/km_KH.go +++ b/resources/locales/km_KH/km_KH.go @@ -1,21 +1,29 @@ package km_KH -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type km_KH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'km_KH' locale func New() locales.Translator { return &km_KH{ - locale: "km_KH", - plurals: []locales.PluralRule{6}, + locale: "km_KH", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *km_KH) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'km_KH' func (t *km_KH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/kn/kn.go b/resources/locales/kn/kn.go index c3524f3..981fef5 100644 --- a/resources/locales/kn/kn.go +++ b/resources/locales/kn/kn.go @@ -7,15 +7,27 @@ import ( ) type kn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kn' locale func New() locales.Translator { return &kn{ - locale: "kn", - plurals: []locales.PluralRule{2, 6}, + locale: "kn", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/kn_IN/kn_IN.go b/resources/locales/kn_IN/kn_IN.go index c2f3f54..cea7597 100644 --- a/resources/locales/kn_IN/kn_IN.go +++ b/resources/locales/kn_IN/kn_IN.go @@ -7,15 +7,27 @@ import ( ) type kn_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kn_IN' locale func New() locales.Translator { return &kn_IN{ - locale: "kn_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "kn_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ko/ko.go b/resources/locales/ko/ko.go index d309fef..f2896c0 100644 --- a/resources/locales/ko/ko.go +++ b/resources/locales/ko/ko.go @@ -1,21 +1,29 @@ package ko -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ko struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ko' locale func New() locales.Translator { return &ko{ - locale: "ko", - plurals: []locales.PluralRule{6}, + locale: "ko", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *ko) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ko' func (t *ko) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ko_KP/ko_KP.go b/resources/locales/ko_KP/ko_KP.go index c0d1462..4d7e484 100644 --- a/resources/locales/ko_KP/ko_KP.go +++ b/resources/locales/ko_KP/ko_KP.go @@ -1,21 +1,29 @@ package ko_KP -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ko_KP struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ko_KP' locale func New() locales.Translator { return &ko_KP{ - locale: "ko_KP", - plurals: []locales.PluralRule{6}, + locale: "ko_KP", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *ko_KP) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ko_KP' func (t *ko_KP) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ko_KR/ko_KR.go b/resources/locales/ko_KR/ko_KR.go index 93dec54..bfe5df2 100644 --- a/resources/locales/ko_KR/ko_KR.go +++ b/resources/locales/ko_KR/ko_KR.go @@ -1,21 +1,29 @@ package ko_KR -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ko_KR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ko_KR' locale func New() locales.Translator { return &ko_KR{ - locale: "ko_KR", - plurals: []locales.PluralRule{6}, + locale: "ko_KR", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *ko_KR) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ko_KR' func (t *ko_KR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/kok/kok.go b/resources/locales/kok/kok.go index 477bc1b..61c9408 100644 --- a/resources/locales/kok/kok.go +++ b/resources/locales/kok/kok.go @@ -1,21 +1,29 @@ package kok -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type kok struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kok' locale func New() locales.Translator { return &kok{ - locale: "kok", - plurals: nil, + locale: "kok", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *kok) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kok' func (t *kok) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/kok_IN/kok_IN.go b/resources/locales/kok_IN/kok_IN.go index cf4fd62..9ca67ef 100644 --- a/resources/locales/kok_IN/kok_IN.go +++ b/resources/locales/kok_IN/kok_IN.go @@ -1,21 +1,29 @@ package kok_IN -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type kok_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kok_IN' locale func New() locales.Translator { return &kok_IN{ - locale: "kok_IN", - plurals: nil, + locale: "kok_IN", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *kok_IN) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'kok_IN' func (t *kok_IN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/ks/ks.go b/resources/locales/ks/ks.go index e2cf610..6daff56 100644 --- a/resources/locales/ks/ks.go +++ b/resources/locales/ks/ks.go @@ -7,15 +7,27 @@ import ( ) type ks struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ks' locale func New() locales.Translator { return &ks{ - locale: "ks", - plurals: []locales.PluralRule{2, 6}, + locale: "ks", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0xe2, 0x80, 0x8e, 0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ks_IN/ks_IN.go b/resources/locales/ks_IN/ks_IN.go index ebb3135..9768371 100644 --- a/resources/locales/ks_IN/ks_IN.go +++ b/resources/locales/ks_IN/ks_IN.go @@ -7,15 +7,27 @@ import ( ) type ks_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ks_IN' locale func New() locales.Translator { return &ks_IN{ - locale: "ks_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "ks_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x65, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ksb/ksb.go b/resources/locales/ksb/ksb.go index 48bc3b4..fed7fe6 100644 --- a/resources/locales/ksb/ksb.go +++ b/resources/locales/ksb/ksb.go @@ -7,15 +7,27 @@ import ( ) type ksb struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ksb' locale func New() locales.Translator { return &ksb{ - locale: "ksb", - plurals: []locales.PluralRule{2, 6}, + locale: "ksb", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ksb_TZ/ksb_TZ.go b/resources/locales/ksb_TZ/ksb_TZ.go index 90059f0..411bc43 100644 --- a/resources/locales/ksb_TZ/ksb_TZ.go +++ b/resources/locales/ksb_TZ/ksb_TZ.go @@ -7,15 +7,27 @@ import ( ) type ksb_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ksb_TZ' locale func New() locales.Translator { return &ksb_TZ{ - locale: "ksb_TZ", - plurals: []locales.PluralRule{2, 6}, + locale: "ksb_TZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ksf/ksf.go b/resources/locales/ksf/ksf.go index 7184680..d274369 100644 --- a/resources/locales/ksf/ksf.go +++ b/resources/locales/ksf/ksf.go @@ -1,21 +1,29 @@ package ksf -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ksf struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ksf' locale func New() locales.Translator { return &ksf{ - locale: "ksf", - plurals: nil, + locale: "ksf", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *ksf) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ksf' func (t *ksf) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/ksf_CM/ksf_CM.go b/resources/locales/ksf_CM/ksf_CM.go index 1fd162c..8368e21 100644 --- a/resources/locales/ksf_CM/ksf_CM.go +++ b/resources/locales/ksf_CM/ksf_CM.go @@ -1,21 +1,29 @@ package ksf_CM -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ksf_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ksf_CM' locale func New() locales.Translator { return &ksf_CM{ - locale: "ksf_CM", - plurals: nil, + locale: "ksf_CM", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *ksf_CM) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ksf_CM' func (t *ksf_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/ksh/ksh.go b/resources/locales/ksh/ksh.go index a33d4ed..f431457 100644 --- a/resources/locales/ksh/ksh.go +++ b/resources/locales/ksh/ksh.go @@ -7,15 +7,27 @@ import ( ) type ksh struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ksh' locale func New() locales.Translator { return &ksh{ - locale: "ksh", - plurals: []locales.PluralRule{1, 2, 6}, + locale: "ksh", + plurals: []locales.PluralRule{1, 2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ksh_DE/ksh_DE.go b/resources/locales/ksh_DE/ksh_DE.go index d38467d..382ea5d 100644 --- a/resources/locales/ksh_DE/ksh_DE.go +++ b/resources/locales/ksh_DE/ksh_DE.go @@ -7,15 +7,27 @@ import ( ) type ksh_DE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ksh_DE' locale func New() locales.Translator { return &ksh_DE{ - locale: "ksh_DE", - plurals: []locales.PluralRule{1, 2, 6}, + locale: "ksh_DE", + plurals: []locales.PluralRule{1, 2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/kw/kw.go b/resources/locales/kw/kw.go index b7e27ce..366cb16 100644 --- a/resources/locales/kw/kw.go +++ b/resources/locales/kw/kw.go @@ -7,15 +7,27 @@ import ( ) type kw struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kw' locale func New() locales.Translator { return &kw{ - locale: "kw", - plurals: []locales.PluralRule{2, 3, 6}, + locale: "kw", + plurals: []locales.PluralRule{2, 3, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/kw_GB/kw_GB.go b/resources/locales/kw_GB/kw_GB.go index 2c88eba..3cbca7c 100644 --- a/resources/locales/kw_GB/kw_GB.go +++ b/resources/locales/kw_GB/kw_GB.go @@ -7,15 +7,27 @@ import ( ) type kw_GB struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'kw_GB' locale func New() locales.Translator { return &kw_GB{ - locale: "kw_GB", - plurals: []locales.PluralRule{2, 3, 6}, + locale: "kw_GB", + plurals: []locales.PluralRule{2, 3, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ky/ky.go b/resources/locales/ky/ky.go index ad74c26..572ff84 100644 --- a/resources/locales/ky/ky.go +++ b/resources/locales/ky/ky.go @@ -7,15 +7,27 @@ import ( ) type ky struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ky' locale func New() locales.Translator { return &ky{ - locale: "ky", - plurals: []locales.PluralRule{2, 6}, + locale: "ky", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ky_KG/ky_KG.go b/resources/locales/ky_KG/ky_KG.go index b435598..37e38e6 100644 --- a/resources/locales/ky_KG/ky_KG.go +++ b/resources/locales/ky_KG/ky_KG.go @@ -7,15 +7,27 @@ import ( ) type ky_KG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ky_KG' locale func New() locales.Translator { return &ky_KG{ - locale: "ky_KG", - plurals: []locales.PluralRule{2, 6}, + locale: "ky_KG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/lag/lag.go b/resources/locales/lag/lag.go index 37d9297..c944d82 100644 --- a/resources/locales/lag/lag.go +++ b/resources/locales/lag/lag.go @@ -7,15 +7,27 @@ import ( ) type lag struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lag' locale func New() locales.Translator { return &lag{ - locale: "lag", - plurals: []locales.PluralRule{1, 2, 6}, + locale: "lag", + plurals: []locales.PluralRule{1, 2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/lag_TZ/lag_TZ.go b/resources/locales/lag_TZ/lag_TZ.go index fcd27e6..ffddc5b 100644 --- a/resources/locales/lag_TZ/lag_TZ.go +++ b/resources/locales/lag_TZ/lag_TZ.go @@ -7,15 +7,27 @@ import ( ) type lag_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lag_TZ' locale func New() locales.Translator { return &lag_TZ{ - locale: "lag_TZ", - plurals: []locales.PluralRule{1, 2, 6}, + locale: "lag_TZ", + plurals: []locales.PluralRule{1, 2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/lb/lb.go b/resources/locales/lb/lb.go index 114f4aa..dd98236 100644 --- a/resources/locales/lb/lb.go +++ b/resources/locales/lb/lb.go @@ -7,15 +7,27 @@ import ( ) type lb struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lb' locale func New() locales.Translator { return &lb{ - locale: "lb", - plurals: []locales.PluralRule{2, 6}, + locale: "lb", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/lb_LU/lb_LU.go b/resources/locales/lb_LU/lb_LU.go index d0be2e9..2e9db9c 100644 --- a/resources/locales/lb_LU/lb_LU.go +++ b/resources/locales/lb_LU/lb_LU.go @@ -7,15 +7,27 @@ import ( ) type lb_LU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lb_LU' locale func New() locales.Translator { return &lb_LU{ - locale: "lb_LU", - plurals: []locales.PluralRule{2, 6}, + locale: "lb_LU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/lg/lg.go b/resources/locales/lg/lg.go index e86db19..067ee6b 100644 --- a/resources/locales/lg/lg.go +++ b/resources/locales/lg/lg.go @@ -7,15 +7,27 @@ import ( ) type lg struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lg' locale func New() locales.Translator { return &lg{ - locale: "lg", - plurals: []locales.PluralRule{2, 6}, + locale: "lg", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/lg_UG/lg_UG.go b/resources/locales/lg_UG/lg_UG.go index f0b3dd4..50c5d36 100644 --- a/resources/locales/lg_UG/lg_UG.go +++ b/resources/locales/lg_UG/lg_UG.go @@ -7,15 +7,27 @@ import ( ) type lg_UG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lg_UG' locale func New() locales.Translator { return &lg_UG{ - locale: "lg_UG", - plurals: []locales.PluralRule{2, 6}, + locale: "lg_UG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/lkt/lkt.go b/resources/locales/lkt/lkt.go index 7812a35..3e69ffd 100644 --- a/resources/locales/lkt/lkt.go +++ b/resources/locales/lkt/lkt.go @@ -1,21 +1,29 @@ package lkt -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type lkt struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lkt' locale func New() locales.Translator { return &lkt{ - locale: "lkt", - plurals: []locales.PluralRule{6}, + locale: "lkt", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *lkt) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lkt' func (t *lkt) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/lkt_US/lkt_US.go b/resources/locales/lkt_US/lkt_US.go index 83e20b0..86bcc98 100644 --- a/resources/locales/lkt_US/lkt_US.go +++ b/resources/locales/lkt_US/lkt_US.go @@ -1,21 +1,29 @@ package lkt_US -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type lkt_US struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lkt_US' locale func New() locales.Translator { return &lkt_US{ - locale: "lkt_US", - plurals: []locales.PluralRule{6}, + locale: "lkt_US", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *lkt_US) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lkt_US' func (t *lkt_US) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ln/ln.go b/resources/locales/ln/ln.go index 6741b0c..2c0a5eb 100644 --- a/resources/locales/ln/ln.go +++ b/resources/locales/ln/ln.go @@ -7,15 +7,27 @@ import ( ) type ln struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ln' locale func New() locales.Translator { return &ln{ - locale: "ln", - plurals: []locales.PluralRule{2, 6}, + locale: "ln", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ln_AO/ln_AO.go b/resources/locales/ln_AO/ln_AO.go index 583d77e..28f38fe 100644 --- a/resources/locales/ln_AO/ln_AO.go +++ b/resources/locales/ln_AO/ln_AO.go @@ -7,15 +7,27 @@ import ( ) type ln_AO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ln_AO' locale func New() locales.Translator { return &ln_AO{ - locale: "ln_AO", - plurals: []locales.PluralRule{2, 6}, + locale: "ln_AO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ln_CD/ln_CD.go b/resources/locales/ln_CD/ln_CD.go index 9023353..d181908 100644 --- a/resources/locales/ln_CD/ln_CD.go +++ b/resources/locales/ln_CD/ln_CD.go @@ -7,15 +7,27 @@ import ( ) type ln_CD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ln_CD' locale func New() locales.Translator { return &ln_CD{ - locale: "ln_CD", - plurals: []locales.PluralRule{2, 6}, + locale: "ln_CD", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ln_CF/ln_CF.go b/resources/locales/ln_CF/ln_CF.go index 0a1a215..6125a20 100644 --- a/resources/locales/ln_CF/ln_CF.go +++ b/resources/locales/ln_CF/ln_CF.go @@ -7,15 +7,27 @@ import ( ) type ln_CF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ln_CF' locale func New() locales.Translator { return &ln_CF{ - locale: "ln_CF", - plurals: []locales.PluralRule{2, 6}, + locale: "ln_CF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ln_CG/ln_CG.go b/resources/locales/ln_CG/ln_CG.go index 5d59af5..b46cf37 100644 --- a/resources/locales/ln_CG/ln_CG.go +++ b/resources/locales/ln_CG/ln_CG.go @@ -7,15 +7,27 @@ import ( ) type ln_CG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ln_CG' locale func New() locales.Translator { return &ln_CG{ - locale: "ln_CG", - plurals: []locales.PluralRule{2, 6}, + locale: "ln_CG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/lo/lo.go b/resources/locales/lo/lo.go index c804f35..900b647 100644 --- a/resources/locales/lo/lo.go +++ b/resources/locales/lo/lo.go @@ -1,21 +1,29 @@ package lo -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type lo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lo' locale func New() locales.Translator { return &lo{ - locale: "lo", - plurals: []locales.PluralRule{6}, + locale: "lo", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *lo) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lo' func (t *lo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/lo_LA/lo_LA.go b/resources/locales/lo_LA/lo_LA.go index 9f0be36..a090474 100644 --- a/resources/locales/lo_LA/lo_LA.go +++ b/resources/locales/lo_LA/lo_LA.go @@ -1,21 +1,29 @@ package lo_LA -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type lo_LA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lo_LA' locale func New() locales.Translator { return &lo_LA{ - locale: "lo_LA", - plurals: []locales.PluralRule{6}, + locale: "lo_LA", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *lo_LA) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lo_LA' func (t *lo_LA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/lrc/lrc.go b/resources/locales/lrc/lrc.go index 6c24f93..06dd15b 100644 --- a/resources/locales/lrc/lrc.go +++ b/resources/locales/lrc/lrc.go @@ -1,21 +1,29 @@ package lrc -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type lrc struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lrc' locale func New() locales.Translator { return &lrc{ - locale: "lrc", - plurals: nil, + locale: "lrc", + plurals: nil, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *lrc) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lrc' func (t *lrc) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/lrc_IQ/lrc_IQ.go b/resources/locales/lrc_IQ/lrc_IQ.go index 85a4d3e..5427a84 100644 --- a/resources/locales/lrc_IQ/lrc_IQ.go +++ b/resources/locales/lrc_IQ/lrc_IQ.go @@ -1,21 +1,29 @@ package lrc_IQ -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type lrc_IQ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lrc_IQ' locale func New() locales.Translator { return &lrc_IQ{ - locale: "lrc_IQ", - plurals: nil, + locale: "lrc_IQ", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *lrc_IQ) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lrc_IQ' func (t *lrc_IQ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/lrc_IR/lrc_IR.go b/resources/locales/lrc_IR/lrc_IR.go index 94d2196..e3be163 100644 --- a/resources/locales/lrc_IR/lrc_IR.go +++ b/resources/locales/lrc_IR/lrc_IR.go @@ -1,21 +1,29 @@ package lrc_IR -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type lrc_IR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lrc_IR' locale func New() locales.Translator { return &lrc_IR{ - locale: "lrc_IR", - plurals: nil, + locale: "lrc_IR", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *lrc_IR) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lrc_IR' func (t *lrc_IR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/lt/lt.go b/resources/locales/lt/lt.go index 68a30ad..bb36352 100644 --- a/resources/locales/lt/lt.go +++ b/resources/locales/lt/lt.go @@ -7,15 +7,27 @@ import ( ) type lt struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lt' locale func New() locales.Translator { return <{ - locale: "lt", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "lt", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/lt_LT/lt_LT.go b/resources/locales/lt_LT/lt_LT.go index 3e18db6..7b1d26c 100644 --- a/resources/locales/lt_LT/lt_LT.go +++ b/resources/locales/lt_LT/lt_LT.go @@ -7,15 +7,27 @@ import ( ) type lt_LT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lt_LT' locale func New() locales.Translator { return <_LT{ - locale: "lt_LT", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "lt_LT", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/lu/lu.go b/resources/locales/lu/lu.go index 27b62d8..bd23de8 100644 --- a/resources/locales/lu/lu.go +++ b/resources/locales/lu/lu.go @@ -1,21 +1,29 @@ package lu -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type lu struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lu' locale func New() locales.Translator { return &lu{ - locale: "lu", - plurals: nil, + locale: "lu", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *lu) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lu' func (t *lu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/lu_CD/lu_CD.go b/resources/locales/lu_CD/lu_CD.go index 343b6d4..ada8b49 100644 --- a/resources/locales/lu_CD/lu_CD.go +++ b/resources/locales/lu_CD/lu_CD.go @@ -1,21 +1,29 @@ package lu_CD -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type lu_CD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lu_CD' locale func New() locales.Translator { return &lu_CD{ - locale: "lu_CD", - plurals: nil, + locale: "lu_CD", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *lu_CD) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'lu_CD' func (t *lu_CD) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/luo/luo.go b/resources/locales/luo/luo.go index a21bcc3..355f147 100644 --- a/resources/locales/luo/luo.go +++ b/resources/locales/luo/luo.go @@ -1,21 +1,29 @@ package luo -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type luo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'luo' locale func New() locales.Translator { return &luo{ - locale: "luo", - plurals: nil, + locale: "luo", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *luo) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'luo' func (t *luo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/luo_KE/luo_KE.go b/resources/locales/luo_KE/luo_KE.go index 69eaae9..7f391bf 100644 --- a/resources/locales/luo_KE/luo_KE.go +++ b/resources/locales/luo_KE/luo_KE.go @@ -1,21 +1,29 @@ package luo_KE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type luo_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'luo_KE' locale func New() locales.Translator { return &luo_KE{ - locale: "luo_KE", - plurals: nil, + locale: "luo_KE", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *luo_KE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'luo_KE' func (t *luo_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/luy/luy.go b/resources/locales/luy/luy.go index 7837157..20d85c2 100644 --- a/resources/locales/luy/luy.go +++ b/resources/locales/luy/luy.go @@ -1,21 +1,29 @@ package luy -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type luy struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'luy' locale func New() locales.Translator { return &luy{ - locale: "luy", - plurals: nil, + locale: "luy", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *luy) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'luy' func (t *luy) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/luy_KE/luy_KE.go b/resources/locales/luy_KE/luy_KE.go index 9e1c4f5..00ea788 100644 --- a/resources/locales/luy_KE/luy_KE.go +++ b/resources/locales/luy_KE/luy_KE.go @@ -1,21 +1,29 @@ package luy_KE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type luy_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'luy_KE' locale func New() locales.Translator { return &luy_KE{ - locale: "luy_KE", - plurals: nil, + locale: "luy_KE", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *luy_KE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'luy_KE' func (t *luy_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/lv/lv.go b/resources/locales/lv/lv.go index e0f4045..d4ad4b6 100644 --- a/resources/locales/lv/lv.go +++ b/resources/locales/lv/lv.go @@ -7,15 +7,27 @@ import ( ) type lv struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lv' locale func New() locales.Translator { return &lv{ - locale: "lv", - plurals: []locales.PluralRule{1, 2, 6}, + locale: "lv", + plurals: []locales.PluralRule{1, 2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/lv_LV/lv_LV.go b/resources/locales/lv_LV/lv_LV.go index a4f56c2..2e199b1 100644 --- a/resources/locales/lv_LV/lv_LV.go +++ b/resources/locales/lv_LV/lv_LV.go @@ -7,15 +7,27 @@ import ( ) type lv_LV struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'lv_LV' locale func New() locales.Translator { return &lv_LV{ - locale: "lv_LV", - plurals: []locales.PluralRule{1, 2, 6}, + locale: "lv_LV", + plurals: []locales.PluralRule{1, 2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/mas/mas.go b/resources/locales/mas/mas.go index 259a2df..dcbb2c5 100644 --- a/resources/locales/mas/mas.go +++ b/resources/locales/mas/mas.go @@ -7,15 +7,27 @@ import ( ) type mas struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mas' locale func New() locales.Translator { return &mas{ - locale: "mas", - plurals: []locales.PluralRule{2, 6}, + locale: "mas", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/mas_KE/mas_KE.go b/resources/locales/mas_KE/mas_KE.go index 2eedac4..87af473 100644 --- a/resources/locales/mas_KE/mas_KE.go +++ b/resources/locales/mas_KE/mas_KE.go @@ -7,15 +7,27 @@ import ( ) type mas_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mas_KE' locale func New() locales.Translator { return &mas_KE{ - locale: "mas_KE", - plurals: []locales.PluralRule{2, 6}, + locale: "mas_KE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/mas_TZ/mas_TZ.go b/resources/locales/mas_TZ/mas_TZ.go index c3c4e38..a83d99b 100644 --- a/resources/locales/mas_TZ/mas_TZ.go +++ b/resources/locales/mas_TZ/mas_TZ.go @@ -7,15 +7,27 @@ import ( ) type mas_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mas_TZ' locale func New() locales.Translator { return &mas_TZ{ - locale: "mas_TZ", - plurals: []locales.PluralRule{2, 6}, + locale: "mas_TZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/mer/mer.go b/resources/locales/mer/mer.go index a7d83cb..8377ad7 100644 --- a/resources/locales/mer/mer.go +++ b/resources/locales/mer/mer.go @@ -1,21 +1,29 @@ package mer -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type mer struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mer' locale func New() locales.Translator { return &mer{ - locale: "mer", - plurals: nil, + locale: "mer", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *mer) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mer' func (t *mer) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/mer_KE/mer_KE.go b/resources/locales/mer_KE/mer_KE.go index 58a4c72..a5fbb22 100644 --- a/resources/locales/mer_KE/mer_KE.go +++ b/resources/locales/mer_KE/mer_KE.go @@ -1,21 +1,29 @@ package mer_KE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type mer_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mer_KE' locale func New() locales.Translator { return &mer_KE{ - locale: "mer_KE", - plurals: nil, + locale: "mer_KE", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *mer_KE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mer_KE' func (t *mer_KE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/mfe/mfe.go b/resources/locales/mfe/mfe.go index 868496d..2442e2a 100644 --- a/resources/locales/mfe/mfe.go +++ b/resources/locales/mfe/mfe.go @@ -1,21 +1,29 @@ package mfe -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type mfe struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mfe' locale func New() locales.Translator { return &mfe{ - locale: "mfe", - plurals: nil, + locale: "mfe", + plurals: nil, + decimal: []byte{}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *mfe) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mfe' func (t *mfe) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/mfe_MU/mfe_MU.go b/resources/locales/mfe_MU/mfe_MU.go index 959caab..e96367e 100644 --- a/resources/locales/mfe_MU/mfe_MU.go +++ b/resources/locales/mfe_MU/mfe_MU.go @@ -1,21 +1,29 @@ package mfe_MU -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type mfe_MU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mfe_MU' locale func New() locales.Translator { return &mfe_MU{ - locale: "mfe_MU", - plurals: nil, + locale: "mfe_MU", + plurals: nil, + decimal: []byte{}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *mfe_MU) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mfe_MU' func (t *mfe_MU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/mg/mg.go b/resources/locales/mg/mg.go index 02365e7..42929af 100644 --- a/resources/locales/mg/mg.go +++ b/resources/locales/mg/mg.go @@ -7,15 +7,27 @@ import ( ) type mg struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mg' locale func New() locales.Translator { return &mg{ - locale: "mg", - plurals: []locales.PluralRule{2, 6}, + locale: "mg", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/mg_MG/mg_MG.go b/resources/locales/mg_MG/mg_MG.go index dac9239..d78e6b6 100644 --- a/resources/locales/mg_MG/mg_MG.go +++ b/resources/locales/mg_MG/mg_MG.go @@ -7,15 +7,27 @@ import ( ) type mg_MG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mg_MG' locale func New() locales.Translator { return &mg_MG{ - locale: "mg_MG", - plurals: []locales.PluralRule{2, 6}, + locale: "mg_MG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/mgh/mgh.go b/resources/locales/mgh/mgh.go index 80cd8a7..8a4bd6a 100644 --- a/resources/locales/mgh/mgh.go +++ b/resources/locales/mgh/mgh.go @@ -1,21 +1,29 @@ package mgh -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type mgh struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mgh' locale func New() locales.Translator { return &mgh{ - locale: "mgh", - plurals: nil, + locale: "mgh", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *mgh) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mgh' func (t *mgh) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/mgh_MZ/mgh_MZ.go b/resources/locales/mgh_MZ/mgh_MZ.go index 39542c2..65ce40d 100644 --- a/resources/locales/mgh_MZ/mgh_MZ.go +++ b/resources/locales/mgh_MZ/mgh_MZ.go @@ -1,21 +1,29 @@ package mgh_MZ -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type mgh_MZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mgh_MZ' locale func New() locales.Translator { return &mgh_MZ{ - locale: "mgh_MZ", - plurals: nil, + locale: "mgh_MZ", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *mgh_MZ) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mgh_MZ' func (t *mgh_MZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/mgo/mgo.go b/resources/locales/mgo/mgo.go index ceaac11..8cfb900 100644 --- a/resources/locales/mgo/mgo.go +++ b/resources/locales/mgo/mgo.go @@ -7,15 +7,27 @@ import ( ) type mgo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mgo' locale func New() locales.Translator { return &mgo{ - locale: "mgo", - plurals: []locales.PluralRule{2, 6}, + locale: "mgo", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/mgo_CM/mgo_CM.go b/resources/locales/mgo_CM/mgo_CM.go index 8269312..6f10946 100644 --- a/resources/locales/mgo_CM/mgo_CM.go +++ b/resources/locales/mgo_CM/mgo_CM.go @@ -7,15 +7,27 @@ import ( ) type mgo_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mgo_CM' locale func New() locales.Translator { return &mgo_CM{ - locale: "mgo_CM", - plurals: []locales.PluralRule{2, 6}, + locale: "mgo_CM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/mk/mk.go b/resources/locales/mk/mk.go index 66dcccf..83d7653 100644 --- a/resources/locales/mk/mk.go +++ b/resources/locales/mk/mk.go @@ -7,15 +7,27 @@ import ( ) type mk struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mk' locale func New() locales.Translator { return &mk{ - locale: "mk", - plurals: []locales.PluralRule{2, 6}, + locale: "mk", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/mk_MK/mk_MK.go b/resources/locales/mk_MK/mk_MK.go index ca9f6e5..60424f5 100644 --- a/resources/locales/mk_MK/mk_MK.go +++ b/resources/locales/mk_MK/mk_MK.go @@ -7,15 +7,27 @@ import ( ) type mk_MK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mk_MK' locale func New() locales.Translator { return &mk_MK{ - locale: "mk_MK", - plurals: []locales.PluralRule{2, 6}, + locale: "mk_MK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ml/ml.go b/resources/locales/ml/ml.go index ebb613f..ccc8d17 100644 --- a/resources/locales/ml/ml.go +++ b/resources/locales/ml/ml.go @@ -7,15 +7,27 @@ import ( ) type ml struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ml' locale func New() locales.Translator { return &ml{ - locale: "ml", - plurals: []locales.PluralRule{2, 6}, + locale: "ml", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ml_IN/ml_IN.go b/resources/locales/ml_IN/ml_IN.go index a7d1dcf..24d1688 100644 --- a/resources/locales/ml_IN/ml_IN.go +++ b/resources/locales/ml_IN/ml_IN.go @@ -7,15 +7,27 @@ import ( ) type ml_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ml_IN' locale func New() locales.Translator { return &ml_IN{ - locale: "ml_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "ml_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/mn/mn.go b/resources/locales/mn/mn.go index fa28c4f..0422494 100644 --- a/resources/locales/mn/mn.go +++ b/resources/locales/mn/mn.go @@ -7,15 +7,27 @@ import ( ) type mn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mn' locale func New() locales.Translator { return &mn{ - locale: "mn", - plurals: []locales.PluralRule{2, 6}, + locale: "mn", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/mn_MN/mn_MN.go b/resources/locales/mn_MN/mn_MN.go index c840bbb..50d9f40 100644 --- a/resources/locales/mn_MN/mn_MN.go +++ b/resources/locales/mn_MN/mn_MN.go @@ -7,15 +7,27 @@ import ( ) type mn_MN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mn_MN' locale func New() locales.Translator { return &mn_MN{ - locale: "mn_MN", - plurals: []locales.PluralRule{2, 6}, + locale: "mn_MN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/mr/mr.go b/resources/locales/mr/mr.go index e25e47b..d152eae 100644 --- a/resources/locales/mr/mr.go +++ b/resources/locales/mr/mr.go @@ -7,15 +7,27 @@ import ( ) type mr struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mr' locale func New() locales.Translator { return &mr{ - locale: "mr", - plurals: []locales.PluralRule{2, 6}, + locale: "mr", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/mr_IN/mr_IN.go b/resources/locales/mr_IN/mr_IN.go index d6a6f01..a302ae2 100644 --- a/resources/locales/mr_IN/mr_IN.go +++ b/resources/locales/mr_IN/mr_IN.go @@ -7,15 +7,27 @@ import ( ) type mr_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mr_IN' locale func New() locales.Translator { return &mr_IN{ - locale: "mr_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "mr_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ms/ms.go b/resources/locales/ms/ms.go index aed55b1..bbb1509 100644 --- a/resources/locales/ms/ms.go +++ b/resources/locales/ms/ms.go @@ -1,21 +1,29 @@ package ms -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ms struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ms' locale func New() locales.Translator { return &ms{ - locale: "ms", - plurals: []locales.PluralRule{6}, + locale: "ms", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *ms) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ms' func (t *ms) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ms_BN/ms_BN.go b/resources/locales/ms_BN/ms_BN.go index a461b52..f252a9f 100644 --- a/resources/locales/ms_BN/ms_BN.go +++ b/resources/locales/ms_BN/ms_BN.go @@ -1,21 +1,29 @@ package ms_BN -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ms_BN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ms_BN' locale func New() locales.Translator { return &ms_BN{ - locale: "ms_BN", - plurals: []locales.PluralRule{6}, + locale: "ms_BN", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *ms_BN) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ms_BN' func (t *ms_BN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ms_MY/ms_MY.go b/resources/locales/ms_MY/ms_MY.go index d41ba5c..f112ed0 100644 --- a/resources/locales/ms_MY/ms_MY.go +++ b/resources/locales/ms_MY/ms_MY.go @@ -1,21 +1,29 @@ package ms_MY -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ms_MY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ms_MY' locale func New() locales.Translator { return &ms_MY{ - locale: "ms_MY", - plurals: []locales.PluralRule{6}, + locale: "ms_MY", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *ms_MY) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ms_MY' func (t *ms_MY) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ms_SG/ms_SG.go b/resources/locales/ms_SG/ms_SG.go index 7d41f90..d5f8cef 100644 --- a/resources/locales/ms_SG/ms_SG.go +++ b/resources/locales/ms_SG/ms_SG.go @@ -1,21 +1,29 @@ package ms_SG -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ms_SG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ms_SG' locale func New() locales.Translator { return &ms_SG{ - locale: "ms_SG", - plurals: []locales.PluralRule{6}, + locale: "ms_SG", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *ms_SG) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ms_SG' func (t *ms_SG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/mt/mt.go b/resources/locales/mt/mt.go index 192ddc3..5c22a06 100644 --- a/resources/locales/mt/mt.go +++ b/resources/locales/mt/mt.go @@ -7,15 +7,27 @@ import ( ) type mt struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mt' locale func New() locales.Translator { return &mt{ - locale: "mt", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "mt", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/mt_MT/mt_MT.go b/resources/locales/mt_MT/mt_MT.go index b80638b..9c47000 100644 --- a/resources/locales/mt_MT/mt_MT.go +++ b/resources/locales/mt_MT/mt_MT.go @@ -7,15 +7,27 @@ import ( ) type mt_MT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mt_MT' locale func New() locales.Translator { return &mt_MT{ - locale: "mt_MT", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "mt_MT", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/mua/mua.go b/resources/locales/mua/mua.go index 86d0333..ab32a24 100644 --- a/resources/locales/mua/mua.go +++ b/resources/locales/mua/mua.go @@ -1,21 +1,29 @@ package mua -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type mua struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mua' locale func New() locales.Translator { return &mua{ - locale: "mua", - plurals: nil, + locale: "mua", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *mua) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mua' func (t *mua) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/mua_CM/mua_CM.go b/resources/locales/mua_CM/mua_CM.go index 9c5498b..c48454d 100644 --- a/resources/locales/mua_CM/mua_CM.go +++ b/resources/locales/mua_CM/mua_CM.go @@ -1,21 +1,29 @@ package mua_CM -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type mua_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mua_CM' locale func New() locales.Translator { return &mua_CM{ - locale: "mua_CM", - plurals: nil, + locale: "mua_CM", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *mua_CM) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mua_CM' func (t *mua_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/my/my.go b/resources/locales/my/my.go index 1b82825..94d5894 100644 --- a/resources/locales/my/my.go +++ b/resources/locales/my/my.go @@ -1,21 +1,29 @@ package my -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type my struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'my' locale func New() locales.Translator { return &my{ - locale: "my", - plurals: []locales.PluralRule{6}, + locale: "my", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *my) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'my' func (t *my) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/my_MM/my_MM.go b/resources/locales/my_MM/my_MM.go index 5f6b131..6d8ef1f 100644 --- a/resources/locales/my_MM/my_MM.go +++ b/resources/locales/my_MM/my_MM.go @@ -1,21 +1,29 @@ package my_MM -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type my_MM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'my_MM' locale func New() locales.Translator { return &my_MM{ - locale: "my_MM", - plurals: []locales.PluralRule{6}, + locale: "my_MM", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *my_MM) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'my_MM' func (t *my_MM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/mzn/mzn.go b/resources/locales/mzn/mzn.go index 3690a74..7fd8edd 100644 --- a/resources/locales/mzn/mzn.go +++ b/resources/locales/mzn/mzn.go @@ -1,21 +1,29 @@ package mzn -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type mzn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mzn' locale func New() locales.Translator { return &mzn{ - locale: "mzn", - plurals: nil, + locale: "mzn", + plurals: nil, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *mzn) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mzn' func (t *mzn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/mzn_IR/mzn_IR.go b/resources/locales/mzn_IR/mzn_IR.go index 2fb8ea1..8a81b13 100644 --- a/resources/locales/mzn_IR/mzn_IR.go +++ b/resources/locales/mzn_IR/mzn_IR.go @@ -1,21 +1,29 @@ package mzn_IR -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type mzn_IR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'mzn_IR' locale func New() locales.Translator { return &mzn_IR{ - locale: "mzn_IR", - plurals: nil, + locale: "mzn_IR", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *mzn_IR) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'mzn_IR' func (t *mzn_IR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/naq/naq.go b/resources/locales/naq/naq.go index 259ac1a..b8a9733 100644 --- a/resources/locales/naq/naq.go +++ b/resources/locales/naq/naq.go @@ -7,15 +7,27 @@ import ( ) type naq struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'naq' locale func New() locales.Translator { return &naq{ - locale: "naq", - plurals: []locales.PluralRule{2, 3, 6}, + locale: "naq", + plurals: []locales.PluralRule{2, 3, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/naq_NA/naq_NA.go b/resources/locales/naq_NA/naq_NA.go index e739850..0648ce4 100644 --- a/resources/locales/naq_NA/naq_NA.go +++ b/resources/locales/naq_NA/naq_NA.go @@ -7,15 +7,27 @@ import ( ) type naq_NA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'naq_NA' locale func New() locales.Translator { return &naq_NA{ - locale: "naq_NA", - plurals: []locales.PluralRule{2, 3, 6}, + locale: "naq_NA", + plurals: []locales.PluralRule{2, 3, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nb/nb.go b/resources/locales/nb/nb.go index 899f2f1..11eb682 100644 --- a/resources/locales/nb/nb.go +++ b/resources/locales/nb/nb.go @@ -7,15 +7,27 @@ import ( ) type nb struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nb' locale func New() locales.Translator { return &nb{ - locale: "nb", - plurals: []locales.PluralRule{2, 6}, + locale: "nb", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{0xd8, 0x89}, + symbol: []byte{}, } } diff --git a/resources/locales/nb_NO/nb_NO.go b/resources/locales/nb_NO/nb_NO.go index 75a6034..34471fb 100644 --- a/resources/locales/nb_NO/nb_NO.go +++ b/resources/locales/nb_NO/nb_NO.go @@ -7,15 +7,27 @@ import ( ) type nb_NO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nb_NO' locale func New() locales.Translator { return &nb_NO{ - locale: "nb_NO", - plurals: []locales.PluralRule{2, 6}, + locale: "nb_NO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/nb_SJ/nb_SJ.go b/resources/locales/nb_SJ/nb_SJ.go index 8630507..ca1e402 100644 --- a/resources/locales/nb_SJ/nb_SJ.go +++ b/resources/locales/nb_SJ/nb_SJ.go @@ -7,15 +7,27 @@ import ( ) type nb_SJ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nb_SJ' locale func New() locales.Translator { return &nb_SJ{ - locale: "nb_SJ", - plurals: []locales.PluralRule{2, 6}, + locale: "nb_SJ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/nd/nd.go b/resources/locales/nd/nd.go index 0bfe8c2..d937fae 100644 --- a/resources/locales/nd/nd.go +++ b/resources/locales/nd/nd.go @@ -7,15 +7,27 @@ import ( ) type nd struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nd' locale func New() locales.Translator { return &nd{ - locale: "nd", - plurals: []locales.PluralRule{2, 6}, + locale: "nd", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nd_ZW/nd_ZW.go b/resources/locales/nd_ZW/nd_ZW.go index 6b08191..1adcef7 100644 --- a/resources/locales/nd_ZW/nd_ZW.go +++ b/resources/locales/nd_ZW/nd_ZW.go @@ -7,15 +7,27 @@ import ( ) type nd_ZW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nd_ZW' locale func New() locales.Translator { return &nd_ZW{ - locale: "nd_ZW", - plurals: []locales.PluralRule{2, 6}, + locale: "nd_ZW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ne/ne.go b/resources/locales/ne/ne.go index 24f3cb7..860655a 100644 --- a/resources/locales/ne/ne.go +++ b/resources/locales/ne/ne.go @@ -7,15 +7,27 @@ import ( ) type ne struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ne' locale func New() locales.Translator { return &ne{ - locale: "ne", - plurals: []locales.PluralRule{2, 6}, + locale: "ne", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ne_IN/ne_IN.go b/resources/locales/ne_IN/ne_IN.go index 45aec43..561b3ee 100644 --- a/resources/locales/ne_IN/ne_IN.go +++ b/resources/locales/ne_IN/ne_IN.go @@ -7,15 +7,27 @@ import ( ) type ne_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ne_IN' locale func New() locales.Translator { return &ne_IN{ - locale: "ne_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "ne_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ne_NP/ne_NP.go b/resources/locales/ne_NP/ne_NP.go index 7a08392..3803b51 100644 --- a/resources/locales/ne_NP/ne_NP.go +++ b/resources/locales/ne_NP/ne_NP.go @@ -7,15 +7,27 @@ import ( ) type ne_NP struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ne_NP' locale func New() locales.Translator { return &ne_NP{ - locale: "ne_NP", - plurals: []locales.PluralRule{2, 6}, + locale: "ne_NP", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/nl/nl.go b/resources/locales/nl/nl.go index c58161e..fa2260c 100644 --- a/resources/locales/nl/nl.go +++ b/resources/locales/nl/nl.go @@ -7,15 +7,27 @@ import ( ) type nl struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nl' locale func New() locales.Translator { return &nl{ - locale: "nl", - plurals: []locales.PluralRule{2, 6}, + locale: "nl", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nl_AW/nl_AW.go b/resources/locales/nl_AW/nl_AW.go index dcf7356..e9d5bb1 100644 --- a/resources/locales/nl_AW/nl_AW.go +++ b/resources/locales/nl_AW/nl_AW.go @@ -7,15 +7,27 @@ import ( ) type nl_AW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nl_AW' locale func New() locales.Translator { return &nl_AW{ - locale: "nl_AW", - plurals: []locales.PluralRule{2, 6}, + locale: "nl_AW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nl_BE/nl_BE.go b/resources/locales/nl_BE/nl_BE.go index 60cbda0..360aac8 100644 --- a/resources/locales/nl_BE/nl_BE.go +++ b/resources/locales/nl_BE/nl_BE.go @@ -7,15 +7,27 @@ import ( ) type nl_BE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nl_BE' locale func New() locales.Translator { return &nl_BE{ - locale: "nl_BE", - plurals: []locales.PluralRule{2, 6}, + locale: "nl_BE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nl_BQ/nl_BQ.go b/resources/locales/nl_BQ/nl_BQ.go index 17afd21..945611a 100644 --- a/resources/locales/nl_BQ/nl_BQ.go +++ b/resources/locales/nl_BQ/nl_BQ.go @@ -7,15 +7,27 @@ import ( ) type nl_BQ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nl_BQ' locale func New() locales.Translator { return &nl_BQ{ - locale: "nl_BQ", - plurals: []locales.PluralRule{2, 6}, + locale: "nl_BQ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nl_CW/nl_CW.go b/resources/locales/nl_CW/nl_CW.go index 077348e..5bebb0c 100644 --- a/resources/locales/nl_CW/nl_CW.go +++ b/resources/locales/nl_CW/nl_CW.go @@ -7,15 +7,27 @@ import ( ) type nl_CW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nl_CW' locale func New() locales.Translator { return &nl_CW{ - locale: "nl_CW", - plurals: []locales.PluralRule{2, 6}, + locale: "nl_CW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nl_NL/nl_NL.go b/resources/locales/nl_NL/nl_NL.go index ff3d3f3..1977296 100644 --- a/resources/locales/nl_NL/nl_NL.go +++ b/resources/locales/nl_NL/nl_NL.go @@ -7,15 +7,27 @@ import ( ) type nl_NL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nl_NL' locale func New() locales.Translator { return &nl_NL{ - locale: "nl_NL", - plurals: []locales.PluralRule{2, 6}, + locale: "nl_NL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nl_SR/nl_SR.go b/resources/locales/nl_SR/nl_SR.go index 8fb9969..c62f352 100644 --- a/resources/locales/nl_SR/nl_SR.go +++ b/resources/locales/nl_SR/nl_SR.go @@ -7,15 +7,27 @@ import ( ) type nl_SR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nl_SR' locale func New() locales.Translator { return &nl_SR{ - locale: "nl_SR", - plurals: []locales.PluralRule{2, 6}, + locale: "nl_SR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nl_SX/nl_SX.go b/resources/locales/nl_SX/nl_SX.go index bc0ada3..7aa122b 100644 --- a/resources/locales/nl_SX/nl_SX.go +++ b/resources/locales/nl_SX/nl_SX.go @@ -7,15 +7,27 @@ import ( ) type nl_SX struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nl_SX' locale func New() locales.Translator { return &nl_SX{ - locale: "nl_SX", - plurals: []locales.PluralRule{2, 6}, + locale: "nl_SX", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nmg/nmg.go b/resources/locales/nmg/nmg.go index 46f0a9e..95bc1e8 100644 --- a/resources/locales/nmg/nmg.go +++ b/resources/locales/nmg/nmg.go @@ -1,21 +1,29 @@ package nmg -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type nmg struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nmg' locale func New() locales.Translator { return &nmg{ - locale: "nmg", - plurals: nil, + locale: "nmg", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *nmg) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nmg' func (t *nmg) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/nmg_CM/nmg_CM.go b/resources/locales/nmg_CM/nmg_CM.go index 7de3b7d..407cd2f 100644 --- a/resources/locales/nmg_CM/nmg_CM.go +++ b/resources/locales/nmg_CM/nmg_CM.go @@ -1,21 +1,29 @@ package nmg_CM -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type nmg_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nmg_CM' locale func New() locales.Translator { return &nmg_CM{ - locale: "nmg_CM", - plurals: nil, + locale: "nmg_CM", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *nmg_CM) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nmg_CM' func (t *nmg_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/nn/nn.go b/resources/locales/nn/nn.go index e084b24..5fca742 100644 --- a/resources/locales/nn/nn.go +++ b/resources/locales/nn/nn.go @@ -7,15 +7,27 @@ import ( ) type nn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nn' locale func New() locales.Translator { return &nn{ - locale: "nn", - plurals: []locales.PluralRule{2, 6}, + locale: "nn", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/nn_NO/nn_NO.go b/resources/locales/nn_NO/nn_NO.go index 164695d..8dd5a87 100644 --- a/resources/locales/nn_NO/nn_NO.go +++ b/resources/locales/nn_NO/nn_NO.go @@ -7,15 +7,27 @@ import ( ) type nn_NO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nn_NO' locale func New() locales.Translator { return &nn_NO{ - locale: "nn_NO", - plurals: []locales.PluralRule{2, 6}, + locale: "nn_NO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/nnh/nnh.go b/resources/locales/nnh/nnh.go index 9731686..da7ff0c 100644 --- a/resources/locales/nnh/nnh.go +++ b/resources/locales/nnh/nnh.go @@ -7,15 +7,27 @@ import ( ) type nnh struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nnh' locale func New() locales.Translator { return &nnh{ - locale: "nnh", - plurals: []locales.PluralRule{2, 6}, + locale: "nnh", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{}, + percent: []byte{0x25}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nnh_CM/nnh_CM.go b/resources/locales/nnh_CM/nnh_CM.go index 7023441..08c9ef5 100644 --- a/resources/locales/nnh_CM/nnh_CM.go +++ b/resources/locales/nnh_CM/nnh_CM.go @@ -7,15 +7,27 @@ import ( ) type nnh_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nnh_CM' locale func New() locales.Translator { return &nnh_CM{ - locale: "nnh_CM", - plurals: []locales.PluralRule{2, 6}, + locale: "nnh_CM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nus/nus.go b/resources/locales/nus/nus.go index 080d36e..b21e874 100644 --- a/resources/locales/nus/nus.go +++ b/resources/locales/nus/nus.go @@ -1,21 +1,29 @@ package nus -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type nus struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nus' locale func New() locales.Translator { return &nus{ - locale: "nus", - plurals: nil, + locale: "nus", + plurals: nil, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *nus) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nus' func (t *nus) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/nus_SS/nus_SS.go b/resources/locales/nus_SS/nus_SS.go index 4bcd4e7..df3c96f 100644 --- a/resources/locales/nus_SS/nus_SS.go +++ b/resources/locales/nus_SS/nus_SS.go @@ -1,21 +1,29 @@ package nus_SS -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type nus_SS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nus_SS' locale func New() locales.Translator { return &nus_SS{ - locale: "nus_SS", - plurals: nil, + locale: "nus_SS", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *nus_SS) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'nus_SS' func (t *nus_SS) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/nyn/nyn.go b/resources/locales/nyn/nyn.go index 1f3c142..89ca0d7 100644 --- a/resources/locales/nyn/nyn.go +++ b/resources/locales/nyn/nyn.go @@ -7,15 +7,27 @@ import ( ) type nyn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nyn' locale func New() locales.Translator { return &nyn{ - locale: "nyn", - plurals: []locales.PluralRule{2, 6}, + locale: "nyn", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/nyn_UG/nyn_UG.go b/resources/locales/nyn_UG/nyn_UG.go index 7dfd344..13a9229 100644 --- a/resources/locales/nyn_UG/nyn_UG.go +++ b/resources/locales/nyn_UG/nyn_UG.go @@ -7,15 +7,27 @@ import ( ) type nyn_UG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'nyn_UG' locale func New() locales.Translator { return &nyn_UG{ - locale: "nyn_UG", - plurals: []locales.PluralRule{2, 6}, + locale: "nyn_UG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/om/om.go b/resources/locales/om/om.go index 3c0f0b2..5b819f7 100644 --- a/resources/locales/om/om.go +++ b/resources/locales/om/om.go @@ -7,15 +7,27 @@ import ( ) type om struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'om' locale func New() locales.Translator { return &om{ - locale: "om", - plurals: []locales.PluralRule{2, 6}, + locale: "om", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/om_ET/om_ET.go b/resources/locales/om_ET/om_ET.go index e4638d8..2722165 100644 --- a/resources/locales/om_ET/om_ET.go +++ b/resources/locales/om_ET/om_ET.go @@ -7,15 +7,27 @@ import ( ) type om_ET struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'om_ET' locale func New() locales.Translator { return &om_ET{ - locale: "om_ET", - plurals: []locales.PluralRule{2, 6}, + locale: "om_ET", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/om_KE/om_KE.go b/resources/locales/om_KE/om_KE.go index 3654d43..5aaf404 100644 --- a/resources/locales/om_KE/om_KE.go +++ b/resources/locales/om_KE/om_KE.go @@ -7,15 +7,27 @@ import ( ) type om_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'om_KE' locale func New() locales.Translator { return &om_KE{ - locale: "om_KE", - plurals: []locales.PluralRule{2, 6}, + locale: "om_KE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/or/or.go b/resources/locales/or/or.go index be24ff9..79e686b 100644 --- a/resources/locales/or/or.go +++ b/resources/locales/or/or.go @@ -7,15 +7,27 @@ import ( ) type or struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'or' locale func New() locales.Translator { return &or{ - locale: "or", - plurals: []locales.PluralRule{2, 6}, + locale: "or", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/or_IN/or_IN.go b/resources/locales/or_IN/or_IN.go index 66503c7..9ee4ad1 100644 --- a/resources/locales/or_IN/or_IN.go +++ b/resources/locales/or_IN/or_IN.go @@ -7,15 +7,27 @@ import ( ) type or_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'or_IN' locale func New() locales.Translator { return &or_IN{ - locale: "or_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "or_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/os/os.go b/resources/locales/os/os.go index ea7982a..4234662 100644 --- a/resources/locales/os/os.go +++ b/resources/locales/os/os.go @@ -7,15 +7,27 @@ import ( ) type os struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'os' locale func New() locales.Translator { return &os{ - locale: "os", - plurals: []locales.PluralRule{2, 6}, + locale: "os", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/os_GE/os_GE.go b/resources/locales/os_GE/os_GE.go index f4856d9..74c38b5 100644 --- a/resources/locales/os_GE/os_GE.go +++ b/resources/locales/os_GE/os_GE.go @@ -7,15 +7,27 @@ import ( ) type os_GE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'os_GE' locale func New() locales.Translator { return &os_GE{ - locale: "os_GE", - plurals: []locales.PluralRule{2, 6}, + locale: "os_GE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/os_RU/os_RU.go b/resources/locales/os_RU/os_RU.go index ee624e5..c796ccc 100644 --- a/resources/locales/os_RU/os_RU.go +++ b/resources/locales/os_RU/os_RU.go @@ -7,15 +7,27 @@ import ( ) type os_RU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'os_RU' locale func New() locales.Translator { return &os_RU{ - locale: "os_RU", - plurals: []locales.PluralRule{2, 6}, + locale: "os_RU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pa/pa.go b/resources/locales/pa/pa.go index 4d26bd5..ab1ea7f 100644 --- a/resources/locales/pa/pa.go +++ b/resources/locales/pa/pa.go @@ -7,15 +7,27 @@ import ( ) type pa struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pa' locale func New() locales.Translator { return &pa{ - locale: "pa", - plurals: []locales.PluralRule{2, 6}, + locale: "pa", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{0xd8, 0x89}, + symbol: []byte{}, } } diff --git a/resources/locales/pa_Arab/pa_Arab.go b/resources/locales/pa_Arab/pa_Arab.go index ed82c1d..19ff876 100644 --- a/resources/locales/pa_Arab/pa_Arab.go +++ b/resources/locales/pa_Arab/pa_Arab.go @@ -7,15 +7,27 @@ import ( ) type pa_Arab struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pa_Arab' locale func New() locales.Translator { return &pa_Arab{ - locale: "pa_Arab", - plurals: []locales.PluralRule{2, 6}, + locale: "pa_Arab", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0xe2, 0x80, 0x8e, 0x2d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pa_Arab_PK/pa_Arab_PK.go b/resources/locales/pa_Arab_PK/pa_Arab_PK.go index 44364d8..8ee84ee 100644 --- a/resources/locales/pa_Arab_PK/pa_Arab_PK.go +++ b/resources/locales/pa_Arab_PK/pa_Arab_PK.go @@ -7,15 +7,27 @@ import ( ) type pa_Arab_PK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pa_Arab_PK' locale func New() locales.Translator { return &pa_Arab_PK{ - locale: "pa_Arab_PK", - plurals: []locales.PluralRule{2, 6}, + locale: "pa_Arab_PK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pa_Guru/pa_Guru.go b/resources/locales/pa_Guru/pa_Guru.go index 55872f2..2863fd9 100644 --- a/resources/locales/pa_Guru/pa_Guru.go +++ b/resources/locales/pa_Guru/pa_Guru.go @@ -7,15 +7,27 @@ import ( ) type pa_Guru struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pa_Guru' locale func New() locales.Translator { return &pa_Guru{ - locale: "pa_Guru", - plurals: []locales.PluralRule{2, 6}, + locale: "pa_Guru", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pa_Guru_IN/pa_Guru_IN.go b/resources/locales/pa_Guru_IN/pa_Guru_IN.go index 20bbe21..f42b9ed 100644 --- a/resources/locales/pa_Guru_IN/pa_Guru_IN.go +++ b/resources/locales/pa_Guru_IN/pa_Guru_IN.go @@ -7,15 +7,27 @@ import ( ) type pa_Guru_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pa_Guru_IN' locale func New() locales.Translator { return &pa_Guru_IN{ - locale: "pa_Guru_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "pa_Guru_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pl/pl.go b/resources/locales/pl/pl.go index 272b7e0..9298834 100644 --- a/resources/locales/pl/pl.go +++ b/resources/locales/pl/pl.go @@ -7,15 +7,27 @@ import ( ) type pl struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pl' locale func New() locales.Translator { return &pl{ - locale: "pl", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "pl", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/pl_PL/pl_PL.go b/resources/locales/pl_PL/pl_PL.go index 6d6ce75..3da09fa 100644 --- a/resources/locales/pl_PL/pl_PL.go +++ b/resources/locales/pl_PL/pl_PL.go @@ -7,15 +7,27 @@ import ( ) type pl_PL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pl_PL' locale func New() locales.Translator { return &pl_PL{ - locale: "pl_PL", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "pl_PL", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/prg/prg.go b/resources/locales/prg/prg.go index 9474d54..e507398 100644 --- a/resources/locales/prg/prg.go +++ b/resources/locales/prg/prg.go @@ -7,15 +7,27 @@ import ( ) type prg struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'prg' locale func New() locales.Translator { return &prg{ - locale: "prg", - plurals: []locales.PluralRule{1, 2, 6}, + locale: "prg", + plurals: []locales.PluralRule{1, 2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/prg_001/prg_001.go b/resources/locales/prg_001/prg_001.go index f269b01..29df343 100644 --- a/resources/locales/prg_001/prg_001.go +++ b/resources/locales/prg_001/prg_001.go @@ -7,15 +7,27 @@ import ( ) type prg_001 struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'prg_001' locale func New() locales.Translator { return &prg_001{ - locale: "prg_001", - plurals: []locales.PluralRule{1, 2, 6}, + locale: "prg_001", + plurals: []locales.PluralRule{1, 2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ps/ps.go b/resources/locales/ps/ps.go index 9454da6..9afa038 100644 --- a/resources/locales/ps/ps.go +++ b/resources/locales/ps/ps.go @@ -7,15 +7,27 @@ import ( ) type ps struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ps' locale func New() locales.Translator { return &ps{ - locale: "ps", - plurals: []locales.PluralRule{2, 6}, + locale: "ps", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0xd9, 0xac}, + minus: []byte{}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ps_AF/ps_AF.go b/resources/locales/ps_AF/ps_AF.go index a19b032..74d2d5d 100644 --- a/resources/locales/ps_AF/ps_AF.go +++ b/resources/locales/ps_AF/ps_AF.go @@ -7,15 +7,27 @@ import ( ) type ps_AF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ps_AF' locale func New() locales.Translator { return &ps_AF{ - locale: "ps_AF", - plurals: []locales.PluralRule{2, 6}, + locale: "ps_AF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/pt/pt.go b/resources/locales/pt/pt.go index c90c941..ddc4387 100644 --- a/resources/locales/pt/pt.go +++ b/resources/locales/pt/pt.go @@ -7,15 +7,27 @@ import ( ) type pt struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt' locale func New() locales.Translator { return &pt{ - locale: "pt", - plurals: []locales.PluralRule{2, 6}, + locale: "pt", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/pt_AO/pt_AO.go b/resources/locales/pt_AO/pt_AO.go index 0304ee3..b9dba19 100644 --- a/resources/locales/pt_AO/pt_AO.go +++ b/resources/locales/pt_AO/pt_AO.go @@ -7,15 +7,27 @@ import ( ) type pt_AO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_AO' locale func New() locales.Translator { return &pt_AO{ - locale: "pt_AO", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_AO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pt_BR/pt_BR.go b/resources/locales/pt_BR/pt_BR.go index aaccca8..a6a9bb0 100644 --- a/resources/locales/pt_BR/pt_BR.go +++ b/resources/locales/pt_BR/pt_BR.go @@ -7,15 +7,27 @@ import ( ) type pt_BR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_BR' locale func New() locales.Translator { return &pt_BR{ - locale: "pt_BR", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_BR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pt_CH/pt_CH.go b/resources/locales/pt_CH/pt_CH.go index 74ae3ad..594ecef 100644 --- a/resources/locales/pt_CH/pt_CH.go +++ b/resources/locales/pt_CH/pt_CH.go @@ -7,15 +7,27 @@ import ( ) type pt_CH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_CH' locale func New() locales.Translator { return &pt_CH{ - locale: "pt_CH", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_CH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pt_CV/pt_CV.go b/resources/locales/pt_CV/pt_CV.go index 8259d1d..017ef78 100644 --- a/resources/locales/pt_CV/pt_CV.go +++ b/resources/locales/pt_CV/pt_CV.go @@ -7,15 +7,27 @@ import ( ) type pt_CV struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_CV' locale func New() locales.Translator { return &pt_CV{ - locale: "pt_CV", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_CV", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pt_GQ/pt_GQ.go b/resources/locales/pt_GQ/pt_GQ.go index f2aecc2..401eb36 100644 --- a/resources/locales/pt_GQ/pt_GQ.go +++ b/resources/locales/pt_GQ/pt_GQ.go @@ -7,15 +7,27 @@ import ( ) type pt_GQ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_GQ' locale func New() locales.Translator { return &pt_GQ{ - locale: "pt_GQ", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_GQ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pt_GW/pt_GW.go b/resources/locales/pt_GW/pt_GW.go index 70b40ec..e61658f 100644 --- a/resources/locales/pt_GW/pt_GW.go +++ b/resources/locales/pt_GW/pt_GW.go @@ -7,15 +7,27 @@ import ( ) type pt_GW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_GW' locale func New() locales.Translator { return &pt_GW{ - locale: "pt_GW", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_GW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pt_LU/pt_LU.go b/resources/locales/pt_LU/pt_LU.go index ddc844c..c5bc6db 100644 --- a/resources/locales/pt_LU/pt_LU.go +++ b/resources/locales/pt_LU/pt_LU.go @@ -7,15 +7,27 @@ import ( ) type pt_LU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_LU' locale func New() locales.Translator { return &pt_LU{ - locale: "pt_LU", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_LU", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pt_MO/pt_MO.go b/resources/locales/pt_MO/pt_MO.go index 43a2849..5e4b44f 100644 --- a/resources/locales/pt_MO/pt_MO.go +++ b/resources/locales/pt_MO/pt_MO.go @@ -7,15 +7,27 @@ import ( ) type pt_MO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_MO' locale func New() locales.Translator { return &pt_MO{ - locale: "pt_MO", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_MO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pt_MZ/pt_MZ.go b/resources/locales/pt_MZ/pt_MZ.go index 09890b1..2f8b210 100644 --- a/resources/locales/pt_MZ/pt_MZ.go +++ b/resources/locales/pt_MZ/pt_MZ.go @@ -7,15 +7,27 @@ import ( ) type pt_MZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_MZ' locale func New() locales.Translator { return &pt_MZ{ - locale: "pt_MZ", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_MZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/pt_PT/pt_PT.go b/resources/locales/pt_PT/pt_PT.go index b27e1b7..a13a3d0 100644 --- a/resources/locales/pt_PT/pt_PT.go +++ b/resources/locales/pt_PT/pt_PT.go @@ -7,15 +7,27 @@ import ( ) type pt_PT struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_PT' locale func New() locales.Translator { return &pt_PT{ - locale: "pt_PT", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_PT", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pt_ST/pt_ST.go b/resources/locales/pt_ST/pt_ST.go index 1c42948..2771c6c 100644 --- a/resources/locales/pt_ST/pt_ST.go +++ b/resources/locales/pt_ST/pt_ST.go @@ -7,15 +7,27 @@ import ( ) type pt_ST struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_ST' locale func New() locales.Translator { return &pt_ST{ - locale: "pt_ST", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_ST", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/pt_TL/pt_TL.go b/resources/locales/pt_TL/pt_TL.go index 0c7706a..756fbb1 100644 --- a/resources/locales/pt_TL/pt_TL.go +++ b/resources/locales/pt_TL/pt_TL.go @@ -7,15 +7,27 @@ import ( ) type pt_TL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'pt_TL' locale func New() locales.Translator { return &pt_TL{ - locale: "pt_TL", - plurals: []locales.PluralRule{2, 6}, + locale: "pt_TL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/qu/qu.go b/resources/locales/qu/qu.go index f4a3dd8..1e788a1 100644 --- a/resources/locales/qu/qu.go +++ b/resources/locales/qu/qu.go @@ -1,21 +1,29 @@ package qu -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type qu struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'qu' locale func New() locales.Translator { return &qu{ - locale: "qu", - plurals: nil, + locale: "qu", + plurals: nil, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *qu) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'qu' func (t *qu) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/qu_BO/qu_BO.go b/resources/locales/qu_BO/qu_BO.go index a3b5bdc..abc93e2 100644 --- a/resources/locales/qu_BO/qu_BO.go +++ b/resources/locales/qu_BO/qu_BO.go @@ -1,21 +1,29 @@ package qu_BO -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type qu_BO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'qu_BO' locale func New() locales.Translator { return &qu_BO{ - locale: "qu_BO", - plurals: nil, + locale: "qu_BO", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *qu_BO) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'qu_BO' func (t *qu_BO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/qu_EC/qu_EC.go b/resources/locales/qu_EC/qu_EC.go index 6e5297d..75f83a2 100644 --- a/resources/locales/qu_EC/qu_EC.go +++ b/resources/locales/qu_EC/qu_EC.go @@ -1,21 +1,29 @@ package qu_EC -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type qu_EC struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'qu_EC' locale func New() locales.Translator { return &qu_EC{ - locale: "qu_EC", - plurals: nil, + locale: "qu_EC", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *qu_EC) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'qu_EC' func (t *qu_EC) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/qu_PE/qu_PE.go b/resources/locales/qu_PE/qu_PE.go index afbe0e0..36b4de5 100644 --- a/resources/locales/qu_PE/qu_PE.go +++ b/resources/locales/qu_PE/qu_PE.go @@ -1,21 +1,29 @@ package qu_PE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type qu_PE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'qu_PE' locale func New() locales.Translator { return &qu_PE{ - locale: "qu_PE", - plurals: nil, + locale: "qu_PE", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *qu_PE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'qu_PE' func (t *qu_PE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/rm/rm.go b/resources/locales/rm/rm.go index c56e86c..178eaf4 100644 --- a/resources/locales/rm/rm.go +++ b/resources/locales/rm/rm.go @@ -7,15 +7,27 @@ import ( ) type rm struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'rm' locale func New() locales.Translator { return &rm{ - locale: "rm", - plurals: []locales.PluralRule{2, 6}, + locale: "rm", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0xe2, 0x80, 0x99}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/rm_CH/rm_CH.go b/resources/locales/rm_CH/rm_CH.go index 0b29ef5..1a99981 100644 --- a/resources/locales/rm_CH/rm_CH.go +++ b/resources/locales/rm_CH/rm_CH.go @@ -7,15 +7,27 @@ import ( ) type rm_CH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'rm_CH' locale func New() locales.Translator { return &rm_CH{ - locale: "rm_CH", - plurals: []locales.PluralRule{2, 6}, + locale: "rm_CH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x39, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/rn/rn.go b/resources/locales/rn/rn.go index d5b5ec0..62843ea 100644 --- a/resources/locales/rn/rn.go +++ b/resources/locales/rn/rn.go @@ -1,21 +1,29 @@ package rn -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type rn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'rn' locale func New() locales.Translator { return &rn{ - locale: "rn", - plurals: nil, + locale: "rn", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *rn) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rn' func (t *rn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/rn_BI/rn_BI.go b/resources/locales/rn_BI/rn_BI.go index f65c342..01f984d 100644 --- a/resources/locales/rn_BI/rn_BI.go +++ b/resources/locales/rn_BI/rn_BI.go @@ -1,21 +1,29 @@ package rn_BI -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type rn_BI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'rn_BI' locale func New() locales.Translator { return &rn_BI{ - locale: "rn_BI", - plurals: nil, + locale: "rn_BI", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *rn_BI) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rn_BI' func (t *rn_BI) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/ro/ro.go b/resources/locales/ro/ro.go index 53671f7..3594771 100644 --- a/resources/locales/ro/ro.go +++ b/resources/locales/ro/ro.go @@ -7,15 +7,27 @@ import ( ) type ro struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ro' locale func New() locales.Translator { return &ro{ - locale: "ro", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "ro", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ro_MD/ro_MD.go b/resources/locales/ro_MD/ro_MD.go index e2407fc..6af7a02 100644 --- a/resources/locales/ro_MD/ro_MD.go +++ b/resources/locales/ro_MD/ro_MD.go @@ -7,15 +7,27 @@ import ( ) type ro_MD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ro_MD' locale func New() locales.Translator { return &ro_MD{ - locale: "ro_MD", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "ro_MD", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ro_RO/ro_RO.go b/resources/locales/ro_RO/ro_RO.go index 52baba1..a9c1588 100644 --- a/resources/locales/ro_RO/ro_RO.go +++ b/resources/locales/ro_RO/ro_RO.go @@ -7,15 +7,27 @@ import ( ) type ro_RO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ro_RO' locale func New() locales.Translator { return &ro_RO{ - locale: "ro_RO", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "ro_RO", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/rof/rof.go b/resources/locales/rof/rof.go index aef2619..8c5f424 100644 --- a/resources/locales/rof/rof.go +++ b/resources/locales/rof/rof.go @@ -7,15 +7,27 @@ import ( ) type rof struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'rof' locale func New() locales.Translator { return &rof{ - locale: "rof", - plurals: []locales.PluralRule{2, 6}, + locale: "rof", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/rof_TZ/rof_TZ.go b/resources/locales/rof_TZ/rof_TZ.go index b7b7fee..cf9c205 100644 --- a/resources/locales/rof_TZ/rof_TZ.go +++ b/resources/locales/rof_TZ/rof_TZ.go @@ -7,15 +7,27 @@ import ( ) type rof_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'rof_TZ' locale func New() locales.Translator { return &rof_TZ{ - locale: "rof_TZ", - plurals: []locales.PluralRule{2, 6}, + locale: "rof_TZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/root/root.go b/resources/locales/root/root.go index 5cdffe7..f1632eb 100644 --- a/resources/locales/root/root.go +++ b/resources/locales/root/root.go @@ -1,21 +1,29 @@ package root -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type root struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'root' locale func New() locales.Translator { return &root{ - locale: "root", - plurals: []locales.PluralRule{6}, + locale: "root", + plurals: []locales.PluralRule{6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *root) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'root' func (t *root) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ru/ru.go b/resources/locales/ru/ru.go index 447aa13..b331b0b 100644 --- a/resources/locales/ru/ru.go +++ b/resources/locales/ru/ru.go @@ -7,15 +7,27 @@ import ( ) type ru struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ru' locale func New() locales.Translator { return &ru{ - locale: "ru", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "ru", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ru_BY/ru_BY.go b/resources/locales/ru_BY/ru_BY.go index b0109f3..758fea0 100644 --- a/resources/locales/ru_BY/ru_BY.go +++ b/resources/locales/ru_BY/ru_BY.go @@ -7,15 +7,27 @@ import ( ) type ru_BY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ru_BY' locale func New() locales.Translator { return &ru_BY{ - locale: "ru_BY", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "ru_BY", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ru_KG/ru_KG.go b/resources/locales/ru_KG/ru_KG.go index 0c77b94..be92dba 100644 --- a/resources/locales/ru_KG/ru_KG.go +++ b/resources/locales/ru_KG/ru_KG.go @@ -7,15 +7,27 @@ import ( ) type ru_KG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ru_KG' locale func New() locales.Translator { return &ru_KG{ - locale: "ru_KG", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "ru_KG", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ru_KZ/ru_KZ.go b/resources/locales/ru_KZ/ru_KZ.go index 33805e8..79aa3ca 100644 --- a/resources/locales/ru_KZ/ru_KZ.go +++ b/resources/locales/ru_KZ/ru_KZ.go @@ -7,15 +7,27 @@ import ( ) type ru_KZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ru_KZ' locale func New() locales.Translator { return &ru_KZ{ - locale: "ru_KZ", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "ru_KZ", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ru_MD/ru_MD.go b/resources/locales/ru_MD/ru_MD.go index 001b67e..4ddf91c 100644 --- a/resources/locales/ru_MD/ru_MD.go +++ b/resources/locales/ru_MD/ru_MD.go @@ -7,15 +7,27 @@ import ( ) type ru_MD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ru_MD' locale func New() locales.Translator { return &ru_MD{ - locale: "ru_MD", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "ru_MD", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ru_RU/ru_RU.go b/resources/locales/ru_RU/ru_RU.go index e770960..6d81e27 100644 --- a/resources/locales/ru_RU/ru_RU.go +++ b/resources/locales/ru_RU/ru_RU.go @@ -7,15 +7,27 @@ import ( ) type ru_RU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ru_RU' locale func New() locales.Translator { return &ru_RU{ - locale: "ru_RU", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "ru_RU", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ru_UA/ru_UA.go b/resources/locales/ru_UA/ru_UA.go index 04ab6cd..00c0e79 100644 --- a/resources/locales/ru_UA/ru_UA.go +++ b/resources/locales/ru_UA/ru_UA.go @@ -7,15 +7,27 @@ import ( ) type ru_UA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ru_UA' locale func New() locales.Translator { return &ru_UA{ - locale: "ru_UA", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "ru_UA", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/rw/rw.go b/resources/locales/rw/rw.go index 98f89b5..52e5add 100644 --- a/resources/locales/rw/rw.go +++ b/resources/locales/rw/rw.go @@ -1,21 +1,29 @@ package rw -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type rw struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'rw' locale func New() locales.Translator { return &rw{ - locale: "rw", - plurals: nil, + locale: "rw", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *rw) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rw' func (t *rw) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/rw_RW/rw_RW.go b/resources/locales/rw_RW/rw_RW.go index 64120fd..7475d28 100644 --- a/resources/locales/rw_RW/rw_RW.go +++ b/resources/locales/rw_RW/rw_RW.go @@ -1,21 +1,29 @@ package rw_RW -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type rw_RW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'rw_RW' locale func New() locales.Translator { return &rw_RW{ - locale: "rw_RW", - plurals: nil, + locale: "rw_RW", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *rw_RW) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'rw_RW' func (t *rw_RW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/rwk/rwk.go b/resources/locales/rwk/rwk.go index c180133..d267a89 100644 --- a/resources/locales/rwk/rwk.go +++ b/resources/locales/rwk/rwk.go @@ -7,15 +7,27 @@ import ( ) type rwk struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'rwk' locale func New() locales.Translator { return &rwk{ - locale: "rwk", - plurals: []locales.PluralRule{2, 6}, + locale: "rwk", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/rwk_TZ/rwk_TZ.go b/resources/locales/rwk_TZ/rwk_TZ.go index 77d5ac6..5911112 100644 --- a/resources/locales/rwk_TZ/rwk_TZ.go +++ b/resources/locales/rwk_TZ/rwk_TZ.go @@ -7,15 +7,27 @@ import ( ) type rwk_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'rwk_TZ' locale func New() locales.Translator { return &rwk_TZ{ - locale: "rwk_TZ", - plurals: []locales.PluralRule{2, 6}, + locale: "rwk_TZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sah/sah.go b/resources/locales/sah/sah.go index a3922eb..a3723ba 100644 --- a/resources/locales/sah/sah.go +++ b/resources/locales/sah/sah.go @@ -1,21 +1,29 @@ package sah -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type sah struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sah' locale func New() locales.Translator { return &sah{ - locale: "sah", - plurals: []locales.PluralRule{6}, + locale: "sah", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *sah) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sah' func (t *sah) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/sah_RU/sah_RU.go b/resources/locales/sah_RU/sah_RU.go index 6e35017..9f631ef 100644 --- a/resources/locales/sah_RU/sah_RU.go +++ b/resources/locales/sah_RU/sah_RU.go @@ -1,21 +1,29 @@ package sah_RU -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type sah_RU struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sah_RU' locale func New() locales.Translator { return &sah_RU{ - locale: "sah_RU", - plurals: []locales.PluralRule{6}, + locale: "sah_RU", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *sah_RU) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sah_RU' func (t *sah_RU) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/saq/saq.go b/resources/locales/saq/saq.go index 9dc76ad..cfca641 100644 --- a/resources/locales/saq/saq.go +++ b/resources/locales/saq/saq.go @@ -7,15 +7,27 @@ import ( ) type saq struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'saq' locale func New() locales.Translator { return &saq{ - locale: "saq", - plurals: []locales.PluralRule{2, 6}, + locale: "saq", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/saq_KE/saq_KE.go b/resources/locales/saq_KE/saq_KE.go index 8242bde..84346b1 100644 --- a/resources/locales/saq_KE/saq_KE.go +++ b/resources/locales/saq_KE/saq_KE.go @@ -7,15 +7,27 @@ import ( ) type saq_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'saq_KE' locale func New() locales.Translator { return &saq_KE{ - locale: "saq_KE", - plurals: []locales.PluralRule{2, 6}, + locale: "saq_KE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sbp/sbp.go b/resources/locales/sbp/sbp.go index 1767a2f..85f0884 100644 --- a/resources/locales/sbp/sbp.go +++ b/resources/locales/sbp/sbp.go @@ -1,21 +1,29 @@ package sbp -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type sbp struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sbp' locale func New() locales.Translator { return &sbp{ - locale: "sbp", - plurals: nil, + locale: "sbp", + plurals: nil, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *sbp) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sbp' func (t *sbp) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/sbp_TZ/sbp_TZ.go b/resources/locales/sbp_TZ/sbp_TZ.go index 3de5719..7ef8c86 100644 --- a/resources/locales/sbp_TZ/sbp_TZ.go +++ b/resources/locales/sbp_TZ/sbp_TZ.go @@ -1,21 +1,29 @@ package sbp_TZ -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type sbp_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sbp_TZ' locale func New() locales.Translator { return &sbp_TZ{ - locale: "sbp_TZ", - plurals: nil, + locale: "sbp_TZ", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *sbp_TZ) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sbp_TZ' func (t *sbp_TZ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/se/se.go b/resources/locales/se/se.go index f100177..0576569 100644 --- a/resources/locales/se/se.go +++ b/resources/locales/se/se.go @@ -7,15 +7,27 @@ import ( ) type se struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'se' locale func New() locales.Translator { return &se{ - locale: "se", - plurals: []locales.PluralRule{2, 3, 6}, + locale: "se", + plurals: []locales.PluralRule{2, 3, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0xe2, 0x88, 0x92}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/se_FI/se_FI.go b/resources/locales/se_FI/se_FI.go index 4ff28d8..bdf89dd 100644 --- a/resources/locales/se_FI/se_FI.go +++ b/resources/locales/se_FI/se_FI.go @@ -7,15 +7,27 @@ import ( ) type se_FI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'se_FI' locale func New() locales.Translator { return &se_FI{ - locale: "se_FI", - plurals: []locales.PluralRule{2, 3, 6}, + locale: "se_FI", + plurals: []locales.PluralRule{2, 3, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/se_NO/se_NO.go b/resources/locales/se_NO/se_NO.go index 1739b2c..10026ac 100644 --- a/resources/locales/se_NO/se_NO.go +++ b/resources/locales/se_NO/se_NO.go @@ -7,15 +7,27 @@ import ( ) type se_NO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'se_NO' locale func New() locales.Translator { return &se_NO{ - locale: "se_NO", - plurals: []locales.PluralRule{2, 3, 6}, + locale: "se_NO", + plurals: []locales.PluralRule{2, 3, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/se_SE/se_SE.go b/resources/locales/se_SE/se_SE.go index 1cf0b83..a27341e 100644 --- a/resources/locales/se_SE/se_SE.go +++ b/resources/locales/se_SE/se_SE.go @@ -7,15 +7,27 @@ import ( ) type se_SE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'se_SE' locale func New() locales.Translator { return &se_SE{ - locale: "se_SE", - plurals: []locales.PluralRule{2, 3, 6}, + locale: "se_SE", + plurals: []locales.PluralRule{2, 3, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/seh/seh.go b/resources/locales/seh/seh.go index 4256568..a2ce0f8 100644 --- a/resources/locales/seh/seh.go +++ b/resources/locales/seh/seh.go @@ -7,15 +7,27 @@ import ( ) type seh struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'seh' locale func New() locales.Translator { return &seh{ - locale: "seh", - plurals: []locales.PluralRule{2, 6}, + locale: "seh", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/seh_MZ/seh_MZ.go b/resources/locales/seh_MZ/seh_MZ.go index a2e5a11..416faa0 100644 --- a/resources/locales/seh_MZ/seh_MZ.go +++ b/resources/locales/seh_MZ/seh_MZ.go @@ -7,15 +7,27 @@ import ( ) type seh_MZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'seh_MZ' locale func New() locales.Translator { return &seh_MZ{ - locale: "seh_MZ", - plurals: []locales.PluralRule{2, 6}, + locale: "seh_MZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ses/ses.go b/resources/locales/ses/ses.go index 93aa1ea..c8f3801 100644 --- a/resources/locales/ses/ses.go +++ b/resources/locales/ses/ses.go @@ -1,21 +1,29 @@ package ses -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ses struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ses' locale func New() locales.Translator { return &ses{ - locale: "ses", - plurals: []locales.PluralRule{6}, + locale: "ses", + plurals: []locales.PluralRule{6}, + decimal: []byte{}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *ses) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ses' func (t *ses) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ses_ML/ses_ML.go b/resources/locales/ses_ML/ses_ML.go index 74f71fc..34aa67c 100644 --- a/resources/locales/ses_ML/ses_ML.go +++ b/resources/locales/ses_ML/ses_ML.go @@ -1,21 +1,29 @@ package ses_ML -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type ses_ML struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ses_ML' locale func New() locales.Translator { return &ses_ML{ - locale: "ses_ML", - plurals: []locales.PluralRule{6}, + locale: "ses_ML", + plurals: []locales.PluralRule{6}, + decimal: []byte{}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *ses_ML) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'ses_ML' func (t *ses_ML) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/sg/sg.go b/resources/locales/sg/sg.go index 3135c04..043a392 100644 --- a/resources/locales/sg/sg.go +++ b/resources/locales/sg/sg.go @@ -1,21 +1,29 @@ package sg -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type sg struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sg' locale func New() locales.Translator { return &sg{ - locale: "sg", - plurals: []locales.PluralRule{6}, + locale: "sg", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *sg) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sg' func (t *sg) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/sg_CF/sg_CF.go b/resources/locales/sg_CF/sg_CF.go index 77ed4f2..0123212 100644 --- a/resources/locales/sg_CF/sg_CF.go +++ b/resources/locales/sg_CF/sg_CF.go @@ -1,21 +1,29 @@ package sg_CF -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type sg_CF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sg_CF' locale func New() locales.Translator { return &sg_CF{ - locale: "sg_CF", - plurals: []locales.PluralRule{6}, + locale: "sg_CF", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *sg_CF) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'sg_CF' func (t *sg_CF) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/shi/shi.go b/resources/locales/shi/shi.go index 0e54cea..9f8c64d 100644 --- a/resources/locales/shi/shi.go +++ b/resources/locales/shi/shi.go @@ -7,15 +7,27 @@ import ( ) type shi struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'shi' locale func New() locales.Translator { return &shi{ - locale: "shi", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "shi", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/shi_Latn/shi_Latn.go b/resources/locales/shi_Latn/shi_Latn.go index c115120..7e6ab84 100644 --- a/resources/locales/shi_Latn/shi_Latn.go +++ b/resources/locales/shi_Latn/shi_Latn.go @@ -7,15 +7,27 @@ import ( ) type shi_Latn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'shi_Latn' locale func New() locales.Translator { return &shi_Latn{ - locale: "shi_Latn", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "shi_Latn", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/shi_Latn_MA/shi_Latn_MA.go b/resources/locales/shi_Latn_MA/shi_Latn_MA.go index f685b97..eabeb14 100644 --- a/resources/locales/shi_Latn_MA/shi_Latn_MA.go +++ b/resources/locales/shi_Latn_MA/shi_Latn_MA.go @@ -7,15 +7,27 @@ import ( ) type shi_Latn_MA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'shi_Latn_MA' locale func New() locales.Translator { return &shi_Latn_MA{ - locale: "shi_Latn_MA", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "shi_Latn_MA", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/shi_Tfng/shi_Tfng.go b/resources/locales/shi_Tfng/shi_Tfng.go index 4232468..5264965 100644 --- a/resources/locales/shi_Tfng/shi_Tfng.go +++ b/resources/locales/shi_Tfng/shi_Tfng.go @@ -7,15 +7,27 @@ import ( ) type shi_Tfng struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'shi_Tfng' locale func New() locales.Translator { return &shi_Tfng{ - locale: "shi_Tfng", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "shi_Tfng", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go b/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go index 14ba3af..69100ca 100644 --- a/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go +++ b/resources/locales/shi_Tfng_MA/shi_Tfng_MA.go @@ -7,15 +7,27 @@ import ( ) type shi_Tfng_MA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'shi_Tfng_MA' locale func New() locales.Translator { return &shi_Tfng_MA{ - locale: "shi_Tfng_MA", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "shi_Tfng_MA", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/si/si.go b/resources/locales/si/si.go index 0abf277..237f8ff 100644 --- a/resources/locales/si/si.go +++ b/resources/locales/si/si.go @@ -7,15 +7,27 @@ import ( ) type si struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'si' locale func New() locales.Translator { return &si{ - locale: "si", - plurals: []locales.PluralRule{2, 6}, + locale: "si", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/si_LK/si_LK.go b/resources/locales/si_LK/si_LK.go index 2e744e9..4a48391 100644 --- a/resources/locales/si_LK/si_LK.go +++ b/resources/locales/si_LK/si_LK.go @@ -7,15 +7,27 @@ import ( ) type si_LK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'si_LK' locale func New() locales.Translator { return &si_LK{ - locale: "si_LK", - plurals: []locales.PluralRule{2, 6}, + locale: "si_LK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sk/sk.go b/resources/locales/sk/sk.go index cb2a1a6..e2dc143 100644 --- a/resources/locales/sk/sk.go +++ b/resources/locales/sk/sk.go @@ -7,15 +7,27 @@ import ( ) type sk struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sk' locale func New() locales.Translator { return &sk{ - locale: "sk", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "sk", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/sk_SK/sk_SK.go b/resources/locales/sk_SK/sk_SK.go index bfecf2b..aec87c6 100644 --- a/resources/locales/sk_SK/sk_SK.go +++ b/resources/locales/sk_SK/sk_SK.go @@ -7,15 +7,27 @@ import ( ) type sk_SK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sk_SK' locale func New() locales.Translator { return &sk_SK{ - locale: "sk_SK", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "sk_SK", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sl/sl.go b/resources/locales/sl/sl.go index 4d513f4..41f7044 100644 --- a/resources/locales/sl/sl.go +++ b/resources/locales/sl/sl.go @@ -7,15 +7,27 @@ import ( ) type sl struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sl' locale func New() locales.Translator { return &sl{ - locale: "sl", - plurals: []locales.PluralRule{2, 3, 4, 6}, + locale: "sl", + plurals: []locales.PluralRule{2, 3, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/sl_SI/sl_SI.go b/resources/locales/sl_SI/sl_SI.go index df8d440..14f739c 100644 --- a/resources/locales/sl_SI/sl_SI.go +++ b/resources/locales/sl_SI/sl_SI.go @@ -7,15 +7,27 @@ import ( ) type sl_SI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sl_SI' locale func New() locales.Translator { return &sl_SI{ - locale: "sl_SI", - plurals: []locales.PluralRule{2, 3, 4, 6}, + locale: "sl_SI", + plurals: []locales.PluralRule{2, 3, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/smn/smn.go b/resources/locales/smn/smn.go index 07c3d27..a3e8862 100644 --- a/resources/locales/smn/smn.go +++ b/resources/locales/smn/smn.go @@ -7,15 +7,27 @@ import ( ) type smn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'smn' locale func New() locales.Translator { return &smn{ - locale: "smn", - plurals: []locales.PluralRule{2, 3, 6}, + locale: "smn", + plurals: []locales.PluralRule{2, 3, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/smn_FI/smn_FI.go b/resources/locales/smn_FI/smn_FI.go index 4fa61c6..a2d586d 100644 --- a/resources/locales/smn_FI/smn_FI.go +++ b/resources/locales/smn_FI/smn_FI.go @@ -7,15 +7,27 @@ import ( ) type smn_FI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'smn_FI' locale func New() locales.Translator { return &smn_FI{ - locale: "smn_FI", - plurals: []locales.PluralRule{2, 3, 6}, + locale: "smn_FI", + plurals: []locales.PluralRule{2, 3, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sn/sn.go b/resources/locales/sn/sn.go index 1ddb7e5..08d32a7 100644 --- a/resources/locales/sn/sn.go +++ b/resources/locales/sn/sn.go @@ -7,15 +7,27 @@ import ( ) type sn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sn' locale func New() locales.Translator { return &sn{ - locale: "sn", - plurals: []locales.PluralRule{2, 6}, + locale: "sn", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/sn_ZW/sn_ZW.go b/resources/locales/sn_ZW/sn_ZW.go index 062c776..e5b4668 100644 --- a/resources/locales/sn_ZW/sn_ZW.go +++ b/resources/locales/sn_ZW/sn_ZW.go @@ -7,15 +7,27 @@ import ( ) type sn_ZW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sn_ZW' locale func New() locales.Translator { return &sn_ZW{ - locale: "sn_ZW", - plurals: []locales.PluralRule{2, 6}, + locale: "sn_ZW", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/so/so.go b/resources/locales/so/so.go index 50a16b3..b8976fc 100644 --- a/resources/locales/so/so.go +++ b/resources/locales/so/so.go @@ -7,15 +7,27 @@ import ( ) type so struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'so' locale func New() locales.Translator { return &so{ - locale: "so", - plurals: []locales.PluralRule{2, 6}, + locale: "so", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/so_DJ/so_DJ.go b/resources/locales/so_DJ/so_DJ.go index f1f286b..50b7655 100644 --- a/resources/locales/so_DJ/so_DJ.go +++ b/resources/locales/so_DJ/so_DJ.go @@ -7,15 +7,27 @@ import ( ) type so_DJ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'so_DJ' locale func New() locales.Translator { return &so_DJ{ - locale: "so_DJ", - plurals: []locales.PluralRule{2, 6}, + locale: "so_DJ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/so_ET/so_ET.go b/resources/locales/so_ET/so_ET.go index bbd147d..65dd07d 100644 --- a/resources/locales/so_ET/so_ET.go +++ b/resources/locales/so_ET/so_ET.go @@ -7,15 +7,27 @@ import ( ) type so_ET struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'so_ET' locale func New() locales.Translator { return &so_ET{ - locale: "so_ET", - plurals: []locales.PluralRule{2, 6}, + locale: "so_ET", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/so_KE/so_KE.go b/resources/locales/so_KE/so_KE.go index d6f3bd0..e10eeda 100644 --- a/resources/locales/so_KE/so_KE.go +++ b/resources/locales/so_KE/so_KE.go @@ -7,15 +7,27 @@ import ( ) type so_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'so_KE' locale func New() locales.Translator { return &so_KE{ - locale: "so_KE", - plurals: []locales.PluralRule{2, 6}, + locale: "so_KE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/so_SO/so_SO.go b/resources/locales/so_SO/so_SO.go index 750208d..bc349c1 100644 --- a/resources/locales/so_SO/so_SO.go +++ b/resources/locales/so_SO/so_SO.go @@ -7,15 +7,27 @@ import ( ) type so_SO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'so_SO' locale func New() locales.Translator { return &so_SO{ - locale: "so_SO", - plurals: []locales.PluralRule{2, 6}, + locale: "so_SO", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/sq/sq.go b/resources/locales/sq/sq.go index c2ae790..9f9b3d9 100644 --- a/resources/locales/sq/sq.go +++ b/resources/locales/sq/sq.go @@ -7,15 +7,27 @@ import ( ) type sq struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sq' locale func New() locales.Translator { return &sq{ - locale: "sq", - plurals: []locales.PluralRule{2, 6}, + locale: "sq", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/sq_AL/sq_AL.go b/resources/locales/sq_AL/sq_AL.go index d5171fb..2e176a5 100644 --- a/resources/locales/sq_AL/sq_AL.go +++ b/resources/locales/sq_AL/sq_AL.go @@ -7,15 +7,27 @@ import ( ) type sq_AL struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sq_AL' locale func New() locales.Translator { return &sq_AL{ - locale: "sq_AL", - plurals: []locales.PluralRule{2, 6}, + locale: "sq_AL", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/sq_MK/sq_MK.go b/resources/locales/sq_MK/sq_MK.go index 685c95a..fce0ff3 100644 --- a/resources/locales/sq_MK/sq_MK.go +++ b/resources/locales/sq_MK/sq_MK.go @@ -7,15 +7,27 @@ import ( ) type sq_MK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sq_MK' locale func New() locales.Translator { return &sq_MK{ - locale: "sq_MK", - plurals: []locales.PluralRule{2, 6}, + locale: "sq_MK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sq_XK/sq_XK.go b/resources/locales/sq_XK/sq_XK.go index 7265bcc..f4343de 100644 --- a/resources/locales/sq_XK/sq_XK.go +++ b/resources/locales/sq_XK/sq_XK.go @@ -7,15 +7,27 @@ import ( ) type sq_XK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sq_XK' locale func New() locales.Translator { return &sq_XK{ - locale: "sq_XK", - plurals: []locales.PluralRule{2, 6}, + locale: "sq_XK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/sr/sr.go b/resources/locales/sr/sr.go index 5645d06..737e496 100644 --- a/resources/locales/sr/sr.go +++ b/resources/locales/sr/sr.go @@ -7,15 +7,27 @@ import ( ) type sr struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr' locale func New() locales.Translator { return &sr{ - locale: "sr", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/sr_Cyrl/sr_Cyrl.go b/resources/locales/sr_Cyrl/sr_Cyrl.go index 278d31e..b83a489 100644 --- a/resources/locales/sr_Cyrl/sr_Cyrl.go +++ b/resources/locales/sr_Cyrl/sr_Cyrl.go @@ -7,15 +7,27 @@ import ( ) type sr_Cyrl struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr_Cyrl' locale func New() locales.Translator { return &sr_Cyrl{ - locale: "sr_Cyrl", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr_Cyrl", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go b/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go index 75a96a4..cdb88ef 100644 --- a/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go +++ b/resources/locales/sr_Cyrl_BA/sr_Cyrl_BA.go @@ -7,15 +7,27 @@ import ( ) type sr_Cyrl_BA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr_Cyrl_BA' locale func New() locales.Translator { return &sr_Cyrl_BA{ - locale: "sr_Cyrl_BA", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr_Cyrl_BA", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go b/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go index ba3867d..7036a7b 100644 --- a/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go +++ b/resources/locales/sr_Cyrl_ME/sr_Cyrl_ME.go @@ -7,15 +7,27 @@ import ( ) type sr_Cyrl_ME struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr_Cyrl_ME' locale func New() locales.Translator { return &sr_Cyrl_ME{ - locale: "sr_Cyrl_ME", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr_Cyrl_ME", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go b/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go index 469fe20..52185c8 100644 --- a/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go +++ b/resources/locales/sr_Cyrl_RS/sr_Cyrl_RS.go @@ -7,15 +7,27 @@ import ( ) type sr_Cyrl_RS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr_Cyrl_RS' locale func New() locales.Translator { return &sr_Cyrl_RS{ - locale: "sr_Cyrl_RS", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr_Cyrl_RS", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go b/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go index a05829d..16dd3e6 100644 --- a/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go +++ b/resources/locales/sr_Cyrl_XK/sr_Cyrl_XK.go @@ -7,15 +7,27 @@ import ( ) type sr_Cyrl_XK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr_Cyrl_XK' locale func New() locales.Translator { return &sr_Cyrl_XK{ - locale: "sr_Cyrl_XK", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr_Cyrl_XK", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sr_Latn/sr_Latn.go b/resources/locales/sr_Latn/sr_Latn.go index 062b485..b09d5e0 100644 --- a/resources/locales/sr_Latn/sr_Latn.go +++ b/resources/locales/sr_Latn/sr_Latn.go @@ -7,15 +7,27 @@ import ( ) type sr_Latn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr_Latn' locale func New() locales.Translator { return &sr_Latn{ - locale: "sr_Latn", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr_Latn", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/sr_Latn_BA/sr_Latn_BA.go b/resources/locales/sr_Latn_BA/sr_Latn_BA.go index bd4d855..295b321 100644 --- a/resources/locales/sr_Latn_BA/sr_Latn_BA.go +++ b/resources/locales/sr_Latn_BA/sr_Latn_BA.go @@ -7,15 +7,27 @@ import ( ) type sr_Latn_BA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr_Latn_BA' locale func New() locales.Translator { return &sr_Latn_BA{ - locale: "sr_Latn_BA", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr_Latn_BA", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/sr_Latn_ME/sr_Latn_ME.go b/resources/locales/sr_Latn_ME/sr_Latn_ME.go index 0215a66..594d2e8 100644 --- a/resources/locales/sr_Latn_ME/sr_Latn_ME.go +++ b/resources/locales/sr_Latn_ME/sr_Latn_ME.go @@ -7,15 +7,27 @@ import ( ) type sr_Latn_ME struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr_Latn_ME' locale func New() locales.Translator { return &sr_Latn_ME{ - locale: "sr_Latn_ME", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr_Latn_ME", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/sr_Latn_RS/sr_Latn_RS.go b/resources/locales/sr_Latn_RS/sr_Latn_RS.go index d38146b..f7e0661 100644 --- a/resources/locales/sr_Latn_RS/sr_Latn_RS.go +++ b/resources/locales/sr_Latn_RS/sr_Latn_RS.go @@ -7,15 +7,27 @@ import ( ) type sr_Latn_RS struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr_Latn_RS' locale func New() locales.Translator { return &sr_Latn_RS{ - locale: "sr_Latn_RS", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr_Latn_RS", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/sr_Latn_XK/sr_Latn_XK.go b/resources/locales/sr_Latn_XK/sr_Latn_XK.go index 2f7aeb0..0e8d8a3 100644 --- a/resources/locales/sr_Latn_XK/sr_Latn_XK.go +++ b/resources/locales/sr_Latn_XK/sr_Latn_XK.go @@ -7,15 +7,27 @@ import ( ) type sr_Latn_XK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sr_Latn_XK' locale func New() locales.Translator { return &sr_Latn_XK{ - locale: "sr_Latn_XK", - plurals: []locales.PluralRule{2, 4, 6}, + locale: "sr_Latn_XK", + plurals: []locales.PluralRule{2, 4, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/sv/sv.go b/resources/locales/sv/sv.go index cddb462..c0a3c96 100644 --- a/resources/locales/sv/sv.go +++ b/resources/locales/sv/sv.go @@ -7,15 +7,27 @@ import ( ) type sv struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sv' locale func New() locales.Translator { return &sv{ - locale: "sv", - plurals: []locales.PluralRule{2, 6}, + locale: "sv", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{0xe2, 0x80, 0x8f, 0xe2, 0x88, 0x92}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/sv_AX/sv_AX.go b/resources/locales/sv_AX/sv_AX.go index fb33dc9..8322467 100644 --- a/resources/locales/sv_AX/sv_AX.go +++ b/resources/locales/sv_AX/sv_AX.go @@ -7,15 +7,27 @@ import ( ) type sv_AX struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sv_AX' locale func New() locales.Translator { return &sv_AX{ - locale: "sv_AX", - plurals: []locales.PluralRule{2, 6}, + locale: "sv_AX", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/sv_FI/sv_FI.go b/resources/locales/sv_FI/sv_FI.go index 552c600..569a9c7 100644 --- a/resources/locales/sv_FI/sv_FI.go +++ b/resources/locales/sv_FI/sv_FI.go @@ -7,15 +7,27 @@ import ( ) type sv_FI struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sv_FI' locale func New() locales.Translator { return &sv_FI{ - locale: "sv_FI", - plurals: []locales.PluralRule{2, 6}, + locale: "sv_FI", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/sv_SE/sv_SE.go b/resources/locales/sv_SE/sv_SE.go index 5207af4..f25f4f7 100644 --- a/resources/locales/sv_SE/sv_SE.go +++ b/resources/locales/sv_SE/sv_SE.go @@ -7,15 +7,27 @@ import ( ) type sv_SE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sv_SE' locale func New() locales.Translator { return &sv_SE{ - locale: "sv_SE", - plurals: []locales.PluralRule{2, 6}, + locale: "sv_SE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x66, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x32, 0x7d}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/sw/sw.go b/resources/locales/sw/sw.go index 8d9609d..e536878 100644 --- a/resources/locales/sw/sw.go +++ b/resources/locales/sw/sw.go @@ -7,15 +7,27 @@ import ( ) type sw struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sw' locale func New() locales.Translator { return &sw{ - locale: "sw", - plurals: []locales.PluralRule{2, 6}, + locale: "sw", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/sw_CD/sw_CD.go b/resources/locales/sw_CD/sw_CD.go index e2e1593..f4a5712 100644 --- a/resources/locales/sw_CD/sw_CD.go +++ b/resources/locales/sw_CD/sw_CD.go @@ -7,15 +7,27 @@ import ( ) type sw_CD struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sw_CD' locale func New() locales.Translator { return &sw_CD{ - locale: "sw_CD", - plurals: []locales.PluralRule{2, 6}, + locale: "sw_CD", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/sw_KE/sw_KE.go b/resources/locales/sw_KE/sw_KE.go index 1083be7..43f91e8 100644 --- a/resources/locales/sw_KE/sw_KE.go +++ b/resources/locales/sw_KE/sw_KE.go @@ -7,15 +7,27 @@ import ( ) type sw_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sw_KE' locale func New() locales.Translator { return &sw_KE{ - locale: "sw_KE", - plurals: []locales.PluralRule{2, 6}, + locale: "sw_KE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/sw_TZ/sw_TZ.go b/resources/locales/sw_TZ/sw_TZ.go index 32adc77..f1b90b6 100644 --- a/resources/locales/sw_TZ/sw_TZ.go +++ b/resources/locales/sw_TZ/sw_TZ.go @@ -7,15 +7,27 @@ import ( ) type sw_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sw_TZ' locale func New() locales.Translator { return &sw_TZ{ - locale: "sw_TZ", - plurals: []locales.PluralRule{2, 6}, + locale: "sw_TZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/sw_UG/sw_UG.go b/resources/locales/sw_UG/sw_UG.go index ffd639a..fa3c03c 100644 --- a/resources/locales/sw_UG/sw_UG.go +++ b/resources/locales/sw_UG/sw_UG.go @@ -7,15 +7,27 @@ import ( ) type sw_UG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'sw_UG' locale func New() locales.Translator { return &sw_UG{ - locale: "sw_UG", - plurals: []locales.PluralRule{2, 6}, + locale: "sw_UG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ta/ta.go b/resources/locales/ta/ta.go index 9b4cf21..2f09d80 100644 --- a/resources/locales/ta/ta.go +++ b/resources/locales/ta/ta.go @@ -7,15 +7,27 @@ import ( ) type ta struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ta' locale func New() locales.Translator { return &ta{ - locale: "ta", - plurals: []locales.PluralRule{2, 6}, + locale: "ta", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ta_IN/ta_IN.go b/resources/locales/ta_IN/ta_IN.go index 5665918..55692ed 100644 --- a/resources/locales/ta_IN/ta_IN.go +++ b/resources/locales/ta_IN/ta_IN.go @@ -7,15 +7,27 @@ import ( ) type ta_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ta_IN' locale func New() locales.Translator { return &ta_IN{ - locale: "ta_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "ta_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ta_LK/ta_LK.go b/resources/locales/ta_LK/ta_LK.go index eeeab14..01d192d 100644 --- a/resources/locales/ta_LK/ta_LK.go +++ b/resources/locales/ta_LK/ta_LK.go @@ -7,15 +7,27 @@ import ( ) type ta_LK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ta_LK' locale func New() locales.Translator { return &ta_LK{ - locale: "ta_LK", - plurals: []locales.PluralRule{2, 6}, + locale: "ta_LK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/ta_MY/ta_MY.go b/resources/locales/ta_MY/ta_MY.go index 244e31c..2c70072 100644 --- a/resources/locales/ta_MY/ta_MY.go +++ b/resources/locales/ta_MY/ta_MY.go @@ -7,15 +7,27 @@ import ( ) type ta_MY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ta_MY' locale func New() locales.Translator { return &ta_MY{ - locale: "ta_MY", - plurals: []locales.PluralRule{2, 6}, + locale: "ta_MY", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ta_SG/ta_SG.go b/resources/locales/ta_SG/ta_SG.go index 2b86ccf..67ad6e9 100644 --- a/resources/locales/ta_SG/ta_SG.go +++ b/resources/locales/ta_SG/ta_SG.go @@ -7,15 +7,27 @@ import ( ) type ta_SG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ta_SG' locale func New() locales.Translator { return &ta_SG{ - locale: "ta_SG", - plurals: []locales.PluralRule{2, 6}, + locale: "ta_SG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/te/te.go b/resources/locales/te/te.go index 5aaa40a..bb87645 100644 --- a/resources/locales/te/te.go +++ b/resources/locales/te/te.go @@ -7,15 +7,27 @@ import ( ) type te struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'te' locale func New() locales.Translator { return &te{ - locale: "te", - plurals: []locales.PluralRule{2, 6}, + locale: "te", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/te_IN/te_IN.go b/resources/locales/te_IN/te_IN.go index c257311..5396bd9 100644 --- a/resources/locales/te_IN/te_IN.go +++ b/resources/locales/te_IN/te_IN.go @@ -7,15 +7,27 @@ import ( ) type te_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'te_IN' locale func New() locales.Translator { return &te_IN{ - locale: "te_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "te_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/teo/teo.go b/resources/locales/teo/teo.go index c4de182..868e855 100644 --- a/resources/locales/teo/teo.go +++ b/resources/locales/teo/teo.go @@ -7,15 +7,27 @@ import ( ) type teo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'teo' locale func New() locales.Translator { return &teo{ - locale: "teo", - plurals: []locales.PluralRule{2, 6}, + locale: "teo", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/teo_KE/teo_KE.go b/resources/locales/teo_KE/teo_KE.go index 50c3448..617ac09 100644 --- a/resources/locales/teo_KE/teo_KE.go +++ b/resources/locales/teo_KE/teo_KE.go @@ -7,15 +7,27 @@ import ( ) type teo_KE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'teo_KE' locale func New() locales.Translator { return &teo_KE{ - locale: "teo_KE", - plurals: []locales.PluralRule{2, 6}, + locale: "teo_KE", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/teo_UG/teo_UG.go b/resources/locales/teo_UG/teo_UG.go index 1cac8d0..e97f6aa 100644 --- a/resources/locales/teo_UG/teo_UG.go +++ b/resources/locales/teo_UG/teo_UG.go @@ -7,15 +7,27 @@ import ( ) type teo_UG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'teo_UG' locale func New() locales.Translator { return &teo_UG{ - locale: "teo_UG", - plurals: []locales.PluralRule{2, 6}, + locale: "teo_UG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/th/th.go b/resources/locales/th/th.go index 3f110c0..f6e0d39 100644 --- a/resources/locales/th/th.go +++ b/resources/locales/th/th.go @@ -1,21 +1,29 @@ package th -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type th struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'th' locale func New() locales.Translator { return &th{ - locale: "th", - plurals: []locales.PluralRule{6}, + locale: "th", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *th) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'th' func (t *th) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/th_TH/th_TH.go b/resources/locales/th_TH/th_TH.go index 1500a88..719fdca 100644 --- a/resources/locales/th_TH/th_TH.go +++ b/resources/locales/th_TH/th_TH.go @@ -1,21 +1,29 @@ package th_TH -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type th_TH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'th_TH' locale func New() locales.Translator { return &th_TH{ - locale: "th_TH", - plurals: []locales.PluralRule{6}, + locale: "th_TH", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *th_TH) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'th_TH' func (t *th_TH) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/ti/ti.go b/resources/locales/ti/ti.go index f9f2d76..0747f17 100644 --- a/resources/locales/ti/ti.go +++ b/resources/locales/ti/ti.go @@ -7,15 +7,27 @@ import ( ) type ti struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ti' locale func New() locales.Translator { return &ti{ - locale: "ti", - plurals: []locales.PluralRule{2, 6}, + locale: "ti", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ti_ER/ti_ER.go b/resources/locales/ti_ER/ti_ER.go index df0d458..a957f2d 100644 --- a/resources/locales/ti_ER/ti_ER.go +++ b/resources/locales/ti_ER/ti_ER.go @@ -7,15 +7,27 @@ import ( ) type ti_ER struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ti_ER' locale func New() locales.Translator { return &ti_ER{ - locale: "ti_ER", - plurals: []locales.PluralRule{2, 6}, + locale: "ti_ER", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ti_ET/ti_ET.go b/resources/locales/ti_ET/ti_ET.go index 7123cb1..8691bb0 100644 --- a/resources/locales/ti_ET/ti_ET.go +++ b/resources/locales/ti_ET/ti_ET.go @@ -7,15 +7,27 @@ import ( ) type ti_ET struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ti_ET' locale func New() locales.Translator { return &ti_ET{ - locale: "ti_ET", - plurals: []locales.PluralRule{2, 6}, + locale: "ti_ET", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/tk/tk.go b/resources/locales/tk/tk.go index 1920e40..2835f47 100644 --- a/resources/locales/tk/tk.go +++ b/resources/locales/tk/tk.go @@ -7,15 +7,27 @@ import ( ) type tk struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'tk' locale func New() locales.Translator { return &tk{ - locale: "tk", - plurals: []locales.PluralRule{2, 6}, + locale: "tk", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/tk_TM/tk_TM.go b/resources/locales/tk_TM/tk_TM.go index 38e21b2..476c345 100644 --- a/resources/locales/tk_TM/tk_TM.go +++ b/resources/locales/tk_TM/tk_TM.go @@ -7,15 +7,27 @@ import ( ) type tk_TM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'tk_TM' locale func New() locales.Translator { return &tk_TM{ - locale: "tk_TM", - plurals: []locales.PluralRule{2, 6}, + locale: "tk_TM", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/to/to.go b/resources/locales/to/to.go index 8d0e886..0b71d65 100644 --- a/resources/locales/to/to.go +++ b/resources/locales/to/to.go @@ -1,21 +1,29 @@ package to -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type to struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'to' locale func New() locales.Translator { return &to{ - locale: "to", - plurals: []locales.PluralRule{6}, + locale: "to", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *to) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'to' func (t *to) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/to_TO/to_TO.go b/resources/locales/to_TO/to_TO.go index c275661..45bda84 100644 --- a/resources/locales/to_TO/to_TO.go +++ b/resources/locales/to_TO/to_TO.go @@ -1,21 +1,29 @@ package to_TO -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type to_TO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'to_TO' locale func New() locales.Translator { return &to_TO{ - locale: "to_TO", - plurals: []locales.PluralRule{6}, + locale: "to_TO", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *to_TO) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'to_TO' func (t *to_TO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/tr/tr.go b/resources/locales/tr/tr.go index 10c64ac..d9d6be2 100644 --- a/resources/locales/tr/tr.go +++ b/resources/locales/tr/tr.go @@ -7,15 +7,27 @@ import ( ) type tr struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'tr' locale func New() locales.Translator { return &tr{ - locale: "tr", - plurals: []locales.PluralRule{2, 6}, + locale: "tr", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/tr_CY/tr_CY.go b/resources/locales/tr_CY/tr_CY.go index 6a34c1f..8e9b50c 100644 --- a/resources/locales/tr_CY/tr_CY.go +++ b/resources/locales/tr_CY/tr_CY.go @@ -7,15 +7,27 @@ import ( ) type tr_CY struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'tr_CY' locale func New() locales.Translator { return &tr_CY{ - locale: "tr_CY", - plurals: []locales.PluralRule{2, 6}, + locale: "tr_CY", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/tr_TR/tr_TR.go b/resources/locales/tr_TR/tr_TR.go index b757694..b2351ee 100644 --- a/resources/locales/tr_TR/tr_TR.go +++ b/resources/locales/tr_TR/tr_TR.go @@ -7,15 +7,27 @@ import ( ) type tr_TR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'tr_TR' locale func New() locales.Translator { return &tr_TR{ - locale: "tr_TR", - plurals: []locales.PluralRule{2, 6}, + locale: "tr_TR", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/twq/twq.go b/resources/locales/twq/twq.go index 9b5d0a1..7a45c68 100644 --- a/resources/locales/twq/twq.go +++ b/resources/locales/twq/twq.go @@ -1,21 +1,29 @@ package twq -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type twq struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'twq' locale func New() locales.Translator { return &twq{ - locale: "twq", - plurals: nil, + locale: "twq", + plurals: nil, + decimal: []byte{0x2e}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *twq) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'twq' func (t *twq) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/twq_NE/twq_NE.go b/resources/locales/twq_NE/twq_NE.go index e4acf2f..106aa28 100644 --- a/resources/locales/twq_NE/twq_NE.go +++ b/resources/locales/twq_NE/twq_NE.go @@ -1,21 +1,29 @@ package twq_NE -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type twq_NE struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'twq_NE' locale func New() locales.Translator { return &twq_NE{ - locale: "twq_NE", - plurals: nil, + locale: "twq_NE", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *twq_NE) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'twq_NE' func (t *twq_NE) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/tzm/tzm.go b/resources/locales/tzm/tzm.go index f774a90..4a73f32 100644 --- a/resources/locales/tzm/tzm.go +++ b/resources/locales/tzm/tzm.go @@ -7,15 +7,27 @@ import ( ) type tzm struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'tzm' locale func New() locales.Translator { return &tzm{ - locale: "tzm", - plurals: []locales.PluralRule{2, 6}, + locale: "tzm", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/tzm_MA/tzm_MA.go b/resources/locales/tzm_MA/tzm_MA.go index de0742e..4044e30 100644 --- a/resources/locales/tzm_MA/tzm_MA.go +++ b/resources/locales/tzm_MA/tzm_MA.go @@ -7,15 +7,27 @@ import ( ) type tzm_MA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'tzm_MA' locale func New() locales.Translator { return &tzm_MA{ - locale: "tzm_MA", - plurals: []locales.PluralRule{2, 6}, + locale: "tzm_MA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/ug/ug.go b/resources/locales/ug/ug.go index 2d9e7fa..b735676 100644 --- a/resources/locales/ug/ug.go +++ b/resources/locales/ug/ug.go @@ -7,15 +7,27 @@ import ( ) type ug struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ug' locale func New() locales.Translator { return &ug{ - locale: "ug", - plurals: []locales.PluralRule{2, 6}, + locale: "ug", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ug_CN/ug_CN.go b/resources/locales/ug_CN/ug_CN.go index 70a4794..ba52fae 100644 --- a/resources/locales/ug_CN/ug_CN.go +++ b/resources/locales/ug_CN/ug_CN.go @@ -7,15 +7,27 @@ import ( ) type ug_CN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ug_CN' locale func New() locales.Translator { return &ug_CN{ - locale: "ug_CN", - plurals: []locales.PluralRule{2, 6}, + locale: "ug_CN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/uk/uk.go b/resources/locales/uk/uk.go index 7fe5225..571064b 100644 --- a/resources/locales/uk/uk.go +++ b/resources/locales/uk/uk.go @@ -7,15 +7,27 @@ import ( ) type uk struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'uk' locale func New() locales.Translator { return &uk{ - locale: "uk", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "uk", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/uk_UA/uk_UA.go b/resources/locales/uk_UA/uk_UA.go index 6bfdaaf..f8d6739 100644 --- a/resources/locales/uk_UA/uk_UA.go +++ b/resources/locales/uk_UA/uk_UA.go @@ -7,15 +7,27 @@ import ( ) type uk_UA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'uk_UA' locale func New() locales.Translator { return &uk_UA{ - locale: "uk_UA", - plurals: []locales.PluralRule{2, 4, 5, 6}, + locale: "uk_UA", + plurals: []locales.PluralRule{2, 4, 5, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ur/ur.go b/resources/locales/ur/ur.go index e243d3c..c4b14ab 100644 --- a/resources/locales/ur/ur.go +++ b/resources/locales/ur/ur.go @@ -7,15 +7,27 @@ import ( ) type ur struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ur' locale func New() locales.Translator { return &ur{ - locale: "ur", - plurals: []locales.PluralRule{2, 6}, + locale: "ur", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0xe2, 0x80, 0x8e, 0x2d, 0xe2, 0x80, 0x8e}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/ur_IN/ur_IN.go b/resources/locales/ur_IN/ur_IN.go index 0ba61be..e852c61 100644 --- a/resources/locales/ur_IN/ur_IN.go +++ b/resources/locales/ur_IN/ur_IN.go @@ -7,15 +7,27 @@ import ( ) type ur_IN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ur_IN' locale func New() locales.Translator { return &ur_IN{ - locale: "ur_IN", - plurals: []locales.PluralRule{2, 6}, + locale: "ur_IN", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x65, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x65, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/ur_PK/ur_PK.go b/resources/locales/ur_PK/ur_PK.go index b05dd24..4db4ca0 100644 --- a/resources/locales/ur_PK/ur_PK.go +++ b/resources/locales/ur_PK/ur_PK.go @@ -7,15 +7,27 @@ import ( ) type ur_PK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'ur_PK' locale func New() locales.Translator { return &ur_PK{ - locale: "ur_PK", - plurals: []locales.PluralRule{2, 6}, + locale: "ur_PK", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x65, 0x2c, 0x20, 0x30, 0x78, 0x32, 0x64, 0x2c, 0x20, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x65, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/uz/uz.go b/resources/locales/uz/uz.go index 565d3e1..d036b17 100644 --- a/resources/locales/uz/uz.go +++ b/resources/locales/uz/uz.go @@ -7,15 +7,27 @@ import ( ) type uz struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'uz' locale func New() locales.Translator { return &uz{ - locale: "uz", - plurals: []locales.PluralRule{2, 6}, + locale: "uz", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0xd9, 0xac}, + minus: []byte{0x2d}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{0xd8, 0x89}, + symbol: []byte{}, } } diff --git a/resources/locales/uz_Arab/uz_Arab.go b/resources/locales/uz_Arab/uz_Arab.go index 7d93a6f..69618ba 100644 --- a/resources/locales/uz_Arab/uz_Arab.go +++ b/resources/locales/uz_Arab/uz_Arab.go @@ -7,15 +7,27 @@ import ( ) type uz_Arab struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'uz_Arab' locale func New() locales.Translator { return &uz_Arab{ - locale: "uz_Arab", - plurals: []locales.PluralRule{2, 6}, + locale: "uz_Arab", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0xd9, 0xac}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/uz_Arab_AF/uz_Arab_AF.go b/resources/locales/uz_Arab_AF/uz_Arab_AF.go index 9000409..3cc5194 100644 --- a/resources/locales/uz_Arab_AF/uz_Arab_AF.go +++ b/resources/locales/uz_Arab_AF/uz_Arab_AF.go @@ -7,15 +7,27 @@ import ( ) type uz_Arab_AF struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'uz_Arab_AF' locale func New() locales.Translator { return &uz_Arab_AF{ - locale: "uz_Arab_AF", - plurals: []locales.PluralRule{2, 6}, + locale: "uz_Arab_AF", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/uz_Cyrl/uz_Cyrl.go b/resources/locales/uz_Cyrl/uz_Cyrl.go index bdb15d9..5b60e71 100644 --- a/resources/locales/uz_Cyrl/uz_Cyrl.go +++ b/resources/locales/uz_Cyrl/uz_Cyrl.go @@ -7,15 +7,27 @@ import ( ) type uz_Cyrl struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'uz_Cyrl' locale func New() locales.Translator { return &uz_Cyrl{ - locale: "uz_Cyrl", - plurals: []locales.PluralRule{2, 6}, + locale: "uz_Cyrl", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0xd9, 0xab}, + group: []byte{0xd9, 0xac}, + minus: []byte{0x2d}, + percent: []byte{0xd9, 0xaa}, + perMille: []byte{0xd8, 0x89}, + symbol: []byte{}, } } diff --git a/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go b/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go index 1479840..7cb1276 100644 --- a/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go +++ b/resources/locales/uz_Cyrl_UZ/uz_Cyrl_UZ.go @@ -7,15 +7,27 @@ import ( ) type uz_Cyrl_UZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'uz_Cyrl_UZ' locale func New() locales.Translator { return &uz_Cyrl_UZ{ - locale: "uz_Cyrl_UZ", - plurals: []locales.PluralRule{2, 6}, + locale: "uz_Cyrl_UZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/uz_Latn/uz_Latn.go b/resources/locales/uz_Latn/uz_Latn.go index 3a49f83..873f8d5 100644 --- a/resources/locales/uz_Latn/uz_Latn.go +++ b/resources/locales/uz_Latn/uz_Latn.go @@ -7,15 +7,27 @@ import ( ) type uz_Latn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'uz_Latn' locale func New() locales.Translator { return &uz_Latn{ - locale: "uz_Latn", - plurals: []locales.PluralRule{2, 6}, + locale: "uz_Latn", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go b/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go index f240532..65f9d6b 100644 --- a/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go +++ b/resources/locales/uz_Latn_UZ/uz_Latn_UZ.go @@ -7,15 +7,27 @@ import ( ) type uz_Latn_UZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'uz_Latn_UZ' locale func New() locales.Translator { return &uz_Latn_UZ{ - locale: "uz_Latn_UZ", - plurals: []locales.PluralRule{2, 6}, + locale: "uz_Latn_UZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x62, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x39, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x61, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x64, 0x38, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x39, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/vai/vai.go b/resources/locales/vai/vai.go index 8b639cf..691f7cd 100644 --- a/resources/locales/vai/vai.go +++ b/resources/locales/vai/vai.go @@ -1,21 +1,29 @@ package vai -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type vai struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vai' locale func New() locales.Translator { return &vai{ - locale: "vai", - plurals: nil, + locale: "vai", + plurals: nil, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *vai) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vai' func (t *vai) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/vai_Latn/vai_Latn.go b/resources/locales/vai_Latn/vai_Latn.go index 52ee5d6..c4cadc1 100644 --- a/resources/locales/vai_Latn/vai_Latn.go +++ b/resources/locales/vai_Latn/vai_Latn.go @@ -1,21 +1,29 @@ package vai_Latn -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type vai_Latn struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vai_Latn' locale func New() locales.Translator { return &vai_Latn{ - locale: "vai_Latn", - plurals: nil, + locale: "vai_Latn", + plurals: nil, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *vai_Latn) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vai_Latn' func (t *vai_Latn) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/vai_Latn_LR/vai_Latn_LR.go b/resources/locales/vai_Latn_LR/vai_Latn_LR.go index 8d571d4..62380b5 100644 --- a/resources/locales/vai_Latn_LR/vai_Latn_LR.go +++ b/resources/locales/vai_Latn_LR/vai_Latn_LR.go @@ -1,21 +1,29 @@ package vai_Latn_LR -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type vai_Latn_LR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vai_Latn_LR' locale func New() locales.Translator { return &vai_Latn_LR{ - locale: "vai_Latn_LR", - plurals: nil, + locale: "vai_Latn_LR", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *vai_Latn_LR) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vai_Latn_LR' func (t *vai_Latn_LR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/vai_Vaii/vai_Vaii.go b/resources/locales/vai_Vaii/vai_Vaii.go index c203404..21dcd3a 100644 --- a/resources/locales/vai_Vaii/vai_Vaii.go +++ b/resources/locales/vai_Vaii/vai_Vaii.go @@ -1,21 +1,29 @@ package vai_Vaii -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type vai_Vaii struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vai_Vaii' locale func New() locales.Translator { return &vai_Vaii{ - locale: "vai_Vaii", - plurals: nil, + locale: "vai_Vaii", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,5 +39,5 @@ func (t *vai_Vaii) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vai_Vaii' func (t *vai_Vaii) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go b/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go index 2fdf019..4e97d48 100644 --- a/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go +++ b/resources/locales/vai_Vaii_LR/vai_Vaii_LR.go @@ -1,21 +1,29 @@ package vai_Vaii_LR -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type vai_Vaii_LR struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vai_Vaii_LR' locale func New() locales.Translator { return &vai_Vaii_LR{ - locale: "vai_Vaii_LR", - plurals: nil, + locale: "vai_Vaii_LR", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *vai_Vaii_LR) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vai_Vaii_LR' func (t *vai_Vaii_LR) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/vi/vi.go b/resources/locales/vi/vi.go index 7d9d326..634f312 100644 --- a/resources/locales/vi/vi.go +++ b/resources/locales/vi/vi.go @@ -1,21 +1,29 @@ package vi -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type vi struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vi' locale func New() locales.Translator { return &vi{ - locale: "vi", - plurals: []locales.PluralRule{6}, + locale: "vi", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2c}, + group: []byte{0x2e}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *vi) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vi' func (t *vi) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/vi_VN/vi_VN.go b/resources/locales/vi_VN/vi_VN.go index 67196d0..33ace8a 100644 --- a/resources/locales/vi_VN/vi_VN.go +++ b/resources/locales/vi_VN/vi_VN.go @@ -1,21 +1,29 @@ package vi_VN -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type vi_VN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vi_VN' locale func New() locales.Translator { return &vi_VN{ - locale: "vi_VN", - plurals: []locales.PluralRule{6}, + locale: "vi_VN", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *vi_VN) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'vi_VN' func (t *vi_VN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/vo/vo.go b/resources/locales/vo/vo.go index 46ef635..7dce2ae 100644 --- a/resources/locales/vo/vo.go +++ b/resources/locales/vo/vo.go @@ -7,15 +7,27 @@ import ( ) type vo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vo' locale func New() locales.Translator { return &vo{ - locale: "vo", - plurals: []locales.PluralRule{2, 6}, + locale: "vo", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/vo_001/vo_001.go b/resources/locales/vo_001/vo_001.go index a2d677f..8822906 100644 --- a/resources/locales/vo_001/vo_001.go +++ b/resources/locales/vo_001/vo_001.go @@ -7,15 +7,27 @@ import ( ) type vo_001 struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vo_001' locale func New() locales.Translator { return &vo_001{ - locale: "vo_001", - plurals: []locales.PluralRule{2, 6}, + locale: "vo_001", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/vun/vun.go b/resources/locales/vun/vun.go index 80eb885..6f9a863 100644 --- a/resources/locales/vun/vun.go +++ b/resources/locales/vun/vun.go @@ -7,15 +7,27 @@ import ( ) type vun struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vun' locale func New() locales.Translator { return &vun{ - locale: "vun", - plurals: []locales.PluralRule{2, 6}, + locale: "vun", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/vun_TZ/vun_TZ.go b/resources/locales/vun_TZ/vun_TZ.go index b61627f..63d9b5f 100644 --- a/resources/locales/vun_TZ/vun_TZ.go +++ b/resources/locales/vun_TZ/vun_TZ.go @@ -7,15 +7,27 @@ import ( ) type vun_TZ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'vun_TZ' locale func New() locales.Translator { return &vun_TZ{ - locale: "vun_TZ", - plurals: []locales.PluralRule{2, 6}, + locale: "vun_TZ", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/wae/wae.go b/resources/locales/wae/wae.go index 385c51c..f02612f 100644 --- a/resources/locales/wae/wae.go +++ b/resources/locales/wae/wae.go @@ -7,15 +7,27 @@ import ( ) type wae struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'wae' locale func New() locales.Translator { return &wae{ - locale: "wae", - plurals: []locales.PluralRule{2, 6}, + locale: "wae", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2c}, + group: []byte{0xe2, 0x80, 0x99}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/wae_CH/wae_CH.go b/resources/locales/wae_CH/wae_CH.go index 5e35b34..6d11897 100644 --- a/resources/locales/wae_CH/wae_CH.go +++ b/resources/locales/wae_CH/wae_CH.go @@ -7,15 +7,27 @@ import ( ) type wae_CH struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'wae_CH' locale func New() locales.Translator { return &wae_CH{ - locale: "wae_CH", - plurals: []locales.PluralRule{2, 6}, + locale: "wae_CH", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x39, 0x39, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/xog/xog.go b/resources/locales/xog/xog.go index 6f5505d..5108533 100644 --- a/resources/locales/xog/xog.go +++ b/resources/locales/xog/xog.go @@ -7,15 +7,27 @@ import ( ) type xog struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'xog' locale func New() locales.Translator { return &xog{ - locale: "xog", - plurals: []locales.PluralRule{2, 6}, + locale: "xog", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } diff --git a/resources/locales/xog_UG/xog_UG.go b/resources/locales/xog_UG/xog_UG.go index a79f6ef..d768928 100644 --- a/resources/locales/xog_UG/xog_UG.go +++ b/resources/locales/xog_UG/xog_UG.go @@ -7,15 +7,27 @@ import ( ) type xog_UG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'xog_UG' locale func New() locales.Translator { return &xog_UG{ - locale: "xog_UG", - plurals: []locales.PluralRule{2, 6}, + locale: "xog_UG", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } diff --git a/resources/locales/yav/yav.go b/resources/locales/yav/yav.go index 2e5edae..a6a4962 100644 --- a/resources/locales/yav/yav.go +++ b/resources/locales/yav/yav.go @@ -1,21 +1,29 @@ package yav -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type yav struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'yav' locale func New() locales.Translator { return &yav{ - locale: "yav", - plurals: nil, + locale: "yav", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *yav) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yav' func (t *yav) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/yav_CM/yav_CM.go b/resources/locales/yav_CM/yav_CM.go index a447ae4..7d100ad 100644 --- a/resources/locales/yav_CM/yav_CM.go +++ b/resources/locales/yav_CM/yav_CM.go @@ -1,21 +1,29 @@ package yav_CM -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type yav_CM struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'yav_CM' locale func New() locales.Translator { return &yav_CM{ - locale: "yav_CM", - plurals: nil, + locale: "yav_CM", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *yav_CM) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yav_CM' func (t *yav_CM) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/yi/yi.go b/resources/locales/yi/yi.go index 1f0972c..b944ca0 100644 --- a/resources/locales/yi/yi.go +++ b/resources/locales/yi/yi.go @@ -7,15 +7,27 @@ import ( ) type yi struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'yi' locale func New() locales.Translator { return &yi{ - locale: "yi", - plurals: []locales.PluralRule{2, 6}, + locale: "yi", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/yi_001/yi_001.go b/resources/locales/yi_001/yi_001.go index efe2b9e..7600125 100644 --- a/resources/locales/yi_001/yi_001.go +++ b/resources/locales/yi_001/yi_001.go @@ -7,15 +7,27 @@ import ( ) type yi_001 struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'yi_001' locale func New() locales.Translator { return &yi_001{ - locale: "yi_001", - plurals: []locales.PluralRule{2, 6}, + locale: "yi_001", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } diff --git a/resources/locales/yo/yo.go b/resources/locales/yo/yo.go index fec4244..0faa3fb 100644 --- a/resources/locales/yo/yo.go +++ b/resources/locales/yo/yo.go @@ -1,21 +1,29 @@ package yo -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type yo struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'yo' locale func New() locales.Translator { return &yo{ - locale: "yo", - plurals: []locales.PluralRule{6}, + locale: "yo", + plurals: []locales.PluralRule{6}, + decimal: []byte{}, + group: []byte{}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *yo) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yo' func (t *yo) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/yo_BJ/yo_BJ.go b/resources/locales/yo_BJ/yo_BJ.go index a683485..6023074 100644 --- a/resources/locales/yo_BJ/yo_BJ.go +++ b/resources/locales/yo_BJ/yo_BJ.go @@ -1,21 +1,29 @@ package yo_BJ -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type yo_BJ struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'yo_BJ' locale func New() locales.Translator { return &yo_BJ{ - locale: "yo_BJ", - plurals: []locales.PluralRule{6}, + locale: "yo_BJ", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *yo_BJ) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yo_BJ' func (t *yo_BJ) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/yo_NG/yo_NG.go b/resources/locales/yo_NG/yo_NG.go index e5f7216..fa7f200 100644 --- a/resources/locales/yo_NG/yo_NG.go +++ b/resources/locales/yo_NG/yo_NG.go @@ -1,21 +1,29 @@ package yo_NG -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type yo_NG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'yo_NG' locale func New() locales.Translator { return &yo_NG{ - locale: "yo_NG", - plurals: []locales.PluralRule{6}, + locale: "yo_NG", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *yo_NG) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yo_NG' func (t *yo_NG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/yue/yue.go b/resources/locales/yue/yue.go index 409f2a0..d936cf9 100644 --- a/resources/locales/yue/yue.go +++ b/resources/locales/yue/yue.go @@ -1,21 +1,29 @@ package yue -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type yue struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'yue' locale func New() locales.Translator { return &yue{ - locale: "yue", - plurals: nil, + locale: "yue", + plurals: nil, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *yue) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yue' func (t *yue) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/yue_HK/yue_HK.go b/resources/locales/yue_HK/yue_HK.go index c1b8077..a7de3c7 100644 --- a/resources/locales/yue_HK/yue_HK.go +++ b/resources/locales/yue_HK/yue_HK.go @@ -1,21 +1,29 @@ package yue_HK -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type yue_HK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'yue_HK' locale func New() locales.Translator { return &yue_HK{ - locale: "yue_HK", - plurals: nil, + locale: "yue_HK", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *yue_HK) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'yue_HK' func (t *yue_HK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/zgh/zgh.go b/resources/locales/zgh/zgh.go index cea0d8e..dc5ec99 100644 --- a/resources/locales/zgh/zgh.go +++ b/resources/locales/zgh/zgh.go @@ -1,21 +1,29 @@ package zgh -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zgh struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zgh' locale func New() locales.Translator { return &zgh{ - locale: "zgh", - plurals: nil, + locale: "zgh", + plurals: nil, + decimal: []byte{0x2c}, + group: []byte{0xc2, 0xa0}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *zgh) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zgh' func (t *zgh) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/zgh_MA/zgh_MA.go b/resources/locales/zgh_MA/zgh_MA.go index 33de810..9b44ded 100644 --- a/resources/locales/zgh_MA/zgh_MA.go +++ b/resources/locales/zgh_MA/zgh_MA.go @@ -1,21 +1,29 @@ package zgh_MA -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zgh_MA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zgh_MA' locale func New() locales.Translator { return &zgh_MA{ - locale: "zgh_MA", - plurals: nil, + locale: "zgh_MA", + plurals: nil, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x63, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x61, 0x30, 0x7d}, + minus: []byte{}, + percent: []byte{}, + perMille: []byte{}, + symbol: []byte{}, } } @@ -31,5 +39,5 @@ func (t *zgh_MA) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zgh_MA' func (t *zgh_MA) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown, nil + return locales.PluralRuleUnknown } diff --git a/resources/locales/zh/zh.go b/resources/locales/zh/zh.go index e74ecee..0889734 100644 --- a/resources/locales/zh/zh.go +++ b/resources/locales/zh/zh.go @@ -1,21 +1,29 @@ package zh -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zh struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zh' locale func New() locales.Translator { return &zh{ - locale: "zh", - plurals: []locales.PluralRule{6}, + locale: "zh", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *zh) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh' func (t *zh) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hans/zh_Hans.go b/resources/locales/zh_Hans/zh_Hans.go index d44608d..c3a5582 100644 --- a/resources/locales/zh_Hans/zh_Hans.go +++ b/resources/locales/zh_Hans/zh_Hans.go @@ -1,21 +1,29 @@ package zh_Hans -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zh_Hans struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zh_Hans' locale func New() locales.Translator { return &zh_Hans{ - locale: "zh_Hans", - plurals: []locales.PluralRule{6}, + locale: "zh_Hans", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *zh_Hans) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hans' func (t *zh_Hans) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hans_CN/zh_Hans_CN.go b/resources/locales/zh_Hans_CN/zh_Hans_CN.go index fd239b9..43018d2 100644 --- a/resources/locales/zh_Hans_CN/zh_Hans_CN.go +++ b/resources/locales/zh_Hans_CN/zh_Hans_CN.go @@ -1,21 +1,29 @@ package zh_Hans_CN -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zh_Hans_CN struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zh_Hans_CN' locale func New() locales.Translator { return &zh_Hans_CN{ - locale: "zh_Hans_CN", - plurals: []locales.PluralRule{6}, + locale: "zh_Hans_CN", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *zh_Hans_CN) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hans_CN' func (t *zh_Hans_CN) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hans_HK/zh_Hans_HK.go b/resources/locales/zh_Hans_HK/zh_Hans_HK.go index 26825c5..a6ab092 100644 --- a/resources/locales/zh_Hans_HK/zh_Hans_HK.go +++ b/resources/locales/zh_Hans_HK/zh_Hans_HK.go @@ -1,21 +1,29 @@ package zh_Hans_HK -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zh_Hans_HK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zh_Hans_HK' locale func New() locales.Translator { return &zh_Hans_HK{ - locale: "zh_Hans_HK", - plurals: []locales.PluralRule{6}, + locale: "zh_Hans_HK", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *zh_Hans_HK) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hans_HK' func (t *zh_Hans_HK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hans_MO/zh_Hans_MO.go b/resources/locales/zh_Hans_MO/zh_Hans_MO.go index f8890b8..f4a849b 100644 --- a/resources/locales/zh_Hans_MO/zh_Hans_MO.go +++ b/resources/locales/zh_Hans_MO/zh_Hans_MO.go @@ -1,21 +1,29 @@ package zh_Hans_MO -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zh_Hans_MO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zh_Hans_MO' locale func New() locales.Translator { return &zh_Hans_MO{ - locale: "zh_Hans_MO", - plurals: []locales.PluralRule{6}, + locale: "zh_Hans_MO", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *zh_Hans_MO) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hans_MO' func (t *zh_Hans_MO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hans_SG/zh_Hans_SG.go b/resources/locales/zh_Hans_SG/zh_Hans_SG.go index a7b9158..2a66795 100644 --- a/resources/locales/zh_Hans_SG/zh_Hans_SG.go +++ b/resources/locales/zh_Hans_SG/zh_Hans_SG.go @@ -1,21 +1,29 @@ package zh_Hans_SG -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zh_Hans_SG struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zh_Hans_SG' locale func New() locales.Translator { return &zh_Hans_SG{ - locale: "zh_Hans_SG", - plurals: []locales.PluralRule{6}, + locale: "zh_Hans_SG", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *zh_Hans_SG) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hans_SG' func (t *zh_Hans_SG) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hant/zh_Hant.go b/resources/locales/zh_Hant/zh_Hant.go index 55eccce..0faf1ac 100644 --- a/resources/locales/zh_Hant/zh_Hant.go +++ b/resources/locales/zh_Hant/zh_Hant.go @@ -1,21 +1,29 @@ package zh_Hant -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zh_Hant struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zh_Hant' locale func New() locales.Translator { return &zh_Hant{ - locale: "zh_Hant", - plurals: []locales.PluralRule{6}, + locale: "zh_Hant", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *zh_Hant) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hant' func (t *zh_Hant) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hant_HK/zh_Hant_HK.go b/resources/locales/zh_Hant_HK/zh_Hant_HK.go index 9524311..b657ebf 100644 --- a/resources/locales/zh_Hant_HK/zh_Hant_HK.go +++ b/resources/locales/zh_Hant_HK/zh_Hant_HK.go @@ -1,21 +1,29 @@ package zh_Hant_HK -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zh_Hant_HK struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zh_Hant_HK' locale func New() locales.Translator { return &zh_Hant_HK{ - locale: "zh_Hant_HK", - plurals: []locales.PluralRule{6}, + locale: "zh_Hant_HK", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{}, } } @@ -31,8 +39,5 @@ func (t *zh_Hant_HK) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hant_HK' func (t *zh_Hant_HK) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hant_MO/zh_Hant_MO.go b/resources/locales/zh_Hant_MO/zh_Hant_MO.go index be2df32..7e8f766 100644 --- a/resources/locales/zh_Hant_MO/zh_Hant_MO.go +++ b/resources/locales/zh_Hant_MO/zh_Hant_MO.go @@ -1,21 +1,29 @@ package zh_Hant_MO -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zh_Hant_MO struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zh_Hant_MO' locale func New() locales.Translator { return &zh_Hant_MO{ - locale: "zh_Hant_MO", - plurals: []locales.PluralRule{6}, + locale: "zh_Hant_MO", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *zh_Hant_MO) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hant_MO' func (t *zh_Hant_MO) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/zh_Hant_TW/zh_Hant_TW.go b/resources/locales/zh_Hant_TW/zh_Hant_TW.go index e91b1fc..bd7a944 100644 --- a/resources/locales/zh_Hant_TW/zh_Hant_TW.go +++ b/resources/locales/zh_Hant_TW/zh_Hant_TW.go @@ -1,21 +1,29 @@ package zh_Hant_TW -import ( - "math" - - "github.com/go-playground/universal-translator/resources/locales" -) +import "github.com/go-playground/universal-translator/resources/locales" type zh_Hant_TW struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zh_Hant_TW' locale func New() locales.Translator { return &zh_Hant_TW{ - locale: "zh_Hant_TW", - plurals: []locales.PluralRule{6}, + locale: "zh_Hant_TW", + plurals: []locales.PluralRule{6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } } @@ -31,8 +39,5 @@ func (t *zh_Hant_TW) Plurals() []locales.PluralRule { // cardinalPluralRule returns the PluralRule given 'num' and digits/precision of 'v' for 'zh_Hant_TW' func (t *zh_Hant_TW) cardinalPluralRule(num float64, v uint64) locales.PluralRule { - - n := math.Abs(num) - return locales.PluralRuleOther } diff --git a/resources/locales/zu/zu.go b/resources/locales/zu/zu.go index 690d8c5..2ce3f4c 100644 --- a/resources/locales/zu/zu.go +++ b/resources/locales/zu/zu.go @@ -7,15 +7,27 @@ import ( ) type zu struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zu' locale func New() locales.Translator { return &zu{ - locale: "zu", - plurals: []locales.PluralRule{2, 6}, + locale: "zu", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x2e}, + group: []byte{0x2c}, + minus: []byte{0x2d}, + percent: []byte{0x25}, + perMille: []byte{0xe2, 0x80, 0xb0}, + symbol: []byte{}, } } diff --git a/resources/locales/zu_ZA/zu_ZA.go b/resources/locales/zu_ZA/zu_ZA.go index b2a38e1..c79c6c2 100644 --- a/resources/locales/zu_ZA/zu_ZA.go +++ b/resources/locales/zu_ZA/zu_ZA.go @@ -7,15 +7,27 @@ import ( ) type zu_ZA struct { - locale string - plurals []locales.PluralRule + locale string + plurals []locales.PluralRule + decimal []byte + group []byte + minus []byte + percent []byte + perMille []byte + symbol []byte } // New returns a new instance of translator for the 'zu_ZA' locale func New() locales.Translator { return &zu_ZA{ - locale: "zu_ZA", - plurals: []locales.PluralRule{2, 6}, + locale: "zu_ZA", + plurals: []locales.PluralRule{2, 6}, + decimal: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x65, 0x7d}, + group: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x63, 0x7d}, + minus: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x64, 0x7d}, + percent: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x32, 0x35, 0x7d}, + perMille: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x30, 0x78, 0x65, 0x32, 0x2c, 0x20, 0x30, 0x78, 0x38, 0x30, 0x2c, 0x20, 0x30, 0x78, 0x62, 0x30, 0x7d}, + symbol: []byte{0x5b, 0x5d, 0x62, 0x79, 0x74, 0x65, 0x7b, 0x7d}, } }