From b1766a65764c8d5250e62127411bf6b82544d4b7 Mon Sep 17 00:00:00 2001 From: David Furlong Date: Tue, 12 May 2020 15:52:20 +0200 Subject: [PATCH 1/2] Create rw.js --- src/locale/rw.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/locale/rw.js diff --git a/src/locale/rw.js b/src/locale/rw.js new file mode 100644 index 000000000..939204d1e --- /dev/null +++ b/src/locale/rw.js @@ -0,0 +1,40 @@ +// Kinyarwanda (Rwanda) [rw] +import dayjs from 'dayjs' + +const locale = { + name: "rw", + weekdays: "Ku Cyumweru_Kuwa Mbere_Kuwa Kabiri_Kuwa Gatatu_Kuwa Kane_Kuwa Gatanu_Kuwa Gatandatu".split( + "_" + ), + months: "Mutarama_Gashyantare_Werurwe_Mata_Gicurasi_Kamena_Nyakanga_Kanama_Nzeri_Ukwakira_Ugushyingo_Ukuboza".split( + "_" + ), + relativeTime: { + future: "mu %s", + past: "%s", + s: "amasegonda", + m: "Umunota", + mm: "%d iminota", + h: "isaha", + hh: "%d amasaha", + d: "Umunsi", + dd: "%d iminsi", + M: "ukwezi", + MM: "%d amezi", + y: "umwaka", + yy: "%d imyaka", + }, + 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", + }, + ordinal: (n) => n, +}; + +dayjs.locale(locale, null, true) + +export default locale From ddf59472599feff7969dc05385e7dc5fc8a8a726 Mon Sep 17 00:00:00 2001 From: davidfurlong Date: Tue, 12 May 2020 15:54:38 +0200 Subject: [PATCH 2/2] Fix formatting --- src/locale/rw.js | 52 ++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/src/locale/rw.js b/src/locale/rw.js index 939204d1e..316037e08 100644 --- a/src/locale/rw.js +++ b/src/locale/rw.js @@ -2,38 +2,34 @@ import dayjs from 'dayjs' const locale = { - name: "rw", - weekdays: "Ku Cyumweru_Kuwa Mbere_Kuwa Kabiri_Kuwa Gatatu_Kuwa Kane_Kuwa Gatanu_Kuwa Gatandatu".split( - "_" - ), - months: "Mutarama_Gashyantare_Werurwe_Mata_Gicurasi_Kamena_Nyakanga_Kanama_Nzeri_Ukwakira_Ugushyingo_Ukuboza".split( - "_" - ), + name: 'rw', + weekdays: 'Ku Cyumweru_Kuwa Mbere_Kuwa Kabiri_Kuwa Gatatu_Kuwa Kane_Kuwa Gatanu_Kuwa Gatandatu'.split('_'), + months: 'Mutarama_Gashyantare_Werurwe_Mata_Gicurasi_Kamena_Nyakanga_Kanama_Nzeri_Ukwakira_Ugushyingo_Ukuboza'.split('_'), relativeTime: { - future: "mu %s", - past: "%s", - s: "amasegonda", - m: "Umunota", - mm: "%d iminota", - h: "isaha", - hh: "%d amasaha", - d: "Umunsi", - dd: "%d iminsi", - M: "ukwezi", - MM: "%d amezi", - y: "umwaka", - yy: "%d imyaka", + future: 'mu %s', + past: '%s', + s: 'amasegonda', + m: 'Umunota', + mm: '%d iminota', + h: 'isaha', + hh: '%d amasaha', + d: 'Umunsi', + dd: '%d iminsi', + M: 'ukwezi', + MM: '%d amezi', + y: 'umwaka', + yy: '%d imyaka' }, 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", + 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' }, - ordinal: (n) => n, -}; + ordinal: n => n +} dayjs.locale(locale, null, true)