aboutsummaryrefslogtreecommitdiff
path: root/modern/src/LocalizationProvider.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-09-03 09:45:43 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-09-03 09:45:43 -0700
commita15843964ef7c2a51bf861dcb395c78062996c87 (patch)
tree2715798d39cef8a824e26f6fddf10ee22bbfd320 /modern/src/LocalizationProvider.js
parent6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a (diff)
downloadtrackermap-web-a15843964ef7c2a51bf861dcb395c78062996c87.tar.gz
trackermap-web-a15843964ef7c2a51bf861dcb395c78062996c87.tar.bz2
trackermap-web-a15843964ef7c2a51bf861dcb395c78062996c87.zip
Fix translation function
Diffstat (limited to 'modern/src/LocalizationProvider.js')
-rw-r--r--modern/src/LocalizationProvider.js4
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);
};