diff --git a/config/index.ts b/config/index.ts index 1dc745b..f98dc58 100644 --- a/config/index.ts +++ b/config/index.ts @@ -7,7 +7,7 @@ export const APP_INFO: AppInfo = { description: '', copyright: '', privacy_policy: '', - default_language: 'zh-Hans', + default_language: 'es', } export const isShowPrompt = false diff --git a/i18n/i18next-config.ts b/i18n/i18next-config.ts index 13580b1..52e6cee 100644 --- a/i18n/i18next-config.ts +++ b/i18n/i18next-config.ts @@ -2,8 +2,10 @@ import i18n from 'i18next' import { initReactI18next } from 'react-i18next' import commonEn from './lang/common.en' +import commonEs from './lang/common.es' import commonZh from './lang/common.zh' import appEn from './lang/app.en' +import appEs from './lang/app.es' import appZh from './lang/app.zh' import type { Locale } from '.' @@ -14,6 +16,12 @@ const resources = { app: appEn, }, }, + 'es': { + translation: { + common: commonEs, + app: appEs, + }, + }, 'zh-Hans': { translation: { common: commonZh, diff --git a/i18n/index.ts b/i18n/index.ts index 914b8ae..041b555 100644 --- a/i18n/index.ts +++ b/i18n/index.ts @@ -1,6 +1,6 @@ export const i18n = { defaultLocale: 'en', - locales: ['en', 'zh-Hans'], + locales: ['en', 'es', 'zh-Hans'], } as const export type Locale = typeof i18n['locales'][number] diff --git a/i18n/lang/app.es.ts b/i18n/lang/app.es.ts new file mode 100644 index 0000000..5a7e363 --- /dev/null +++ b/i18n/lang/app.es.ts @@ -0,0 +1,33 @@ +const translation = { + common: { + welcome: 'Bienvenido a usar', + appUnavailable: 'App es inaccesible', + appUnkonwError: 'App es inaccesible', + }, + chat: { + newChat: 'Nuevo chat', + newChatDefaultName: 'Nueva conversación', + openingStatementTitle: 'Frase de apertura', + powerBy: 'Desarrollado por', + prompt: 'Prompt', + privatePromptConfigTitle: 'Ajustes de conversación', + publicPromptConfigTitle: 'Prompt inicial', + configStatusDes: 'Antes de comenzar, puede modificar la configuración de la conversación', + configDisabled: + 'La configuración de la sesión anterior se ha utilizado para esta sesión.', + startChat: 'Comenzar chat', + privacyPolicyLeft: + 'Por favor lea la ', + privacyPolicyMiddle: + 'política de privacidad', + privacyPolicyRight: + ' proporcionada por el desarrollador de la aplicación.', + }, + errorMessage: { + valueOfVarRequired: 'El valor de las variables no puede estar vacío', + waitForResponse: + 'Por favor espere a que la respuesta al mensaje anterior se complete.', + }, +} + +export default translation diff --git a/i18n/lang/common.es.ts b/i18n/lang/common.es.ts new file mode 100644 index 0000000..8b5472d --- /dev/null +++ b/i18n/lang/common.es.ts @@ -0,0 +1,33 @@ +const translation = { + api: { + success: 'Éxito', + saved: 'Guardado', + create: 'Creado', + }, + operation: { + confirm: 'Confirmar', + cancel: 'Cancelar', + clear: 'Limpiar', + save: 'Guardar', + edit: 'Editar', + refresh: 'Reiniciar', + search: 'Buscar', + send: 'Enviar', + lineBreak: 'Salto de línea', + like: 'Me gusta', + dislike: 'No me gusta', + ok: 'OK', + }, + imageUploader: { + uploadFromComputer: 'Subir desde el ordenador', + uploadFromComputerReadError: 'La lectura de la imagen falló, por favor inténtelo de nuevo.', + uploadFromComputerUploadError: 'Error al subir la imagen, por favor inténtelo de nuevo.', + uploadFromComputerLimit: 'Las imágenes subidas no pueden superar los {{size}} MB', + pasteImageLink: 'Pegar enlace de imagen', + pasteImageLinkInputPlaceholder: 'Pegar enlace de imagen aquí', + pasteImageLinkInvalid: 'Enlace de imagen no válido', + imageUpload: 'Subir imagen', + }, +} + +export default translation