mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-08 17:32:27 +08:00
feat: add spanish language
This commit is contained in:
@ -7,7 +7,7 @@ export const APP_INFO: AppInfo = {
|
|||||||
description: '',
|
description: '',
|
||||||
copyright: '',
|
copyright: '',
|
||||||
privacy_policy: '',
|
privacy_policy: '',
|
||||||
default_language: 'zh-Hans',
|
default_language: 'es',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isShowPrompt = false
|
export const isShowPrompt = false
|
||||||
|
|||||||
@ -2,8 +2,10 @@
|
|||||||
import i18n from 'i18next'
|
import i18n from 'i18next'
|
||||||
import { initReactI18next } from 'react-i18next'
|
import { initReactI18next } from 'react-i18next'
|
||||||
import commonEn from './lang/common.en'
|
import commonEn from './lang/common.en'
|
||||||
|
import commonEs from './lang/common.es'
|
||||||
import commonZh from './lang/common.zh'
|
import commonZh from './lang/common.zh'
|
||||||
import appEn from './lang/app.en'
|
import appEn from './lang/app.en'
|
||||||
|
import appEs from './lang/app.es'
|
||||||
import appZh from './lang/app.zh'
|
import appZh from './lang/app.zh'
|
||||||
import type { Locale } from '.'
|
import type { Locale } from '.'
|
||||||
|
|
||||||
@ -14,6 +16,12 @@ const resources = {
|
|||||||
app: appEn,
|
app: appEn,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'es': {
|
||||||
|
translation: {
|
||||||
|
common: commonEs,
|
||||||
|
app: appEs,
|
||||||
|
},
|
||||||
|
},
|
||||||
'zh-Hans': {
|
'zh-Hans': {
|
||||||
translation: {
|
translation: {
|
||||||
common: commonZh,
|
common: commonZh,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
export const i18n = {
|
export const i18n = {
|
||||||
defaultLocale: 'en',
|
defaultLocale: 'en',
|
||||||
locales: ['en', 'zh-Hans'],
|
locales: ['en', 'es', 'zh-Hans'],
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type Locale = typeof i18n['locales'][number]
|
export type Locale = typeof i18n['locales'][number]
|
||||||
|
|||||||
33
i18n/lang/app.es.ts
Normal file
33
i18n/lang/app.es.ts
Normal file
@ -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
|
||||||
33
i18n/lang/common.es.ts
Normal file
33
i18n/lang/common.es.ts
Normal file
@ -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
|
||||||
Reference in New Issue
Block a user