-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1830 from iamkun/dev
D2M
- Loading branch information
Showing
20 changed files
with
401 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,62 @@ | ||
// German (Switzerland) [de-ch] | ||
import dayjs from 'dayjs' | ||
|
||
const texts = { | ||
s: 'ein paar Sekunden', | ||
m: ['eine Minute', 'einer Minute'], | ||
mm: '%d Minuten', | ||
h: ['eine Stunde', 'einer Stunde'], | ||
hh: '%d Stunden', | ||
d: ['ein Tag', 'einem Tag'], | ||
dd: ['%d Tage', '%d Tagen'], | ||
M: ['ein Monat', 'einem Monat'], | ||
MM: ['%d Monate', '%d Monaten'], | ||
y: ['ein Jahr', 'einem Jahr'], | ||
yy: ['%d Jahre', '%d Jahren'] | ||
} | ||
|
||
function relativeTimeFormatter(number, withoutSuffix, key) { | ||
let l = texts[key] | ||
if (Array.isArray(l)) { | ||
l = l[withoutSuffix ? 0 : 1] | ||
} | ||
return l.replace('%d', number) | ||
} | ||
|
||
const locale = { | ||
name: 'de-ch', | ||
weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), | ||
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), | ||
weekStart: 1, | ||
weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), | ||
monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), | ||
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), | ||
ordinal: n => n, | ||
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), | ||
monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), | ||
ordinal: n => `${n}.`, | ||
weekStart: 1, | ||
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: 'in %s', | ||
past: 'vor %s', | ||
s: relativeTimeFormatter, | ||
m: relativeTimeFormatter, | ||
mm: relativeTimeFormatter, | ||
h: relativeTimeFormatter, | ||
hh: relativeTimeFormatter, | ||
d: relativeTimeFormatter, | ||
dd: relativeTimeFormatter, | ||
M: relativeTimeFormatter, | ||
MM: relativeTimeFormatter, | ||
y: relativeTimeFormatter, | ||
yy: relativeTimeFormatter | ||
} | ||
} | ||
|
||
dayjs.locale(locale, null, true) | ||
|
||
export default locale | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Kirundi [rn] | ||
import dayjs from 'dayjs' | ||
|
||
const locale = { | ||
name: 'rn', | ||
weekdays: 'Ku wa Mungu_Ku wa Mbere_Ku wa Kabiri_Ku wa Gatatu_Ku wa Kane_Ku wa Gatanu_Ku wa Gatandatu'.split('_'), | ||
weekdaysShort: 'Kngu_Kmbr_Kbri_Ktat_Kkan_Ktan_Kdat'.split('_'), | ||
weekdaysMin: 'K7_K1_K2_K3_K4_K5_K6'.split('_'), | ||
months: 'Nzero_Ruhuhuma_Ntwarante_Ndamukiza_Rusama_Ruhenshi_Mukakaro_Myandagaro_Nyakanga_Gitugutu_Munyonyo_Kigarama'.split('_'), | ||
monthsShort: 'Nzer_Ruhuh_Ntwar_Ndam_Rus_Ruhen_Muk_Myand_Nyak_Git_Muny_Kig'.split('_'), | ||
weekStart: 1, | ||
ordinal: n => n, | ||
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' | ||
} | ||
} | ||
|
||
dayjs.locale(locale, null, true) | ||
|
||
export default locale |
Oops, something went wrong.