mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 21:04:11 +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
58 lines
2 KiB
JavaScript
58 lines
2 KiB
JavaScript
// moment.js language configuration
|
|
// language : norwegian bokmål (nb)
|
|
// authors : Espen Hovlandsdal : https://github.com/rexxars
|
|
// Sigurd Gartmann : https://github.com/sigurdga
|
|
|
|
(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('nb', {
|
|
months : "januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),
|
|
monthsShort : "jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),
|
|
weekdays : "søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),
|
|
weekdaysShort : "sø._ma._ti._on._to._fr._lø.".split("_"),
|
|
weekdaysMin : "sø_ma_ti_on_to_fr_lø".split("_"),
|
|
longDateFormat : {
|
|
LT : "H.mm",
|
|
L : "DD.MM.YYYY",
|
|
LL : "D. MMMM YYYY",
|
|
LLL : "D. MMMM YYYY [kl.] LT",
|
|
LLLL : "dddd D. MMMM YYYY [kl.] LT"
|
|
},
|
|
calendar : {
|
|
sameDay: '[i dag kl.] LT',
|
|
nextDay: '[i morgen kl.] LT',
|
|
nextWeek: 'dddd [kl.] LT',
|
|
lastDay: '[i går kl.] LT',
|
|
lastWeek: '[forrige] dddd [kl.] LT',
|
|
sameElse: 'L'
|
|
},
|
|
relativeTime : {
|
|
future : "om %s",
|
|
past : "for %s siden",
|
|
s : "noen sekunder",
|
|
m : "ett minutt",
|
|
mm : "%d minutter",
|
|
h : "en time",
|
|
hh : "%d timer",
|
|
d : "en dag",
|
|
dd : "%d dager",
|
|
M : "en måned",
|
|
MM : "%d måneder",
|
|
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.
|
|
}
|
|
});
|
|
}));
|