From 36009ad11714fec20ec3e59cd082759c39d128b5 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Wed, 4 Sep 2019 16:01:26 +0200 Subject: [PATCH 1/2] Add fallback locale --- src/components/Locale/Locale.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Locale/Locale.tsx b/src/components/Locale/Locale.tsx index 600b5e54e..0a83cc640 100644 --- a/src/components/Locale/Locale.tsx +++ b/src/components/Locale/Locale.tsx @@ -151,10 +151,12 @@ function getMatchingLocale(): Locale { } } } + + return undefined; } const LocaleProvider: React.FC = ({ children }) => { - const [locale] = React.useState(getMatchingLocale()); + const [locale] = React.useState(getMatchingLocale() || defaultLocale); return ( Date: Wed, 4 Sep 2019 16:03:19 +0200 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa1cfa460..6bbc1a03f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,3 +14,4 @@ All notable, unreleased changes to this project will be documented in this file. - Fix plugins page translations - #141 by @benekex2 - Add attributes to column picker - #136 by @dominik-zeglen - Fix table cell padding - #143 by @dominik-zeglen +- Add fallback locale - #153 by @dominik-zeglen