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
61 lines
2.2 KiB
JavaScript
61 lines
2.2 KiB
JavaScript
// moment.js language configuration
|
|
// language : portuguese (pt)
|
|
// author : Jefferson : https://github.com/jalex79
|
|
|
|
(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('pt', {
|
|
months : "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),
|
|
monthsShort : "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),
|
|
weekdays : "Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),
|
|
weekdaysShort : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),
|
|
weekdaysMin : "Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),
|
|
longDateFormat : {
|
|
LT : "HH:mm",
|
|
L : "DD/MM/YYYY",
|
|
LL : "D [de] MMMM [de] YYYY",
|
|
LLL : "D [de] MMMM [de] YYYY LT",
|
|
LLLL : "dddd, D [de] MMMM [de] YYYY LT"
|
|
},
|
|
calendar : {
|
|
sameDay: '[Hoje às] LT',
|
|
nextDay: '[Amanhã às] LT',
|
|
nextWeek: 'dddd [às] LT',
|
|
lastDay: '[Ontem às] LT',
|
|
lastWeek: function () {
|
|
return (this.day() === 0 || this.day() === 6) ?
|
|
'[Último] dddd [às] LT' : // Saturday + Sunday
|
|
'[Última] dddd [às] LT'; // Monday - Friday
|
|
},
|
|
sameElse: 'L'
|
|
},
|
|
relativeTime : {
|
|
future : "em %s",
|
|
past : "%s atrás",
|
|
s : "segundos",
|
|
m : "um minuto",
|
|
mm : "%d minutos",
|
|
h : "uma hora",
|
|
hh : "%d horas",
|
|
d : "um dia",
|
|
dd : "%d dias",
|
|
M : "um mês",
|
|
MM : "%d meses",
|
|
y : "um ano",
|
|
yy : "%d anos"
|
|
},
|
|
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.
|
|
}
|
|
});
|
|
}));
|