From 809f9e4f001e2f4f0bbbf3884bc6b23c9524015f Mon Sep 17 00:00:00 2001 From: gsuee <141363690+gsuee@users.noreply.github.com> Date: Mon, 2 Sep 2024 07:12:16 -0400 Subject: [PATCH] Internationalization of some messages Contributed by @gsuee --- frontend/src/components/Settings/Options.js | 47 ++++++------ frontend/src/layout/index.js | 6 +- frontend/src/pages/SettingsCustom/index.js | 14 ++-- frontend/src/translate/languages/en.js | 79 +++++++++++++++++++++ frontend/src/translate/languages/es.js | 79 +++++++++++++++++++++ frontend/src/translate/languages/id.js | 79 +++++++++++++++++++++ frontend/src/translate/languages/pt.js | 79 +++++++++++++++++++++ 7 files changed, 351 insertions(+), 32 deletions(-) diff --git a/frontend/src/components/Settings/Options.js b/frontend/src/components/Settings/Options.js index 62f8a73a..0420281c 100644 --- a/frontend/src/components/Settings/Options.js +++ b/frontend/src/components/Settings/Options.js @@ -23,6 +23,7 @@ import { faCopy, faGears } from '@fortawesome/free-solid-svg-icons'; import { generateSecureToken } from "../../helpers/generateSecureToken"; import { copyToClipboard } from "../../helpers/copyToClipboard"; +import { i18n } from "../../translate/i18n.js"; const useStyles = makeStyles((theme) => ({ container: { @@ -319,7 +320,7 @@ export default function Options(props) { */} - Avaliações + {i18n.t("settings.validations.title")} {loadingUserRating && "Atualizando..."} @@ -338,7 +339,7 @@ export default function Options(props) { - Gerenciamento de Expediente + {i18n.t("settings.OfficeManagement.title")} {loadingScheduleType && "Atualizando..."} @@ -359,7 +360,7 @@ export default function Options(props) { - Ignorar Mensagens de Grupos + {i18n.t("settings.IgnoreGroupMessages.title")} {loadingScheduleType && "Atualizando..."} @@ -379,7 +380,7 @@ export default function Options(props) { - Chamadas de Voz e Vídeo + {i18n.t("settings.VoiceAndVideoCalls.title")} {loadingCallType && "Atualizando..."} @@ -418,7 +419,7 @@ export default function Options(props) { - Saída automática de chatbot + {i18n.t("settings.AutomaticChatbotOutput.title")} {loadingChatbotAutoExit && "Atualizando..."} @@ -438,7 +439,7 @@ export default function Options(props) { - Mensagens Rápidas + {i18n.t("settings.QuickMessages.title")} {loadingQuickMessages && "Atualizando..."} @@ -517,7 +518,7 @@ export default function Options(props) { - Permitir cadastro + {i18n.t("settings.AllowRegistration.title")} {loadingAllowSignup && "Atualizando..."} @@ -540,7 +541,7 @@ export default function Options(props) { ({ @@ -413,11 +415,11 @@ const LoggedInLayout = ({ children, themeToggle }) => { > {greaterThenSm && user?.profile === "admin" && user?.company?.dueDate ? ( <> - Olá {user.name}, seja bem-vindo a {user?.company?.name}! (Ativo até {dateToClient(user?.company?.dueDate)}) + {i18n.t("settings.WelcomeGreeting.greetings")} {user.name}, {i18n.t("settings.WelcomeGreeting.welcome")} {user?.company?.name}! ({i18n.t("settings.WelcomeGreeting.expirationTime")} {dateToClient(user?.company?.dueDate)}) ) : ( <> - Olá {user.name}, seja bem-vindo a {user?.company?.name}! + {i18n.t("settings.WelcomeGreeting.greetings")} {user.name}, {i18n.t("settings.WelcomeGreeting.welcome")} {user?.company?.name}! ({i18n.t("settings.WelcomeGreeting.expirationTime")} {dateToClient(user?.company?.dueDate)}) )} diff --git a/frontend/src/pages/SettingsCustom/index.js b/frontend/src/pages/SettingsCustom/index.js index 5f6bed55..2270a0b6 100644 --- a/frontend/src/pages/SettingsCustom/index.js +++ b/frontend/src/pages/SettingsCustom/index.js @@ -165,13 +165,13 @@ const SettingsCustom = () => { onChange={handleTabChange} className={classes.tab} > - - {schedulesEnabled && } - {isSuper() ? : null} - {isSuper() ? : null} - {isSuper() ? : null} - {isSuper() ? : null} - {isSuper() ? : null} + + {schedulesEnabled && } + {isSuper() ? : null} + {isSuper() ? : null} + {isSuper() ? : null} + {isSuper() ? : null} + {isSuper() ? : null}