feat(i18n): settings static content

This commit is contained in:
ManishMadan2882
2024-05-28 01:39:37 +05:30
parent f6c66f6ee4
commit 4fcc80719e
13 changed files with 268 additions and 46 deletions

View File

@@ -0,0 +1,39 @@
{
"language": "English",
"chat":"Chat",
"newChat":"New Chat",
"myPlan":"My Plan",
"about":"About",
"inputPlaceholder":"Type your message here...",
"tagline":"DocsGPT uses GenAI, please review critial information using sources.",
"sourceDocs":"Source Docs",
"settings":{
"label":"Settings",
"general":{
"label":"General",
"selectTheme":"Select Theme",
"light":"Light",
"dark":"Dark",
"selectLanguage":"Select Language",
"chunks":"Chunks processed per query",
"prompt":"Active Prompt",
"deleteAllLabel":"Delete all Conversation",
"deleteAllBtn":"Delete all",
"addNew":"Add New"
},
"documents":{
"label":"Documents",
"name":"Document Name",
"date":"Vector Date",
"type":"Type",
"tokenUsage":"Token Usage"
},
"apiKeys":{
"label":"API Keys",
"name":"Name",
"key":"API Key",
"sourceDoc":"Source Document",
"createNew":"Create New"
}
}
}

View File

@@ -0,0 +1,39 @@
{
"language": "Spanish",
"chat": "Chat",
"newChat": "Nuevo Chat",
"myPlan": "Mi Plan",
"about": "Acerca de",
"inputPlaceholder": "Escribe tu mensaje aquí...",
"tagline": "DocsGPT utiliza GenAI, por favor revisa información crítica utilizando fuentes.",
"sourceDocs": "Documentos Fuente",
"settings": {
"label": "Configuración",
"general": {
"label":"General",
"selectTheme": "Seleccionar Tema",
"light":"de luz",
"dark":"oscura",
"selectLanguage": "Seleccionar Idioma",
"chunks": "Trozos procesados por consulta",
"prompt": "Prompt Activo",
"deleteAllLabel": "Eliminar toda la Conversación",
"deleteAllBtn": "Eliminar todo",
"addNew": "Agregar Nuevo"
},
"documents": {
"label":"Documentos",
"name": "Nombre del Documento",
"date": "Fecha Vector",
"type": "Tipo",
"tokenUsage": "Uso de Tokens"
},
"apiKeys": {
"label":"Claves API",
"name": "Nombre",
"key": "Clave de API",
"sourceDoc": "Documento Fuente",
"createNew": "Crear Nuevo"
}
}
}

View File

@@ -0,0 +1,21 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import en from './en.json'; //English
import es from './es.json'; //Spanish
i18n.use(initReactI18next).init({
resources: {
en: {
translation: en,
},
es: {
translation: es,
},
},
});
const locale = localStorage.getItem('docsgpt-locale') ?? 'en';
i18n.changeLanguage(locale);
export default i18n;