add support to xx@xxxx localization files

This commit is contained in:
Ramón Souza 2022-09-08 11:47:41 -03:00
parent a17679834f
commit c6c65c4aa0
2 changed files with 6 additions and 1 deletions

View File

@ -157,6 +157,7 @@ class IntlStartup extends Component {
render() { render() {
const { fetching, normalizedLocale, messages } = this.state; const { fetching, normalizedLocale, messages } = this.state;
const { children } = this.props; const { children } = this.props;
const locale = normalizedLocale?.replace('@', '-');
return ( return (
<> <>
@ -164,7 +165,7 @@ class IntlStartup extends Component {
{normalizedLocale {normalizedLocale
&& ( && (
<IntlProvider fallbackOnEmptyString={FALLBACK_ON_EMPTY_STRING} locale={normalizedLocale} messages={messages}> <IntlProvider fallbackOnEmptyString={FALLBACK_ON_EMPTY_STRING} locale={locale} messages={messages}>
{children} {children}
</IntlProvider> </IntlProvider>
) )

View File

@ -22,5 +22,9 @@
"oc": { "oc": {
"englishName": "Occitan", "englishName": "Occitan",
"nativeName": "Occitan" "nativeName": "Occitan"
},
"uz@Cyrl": {
"englishName": "Uzbek (Cyrillic)",
"nativeName": "ўзбек тили"
} }
} }