diff --git a/packages/web/src/components/ItemFieldValue.tsx b/packages/web/src/components/ItemFieldValue.tsx index c5f2c95..5312268 100644 --- a/packages/web/src/components/ItemFieldValue.tsx +++ b/packages/web/src/components/ItemFieldValue.tsx @@ -18,13 +18,14 @@ const Container = styled.div` ` function useCopy(text: string) { + const t = useTranslate() return useCallback(() => { navigator.clipboard.writeText(text) toast({ type: ToastType.Secondary, - message: "Copied to clipboard.", + message: t.tips.copied_to_clipboard, }) - }, [text]) + }, [text, t]) } export { Password as PasswordFieldView } diff --git a/packages/web/src/i18n/texts.yml b/packages/web/src/i18n/texts.yml index ca64c5b..ebde8a1 100644 --- a/packages/web/src/i18n/texts.yml +++ b/packages/web/src/i18n/texts.yml @@ -138,3 +138,8 @@ tips: en: Automatically lock after inactivity fr: Verouiller automatiquement après un temps d’inactivité ja: 一定時間使わないときに自動的にロックする + + copied_to_clipboard: + en: Copied to clipboard + fr: Copié dans le presse-papier + ja: クリップボードへコピーしました