[TASK] Replace deprecated moment.js function
This commit is contained in:
parent
f265901036
commit
d100db521b
@ -35,18 +35,20 @@ define(['polyglot', 'moment', 'helper'], function (Polyglot, moment, helper) {
|
|||||||
function setTranslation(json) {
|
function setTranslation(json) {
|
||||||
_.extend(json);
|
_.extend(json);
|
||||||
|
|
||||||
moment.locale(_.locale(), {
|
if (moment.locale(_.locale()) !== _.locale()) {
|
||||||
longDateFormat: {
|
moment.defineLocale(_.locale(), {
|
||||||
LT: 'HH:mm',
|
longDateFormat: {
|
||||||
LTS: 'HH:mm:ss',
|
LT: 'HH:mm',
|
||||||
L: 'DD.MM.YYYY',
|
LTS: 'HH:mm:ss',
|
||||||
LL: 'D. MMMM YYYY',
|
L: 'DD.MM.YYYY',
|
||||||
LLL: 'D. MMMM YYYY HH:mm',
|
LL: 'D. MMMM YYYY',
|
||||||
LLLL: 'dddd, D. MMMM YYYY HH:mm'
|
LLL: 'D. MMMM YYYY HH:mm',
|
||||||
},
|
LLLL: 'dddd, D. MMMM YYYY HH:mm'
|
||||||
calendar: json.momentjs.calendar,
|
},
|
||||||
relativeTime: json.momentjs.relativeTime
|
calendar: json.momentjs.calendar,
|
||||||
});
|
relativeTime: json.momentjs.relativeTime
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window._ = new Polyglot({ locale: getLocale(), allowMissing: true });
|
window._ = new Polyglot({ locale: getLocale(), allowMissing: true });
|
||||||
|
Loading…
Reference in New Issue
Block a user