Skip to content

Commit

Permalink
Fix notification selection text
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgwatson committed May 12, 2023
1 parent 2303b2c commit dc20c32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div
styleName={cx('setting-controls', { highlightIcon: settings[settingKey] })}
onClick={() => 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'
>
<Icon name={name} styleName={cx('icon', { highlightIcon: settings[settingKey] })} />
<span styleName='setting-status'>{settingStatus}</span>
<span styleName='setting-status'>{t(settingStatus)}</span>
</div>
)
}
Expand Down

0 comments on commit dc20c32

Please sign in to comment.