Interface optimizations

moment js update
This commit is contained in:
RainLoop Team 2014-04-30 20:24:45 +04:00
parent be8c186f87
commit f36cb72b82
104 changed files with 5869 additions and 1180 deletions

View file

@ -12,15 +12,31 @@
factory(window.moment); // Browser global
}
}(function (moment) {
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
'mm': 'minute',
'hh': 'ore',
'dd': 'zile',
'MM': 'luni',
'yy': 'ani'
},
separator = ' ';
if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
separator = ' de ';
}
return number + separator + format[key];
}
return moment.lang('ro', {
months : "Ianuarie_Februarie_Martie_Aprilie_Mai_Iunie_Iulie_August_Septembrie_Octombrie_Noiembrie_Decembrie".split("_"),
monthsShort : "Ian_Feb_Mar_Apr_Mai_Iun_Iul_Aug_Sep_Oct_Noi_Dec".split("_"),
weekdays : "Duminică_Luni_Marţi_Miercuri_Joi_Vineri_Sâmbătă".split("_"),
months : "ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),
monthsShort : "ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),
weekdays : "duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),
weekdaysShort : "Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),
weekdaysMin : "Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
L : "DD.MM.YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY H:mm",
LLLL : "dddd, D MMMM YYYY H:mm"
@ -38,15 +54,15 @@
past : "%s în urmă",
s : "câteva secunde",
m : "un minut",
mm : "%d minute",
mm : relativeTimeWithPlural,
h : "o oră",
hh : "%d ore",
hh : relativeTimeWithPlural,
d : "o zi",
dd : "%d zile",
dd : relativeTimeWithPlural,
M : "o lună",
MM : "%d luni",
MM : relativeTimeWithPlural,
y : "un an",
yy : "%d ani"
yy : relativeTimeWithPlural
},
week : {
dow : 1, // Monday is the first day of the week.