From ef713ce8e84b7bdad53958dfae34103cdee0801c Mon Sep 17 00:00:00 2001 From: alpita-masurkar Date: Mon, 13 Jul 2020 11:36:40 +0200 Subject: [PATCH 1/2] Add localization for Haitian Creole and Spanish (Puerto Rico) Adding localization for Haitian Creole: ht and Spanish (Puerto Rico): es-PR --- src/locale/es-pr.js | 41 +++++++++++++++++++++++++++++++++++++++++ src/locale/ht.js | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 src/locale/es-pr.js create mode 100644 src/locale/ht.js diff --git a/src/locale/es-pr.js b/src/locale/es-pr.js new file mode 100644 index 000000000..f8c20c3a9 --- /dev/null +++ b/src/locale/es-pr.js @@ -0,0 +1,41 @@ +// Spanish (Puerto Rico) [es-PR] +import dayjs from 'dayjs' + +const locale = { + name: 'es-pr', + monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'), + weekStart: 1, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'MM/DD/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A' + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años' + }, + ordinal: n => `${n}º` +} + +dayjs.locale(locale, null, true) + +export default locale + diff --git a/src/locale/ht.js b/src/locale/ht.js new file mode 100644 index 000000000..796e41d60 --- /dev/null +++ b/src/locale/ht.js @@ -0,0 +1,40 @@ +// French (Canada) [fr-ca] +import dayjs from 'dayjs' + +const locale = { + name: 'ht', + weekdays: 'dimanch_lendi_madi_mèkredi_jedi_vandredi_samdi'.split('_'), + months: 'janvye_fevriye_mas_avril_me_jen_jiyè_out_septanm_oktòb_novanm_desanm'.split('_'), + weekdaysShort: 'dim._len._mad._mèk._jed._van._sam.'.split('_'), + monthsShort: 'jan._fev._mas_avr._me_jen_jiyè._out_sept._okt._nov._des.'.split('_'), + weekdaysMin: 'di_le_ma_mè_je_va_sa'.split('_'), + ordinal: n => n, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'nan %s', + past: 'sa gen %s', + s: 'kèk segond', + m: 'yon minit', + mm: '%d minit', + h: 'inèdtan', + hh: '%d zè', + d: 'yon jou', + dd: '%d jou', + M: 'yon mwa', + MM: '%d mwa', + y: 'yon ane', + yy: '%d ane' + } +} + +dayjs.locale(locale, null, true) + +export default locale + From 815f97653b255746511355a79948208ae004885b Mon Sep 17 00:00:00 2001 From: alpita-masurkar Date: Mon, 13 Jul 2020 13:00:53 +0200 Subject: [PATCH 2/2] Fixed the comment --- src/locale/ht.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locale/ht.js b/src/locale/ht.js index 796e41d60..555bc760d 100644 --- a/src/locale/ht.js +++ b/src/locale/ht.js @@ -1,4 +1,4 @@ -// French (Canada) [fr-ca] +// Haitian Creole (Haiti) [ht] import dayjs from 'dayjs' const locale = {