From 6f9a19e7cdee34445cdfe26584a91bd7bcd64291 Mon Sep 17 00:00:00 2001 From: Roman Sedov Date: Mon, 1 Feb 2021 11:26:51 +0300 Subject: [PATCH] feat(i18n): add Spanish with 100% support (#191) --- projects/i18n/README.md | 2 + projects/i18n/languages/index.ts | 1 + .../i18n/languages/spanish/addon-commerce.ts | 6 +++ .../i18n/languages/spanish/addon-editor.ts | 39 +++++++++++++++ .../i18n/languages/spanish/addon-table.ts | 10 ++++ projects/i18n/languages/spanish/core.ts | 23 +++++++++ projects/i18n/languages/spanish/index.ts | 8 +++ projects/i18n/languages/spanish/kit.ts | 49 +++++++++++++++++++ projects/i18n/languages/spanish/package.json | 7 +++ projects/i18n/languages/spanish/spanish.ts | 12 +++++ 10 files changed, 157 insertions(+) create mode 100644 projects/i18n/languages/spanish/addon-commerce.ts create mode 100644 projects/i18n/languages/spanish/addon-editor.ts create mode 100644 projects/i18n/languages/spanish/addon-table.ts create mode 100644 projects/i18n/languages/spanish/core.ts create mode 100644 projects/i18n/languages/spanish/index.ts create mode 100644 projects/i18n/languages/spanish/kit.ts create mode 100644 projects/i18n/languages/spanish/package.json create mode 100644 projects/i18n/languages/spanish/spanish.ts diff --git a/projects/i18n/README.md b/projects/i18n/README.md index 2a8c4efc9c01..a65ed163f3cb 100644 --- a/projects/i18n/README.md +++ b/projects/i18n/README.md @@ -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 diff --git a/projects/i18n/languages/index.ts b/projects/i18n/languages/index.ts index 6c388635ac98..6cb6a09ff62a 100644 --- a/projects/i18n/languages/index.ts +++ b/projects/i18n/languages/index.ts @@ -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'; diff --git a/projects/i18n/languages/spanish/addon-commerce.ts b/projects/i18n/languages/spanish/addon-commerce.ts new file mode 100644 index 000000000000..c90235ebf6c1 --- /dev/null +++ b/projects/i18n/languages/spanish/addon-commerce.ts @@ -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'], +}; diff --git a/projects/i18n/languages/spanish/addon-editor.ts b/projects/i18n/languages/spanish/addon-editor.ts new file mode 100644 index 000000000000..682354b736c1 --- /dev/null +++ b/projects/i18n/languages/spanish/addon-editor.ts @@ -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', + }, +}; diff --git a/projects/i18n/languages/spanish/addon-table.ts b/projects/i18n/languages/spanish/addon-table.ts new file mode 100644 index 000000000000..7800c60927bb --- /dev/null +++ b/projects/i18n/languages/spanish/addon-table.ts @@ -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', + }, +}; diff --git a/projects/i18n/languages/spanish/core.ts b/projects/i18n/languages/spanish/core.ts new file mode 100644 index 000000000000..0593ed4980c1 --- /dev/null +++ b/projects/i18n/languages/spanish/core.ts @@ -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'], +}; diff --git a/projects/i18n/languages/spanish/index.ts b/projects/i18n/languages/spanish/index.ts new file mode 100644 index 000000000000..8a23d0a8e699 --- /dev/null +++ b/projects/i18n/languages/spanish/index.ts @@ -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'; diff --git a/projects/i18n/languages/spanish/kit.ts b/projects/i18n/languages/spanish/kit.ts new file mode 100644 index 000000000000..d76cabea3ca3 --- /dev/null +++ b/projects/i18n/languages/spanish/kit.ts @@ -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í', + }, +}; diff --git a/projects/i18n/languages/spanish/package.json b/projects/i18n/languages/spanish/package.json new file mode 100644 index 000000000000..289d2d373a50 --- /dev/null +++ b/projects/i18n/languages/spanish/package.json @@ -0,0 +1,7 @@ +{ + "ngPackage": { + "lib": { + "entryFile": "index.ts" + } + } +} diff --git a/projects/i18n/languages/spanish/spanish.ts b/projects/i18n/languages/spanish/spanish.ts new file mode 100644 index 000000000000..1dcbcad2e09d --- /dev/null +++ b/projects/i18n/languages/spanish/spanish.ts @@ -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, +};