summaryrefslogtreecommitdiffstats
path: root/src/components/Settings/ReduceMotion
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-29 19:03:59 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-29 19:03:59 +0100
commit8fb5e4ef3ae925ebc6622711fb5c8c6147642cbc (patch)
tree9e99137a7b64ea7993a8311a7162336a551be8b2 /src/components/Settings/ReduceMotion
parent2bae7c43764df5678fe2fc2e68be11ae95d85a41 (diff)
parente4d5b8151802517b2943756fc0d09ffa95e2c4e2 (diff)
feat(i18n): replace linguijs with formatjs
Diffstat (limited to 'src/components/Settings/ReduceMotion')
-rw-r--r--src/components/Settings/ReduceMotion/ReduceMotion.tsx18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/components/Settings/ReduceMotion/ReduceMotion.tsx b/src/components/Settings/ReduceMotion/ReduceMotion.tsx
index 01f8b67..c7b5775 100644
--- a/src/components/Settings/ReduceMotion/ReduceMotion.tsx
+++ b/src/components/Settings/ReduceMotion/ReduceMotion.tsx
@@ -1,9 +1,10 @@
import { Toggle } from '@components/Form';
-import { t } from '@lingui/macro';
import { LocalStorage } from '@services/local-storage';
import { useEffect, useState } from 'react';
+import { useIntl } from 'react-intl';
const ReduceMotion = () => {
+ const intl = useIntl();
const [isDeactivated, setIsDeactivated] = useState<boolean>(false);
useEffect(() => {
@@ -23,9 +24,18 @@ const ReduceMotion = () => {
return (
<Toggle
id="reduced-motion"
- label={t`Animations:`}
- leftChoice={t`On`}
- rightChoice={t`Off`}
+ label={intl.formatMessage({
+ defaultMessage: 'Animations:',
+ description: 'ReduceMotion: toggle label',
+ })}
+ leftChoice={intl.formatMessage({
+ defaultMessage: 'On',
+ description: 'ReduceMotion: toggle on label',
+ })}
+ rightChoice={intl.formatMessage({
+ defaultMessage: 'Off',
+ description: 'ReduceMotion: toggle off label',
+ })}
value={isDeactivated}
changeHandler={updateState}
/>