Skip to content

Commit

Permalink
feat(i18n): add Spanish with 100% support (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarsiBarsi authored Feb 1, 2021
1 parent f9929fe commit 6f9a19e
Show file tree
Hide file tree
Showing 10 changed files with 157 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/i18n/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Supported languages:

- **Russian**: 100%

- **Spanish**: 100%

It's a part of [**Taiga UI**](https://github.com/TinkoffCreditSystems/taiga-ui) that is fully-treeshakable Angular UI Kit consisting of multiple base libraries and several add-ons

## How to install
Expand Down
1 change: 1 addition & 0 deletions projects/i18n/languages/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from '@taiga-ui/i18n/languages/english';
export * from '@taiga-ui/i18n/languages/russian';
export * from '@taiga-ui/i18n/languages/spanish';
6 changes: 6 additions & 0 deletions projects/i18n/languages/spanish/addon-commerce.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import {LanguageCommerce} from '@taiga-ui/i18n/interfaces';

export const TUI_SPANISH_LANGUAGE_ADDON_COMMERCE: LanguageCommerce = {
cardNumber: ['Número', 'Número de la tarjeta'],
cardExpiry: ['Expira', 'Fecha de expiración'],
};
39 changes: 39 additions & 0 deletions projects/i18n/languages/spanish/addon-editor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import {LanguageEditor} from '@taiga-ui/i18n/interfaces';

export const TUI_SPANISH_LANGUAGE_ADDON_EDITOR: LanguageEditor = {
colorSelectorModeNames: ['Color sólido', 'Gradiente'],
toolbarTools: {
undo: 'Deshacer',
redo: 'Rehacer',
font: 'Fuente',
fontStyle: 'Estilo de la fuente',
fontSize: 'Tamaño de la fuente',
bold: 'Negrita',
italic: 'Italica',
underline: 'Subrayado',
strikeThrough: 'Tachado',
justify: 'Justificar',
justifyLeft: 'Alinear a izquierda',
justifyCenter: 'Centrar',
justifyRight: 'Alinear a derecha',
justifyFull: 'Justificar',
list: 'Listar',
indent: 'Sangría',
outdent: 'Sin sangría',
unorderedList: 'Lista desordenada',
orderedList: 'Lista ordenada',
quote: 'Cita',
foreColor: 'Color',
backColor: 'Color de fondo',
hiliteColor: 'Color de resaltado',
clear: 'Limpiar',
link: 'Enlace',
attach: 'Adjuntar archivo',
tex: 'Insertar texto',
code: 'Código',
image: 'Insertar imagen',
insertHorizontalRule: 'Insertar regla horizontal',
superscript: 'Superíndice',
subscript: 'Subíndice',
},
};
10 changes: 10 additions & 0 deletions projects/i18n/languages/spanish/addon-table.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {LanguageTable} from '@taiga-ui/i18n/interfaces';

export const TUI_SPANISH_LANGUAGE_ADDON_TABLE: LanguageTable = {
showHideText: 'Mostrar/Ocultar',
paginationTexts: {
pages: 'Páginas',
linesPerPage: 'Lineas por página',
of: 'de',
},
};
23 changes: 23 additions & 0 deletions projects/i18n/languages/spanish/core.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import {LanguageCore} from '@taiga-ui/i18n/interfaces';

export const TUI_SPANISH_LANGUAGE_CORE: LanguageCore = {
months: [
'Enero',
'Febrero',
'Marzo',
'Abril',
'Mayo',
'Junio',
'Julio',
'Agosto',
'Septiembre',
'Octubre',
'Noviembre',
'Diciembre',
],
close: 'Cerrar',
nothingFoundMessage: 'Nada encontrado',
defaultErrorMessage: 'El valor es válido',
spinTexts: ['Previo', 'Siguiente'],
shortWeekDays: ['Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sáb', 'Dom'],
};
8 changes: 8 additions & 0 deletions projects/i18n/languages/spanish/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export * from './core';
export * from './kit';

export * from './addon-commerce';
export * from './addon-editor';
export * from './addon-table';

export * from './spanish';
49 changes: 49 additions & 0 deletions projects/i18n/languages/spanish/kit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import {LanguageKit} from '@taiga-ui/i18n/interfaces';

export const TUI_SPANISH_LANGUAGE_KIT: LanguageKit = {
cancel: 'Cancelar',
done: 'Hecho',
more: 'Más',
otherDate: 'Otra fecha...',
mobileCalendarTexts: ['Seleccione el día', 'Seleccione un rango'],
range: ['desde', 'hasta'],
countTexts: ['Más', 'Menos'],
time: {
'HH:MM': 'HH:MM',
'HH:MM:SS': 'HH:MM:SS',
'HH:MM:SS.MSS': 'HH:MM:SS.MSS',
},
digitalInformationUnits: ['B', 'KB', 'MB'],
passwordTexts: ['Muetra clave', 'Oculta clave'],
copyTexts: ['Copiar', 'Copiado'],
shortCalendarMonths: [
'Ene',
'Feb',
'Mar',
'Abr',
'May',
'Jun',
'Jul',
'Ago',
'Sep',
'Oct',
'Nov',
'Dic',
],
pagination: ['Página anterior', 'Página siguiente'],
fileTexts: {
loadingError: 'Error de lectura',
preview: 'Previo',
remove: 'Remover',
},
inputFileTexts: {
defaultLabelSingle: 'o arrástrelo aquí',
defaultLabelMultiple: 'o arrástrelos aquí',
defaultLinkSingle: 'Seleccione un archivo',
defaultLinkMultiple: 'Seleccione archivos',
maxSizeRejectionReason: 'Archivo demasiado grande ',
formatRejectionReason: 'Formato de fila erróneo',
drop: 'Suelte el archivo aquí',
dropMultiple: 'Suelte los archivos aquí',
},
};
7 changes: 7 additions & 0 deletions projects/i18n/languages/spanish/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ngPackage": {
"lib": {
"entryFile": "index.ts"
}
}
}
12 changes: 12 additions & 0 deletions projects/i18n/languages/spanish/spanish.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {Language} from '@taiga-ui/i18n/interfaces';
import {TUI_SPANISH_LANGUAGE_ADDON_COMMERCE} from './addon-commerce';
import {TUI_SPANISH_LANGUAGE_ADDON_TABLE} from './addon-table';
import {TUI_SPANISH_LANGUAGE_CORE} from './core';
import {TUI_SPANISH_LANGUAGE_KIT} from './kit';

export const TUI_SPANISH_LANGUAGE: Language = {
...TUI_SPANISH_LANGUAGE_CORE,
...TUI_SPANISH_LANGUAGE_KIT,
...TUI_SPANISH_LANGUAGE_ADDON_TABLE,
...TUI_SPANISH_LANGUAGE_ADDON_COMMERCE,
};

0 comments on commit 6f9a19e

Please sign in to comment.