We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have interesting bug, I use locales like('en', 'ru')
_getNumberModuleForLang always return default value IntlCLDRNumberType01
_getNumberModuleForLang
IntlCLDRNumberType01
Because:
locale = 'ru'; getNumberVariations() => IntlNumberType.get(locale) => FBLocaleToLang.get(locale) // return '' ----------------------------------^^^ here bug
Snippet:
(()=>{ const _locToLang = { "cx_PH": "ceb", "ck_US": "chr", "fb_AA": "en", "fb_AC": "en", "fbt_AC": "en", "fb_HA": "en", "fb_AR": "ar", "fb_HX": "en", "fb_LS": "en", "fb_LL": "en", "fb_RL": "en", "fb_ZH": "zh", "tl_PH": "fil", "sy_SY": "syr", "qc_GT": "quc", "tl_ST": "tlh", "gx_GR": "grc", "qz_MM": "my", "eh_IN": "hi", "cb_IQ": "ckb", "zz_TR": "zza", "tz_MA": "tzm", "sz_PL": "szl", "bp_IN": "bho", "ns_ZA": "nso", "fv_NG": "fuv", "em_ZM": "bem", "qr_GR": "rup", "qk_DZ": "kab", "qv_IT": "vec", "qs_DE": "dsb", "qb_DE": "hsb", "qe_US": "esu", "bv_DE": "bar", "qt_US": "tli", "nh_MX": "nah", "tq_AR": "tob", "fn_IT": "fur", "lr_IT": "lij" }; const FBLocaleToLang = { get: function(locale) { return _locToLang[locale] || locale.substring(0, locale.indexOf('_')); }, }; return FBLocaleToLang.get('en'); // return "" return FBLocaleToLang.get('ru'); // return "" })();
The text was updated successfully, but these errors were encountered:
@retyui you should be able to get what you want by using IntlNumberType.forLanguage. Please re-open if this doesn't work.
IntlNumberType.forLanguage
Sorry, something went wrong.
Actually, before I close, can you tell me where you're hitting this? Is it in the translate script?
Support short locale format like 'ru',' zza' (#85)
1753259
Summary: via: #83 ```js var locale = 'ru'; fbt._prama(...) => getNumberVariations(...) => IntlNumberType.get(locale) // Always return default value `IntlCLDRNumberType01` => FBLocaleToLang.get(locale) // Because result here is an empty string '' FBLocaleToLang.get('ru') => '' FBLocaleToLang.get('zza') => '' ``` Pull Request resolved: #85 Differential Revision: D17854003 Pulled By: jrwats fbshipit-source-id: 6011ff7587d62ec0881ec6bdf64bee0a0a41ff2f
retyui
No branches or pull requests
I have interesting bug, I use locales like('en', 'ru')
_getNumberModuleForLang
always return default valueIntlCLDRNumberType01
Because:
Snippet:
The text was updated successfully, but these errors were encountered: