ember-rails-i18n 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +339 -0
- data/README.md +64 -0
- data/Rakefile +1 -0
- data/ember-rails-i18n.gemspec +26 -0
- data/lib/ember-rails-i18n.rb +15 -0
- data/lib/ember-rails-i18n/helper.rb +29 -0
- data/lib/ember-rails-i18n/version.rb +3 -0
- data/lib/javascripts/moment.js +2489 -0
- data/lib/javascripts/moment_locale/ar-ma.js +56 -0
- data/lib/javascripts/moment_locale/ar.js +56 -0
- data/lib/javascripts/moment_locale/bg.js +86 -0
- data/lib/javascripts/moment_locale/br.js +107 -0
- data/lib/javascripts/moment_locale/bs.js +139 -0
- data/lib/javascripts/moment_locale/ca.js +66 -0
- data/lib/javascripts/moment_locale/cs.js +155 -0
- data/lib/javascripts/moment_locale/cv.js +59 -0
- data/lib/javascripts/moment_locale/cy.js +77 -0
- data/lib/javascripts/moment_locale/da.js +56 -0
- data/lib/javascripts/moment_locale/de.js +71 -0
- data/lib/javascripts/moment_locale/el.js +79 -0
- data/lib/javascripts/moment_locale/en-au.js +62 -0
- data/lib/javascripts/moment_locale/en-ca.js +59 -0
- data/lib/javascripts/moment_locale/en-gb.js +63 -0
- data/lib/javascripts/moment_locale/eo.js +65 -0
- data/lib/javascripts/moment_locale/es.js +75 -0
- data/lib/javascripts/moment_locale/et.js +76 -0
- data/lib/javascripts/moment_locale/eu.js +60 -0
- data/lib/javascripts/moment_locale/fa.js +97 -0
- data/lib/javascripts/moment_locale/fi.js +103 -0
- data/lib/javascripts/moment_locale/fo.js +56 -0
- data/lib/javascripts/moment_locale/fr-ca.js +54 -0
- data/lib/javascripts/moment_locale/fr.js +58 -0
- data/lib/javascripts/moment_locale/gl.js +71 -0
- data/lib/javascripts/moment_locale/he.js +77 -0
- data/lib/javascripts/moment_locale/hi.js +105 -0
- data/lib/javascripts/moment_locale/hr.js +140 -0
- data/lib/javascripts/moment_locale/hu.js +105 -0
- data/lib/javascripts/moment_locale/hy-am.js +113 -0
- data/lib/javascripts/moment_locale/id.js +67 -0
- data/lib/javascripts/moment_locale/is.js +124 -0
- data/lib/javascripts/moment_locale/it.js +59 -0
- data/lib/javascripts/moment_locale/ja.js +58 -0
- data/lib/javascripts/moment_locale/ka.js +108 -0
- data/lib/javascripts/moment_locale/km.js +55 -0
- data/lib/javascripts/moment_locale/ko.js +63 -0
- data/lib/javascripts/moment_locale/lb.js +160 -0
- data/lib/javascripts/moment_locale/lt.js +118 -0
- data/lib/javascripts/moment_locale/lv.js +77 -0
- data/lib/javascripts/moment_locale/mk.js +86 -0
- data/lib/javascripts/moment_locale/ml.js +64 -0
- data/lib/javascripts/moment_locale/mr.js +104 -0
- data/lib/javascripts/moment_locale/ms-my.js +66 -0
- data/lib/javascripts/moment_locale/nb.js +57 -0
- data/lib/javascripts/moment_locale/ne.js +105 -0
- data/lib/javascripts/moment_locale/nl.js +67 -0
- data/lib/javascripts/moment_locale/nn.js +56 -0
- data/lib/javascripts/moment_locale/pl.js +98 -0
- data/lib/javascripts/moment_locale/pt-br.js +56 -0
- data/lib/javascripts/moment_locale/pt.js +60 -0
- data/lib/javascripts/moment_locale/ro.js +72 -0
- data/lib/javascripts/moment_locale/ru.js +163 -0
- data/lib/javascripts/moment_locale/sk.js +156 -0
- data/lib/javascripts/moment_locale/sl.js +144 -0
- data/lib/javascripts/moment_locale/sq.js +61 -0
- data/lib/javascripts/moment_locale/sr-cyr.js +106 -0
- data/lib/javascripts/moment_locale/sr.js +106 -0
- data/lib/javascripts/moment_locale/sv.js +63 -0
- data/lib/javascripts/moment_locale/ta.js +112 -0
- data/lib/javascripts/moment_locale/th.js +58 -0
- data/lib/javascripts/moment_locale/tl-ph.js +58 -0
- data/lib/javascripts/moment_locale/tr.js +93 -0
- data/lib/javascripts/moment_locale/tzm-la.js +55 -0
- data/lib/javascripts/moment_locale/tzm.js +55 -0
- data/lib/javascripts/moment_locale/uk.js +157 -0
- data/lib/javascripts/moment_locale/uz.js +55 -0
- data/lib/javascripts/moment_locale/vi.js +62 -0
- data/lib/javascripts/moment_locale/zh-cn.js +108 -0
- data/lib/javascripts/moment_locale/zh-tw.js +84 -0
- data/vendor/assets/javascripts/locales/i18n.js +598 -0
- data/vendor/assets/javascripts/locales/test.js.erb +3 -0
- metadata +182 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : korean (ko)
|
3
|
+
//
|
4
|
+
// authors
|
5
|
+
//
|
6
|
+
// - Kyungwook, Park : https://github.com/kyungw00k
|
7
|
+
// - Jeeeyul Lee <jeeeyul@gmail.com>
|
8
|
+
(function (factory) {
|
9
|
+
if (typeof define === 'function' && define.amd) {
|
10
|
+
define(['moment'], factory); // AMD
|
11
|
+
} else if (typeof exports === 'object') {
|
12
|
+
module.exports = factory(require('../moment')); // Node
|
13
|
+
} else {
|
14
|
+
factory(window.moment); // Browser global
|
15
|
+
}
|
16
|
+
}(function (moment) {
|
17
|
+
return moment.lang('ko', {
|
18
|
+
months : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),
|
19
|
+
monthsShort : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),
|
20
|
+
weekdays : "일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),
|
21
|
+
weekdaysShort : "일_월_화_수_목_금_토".split("_"),
|
22
|
+
weekdaysMin : "일_월_화_수_목_금_토".split("_"),
|
23
|
+
longDateFormat : {
|
24
|
+
LT : "A h시 mm분",
|
25
|
+
L : "YYYY.MM.DD",
|
26
|
+
LL : "YYYY년 MMMM D일",
|
27
|
+
LLL : "YYYY년 MMMM D일 LT",
|
28
|
+
LLLL : "YYYY년 MMMM D일 dddd LT"
|
29
|
+
},
|
30
|
+
meridiem : function (hour, minute, isUpper) {
|
31
|
+
return hour < 12 ? '오전' : '오후';
|
32
|
+
},
|
33
|
+
calendar : {
|
34
|
+
sameDay : '오늘 LT',
|
35
|
+
nextDay : '내일 LT',
|
36
|
+
nextWeek : 'dddd LT',
|
37
|
+
lastDay : '어제 LT',
|
38
|
+
lastWeek : '지난주 dddd LT',
|
39
|
+
sameElse : 'L'
|
40
|
+
},
|
41
|
+
relativeTime : {
|
42
|
+
future : "%s 후",
|
43
|
+
past : "%s 전",
|
44
|
+
s : "몇초",
|
45
|
+
ss : "%d초",
|
46
|
+
m : "일분",
|
47
|
+
mm : "%d분",
|
48
|
+
h : "한시간",
|
49
|
+
hh : "%d시간",
|
50
|
+
d : "하루",
|
51
|
+
dd : "%d일",
|
52
|
+
M : "한달",
|
53
|
+
MM : "%d달",
|
54
|
+
y : "일년",
|
55
|
+
yy : "%d년"
|
56
|
+
},
|
57
|
+
ordinal : '%d일',
|
58
|
+
meridiemParse : /(오전|오후)/,
|
59
|
+
isPM : function (token) {
|
60
|
+
return token === "오후";
|
61
|
+
}
|
62
|
+
});
|
63
|
+
}));
|
@@ -0,0 +1,160 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : Luxembourgish (lb)
|
3
|
+
// author : mweimerskirch : https://github.com/mweimerskirch
|
4
|
+
|
5
|
+
// Note: Luxembourgish has a very particular phonological rule ("Eifeler Regel") that causes the
|
6
|
+
// deletion of the final "n" in certain contexts. That's what the "eifelerRegelAppliesToWeekday"
|
7
|
+
// and "eifelerRegelAppliesToNumber" methods are meant for
|
8
|
+
|
9
|
+
(function (factory) {
|
10
|
+
if (typeof define === 'function' && define.amd) {
|
11
|
+
define(['moment'], factory); // AMD
|
12
|
+
} else if (typeof exports === 'object') {
|
13
|
+
module.exports = factory(require('../moment')); // Node
|
14
|
+
} else {
|
15
|
+
factory(window.moment); // Browser global
|
16
|
+
}
|
17
|
+
}(function (moment) {
|
18
|
+
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
19
|
+
var format = {
|
20
|
+
'm': ['eng Minutt', 'enger Minutt'],
|
21
|
+
'h': ['eng Stonn', 'enger Stonn'],
|
22
|
+
'd': ['een Dag', 'engem Dag'],
|
23
|
+
'dd': [number + ' Deeg', number + ' Deeg'],
|
24
|
+
'M': ['ee Mount', 'engem Mount'],
|
25
|
+
'MM': [number + ' Méint', number + ' Méint'],
|
26
|
+
'y': ['ee Joer', 'engem Joer'],
|
27
|
+
'yy': [number + ' Joer', number + ' Joer']
|
28
|
+
};
|
29
|
+
return withoutSuffix ? format[key][0] : format[key][1];
|
30
|
+
}
|
31
|
+
|
32
|
+
function processFutureTime(string) {
|
33
|
+
var number = string.substr(0, string.indexOf(' '));
|
34
|
+
if (eifelerRegelAppliesToNumber(number)) {
|
35
|
+
return "a " + string;
|
36
|
+
}
|
37
|
+
return "an " + string;
|
38
|
+
}
|
39
|
+
|
40
|
+
function processPastTime(string) {
|
41
|
+
var number = string.substr(0, string.indexOf(' '));
|
42
|
+
if (eifelerRegelAppliesToNumber(number)) {
|
43
|
+
return "viru " + string;
|
44
|
+
}
|
45
|
+
return "virun " + string;
|
46
|
+
}
|
47
|
+
|
48
|
+
function processLastWeek(string1) {
|
49
|
+
var weekday = this.format('d');
|
50
|
+
if (eifelerRegelAppliesToWeekday(weekday)) {
|
51
|
+
return '[Leschte] dddd [um] LT';
|
52
|
+
}
|
53
|
+
return '[Leschten] dddd [um] LT';
|
54
|
+
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* Returns true if the word before the given week day loses the "-n" ending.
|
58
|
+
* e.g. "Leschten Dënschdeg" but "Leschte Méindeg"
|
59
|
+
*
|
60
|
+
* @param weekday {integer}
|
61
|
+
* @returns {boolean}
|
62
|
+
*/
|
63
|
+
function eifelerRegelAppliesToWeekday(weekday) {
|
64
|
+
weekday = parseInt(weekday, 10);
|
65
|
+
switch (weekday) {
|
66
|
+
case 0: // Sonndeg
|
67
|
+
case 1: // Méindeg
|
68
|
+
case 3: // Mëttwoch
|
69
|
+
case 5: // Freideg
|
70
|
+
case 6: // Samschdeg
|
71
|
+
return true;
|
72
|
+
default: // 2 Dënschdeg, 4 Donneschdeg
|
73
|
+
return false;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Returns true if the word before the given number loses the "-n" ending.
|
79
|
+
* e.g. "an 10 Deeg" but "a 5 Deeg"
|
80
|
+
*
|
81
|
+
* @param number {integer}
|
82
|
+
* @returns {boolean}
|
83
|
+
*/
|
84
|
+
function eifelerRegelAppliesToNumber(number) {
|
85
|
+
number = parseInt(number, 10);
|
86
|
+
if (isNaN(number)) {
|
87
|
+
return false;
|
88
|
+
}
|
89
|
+
if (number < 0) {
|
90
|
+
// Negative Number --> always true
|
91
|
+
return true;
|
92
|
+
} else if (number < 10) {
|
93
|
+
// Only 1 digit
|
94
|
+
if (4 <= number && number <= 7) {
|
95
|
+
return true;
|
96
|
+
}
|
97
|
+
return false;
|
98
|
+
} else if (number < 100) {
|
99
|
+
// 2 digits
|
100
|
+
var lastDigit = number % 10, firstDigit = number / 10;
|
101
|
+
if (lastDigit === 0) {
|
102
|
+
return eifelerRegelAppliesToNumber(firstDigit);
|
103
|
+
}
|
104
|
+
return eifelerRegelAppliesToNumber(lastDigit);
|
105
|
+
} else if (number < 10000) {
|
106
|
+
// 3 or 4 digits --> recursively check first digit
|
107
|
+
while (number >= 10) {
|
108
|
+
number = number / 10;
|
109
|
+
}
|
110
|
+
return eifelerRegelAppliesToNumber(number);
|
111
|
+
} else {
|
112
|
+
// Anything larger than 4 digits: recursively check first n-3 digits
|
113
|
+
number = number / 1000;
|
114
|
+
return eifelerRegelAppliesToNumber(number);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
return moment.lang('lb', {
|
119
|
+
months: "Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),
|
120
|
+
monthsShort: "Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),
|
121
|
+
weekdays: "Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),
|
122
|
+
weekdaysShort: "So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),
|
123
|
+
weekdaysMin: "So_Mé_Dë_Më_Do_Fr_Sa".split("_"),
|
124
|
+
longDateFormat: {
|
125
|
+
LT: "H:mm [Auer]",
|
126
|
+
L: "DD.MM.YYYY",
|
127
|
+
LL: "D. MMMM YYYY",
|
128
|
+
LLL: "D. MMMM YYYY LT",
|
129
|
+
LLLL: "dddd, D. MMMM YYYY LT"
|
130
|
+
},
|
131
|
+
calendar: {
|
132
|
+
sameDay: "[Haut um] LT",
|
133
|
+
sameElse: "L",
|
134
|
+
nextDay: '[Muer um] LT',
|
135
|
+
nextWeek: 'dddd [um] LT',
|
136
|
+
lastDay: '[Gëschter um] LT',
|
137
|
+
lastWeek: processLastWeek
|
138
|
+
},
|
139
|
+
relativeTime: {
|
140
|
+
future: processFutureTime,
|
141
|
+
past: processPastTime,
|
142
|
+
s: "e puer Sekonnen",
|
143
|
+
m: processRelativeTime,
|
144
|
+
mm: "%d Minutten",
|
145
|
+
h: processRelativeTime,
|
146
|
+
hh: "%d Stonnen",
|
147
|
+
d: processRelativeTime,
|
148
|
+
dd: processRelativeTime,
|
149
|
+
M: processRelativeTime,
|
150
|
+
MM: processRelativeTime,
|
151
|
+
y: processRelativeTime,
|
152
|
+
yy: processRelativeTime
|
153
|
+
},
|
154
|
+
ordinal: '%d.',
|
155
|
+
week: {
|
156
|
+
dow: 1, // Monday is the first day of the week.
|
157
|
+
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
158
|
+
}
|
159
|
+
});
|
160
|
+
}));
|
@@ -0,0 +1,118 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : Lithuanian (lt)
|
3
|
+
// author : Mindaugas Mozūras : https://github.com/mmozuras
|
4
|
+
|
5
|
+
(function (factory) {
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
7
|
+
define(['moment'], factory); // AMD
|
8
|
+
} else if (typeof exports === 'object') {
|
9
|
+
module.exports = factory(require('../moment')); // Node
|
10
|
+
} else {
|
11
|
+
factory(window.moment); // Browser global
|
12
|
+
}
|
13
|
+
}(function (moment) {
|
14
|
+
var units = {
|
15
|
+
"m" : "minutė_minutės_minutę",
|
16
|
+
"mm": "minutės_minučių_minutes",
|
17
|
+
"h" : "valanda_valandos_valandą",
|
18
|
+
"hh": "valandos_valandų_valandas",
|
19
|
+
"d" : "diena_dienos_dieną",
|
20
|
+
"dd": "dienos_dienų_dienas",
|
21
|
+
"M" : "mėnuo_mėnesio_mėnesį",
|
22
|
+
"MM": "mėnesiai_mėnesių_mėnesius",
|
23
|
+
"y" : "metai_metų_metus",
|
24
|
+
"yy": "metai_metų_metus"
|
25
|
+
},
|
26
|
+
weekDays = "pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis_sekmadienis".split("_");
|
27
|
+
|
28
|
+
function translateSeconds(number, withoutSuffix, key, isFuture) {
|
29
|
+
if (withoutSuffix) {
|
30
|
+
return "kelios sekundės";
|
31
|
+
} else {
|
32
|
+
return isFuture ? "kelių sekundžių" : "kelias sekundes";
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
function translateSingular(number, withoutSuffix, key, isFuture) {
|
37
|
+
return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
|
38
|
+
}
|
39
|
+
|
40
|
+
function special(number) {
|
41
|
+
return number % 10 === 0 || (number > 10 && number < 20);
|
42
|
+
}
|
43
|
+
|
44
|
+
function forms(key) {
|
45
|
+
return units[key].split("_");
|
46
|
+
}
|
47
|
+
|
48
|
+
function translate(number, withoutSuffix, key, isFuture) {
|
49
|
+
var result = number + " ";
|
50
|
+
if (number === 1) {
|
51
|
+
return result + translateSingular(number, withoutSuffix, key[0], isFuture);
|
52
|
+
} else if (withoutSuffix) {
|
53
|
+
return result + (special(number) ? forms(key)[1] : forms(key)[0]);
|
54
|
+
} else {
|
55
|
+
if (isFuture) {
|
56
|
+
return result + forms(key)[1];
|
57
|
+
} else {
|
58
|
+
return result + (special(number) ? forms(key)[1] : forms(key)[2]);
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
function relativeWeekDay(moment, format) {
|
64
|
+
var nominative = format.indexOf('dddd HH:mm') === -1,
|
65
|
+
weekDay = weekDays[moment.weekday()];
|
66
|
+
|
67
|
+
return nominative ? weekDay : weekDay.substring(0, weekDay.length - 2) + "į";
|
68
|
+
}
|
69
|
+
|
70
|
+
return moment.lang("lt", {
|
71
|
+
months : "sausio_vasario_kovo_balandžio_gegužės_biržėlio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),
|
72
|
+
monthsShort : "sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),
|
73
|
+
weekdays : relativeWeekDay,
|
74
|
+
weekdaysShort : "Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),
|
75
|
+
weekdaysMin : "S_P_A_T_K_Pn_Š".split("_"),
|
76
|
+
longDateFormat : {
|
77
|
+
LT : "HH:mm",
|
78
|
+
L : "YYYY-MM-DD",
|
79
|
+
LL : "YYYY [m.] MMMM D [d.]",
|
80
|
+
LLL : "YYYY [m.] MMMM D [d.], LT [val.]",
|
81
|
+
LLLL : "YYYY [m.] MMMM D [d.], dddd, LT [val.]",
|
82
|
+
l : "YYYY-MM-DD",
|
83
|
+
ll : "YYYY [m.] MMMM D [d.]",
|
84
|
+
lll : "YYYY [m.] MMMM D [d.], LT [val.]",
|
85
|
+
llll : "YYYY [m.] MMMM D [d.], ddd, LT [val.]"
|
86
|
+
},
|
87
|
+
calendar : {
|
88
|
+
sameDay : "[Šiandien] LT",
|
89
|
+
nextDay : "[Rytoj] LT",
|
90
|
+
nextWeek : "dddd LT",
|
91
|
+
lastDay : "[Vakar] LT",
|
92
|
+
lastWeek : "[Praėjusį] dddd LT",
|
93
|
+
sameElse : "L"
|
94
|
+
},
|
95
|
+
relativeTime : {
|
96
|
+
future : "po %s",
|
97
|
+
past : "prieš %s",
|
98
|
+
s : translateSeconds,
|
99
|
+
m : translateSingular,
|
100
|
+
mm : translate,
|
101
|
+
h : translateSingular,
|
102
|
+
hh : translate,
|
103
|
+
d : translateSingular,
|
104
|
+
dd : translate,
|
105
|
+
M : translateSingular,
|
106
|
+
MM : translate,
|
107
|
+
y : translateSingular,
|
108
|
+
yy : translate
|
109
|
+
},
|
110
|
+
ordinal : function (number) {
|
111
|
+
return number + '-oji';
|
112
|
+
},
|
113
|
+
week : {
|
114
|
+
dow : 1, // Monday is the first day of the week.
|
115
|
+
doy : 4 // The week that contains Jan 4th is the first week of the year.
|
116
|
+
}
|
117
|
+
});
|
118
|
+
}));
|
@@ -0,0 +1,77 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : latvian (lv)
|
3
|
+
// author : Kristaps Karlsons : https://github.com/skakri
|
4
|
+
|
5
|
+
(function (factory) {
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
7
|
+
define(['moment'], factory); // AMD
|
8
|
+
} else if (typeof exports === 'object') {
|
9
|
+
module.exports = factory(require('../moment')); // Node
|
10
|
+
} else {
|
11
|
+
factory(window.moment); // Browser global
|
12
|
+
}
|
13
|
+
}(function (moment) {
|
14
|
+
var units = {
|
15
|
+
'mm': 'minūti_minūtes_minūte_minūtes',
|
16
|
+
'hh': 'stundu_stundas_stunda_stundas',
|
17
|
+
'dd': 'dienu_dienas_diena_dienas',
|
18
|
+
'MM': 'mēnesi_mēnešus_mēnesis_mēneši',
|
19
|
+
'yy': 'gadu_gadus_gads_gadi'
|
20
|
+
};
|
21
|
+
|
22
|
+
function format(word, number, withoutSuffix) {
|
23
|
+
var forms = word.split('_');
|
24
|
+
if (withoutSuffix) {
|
25
|
+
return number % 10 === 1 && number !== 11 ? forms[2] : forms[3];
|
26
|
+
} else {
|
27
|
+
return number % 10 === 1 && number !== 11 ? forms[0] : forms[1];
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
function relativeTimeWithPlural(number, withoutSuffix, key) {
|
32
|
+
return number + ' ' + format(units[key], number, withoutSuffix);
|
33
|
+
}
|
34
|
+
|
35
|
+
return moment.lang('lv', {
|
36
|
+
months : "janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),
|
37
|
+
monthsShort : "jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),
|
38
|
+
weekdays : "svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),
|
39
|
+
weekdaysShort : "Sv_P_O_T_C_Pk_S".split("_"),
|
40
|
+
weekdaysMin : "Sv_P_O_T_C_Pk_S".split("_"),
|
41
|
+
longDateFormat : {
|
42
|
+
LT : "HH:mm",
|
43
|
+
L : "DD.MM.YYYY",
|
44
|
+
LL : "YYYY. [gada] D. MMMM",
|
45
|
+
LLL : "YYYY. [gada] D. MMMM, LT",
|
46
|
+
LLLL : "YYYY. [gada] D. MMMM, dddd, LT"
|
47
|
+
},
|
48
|
+
calendar : {
|
49
|
+
sameDay : '[Šodien pulksten] LT',
|
50
|
+
nextDay : '[Rīt pulksten] LT',
|
51
|
+
nextWeek : 'dddd [pulksten] LT',
|
52
|
+
lastDay : '[Vakar pulksten] LT',
|
53
|
+
lastWeek : '[Pagājušā] dddd [pulksten] LT',
|
54
|
+
sameElse : 'L'
|
55
|
+
},
|
56
|
+
relativeTime : {
|
57
|
+
future : "%s vēlāk",
|
58
|
+
past : "%s agrāk",
|
59
|
+
s : "dažas sekundes",
|
60
|
+
m : "minūti",
|
61
|
+
mm : relativeTimeWithPlural,
|
62
|
+
h : "stundu",
|
63
|
+
hh : relativeTimeWithPlural,
|
64
|
+
d : "dienu",
|
65
|
+
dd : relativeTimeWithPlural,
|
66
|
+
M : "mēnesi",
|
67
|
+
MM : relativeTimeWithPlural,
|
68
|
+
y : "gadu",
|
69
|
+
yy : relativeTimeWithPlural
|
70
|
+
},
|
71
|
+
ordinal : '%d.',
|
72
|
+
week : {
|
73
|
+
dow : 1, // Monday is the first day of the week.
|
74
|
+
doy : 4 // The week that contains Jan 4th is the first week of the year.
|
75
|
+
}
|
76
|
+
});
|
77
|
+
}));
|
@@ -0,0 +1,86 @@
|
|
1
|
+
// moment.js language configuration
|
2
|
+
// language : macedonian (mk)
|
3
|
+
// author : Borislav Mickov : https://github.com/B0k0
|
4
|
+
|
5
|
+
(function (factory) {
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
7
|
+
define(['moment'], factory); // AMD
|
8
|
+
} else if (typeof exports === 'object') {
|
9
|
+
module.exports = factory(require('../moment')); // Node
|
10
|
+
} else {
|
11
|
+
factory(window.moment); // Browser global
|
12
|
+
}
|
13
|
+
}(function (moment) {
|
14
|
+
return moment.lang('mk', {
|
15
|
+
months : "јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),
|
16
|
+
monthsShort : "јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),
|
17
|
+
weekdays : "недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),
|
18
|
+
weekdaysShort : "нед_пон_вто_сре_чет_пет_саб".split("_"),
|
19
|
+
weekdaysMin : "нe_пo_вт_ср_че_пе_сa".split("_"),
|
20
|
+
longDateFormat : {
|
21
|
+
LT : "H:mm",
|
22
|
+
L : "D.MM.YYYY",
|
23
|
+
LL : "D MMMM YYYY",
|
24
|
+
LLL : "D MMMM YYYY LT",
|
25
|
+
LLLL : "dddd, D MMMM YYYY LT"
|
26
|
+
},
|
27
|
+
calendar : {
|
28
|
+
sameDay : '[Денес во] LT',
|
29
|
+
nextDay : '[Утре во] LT',
|
30
|
+
nextWeek : 'dddd [во] LT',
|
31
|
+
lastDay : '[Вчера во] LT',
|
32
|
+
lastWeek : function () {
|
33
|
+
switch (this.day()) {
|
34
|
+
case 0:
|
35
|
+
case 3:
|
36
|
+
case 6:
|
37
|
+
return '[Во изминатата] dddd [во] LT';
|
38
|
+
case 1:
|
39
|
+
case 2:
|
40
|
+
case 4:
|
41
|
+
case 5:
|
42
|
+
return '[Во изминатиот] dddd [во] LT';
|
43
|
+
}
|
44
|
+
},
|
45
|
+
sameElse : 'L'
|
46
|
+
},
|
47
|
+
relativeTime : {
|
48
|
+
future : "после %s",
|
49
|
+
past : "пред %s",
|
50
|
+
s : "неколку секунди",
|
51
|
+
m : "минута",
|
52
|
+
mm : "%d минути",
|
53
|
+
h : "час",
|
54
|
+
hh : "%d часа",
|
55
|
+
d : "ден",
|
56
|
+
dd : "%d дена",
|
57
|
+
M : "месец",
|
58
|
+
MM : "%d месеци",
|
59
|
+
y : "година",
|
60
|
+
yy : "%d години"
|
61
|
+
},
|
62
|
+
ordinal : function (number) {
|
63
|
+
var lastDigit = number % 10,
|
64
|
+
last2Digits = number % 100;
|
65
|
+
if (number === 0) {
|
66
|
+
return number + '-ев';
|
67
|
+
} else if (last2Digits === 0) {
|
68
|
+
return number + '-ен';
|
69
|
+
} else if (last2Digits > 10 && last2Digits < 20) {
|
70
|
+
return number + '-ти';
|
71
|
+
} else if (lastDigit === 1) {
|
72
|
+
return number + '-ви';
|
73
|
+
} else if (lastDigit === 2) {
|
74
|
+
return number + '-ри';
|
75
|
+
} else if (lastDigit === 7 || lastDigit === 8) {
|
76
|
+
return number + '-ми';
|
77
|
+
} else {
|
78
|
+
return number + '-ти';
|
79
|
+
}
|
80
|
+
},
|
81
|
+
week : {
|
82
|
+
dow : 1, // Monday is the first day of the week.
|
83
|
+
doy : 7 // The week that contains Jan 1st is the first week of the year.
|
84
|
+
}
|
85
|
+
});
|
86
|
+
}));
|