diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-03 09:45:43 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-03 09:45:43 -0700 |
commit | a15843964ef7c2a51bf861dcb395c78062996c87 (patch) | |
tree | 2715798d39cef8a824e26f6fddf10ee22bbfd320 /modern | |
parent | 6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a (diff) | |
download | trackermap-web-a15843964ef7c2a51bf861dcb395c78062996c87.tar.gz trackermap-web-a15843964ef7c2a51bf861dcb395c78062996c87.tar.bz2 trackermap-web-a15843964ef7c2a51bf861dcb395c78062996c87.zip |
Fix translation function
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/LocalizationProvider.js | 4 |
1 files changed, 2 insertions, 2 deletions
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); }; |