From bdce94f2ac1d2acbe7088bd821494986d47e9174 Mon Sep 17 00:00:00 2001 From: Esmerlin Joel Mieses <43692952+EsmerlinJM@users.noreply.github.com> Date: Tue, 28 Mar 2023 00:15:17 -0300 Subject: [PATCH] [FEAT](i18n): Add support for Spanish language (es_ES) (#58) <3 --- src/i18n/es_ES.json | 7 +++++++ src/i18n/index.ts | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/i18n/es_ES.json diff --git a/src/i18n/es_ES.json b/src/i18n/es_ES.json new file mode 100644 index 0000000..c4767e8 --- /dev/null +++ b/src/i18n/es_ES.json @@ -0,0 +1,7 @@ +{ + "localLanguage": "spanish", + "commitFix": "fix(server.ts): cambiar la variable port de minúsculas a mayúsculas PORT", + "commitFeat": "feat(server.ts): añadir soporte para la variable de entorno process.env.PORT", + "commitDescription": "La variable port ahora se llama PORT, lo que mejora la coherencia con las convenciones de nomenclatura, ya que PORT es una constante. El soporte para una variable de entorno permite que la aplicación sea más flexible, ya que ahora puede ejecutarse en cualquier puerto disponible especificado a través de la variable de entorno process.env.PORT." + } + \ No newline at end of file diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 0077b25..b6d7ba3 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -7,6 +7,7 @@ import zh_CN from '../i18n/zh_CN.json' assert { type: 'json' }; import zh_TW from '../i18n/zh_TW.json' assert { type: 'json' }; import ja from '../i18n/ja.json' assert { type: 'json' }; import pt_br from '../i18n/pt_br.json' assert { type: 'json' }; +import es_ES from '../i18n/es_ES.json' assert { type: 'json' }; export enum I18nLocals { 'en' = 'en', @@ -17,7 +18,8 @@ export enum I18nLocals { 'fr' = 'fr', 'it' = 'it', 'ko' = 'ko', - 'pt_br' = 'pt_br' + 'pt_br' = 'pt_br', + 'es_ES' = 'es_ES' }; export const i18n = { @@ -29,7 +31,8 @@ export const i18n = { fr, it, ko, - pt_br + pt_br, + es_ES }; export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = { @@ -42,6 +45,7 @@ export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = { it: ['it', 'Italian', 'italiano'], pt_br: ['pt_br', 'Portuguese', 'português'], en: ['en', 'English', 'english'], + es_ES: ['es_ES', 'Spanish', 'español'], }; export function getI18nLocal(value: string): string | boolean {