Merge pull request #153 from mirumee/fix/exploding-locales
Add fallback locale
This commit is contained in:
commit
0768591255
2 changed files with 4 additions and 1 deletions
|
@ -14,3 +14,4 @@ All notable, unreleased changes to this project will be documented in this file.
|
||||||
- Fix plugins page translations - #141 by @benekex2
|
- Fix plugins page translations - #141 by @benekex2
|
||||||
- Add attributes to column picker - #136 by @dominik-zeglen
|
- Add attributes to column picker - #136 by @dominik-zeglen
|
||||||
- Fix table cell padding - #143 by @dominik-zeglen
|
- Fix table cell padding - #143 by @dominik-zeglen
|
||||||
|
- Add fallback locale - #153 by @dominik-zeglen
|
||||||
|
|
|
@ -151,10 +151,12 @@ function getMatchingLocale(): Locale {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const LocaleProvider: React.FC = ({ children }) => {
|
const LocaleProvider: React.FC = ({ children }) => {
|
||||||
const [locale] = React.useState(getMatchingLocale());
|
const [locale] = React.useState(getMatchingLocale() || defaultLocale);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IntlProvider
|
<IntlProvider
|
||||||
|
|
Loading…
Reference in a new issue