Translation followup (#9735)

Address PR comments and more progress on translation
This commit is contained in:
Félix Malfait
2025-01-19 13:29:19 +01:00
committed by GitHub
parent 052331685f
commit 056cb7c66d
97 changed files with 3981 additions and 402 deletions

View File

@ -1,5 +1,6 @@
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { useLingui } from '@lingui/react/macro';
import { isUndefined } from '@sniptt/guards';
import { ComponentPropsWithoutRef, ReactNode, useMemo } from 'react';
import {
@ -122,6 +123,7 @@ export const SnackBar = ({
variant = SnackBarVariant.Default,
}: SnackBarProps) => {
const theme = useTheme();
const { t } = useLingui();
const { animation: progressAnimation, value: progressValue } =
useProgressAnimation({
autoPlay: isUndefined(overrideProgressValue),
@ -193,10 +195,10 @@ export const SnackBar = ({
<StyledIcon>{icon}</StyledIcon>
<StyledMessage>{message}</StyledMessage>
<StyledActions>
{!!onCancel && <LightButton title="Cancel" onClick={onCancel} />}
{!!onCancel && <LightButton title={t`Cancel`} onClick={onCancel} />}
{!!onClose && (
<LightIconButton title="Close" Icon={IconX} onClick={onClose} />
<LightIconButton title={t`Close`} Icon={IconX} onClick={onClose} />
)}
</StyledActions>
</StyledHeader>