Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1dd805240 | ||
|
|
334d8c70ec | ||
|
|
b7236112bc | ||
|
|
5d8ebbd747 |
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,8 @@
|
||||
node_modules/
|
||||
*/node_modules/
|
||||
*/build/
|
||||
|
||||
**/node_modules/
|
||||
**/build/
|
||||
.DS_Store
|
||||
.env
|
||||
File diff suppressed because one or more lines are too long
1
frontend/json/runtimeError.json
Normal file
1
frontend/json/runtimeError.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
||||
@ -13,6 +13,7 @@ const LANGS: LanguageOption[] = [
|
||||
{ value: 'fr', label: '🇫🇷 FR' },
|
||||
{ value: 'es', label: '🇪🇸 ES' },
|
||||
{ value: 'de', label: '🇩🇪 DE' },
|
||||
{ value: 'pt', label: '🇵🇹 PT' },
|
||||
];
|
||||
|
||||
const Option = (props: OptionProps<LanguageOption, false>) => (
|
||||
|
||||
@ -3,19 +3,80 @@ import { initReactI18next } from 'react-i18next';
|
||||
import HttpApi from 'i18next-http-backend';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
|
||||
// Embedded translations to avoid external locale files setup
|
||||
const resources = {
|
||||
pt: {
|
||||
common: {
|
||||
pages: {
|
||||
dashboard: {
|
||||
pageTitle: 'Painel',
|
||||
overview: 'VisĂŁo geral',
|
||||
loadingWidgets: 'Carregando widgets...',
|
||||
loading: 'Carregando...'
|
||||
},
|
||||
login: {
|
||||
pageTitle: 'Entrar',
|
||||
form: {
|
||||
loginLabel: 'Usuário',
|
||||
loginHelp: 'Por favor, insira seu usuário',
|
||||
passwordLabel: 'Senha',
|
||||
passwordHelp: 'Por favor, insira sua senha',
|
||||
remember: 'Lembrar-me',
|
||||
forgotPassword: 'Esqueceu a senha?',
|
||||
loginButton: 'Entrar',
|
||||
loading: 'Carregando...',
|
||||
noAccountYet: 'Ainda nĂŁo tem uma conta?',
|
||||
newAccount: 'Nova Conta'
|
||||
},
|
||||
pexels: {
|
||||
photoCredit: 'Foto de {{photographer}} no Pexels',
|
||||
videoCredit: 'VĂdeo de {{name}} no Pexels',
|
||||
videoUnsupported: 'Seu navegador nĂŁo suporta a tag de vĂdeo.'
|
||||
},
|
||||
footer: {
|
||||
copyright: '© {{year}} {{title}}. Todos os direitos reservados',
|
||||
privacy: 'PolĂtica de Privacidade'
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
widgetCreator: {
|
||||
title: 'Criar Gráfico ou Widget',
|
||||
helpText: 'Descreva seu novo widget ou gráfico em linguagem natural. Por exemplo: "Número de usuários admin" OU "gráfico vermelho com número de contratos fechados agrupados por mês"',
|
||||
settingsTitle: 'Configurações do Criador de Widgets',
|
||||
settingsDescription: 'Para qual função estamos exibindo e criando widgets?',
|
||||
doneButton: 'ConcluĂdo',
|
||||
loading: 'Carregando...'
|
||||
},
|
||||
search: {
|
||||
placeholder: 'Pesquisar',
|
||||
required: 'Campo obrigatĂłrio',
|
||||
minLength: 'Tamanho mĂnimo: {{count}} caracteres'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
i18n
|
||||
.use(HttpApi)
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
resources,
|
||||
fallbackLng: 'en',
|
||||
supportedLngs: ['en', 'fr', 'es', 'de', 'pt'],
|
||||
ns: ['common'],
|
||||
defaultNS: 'common',
|
||||
detection: {
|
||||
order: ['localStorage', 'navigator'],
|
||||
lookupLocalStorage: 'app_lang_31659',
|
||||
caches: ['localStorage'],
|
||||
caches: ['localStorage']
|
||||
},
|
||||
backend: {
|
||||
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
||||
loadPath: '/locales/{{lng}}/{{ns}}.json'
|
||||
},
|
||||
interpolation: { escapeValue: false },
|
||||
interpolation: {
|
||||
escapeValue: false
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user