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/
|
||||||
*/node_modules/
|
*/node_modules/
|
||||||
*/build/
|
*/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: 'fr', label: '🇫🇷 FR' },
|
||||||
{ value: 'es', label: '🇪🇸 ES' },
|
{ value: 'es', label: '🇪🇸 ES' },
|
||||||
{ value: 'de', label: '🇩🇪 DE' },
|
{ value: 'de', label: '🇩🇪 DE' },
|
||||||
|
{ value: 'pt', label: '🇵🇹 PT' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const Option = (props: OptionProps<LanguageOption, false>) => (
|
const Option = (props: OptionProps<LanguageOption, false>) => (
|
||||||
|
|||||||
@ -3,19 +3,80 @@ import { initReactI18next } from 'react-i18next';
|
|||||||
import HttpApi from 'i18next-http-backend';
|
import HttpApi from 'i18next-http-backend';
|
||||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
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
|
i18n
|
||||||
.use(HttpApi)
|
.use(HttpApi)
|
||||||
.use(LanguageDetector)
|
.use(LanguageDetector)
|
||||||
.use(initReactI18next)
|
.use(initReactI18next)
|
||||||
.init({
|
.init({
|
||||||
|
resources,
|
||||||
fallbackLng: 'en',
|
fallbackLng: 'en',
|
||||||
|
supportedLngs: ['en', 'fr', 'es', 'de', 'pt'],
|
||||||
|
ns: ['common'],
|
||||||
|
defaultNS: 'common',
|
||||||
detection: {
|
detection: {
|
||||||
order: ['localStorage', 'navigator'],
|
order: ['localStorage', 'navigator'],
|
||||||
lookupLocalStorage: 'app_lang_31659',
|
lookupLocalStorage: 'app_lang_31659',
|
||||||
caches: ['localStorage'],
|
caches: ['localStorage']
|
||||||
},
|
},
|
||||||
backend: {
|
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