Skip to content

Commit

Permalink
feat: add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddyDevelop committed Oct 9, 2024
1 parent 1b2ffd3 commit 2f3ad95
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ interface Props {
}

const ListSessionsAccordion = ({
sessions = [],
checkedItemID,
setCheckedItemID,
onSessionDelete,
deletableSessionIDs,
}: Props) => {
sessions = [],
checkedItemID,
setCheckedItemID,
onSessionDelete,
deletableSessionIDs,
}: Props) => {
const { t } = useContext(TranslateContext);

const labels = (session: Session) => {
Expand Down Expand Up @@ -68,16 +68,14 @@ const ListSessionsAccordion = ({
</Paragraph>
{deletableSessionIDs?.includes(session.id) ? (
<Paragraph>
<Headline2>{t("headlines.deleteSession")}</Headline2>
{t("texts.deleteSession")}
<br />
<Headline2>{t("headlines.revokeSession")}</Headline2>
<Link
uiAction={"session-delete"}
dangerous
onClick={(event) => onSessionDelete(event, session.id)}
loadingSpinnerPosition={"right"}
>
{t("labels.delete")}
{t("labels.revoke")}
</Link>
</Paragraph>
) : null}
Expand Down
5 changes: 5 additions & 0 deletions frontend/elements/src/i18n/bn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const bn: Translation = {
signUp: "নিবন্ধন করুন",
selectLoginMethod: "লগইন পদ্ধতি নির্বাচন করুন",
setupLoginMethod: "লগইন পদ্ধতি সেটআপ করুন",
lastUsed: "সর্বশেষ দেখা হয়েছে",
ipAddress: "আইপি ঠিকানা",
revokeSession: "সেশন বাতিল করুন",
},
texts: {
enterPasscode: 'যে পাসকোডটি পাঠানো হয়েছিল "{emailAddress}" এ তা লিখুন.',
Expand Down Expand Up @@ -104,6 +107,8 @@ export const bn: Translation = {
setUsername: "ব্যবহারকারীর নাম সেট করুন",
changePassword: "পাসওয়ার্ড পরিবর্তন করুন",
setPassword: "পাসওয়ার্ড সেট করুন",
revoke: "বাতিল করুন",
currentSession: "বর্তমান সেশন",
},
errors: {
somethingWentWrong:
Expand Down
5 changes: 5 additions & 0 deletions frontend/elements/src/i18n/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const de: Translation = {
signUp: "Registrieren",
selectLoginMethod: "Wähle die Anmelde-Methode",
setupLoginMethod: "Anmelde-Methode einrichten",
lastUsed: "Zuletzt gesehen",
ipAddress: "IP Adresse",
revokeSession: "Sitzung beenden",
},
texts: {
enterPasscode:
Expand Down Expand Up @@ -107,6 +110,8 @@ export const de: Translation = {
setUsername: "Benutzernamen setzen",
changePassword: "Passwort ändern",
setPassword: "Passwort setzen",
revoke: "Beenden",
currentSession: "Aktuelle Sitzung",
},
errors: {
somethingWentWrong:
Expand Down
5 changes: 5 additions & 0 deletions frontend/elements/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const en: Translation = {
signUp: "Create account",
selectLoginMethod: "Select login method",
setupLoginMethod: "Set up login method",
lastUsed: "Last seen",
ipAddress: "IP address",
revokeSession: "Revoke session",
},
texts: {
enterPasscode: 'Enter the passcode that was sent to "{emailAddress}".',
Expand Down Expand Up @@ -104,6 +107,8 @@ export const en: Translation = {
setUsername: "Set username",
changePassword: "Change password",
setPassword: "Set password",
revoke: "Revoke",
currentSession: "Current session",
},
errors: {
somethingWentWrong:
Expand Down
5 changes: 5 additions & 0 deletions frontend/elements/src/i18n/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const fr: Translation = {
signUp: "S'inscrire",
selectLoginMethod: "Sélectionner la méthode de connexion",
setupLoginMethod: "Configurer la méthode de connexion",
lastUsed: "Dernière vue",
ipAddress: "Adresse IP",
revokeSession: "Révoquer la session",
},
texts: {
enterPasscode:
Expand Down Expand Up @@ -108,6 +111,8 @@ export const fr: Translation = {
setUsername: "Définir le nom d'utilisateur",
changePassword: "Changer le mot de passe",
setPassword: "Définir le mot de passe",
revoke: "Révoquer",
currentSession: "Session en cours",
},
errors: {
somethingWentWrong:
Expand Down
5 changes: 5 additions & 0 deletions frontend/elements/src/i18n/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const it: Translation = {
signUp: "Registrati",
selectLoginMethod: "Seleziona il metodo di accesso",
setupLoginMethod: "Imposta il metodo di accesso",
lastUsed: "Ultima visualizzazione",
ipAddress: "Indirizzo IP",
revokeSession: "Revoca sessione",
},
texts: {
enterPasscode: 'Inserisci il codice di accesso inviato a "{emailAddress}".',
Expand Down Expand Up @@ -105,6 +108,8 @@ export const it: Translation = {
setUsername: "Imposta nome utente",
changePassword: "Cambia password",
setPassword: "Imposta password",
revoke: "Revoca",
currentSession: "Sessione corrente",
},
errors: {
somethingWentWrong: "Si è verificato un errore tecnico. Riprova più tardi.",
Expand Down
5 changes: 5 additions & 0 deletions frontend/elements/src/i18n/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const ptBR: Translation = {
signUp: "Registrar",
selectLoginMethod: "Selecionar método de login",
setupLoginMethod: "Configurar método de login",
lastUsed: "Última vez visto",
ipAddress: "Endereço IP",
revokeSession: "Revogar sessão",
},
texts: {
enterPasscode:
Expand Down Expand Up @@ -107,6 +110,8 @@ export const ptBR: Translation = {
setUsername: "Definir nome de usuário",
changePassword: "Alterar senha",
setPassword: "Definir senha",
revoke: "Revogar",
currentSession: "Sessão atual",
},
errors: {
somethingWentWrong:
Expand Down
5 changes: 5 additions & 0 deletions frontend/elements/src/i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export interface Translation {
signUp: string;
selectLoginMethod: string;
setupLoginMethod: string;
lastUsed: string;
ipAddress: string;
revokeSession: string;
};
texts: {
enterPasscode: string;
Expand Down Expand Up @@ -100,6 +103,8 @@ export interface Translation {
setPassword: string;
changeUsername: string;
setUsername: string;
revoke: string;
currentSession: string;
};
errors: {
somethingWentWrong: string;
Expand Down
5 changes: 5 additions & 0 deletions frontend/elements/src/i18n/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const zh: Translation = {
signUp: "注册",
selectLoginMethod: "选择登录方法",
setupLoginMethod: "设置登录方法",
lastUsed: "最后一次查看",
ipAddress: "IP 地址",
revokeSession: "撤销会话",
},
texts: {
enterPasscode: "输入发送到“{emailAddress}”的验证码。",
Expand Down Expand Up @@ -100,6 +103,8 @@ export const zh: Translation = {
setUsername: "设置用户名",
changePassword: "更改密码",
setPassword: "设置密码",
revoke: "撤销",
currentSession: "当前会话",
},
errors: {
somethingWentWrong: "发生技术错误。请稍后再试。",
Expand Down

0 comments on commit 2f3ad95

Please sign in to comment.