From dc20c321e6d21642925cb23ebccb4bd21d491947 Mon Sep 17 00:00:00 2001 From: Tom Watson Date: Fri, 12 May 2023 09:43:13 -0700 Subject: [PATCH] Fix notification selection text --- public/locales/en.json | 2 ++ public/locales/es.json | 2 ++ .../NotificationSettingsTab/NotificationSettingsTab.js | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/locales/en.json b/public/locales/en.json index 0b80a8718..dc1d71027 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -441,11 +441,13 @@ "Nutrient density": "Nutrient density", "OFF": "OFF", "ON": "ON", + "Off": "Off", "Offensive": "Offensive", "Offer": "Offer", "Offers": "Offers", "Oh no, something went wrong! Check your internet connection and try again": "Oh no, something went wrong! Check your internet connection and try again", "Ok": "Ok", + "On": "On", "One more step!": "One more step!", "Only members of this group can see posts": "Only members of this group can see posts", "Only parent groups can be added as prerequisite groups.": "Only parent groups can be added as prerequisite groups.", diff --git a/public/locales/es.json b/public/locales/es.json index 6bd508d05..95036de9e 100644 --- a/public/locales/es.json +++ b/public/locales/es.json @@ -456,11 +456,13 @@ "Nutrient density": "Densidad de nutrientes", "OFF": "APAGADO", "ON": "ENCENDIDO", + "Off": "Apagado", "Offensive": "Ofensivo", "Offer": "Oferta", "Offers": "Ofertas", "Oh no, something went wrong! Check your internet connection and try again": "¡Oh no, algo salió mal! \nComprueba tu conexión a Internet e inténtalo de nuevo", "Ok": "De acuerdo", + "On": "Encendido", "One more step!": "¡Un paso más!", "Only members of this group can see posts": "Solo los miembros de este grupo pueden ver las publicaciones.", "Only parent groups can be added as prerequisite groups": "Solo se pueden agregar grupos principales como grupos de requisitos previos.", diff --git a/src/routes/UserSettings/NotificationSettingsTab/NotificationSettingsTab.js b/src/routes/UserSettings/NotificationSettingsTab/NotificationSettingsTab.js index 551fa62ec..7465d1e4e 100644 --- a/src/routes/UserSettings/NotificationSettingsTab/NotificationSettingsTab.js +++ b/src/routes/UserSettings/NotificationSettingsTab/NotificationSettingsTab.js @@ -218,16 +218,17 @@ export class SettingsRow extends React.Component { export function SettingsIcon ({ settingKey, name, update, settings }) { const settingStatus = settings[settingKey] ? 'On' : 'Off' + const { t } = useTranslation() return (
update({ [settingKey]: !settings[settingKey] })} - data-tip={`Turn ${name === 'EmailNotification' ? 'Email' : 'Mobile Push'} Notifications ${settings[settingKey] ? 'Off' : 'On'}`} + data-tip={`Turn ${name === 'EmailNotification' ? 'Email' : 'Mobile Push'} Notifications ${settings[settingKey] ? t('Off') : t('On')}`} data-for='helpTip' > - {settingStatus} + {t(settingStatus)}
) }