Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding localization for Haitian Creole and Spanish (Puerto Rico) #958

Merged
merged 3 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions src/locale/es-pr.js
Original file line number Diff line number Diff line change
@@ -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

40 changes: 40 additions & 0 deletions src/locale/ht.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// French (Canada) [fr-ca]
alpita-masurkar marked this conversation as resolved.
Show resolved Hide resolved
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