mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-03 16:31:37 +01:00
Name the translate function _t
Then it should continue to get picked up by the script This seems a bit flaky and ew but I'm not sure I want to get into changing this in this PR.
This commit is contained in:
parent
7e76eb5f93
commit
b74c4d449b
@ -90,11 +90,11 @@ interface AudioPlayerViewProps {
|
||||
* ```
|
||||
*/
|
||||
export function AudioPlayerView({ vm }: Readonly<AudioPlayerViewProps>): JSX.Element {
|
||||
const i18n = useI18n();
|
||||
const { translate: _t } = useI18n();
|
||||
|
||||
const {
|
||||
playbackState,
|
||||
mediaName = i18n.translate("timeline|m.audio|unnamed_audio"),
|
||||
mediaName = _t("timeline|m.audio|unnamed_audio"),
|
||||
sizeBytes,
|
||||
durationSeconds,
|
||||
playedSeconds,
|
||||
|
||||
@ -46,9 +46,9 @@ export function PlayPauseButton({
|
||||
togglePlay,
|
||||
...rest
|
||||
}: Readonly<PlayPauseButtonProps>): JSX.Element {
|
||||
const i18n = useI18n();
|
||||
const { translate: _t } = useI18n();
|
||||
|
||||
const label = playing ? i18n.translate("action|pause") : i18n.translate("action|play");
|
||||
const label = playing ? _t("action|pause") : _t("action|play");
|
||||
|
||||
return (
|
||||
<IconButton
|
||||
|
||||
@ -33,7 +33,7 @@ interface ISeekCSS extends CSSProperties {
|
||||
* ```
|
||||
*/
|
||||
export function SeekBar({ value = 0, className, ...rest }: Readonly<SeekBarProps>): JSX.Element {
|
||||
const i18n = useI18n();
|
||||
const { translate: _t } = useI18n();
|
||||
|
||||
const [newValue, setNewValue] = useState(value);
|
||||
// Throttle the value setting to avoid excessive re-renders
|
||||
@ -53,7 +53,7 @@ export function SeekBar({ value = 0, className, ...rest }: Readonly<SeekBarProps
|
||||
value={newValue}
|
||||
step={1}
|
||||
style={{ "--fillTo": newValue / 100 } as ISeekCSS}
|
||||
aria-label={i18n.translate("a11y|seek_bar_label")}
|
||||
aria-label={_t("a11y|seek_bar_label")}
|
||||
{...rest}
|
||||
/>
|
||||
);
|
||||
|
||||
@ -39,7 +39,7 @@ export interface PillProps extends Omit<HTMLAttributes<HTMLDivElement>, "onClick
|
||||
*/
|
||||
export function Pill({ className, children, label, onClick, ...props }: PropsWithChildren<PillProps>): JSX.Element {
|
||||
const id = useId();
|
||||
const i18n = useI18n();
|
||||
const { translate: _t } = useI18n();
|
||||
|
||||
return (
|
||||
<Flex
|
||||
@ -58,7 +58,7 @@ export function Pill({ className, children, label, onClick, ...props }: PropsWit
|
||||
aria-describedby={id}
|
||||
size="16px"
|
||||
onClick={onClick}
|
||||
aria-label={i18n.translate("action|delete")}
|
||||
aria-label={_t("action|delete")}
|
||||
className="mx_Dialog_nonDialogButton"
|
||||
>
|
||||
<CloseIcon color="var(--cpd-color-icon-tertiary)" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user