diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-03 00:21:33 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-03 00:21:33 -0700 |
commit | 105e4ec887e249ec47db83095504012bad22df80 (patch) | |
tree | 0ca61c0015b1941362de8d2a82a005a88659dca4 /modern/src/settings/NotificationPage.js | |
parent | e6f906dbb565abdb29297ec67db3c922135c628c (diff) | |
download | trackermap-web-105e4ec887e249ec47db83095504012bad22df80.tar.gz trackermap-web-105e4ec887e249ec47db83095504012bad22df80.tar.bz2 trackermap-web-105e4ec887e249ec47db83095504012bad22df80.zip |
More translation migrations
Diffstat (limited to 'modern/src/settings/NotificationPage.js')
-rw-r--r-- | modern/src/settings/NotificationPage.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modern/src/settings/NotificationPage.js b/modern/src/settings/NotificationPage.js index 98104d76..6d895d0f 100644 --- a/modern/src/settings/NotificationPage.js +++ b/modern/src/settings/NotificationPage.js @@ -4,7 +4,7 @@ import { Accordion, AccordionSummary, AccordionDetails, makeStyles, Typography, FormControlLabel, Checkbox, } from '@material-ui/core'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import t, { findStringKeys } from '../LocalizationProvider'; +import t, { findStringKeys, useTranslation, useTranslationKeys } from '../LocalizationProvider'; import EditItemView from '../EditItemView'; import { prefixString, unprefixString } from '../common/stringUtils'; import SelectField from '../form/SelectField'; @@ -17,10 +17,11 @@ const useStyles = makeStyles(() => ({ const NotificationPage = () => { const classes = useStyles(); + const t = useTranslation(); const [item, setItem] = useState(); - const alarms = findStringKeys((it) => it.startsWith('alarm')).map((it) => ({ + const alarms = useTranslationKeys((it) => it.startsWith('alarm')).map((it) => ({ key: unprefixString('alarm', it), name: t(it), })); |