diff --git a/packages/web/src/components/ItemFieldValue.tsx b/packages/web/src/components/ItemFieldValue.tsx index 6a78015..c5f2c95 100644 --- a/packages/web/src/components/ItemFieldValue.tsx +++ b/packages/web/src/components/ItemFieldValue.tsx @@ -2,6 +2,7 @@ import styled from "@emotion/styled" import type { ItemSection, ItemField } from "opvault.js" import { FieldType } from "opvault.js" import { useCallback, useMemo, useState } from "react" +import { useTranslate } from "../i18n" import { parseMonthYear } from "../utils" import { BigTextView } from "./BigTextView" import { ErrorBoundary } from "./ErrorBoundary" @@ -31,6 +32,7 @@ export { Password as PasswordFieldView } const Password: React.FC<{ field: Pick }> = ({ field }) => { + const t = useTranslate() const [show, setShow] = useState(false) const [bigText, showBigText] = useState(false) @@ -59,9 +61,11 @@ const Password: React.FC<{ {bigText && {field.v}} - Copier - {show ? "Cacher" : "Afficher"} - {!bigText && Afficher en gros caractères} + {t.action.copy} + {show ? t.action.hide : t.action.show} + {!bigText && ( + {t.action.show_in_big_characters} + )} ) diff --git a/packages/web/src/i18n/texts.yml b/packages/web/src/i18n/texts.yml index ff0f600..ca64c5b 100644 --- a/packages/web/src/i18n/texts.yml +++ b/packages/web/src/i18n/texts.yml @@ -103,6 +103,26 @@ action: fr: Déverouiller ja: ロック解除 + copy: + en: Copy + fr: Copier + ja: コピー + + hide: + en: Hide + fr: Cacher + ja: 非表示 + + show: + en: Show + fr: Afficher + ja: 表示 + + show_in_big_characters: + en: Show in large characters + fr: Afficher en gros caractères + ja: 大きく表示 + go_back: en: Back fr: Revenir diff --git a/packages/web/src/pages/Vault.tsx b/packages/web/src/pages/Vault.tsx index 27d97ad..7f842d6 100644 --- a/packages/web/src/pages/Vault.tsx +++ b/packages/web/src/pages/Vault.tsx @@ -158,7 +158,7 @@ export const VaultView: React.FC<{ vault: Vault; onLock(): void }> = ({ - setShowSettings(true)}> + setShowSettings(true)} title={t.label.settings}>