From a15843964ef7c2a51bf861dcb395c78062996c87 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 3 Sep 2021 09:45:43 -0700 Subject: Fix translation function --- modern/src/LocalizationProvider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modern/src/LocalizationProvider.js') diff --git a/modern/src/LocalizationProvider.js b/modern/src/LocalizationProvider.js index 129f1d9c..ae08a569 100644 --- a/modern/src/LocalizationProvider.js +++ b/modern/src/LocalizationProvider.js @@ -156,12 +156,12 @@ export const useLocalization = () => { export const useTranslation = () => { const context = useContext(LocalizationContext); - const data = context.languages[context.language]; + const data = context.languages[context.language].data; return (key) => data[key]; }; export const useTranslationKeys = (predicate) => { const context = useContext(LocalizationContext); - const data = context.languages[context.language]; + const data = context.languages[context.language].data; return Object.keys(data).filter(predicate); }; -- cgit v1.2.3