aboutsummaryrefslogtreecommitdiff
path: root/modern
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
parent6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a (diff)
downloadetbsa-traccar-web-a15843964ef7c2a51bf861dcb395c78062996c87.tar.gz
etbsa-traccar-web-a15843964ef7c2a51bf861dcb395c78062996c87.tar.bz2
etbsa-traccar-web-a15843964ef7c2a51bf861dcb395c78062996c87.zip
Fix translation function
Diffstat (limited to 'modern')
-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 129f1d9..ae08a56 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);
};