Compare commits

..

No commits in common. "ai-dev" and "master" have entirely different histories.

5 changed files with 7 additions and 77 deletions

5
.gitignore vendored
View File

@ -1,8 +1,3 @@
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

View File

@ -1 +0,0 @@
{}

View File

@ -13,7 +13,6 @@ 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>) => (

View File

@ -3,80 +3,19 @@ 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: { interpolation: { escapeValue: false },
escapeValue: false
}
}); });