diff --git a/build/esm.js b/build/esm.js index 634f3aea..92f2dfde 100644 --- a/build/esm.js +++ b/build/esm.js @@ -16,6 +16,6 @@ const localeDir = path.join(process.env.PWD, 'esm/locale'); await promisify(fs.writeFile)(filePath, result, 'utf8') }) } catch (e) { - console.error(e) + console.error(e) // eslint-disable-line no-console } })() diff --git a/src/locale/sw.js b/src/locale/sw.js index b0534a62..7e68f481 100644 --- a/src/locale/sw.js +++ b/src/locale/sw.js @@ -2,32 +2,35 @@ import dayjs from 'dayjs' const locale = { name: 'sw', - weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijuma_Jumamosi'.split('_'), - months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Octoba_Novemba_Disemba'.split('_'), + weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), + weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), + weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), + months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), weekStart: 1, - ordinal: n => `${n}.`, + ordinal: n => n, + relativeTime: { + future: '%s baadaye', + past: 'tokea %s', + s: 'hivi punde', + m: 'dakika moja', + mm: 'dakika %d', + h: 'saa limoja', + hh: 'masaa %d', + d: 'siku moja', + dd: 'masiku %d', + M: 'mwezi mmoja', + MM: 'miezi %d', + y: 'mwaka mmoja', + yy: 'miaka %d' + }, formats: { - LT: 'H:mm', - LTS: 'H:mm:ss', + LT: 'HH:mm', + LTS: 'HH:mm:ss', L: 'DD.MM.YYYY', - LL: 'D. MMMM YYYY', - LLL: 'D. MMMM YYYY H:mm', - LLLL: 'dddd D. MMMM YYYY H:mm' - }, - relativeTime: { - future: 'Ujao %s', - past: 'Uliopita %s', - s: 'sekunde', - m: 'dakika', - mm: '%d madakika', - h: 'saa', - hh: '%d masaa', - d: 'siku', - dd: '%d masiku', - M: 'mwezi', - MM: '%d miezi', - y: 'mwaka', - yy: '%d miaka' + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' } } diff --git a/src/locale/swa.js b/src/locale/swa.js deleted file mode 100644 index bd306bad..00000000 --- a/src/locale/swa.js +++ /dev/null @@ -1,39 +0,0 @@ -import dayjs from 'dayjs' - -const locale = { - name: 'swa', - weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), - weekdaysShort: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), - weekdaysMin: 'S_M_T_W_T_F_S'.split('_'), - months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'), - monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), - weekStart: 1, - ordinal: n => n, - relativeTime: { - future: 'kwa %s', - past: '%s iliyopita', - s: 'sekunde', - m: 'dakika', - mm: '%d dakika', - h: 'saa', - hh: '%d masaa', - d: 'siku', - dd: '%d masiku', - M: 'mwezi', - MM: '%d miezi', - y: 'mwaka', - yy: '%d miaka' - }, - 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' - } -} - -dayjs.locale(locale, null, true) - -export default locale