feat(i18n): Spanish
This commit is contained in:
parent
fad4b75dde
commit
3250773367
2 changed files with 35 additions and 0 deletions
33
src/i18n/es.ts
Normal file
33
src/i18n/es.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
import { createLocale } from './'
|
||||
|
||||
export default createLocale({
|
||||
'PROCESSING' () {
|
||||
return 'Cargando…' as const
|
||||
},
|
||||
'BTN_ERROR' () {
|
||||
return '❌¡Descarga Fallida!' as const
|
||||
},
|
||||
|
||||
'DEPRECATION_NOTICE' (btnName: string) {
|
||||
return `¡OBSOLETO!\nParecer ser que \`${btnName}\` no funciona correctamente, use \`Partes Indivduales\` en su lugar.\n(Esto todavía puede funcionar. Haga click en \`Aceptar\` para continuar.)` as const
|
||||
},
|
||||
|
||||
'DOWNLOAD' <T extends string> (fileType: T) {
|
||||
return `Descargar ${fileType}` as const
|
||||
},
|
||||
'DOWNLOAD_AUDIO' <T extends string> (fileType: T) {
|
||||
return `Descargar Audio ${fileType}` as const
|
||||
},
|
||||
|
||||
'IND_PARTS' () {
|
||||
return 'Partes individuales' as const
|
||||
},
|
||||
'IND_PARTS_TOOLTIP' () {
|
||||
return 'Descargar partes individuales (BETA)' as const
|
||||
},
|
||||
|
||||
'FULL_SCORE' () {
|
||||
return 'Partitura Completa' as const
|
||||
},
|
||||
})
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
import en from './en'
|
||||
import es from './es'
|
||||
|
||||
export interface LOCALE {
|
||||
'PROCESSING' (): string;
|
||||
|
@ -25,6 +26,7 @@ export function createLocale<OBJ extends LOCALE> (obj: OBJ): OBJ {
|
|||
|
||||
const locales = (<L extends { [n: string]: LOCALE } /** type checking */> (l: L) => Object.freeze(l))({
|
||||
en,
|
||||
es,
|
||||
})
|
||||
|
||||
// detect browser language
|
||||
|
|
Loading…
Reference in a new issue