From c4ebdf1be0947d1b656983989df2442b86b446c9 Mon Sep 17 00:00:00 2001 From: potts99 Date: Tue, 28 Nov 2023 21:37:53 +0000 Subject: [PATCH] more locales --- apps/client/layouts/settings.tsx | 9 ++++++--- apps/client/locales/da/peppermint.json | 6 +++++- apps/client/locales/de/peppermint.json | 6 +++++- apps/client/locales/en/peppermint.json | 6 +++++- apps/client/locales/es/peppermint.json | 6 +++++- apps/client/locales/fr/peppermint.json | 7 ++++++- apps/client/locales/no/peppermint.json | 6 +++++- apps/client/locales/pt/peppermint.json | 9 ++++++++- apps/client/locales/se/peppermint.json | 6 +++++- apps/client/locales/tl/peppermint.json | 6 +++++- apps/client/pages/settings/profile.tsx | 20 ++++++++++---------- 11 files changed, 65 insertions(+), 22 deletions(-) diff --git a/apps/client/layouts/settings.tsx b/apps/client/layouts/settings.tsx index 882355281..3f4f4190e 100644 --- a/apps/client/layouts/settings.tsx +++ b/apps/client/layouts/settings.tsx @@ -1,11 +1,14 @@ import { useState } from "react"; +import useTranslation from "next-translate/useTranslation"; import Link from "next/link"; import { useRouter } from "next/router"; export default function Settings({ children }) { const router = useRouter(); + const { t } = useTranslation("peppermint"); + const linkStyles = { active: "w-full bg-teal-50 border-teal-500 text-teal-700 hover:bg-teal-50 hover:text-teal-700 group border-l-4 px-3 py-2 flex items-center text-sm font-medium", @@ -46,7 +49,7 @@ export default function Settings({ children }) { d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z" /> - Profile + {t("profile")} - Notifications + {t("notifications")} - Password + {t("reset_password")} diff --git a/apps/client/locales/da/peppermint.json b/apps/client/locales/da/peppermint.json index 6a10a4501..d08aeaee9 100644 --- a/apps/client/locales/da/peppermint.json +++ b/apps/client/locales/da/peppermint.json @@ -74,7 +74,11 @@ "admin_settings": "Administratorindstillinger", "profile": "Profil", "logout": "Log ud", - "unassigned_tickets": "Ikke tildelte billetter" + "unassigned_tickets": "Ikke tildelte billetter", + "profile_desc": "Disse oplysninger vil blive vist offentligt, så vær forsigtig med, hvad du deler.", + "language": "Sprog", + "notifications": "Notifikationer", + "save_and_reload": "Gem og genindlæs" } \ No newline at end of file diff --git a/apps/client/locales/de/peppermint.json b/apps/client/locales/de/peppermint.json index 9a2254306..efc061b72 100644 --- a/apps/client/locales/de/peppermint.json +++ b/apps/client/locales/de/peppermint.json @@ -74,5 +74,9 @@ "admin_settings": "Admin-Einstellungen", "profile": "Profil", "logout": "Abmelden", - "unassigned_tickets": "Nicht zugewiesene Tickets" + "unassigned_tickets": "Nicht zugewiesene Tickets", + "profile_desc": "Diese Informationen werden öffentlich angezeigt, also achten Sie darauf, was Sie teilen.", + "language": "Sprache", + "notifications": "Benachrichtigungen", + "save_and_reload": "Speichern und neu laden" } diff --git a/apps/client/locales/en/peppermint.json b/apps/client/locales/en/peppermint.json index fe594a5d5..594d220e6 100644 --- a/apps/client/locales/en/peppermint.json +++ b/apps/client/locales/en/peppermint.json @@ -74,5 +74,9 @@ "admin_settings": "Admin Settings", "profile": "Profile", "logout": "Logout", - "unassigned_tickets": "Unassigned Tickets" + "unassigned_tickets": "Unassigned Tickets", + "profile_desc": "This information will be displayed publicly so be careful what you share.", + "language": "Language", + "notifications": "Notifications", + "save_and_reload": "Save and Reload" } diff --git a/apps/client/locales/es/peppermint.json b/apps/client/locales/es/peppermint.json index 70ffc4fde..5a1b18f4c 100644 --- a/apps/client/locales/es/peppermint.json +++ b/apps/client/locales/es/peppermint.json @@ -74,6 +74,10 @@ "admin_settings": "Configuración de Administrador", "profile": "Perfil", "logout": "Cerrar sesión", - "unassigned_tickets": "Tickets no asignados" + "unassigned_tickets": "Tickets no asignados", + "profile_desc": "Esta información se mostrará públicamente, así que ten cuidado con lo que compartes.", + "language": "Idioma", + "notifications": "Notificaciones", + "save_and_reload": "Guardar y recargar" } \ No newline at end of file diff --git a/apps/client/locales/fr/peppermint.json b/apps/client/locales/fr/peppermint.json index da93d8e3b..0207fe08d 100644 --- a/apps/client/locales/fr/peppermint.json +++ b/apps/client/locales/fr/peppermint.json @@ -74,6 +74,11 @@ "admin_settings": "Paramètres administrateur", "profile": "Profil", "logout": "Déconnexion", - "unassigned_tickets": "Tickets non attribués" + "unassigned_tickets": "Tickets non attribués", + "profile_desc": "Ces informations seront affichées publiquement, alors faites attention à ce que vous partagez.", + "language": "Langue", + "notifications": "Notifications", + "save_and_reload": "Enregistrer et recharger" + } \ No newline at end of file diff --git a/apps/client/locales/no/peppermint.json b/apps/client/locales/no/peppermint.json index 063c3e3e3..611f149c6 100644 --- a/apps/client/locales/no/peppermint.json +++ b/apps/client/locales/no/peppermint.json @@ -74,6 +74,10 @@ "admin_settings": "Admininnstillinger", "profile": "Profil", "logout": "Logg ut", - "unassigned_tickets": "Ikke tildelte billetter" + "unassigned_tickets": "Ikke tildelte billetter", + "profile_desc": "Denne informasjonen vil bli vist offentlig, så vær forsiktig med hva du deler.", + "language": "Språk", + "notifications": "Varsler", + "save_and_reload": "Lagre og last inn på nytt" } \ No newline at end of file diff --git a/apps/client/locales/pt/peppermint.json b/apps/client/locales/pt/peppermint.json index 2186f10bb..20bd655d4 100644 --- a/apps/client/locales/pt/peppermint.json +++ b/apps/client/locales/pt/peppermint.json @@ -71,6 +71,13 @@ "closed_issue": "Problema Fechado", "recent_tickets": "Tickets Recentes", "notebook_title": "Título do Caderno", - "admin_settings": "Configurações de Admin" + "admin_settings": "Configurações de Admin", + "profile": "Perfil", + "logout": "Sair", + "unassigned_tickets": "Tickets não atribuídos", + "profile_desc": "Estas informações serão exibidas publicamente, então tenha cuidado com o que compartilha.", + "language": "Idioma", + "notifications": "Notificações", + "save_and_reload": "Salvar e Recarregar" } \ No newline at end of file diff --git a/apps/client/locales/se/peppermint.json b/apps/client/locales/se/peppermint.json index f9d38dd58..4ed9f34bd 100644 --- a/apps/client/locales/se/peppermint.json +++ b/apps/client/locales/se/peppermint.json @@ -74,5 +74,9 @@ "admin_settings": "Admininställningar", "profile": "Profil", "logout": "Logga ut", - "unassigned_tickets": "Oattribuerade biljetter" + "unassigned_tickets": "Oattribuerade biljetter", + "profile_desc": "Denna information kommer att visas offentligt, så var försiktig med vad du delar.", + "language": "Språk", + "notifications": "Notifieringar", + "save_and_reload": "Spara och ladda om" } diff --git a/apps/client/locales/tl/peppermint.json b/apps/client/locales/tl/peppermint.json index 5c4a35f8a..fee9879b7 100644 --- a/apps/client/locales/tl/peppermint.json +++ b/apps/client/locales/tl/peppermint.json @@ -74,7 +74,11 @@ "admin_settings": "Mga Setting ng Admin", "profile": "Profile", "logout": "Mag-log out", - "unassigned_tickets": "Hindi itinalagang mga Tiket" + "unassigned_tickets": "Hindi itinalagang mga Tiket", + "profile_desc": "Ang impormasyong ito ay ipapakita sa publiko kaya mag-ingat sa iyong ibabahagi.", + "language": "Wika", + "notifications": "Mga Abiso", + "save_and_reload": "I-save at I-reload" } \ No newline at end of file diff --git a/apps/client/pages/settings/profile.tsx b/apps/client/pages/settings/profile.tsx index 507d82dac..7ef2edd63 100644 --- a/apps/client/pages/settings/profile.tsx +++ b/apps/client/pages/settings/profile.tsx @@ -1,4 +1,5 @@ import { getCookie } from "cookies-next"; +import useTranslation from "next-translate/useTranslation"; import { useRouter } from "next/router"; import { useState } from "react"; import { useUser } from "../../store/session"; @@ -7,6 +8,8 @@ export default function UserProfile() { const { user } = useUser(); const token = getCookie("session"); + const { t } = useTranslation("peppermint"); + const router = useRouter(); const [name, setName] = useState(user.name); @@ -41,19 +44,16 @@ export default function UserProfile() {

- Profile + {t("profile")}

-

- This information will be displayed publicly so be careful what you - share. -

+

{t("profile_desc")}