mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 12:53:24 +00:00
5d419682f5
Add moment.js ( http://momentjs.com/ ) as a ResourceLoader module and use it to parse and format date strings. Moment.js seems to be the least bad option right now; eventually it should be replaced by i18n functionality in core Javascript modules. Change-Id: I332655778be3d694781b83fa5dea1e59770d8866
57 lines
1.9 KiB
JavaScript
57 lines
1.9 KiB
JavaScript
// moment.js language configuration
|
|
// language : norwegian nynorsk (nn)
|
|
// author : https://github.com/mechuwind
|
|
|
|
(function (factory) {
|
|
if (typeof define === 'function' && define.amd) {
|
|
define(['moment'], factory); // AMD
|
|
} else if (typeof exports === 'object') {
|
|
module.exports = factory(require('../moment')); // Node
|
|
} else {
|
|
factory(window.moment); // Browser global
|
|
}
|
|
}(function (moment) {
|
|
return moment.lang('nn', {
|
|
months : "januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),
|
|
monthsShort : "jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),
|
|
weekdays : "sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),
|
|
weekdaysShort : "sun_mån_tys_ons_tor_fre_lau".split("_"),
|
|
weekdaysMin : "su_må_ty_on_to_fr_lø".split("_"),
|
|
longDateFormat : {
|
|
LT : "HH:mm",
|
|
L : "DD.MM.YYYY",
|
|
LL : "D MMMM YYYY",
|
|
LLL : "D MMMM YYYY LT",
|
|
LLLL : "dddd D MMMM YYYY LT"
|
|
},
|
|
calendar : {
|
|
sameDay: '[I dag klokka] LT',
|
|
nextDay: '[I morgon klokka] LT',
|
|
nextWeek: 'dddd [klokka] LT',
|
|
lastDay: '[I går klokka] LT',
|
|
lastWeek: '[Føregående] dddd [klokka] LT',
|
|
sameElse: 'L'
|
|
},
|
|
relativeTime : {
|
|
future : "om %s",
|
|
past : "for %s siden",
|
|
s : "noen sekund",
|
|
m : "ett minutt",
|
|
mm : "%d minutt",
|
|
h : "en time",
|
|
hh : "%d timar",
|
|
d : "en dag",
|
|
dd : "%d dagar",
|
|
M : "en månad",
|
|
MM : "%d månader",
|
|
y : "ett år",
|
|
yy : "%d år"
|
|
},
|
|
ordinal : '%d.',
|
|
week : {
|
|
dow : 1, // Monday is the first day of the week.
|
|
doy : 4 // The week that contains Jan 4th is the first week of the year.
|
|
}
|
|
});
|
|
}));
|