mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
Upgrade moment.js to latest version, add missing locales now that we
support more languages.
This commit is contained in:
@ -1,49 +1,59 @@
|
||||
// moment.js language configuration
|
||||
// language : italian (it)
|
||||
// moment.js locale configuration
|
||||
// locale : italian (it)
|
||||
// author : Lorenzo : https://github.com/aliem
|
||||
// author: Mattia Larentis: https://github.com/nostalgiaz
|
||||
|
||||
moment.lang('it', {
|
||||
months : "Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settembre_Ottobre_Novembre_Dicembre".split("_"),
|
||||
monthsShort : "Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),
|
||||
weekdays : "Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),
|
||||
weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),
|
||||
weekdaysMin : "D_L_Ma_Me_G_V_S".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: '[Oggi alle] LT',
|
||||
nextDay: '[Domani alle] LT',
|
||||
nextWeek: 'dddd [alle] LT',
|
||||
lastDay: '[Ieri alle] LT',
|
||||
lastWeek: '[lo scorso] dddd [alle] LT',
|
||||
sameElse: 'L'
|
||||
},
|
||||
relativeTime : {
|
||||
future : function (s) {
|
||||
return ((/^[0-9].+$/).test(s) ? "tra" : "in") + " " + s;
|
||||
},
|
||||
past : "%s fa",
|
||||
s : "secondi",
|
||||
m : "un minuto",
|
||||
mm : "%d minuti",
|
||||
h : "un'ora",
|
||||
hh : "%d ore",
|
||||
d : "un giorno",
|
||||
dd : "%d giorni",
|
||||
M : "un mese",
|
||||
MM : "%d mesi",
|
||||
y : "un anno",
|
||||
yy : "%d anni"
|
||||
},
|
||||
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.
|
||||
(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.defineLocale('it', {
|
||||
months : "gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),
|
||||
monthsShort : "gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),
|
||||
weekdays : "Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),
|
||||
weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),
|
||||
weekdaysMin : "D_L_Ma_Me_G_V_S".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: '[Oggi alle] LT',
|
||||
nextDay: '[Domani alle] LT',
|
||||
nextWeek: 'dddd [alle] LT',
|
||||
lastDay: '[Ieri alle] LT',
|
||||
lastWeek: '[lo scorso] dddd [alle] LT',
|
||||
sameElse: 'L'
|
||||
},
|
||||
relativeTime : {
|
||||
future : function (s) {
|
||||
return ((/^[0-9].+$/).test(s) ? "tra" : "in") + " " + s;
|
||||
},
|
||||
past : "%s fa",
|
||||
s : "alcuni secondi",
|
||||
m : "un minuto",
|
||||
mm : "%d minuti",
|
||||
h : "un'ora",
|
||||
hh : "%d ore",
|
||||
d : "un giorno",
|
||||
dd : "%d giorni",
|
||||
M : "un mese",
|
||||
MM : "%d mesi",
|
||||
y : "un anno",
|
||||
yy : "%d anni"
|
||||
},
|
||||
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.
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
Reference in New Issue
Block a user