rails-timeago 2.16.0 → 2.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +53 -0
- data/.travis.yml +20 -8
- data/CHANGELOG.md +8 -0
- data/Gemfile +3 -5
- data/Rakefile +14 -12
- data/lib/assets/javascripts/rails-timeago-all.js +4 -0
- data/lib/rails-timeago.rb +21 -17
- data/lib/rails-timeago/helper.rb +13 -10
- data/lib/rails-timeago/version.rb +4 -2
- data/rails-timeago.gemspec +13 -11
- data/spec/rails-timeago_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/stub.rb +11 -9
- data/spec/timeago/helper_spec.rb +27 -25
- data/vendor/assets/javascripts/jquery.timeago.js +1 -1
- data/vendor/assets/javascripts/locales/jquery.timeago.af.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.am.js +30 -0
- data/vendor/assets/javascripts/locales/jquery.timeago.ar.js +12 -4
- data/vendor/assets/javascripts/locales/jquery.timeago.az-short.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.az.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.be.js +43 -0
- data/vendor/assets/javascripts/locales/jquery.timeago.bg.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.bs.js +13 -7
- data/vendor/assets/javascripts/locales/jquery.timeago.ca.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.cs.js +34 -24
- data/vendor/assets/javascripts/locales/jquery.timeago.cy.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.da.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.de-short.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.de.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.dv.js +32 -22
- data/vendor/assets/javascripts/locales/jquery.timeago.el.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.en-short.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.es-short.js +31 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.es.js +29 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.et.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.eu.js +28 -17
- data/vendor/assets/javascripts/locales/jquery.timeago.fa-short.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.fa.js +32 -22
- data/vendor/assets/javascripts/locales/jquery.timeago.fi.js +38 -28
- data/vendor/assets/javascripts/locales/jquery.timeago.fr-short.js +26 -16
- data/vendor/assets/javascripts/locales/jquery.timeago.fr.js +27 -17
- data/vendor/assets/javascripts/locales/jquery.timeago.gl.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.he.js +26 -16
- data/vendor/assets/javascripts/locales/jquery.timeago.hr.js +53 -48
- data/vendor/assets/javascripts/locales/jquery.timeago.hu.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.hy.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.id.js +29 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.is.js +29 -19
- data/vendor/assets/javascripts/locales/jquery.timeago.it-short.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.it.js +28 -16
- data/vendor/assets/javascripts/locales/jquery.timeago.ja.js +29 -19
- data/vendor/assets/javascripts/locales/jquery.timeago.jv.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.ko.js +31 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.ky.js +11 -3
- data/vendor/assets/javascripts/locales/jquery.timeago.lt.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.lv.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.mk.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.nl.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.no.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.pl.js +11 -3
- data/vendor/assets/javascripts/locales/jquery.timeago.pt-br-short.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.pt-br.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.pt-short.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.pt.js +26 -16
- data/vendor/assets/javascripts/locales/jquery.timeago.ro.js +29 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.rs.js +53 -48
- data/vendor/assets/javascripts/locales/jquery.timeago.ru.js +11 -3
- data/vendor/assets/javascripts/locales/jquery.timeago.rw.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.si.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.sk.js +34 -24
- data/vendor/assets/javascripts/locales/jquery.timeago.sl.js +45 -39
- data/vendor/assets/javascripts/locales/jquery.timeago.sq.js +26 -0
- data/vendor/assets/javascripts/locales/jquery.timeago.sr.js +53 -48
- data/vendor/assets/javascripts/locales/jquery.timeago.sv.js +28 -18
- data/vendor/assets/javascripts/locales/jquery.timeago.th.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.tr-short.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.tr.js +26 -16
- data/vendor/assets/javascripts/locales/jquery.timeago.uk.js +11 -3
- data/vendor/assets/javascripts/locales/jquery.timeago.ur.js +30 -0
- data/vendor/assets/javascripts/locales/jquery.timeago.uz.js +29 -19
- data/vendor/assets/javascripts/locales/jquery.timeago.vi.js +30 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.zh-CN.js +31 -20
- data/vendor/assets/javascripts/locales/jquery.timeago.zh-TW.js +30 -20
- metadata +8 -4
@@ -1,24 +1,34 @@
|
|
1
|
-
|
2
|
-
(function
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
1
|
+
(function (factory) {
|
2
|
+
if (typeof define === 'function' && define.amd) {
|
3
|
+
define(['jquery'], factory);
|
4
|
+
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
5
|
+
factory(require('jquery'));
|
6
|
+
} else {
|
7
|
+
factory(jQuery);
|
8
|
+
}
|
9
|
+
}(function (jQuery) {
|
10
|
+
// Slovak
|
11
|
+
(function() {
|
12
|
+
function f(n, d, a) {
|
13
|
+
return a[d>=0 ? 0 : a.length===2 || n<5 ? 1 : 2];
|
14
|
+
}
|
15
|
+
|
16
|
+
jQuery.timeago.settings.strings["sk"] = {
|
17
|
+
prefixAgo: 'pred',
|
18
|
+
prefixFromNow: 'o',
|
19
|
+
suffixAgo: null,
|
20
|
+
suffixFromNow: null,
|
21
|
+
seconds: function(n, d) {return f(n, d, ['menej ako minútou', 'menej ako minútu']);},
|
22
|
+
minute: function(n, d) {return f(n, d, ['minútou', 'minútu']);},
|
23
|
+
minutes: function(n, d) {return f(n, d, ['%d minútami', '%d minúty', '%d minút']);},
|
24
|
+
hour: function(n, d) {return f(n, d, ['hodinou', 'hodinu']);},
|
25
|
+
hours: function(n, d) {return f(n, d, ['%d hodinami', '%d hodiny', '%d hodín']);},
|
26
|
+
day: function(n, d) {return f(n, d, ['%d dňom', '%d deň']);},
|
27
|
+
days: function(n, d) {return f(n, d, ['%d dňami', '%d dni', '%d dní']);},
|
28
|
+
month: function(n, d) {return f(n, d, ['%d mesiacom', '%d mesiac']);},
|
29
|
+
months: function(n, d) {return f(n, d, ['%d mesiacmi', '%d mesiace', '%d mesiacov']);},
|
30
|
+
year: function(n, d) {return f(n, d, ['%d rokom', '%d rok']);},
|
31
|
+
years: function(n, d) {return f(n, d, ['%d rokmi', '%d roky', '%d rokov']);}
|
32
|
+
};
|
33
|
+
})();
|
34
|
+
}));
|
@@ -1,40 +1,46 @@
|
|
1
|
-
|
2
|
-
(function
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
(function (factory) {
|
2
|
+
if (typeof define === 'function' && define.amd) {
|
3
|
+
define(['jquery'], factory);
|
4
|
+
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
5
|
+
factory(require('jquery'));
|
6
|
+
} else {
|
7
|
+
factory(jQuery);
|
8
|
+
}
|
9
|
+
}(function (jQuery) {
|
10
|
+
// Slovenian with support for dual
|
11
|
+
var numpf = function (n, a) {
|
12
|
+
return a[n%100===1 ? 1 : n%100===2 ? 2 : n%100===3 || n%100===4 ? 3 : 0];
|
13
|
+
};
|
7
14
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
}).call(this);
|
15
|
+
jQuery.timeago.settings.strings["sl"] = {
|
16
|
+
prefixAgo: null,
|
17
|
+
prefixFromNow: "čez",
|
18
|
+
suffixAgo: "nazaj",
|
19
|
+
suffixFromNow: null,
|
20
|
+
second: "sekundo",
|
21
|
+
seconds: function (value) {
|
22
|
+
return numpf(value, ["%d sekund", "%d sekundo", "%d sekundi", "%d sekunde"]);
|
23
|
+
},
|
24
|
+
minute: "minuto",
|
25
|
+
minutes: function (value) {
|
26
|
+
return numpf(value, ["%d minut", "%d minuto", "%d minuti", "%d minute"]);
|
27
|
+
},
|
28
|
+
hour: "eno uro",
|
29
|
+
hours: function (value) {
|
30
|
+
return numpf(value, ["%d ur", "%d uro", "%d uri", "%d ure"]);
|
31
|
+
},
|
32
|
+
day: "en dan",
|
33
|
+
days: function (value) {
|
34
|
+
return numpf(value, ["%d dni", "%d dan", "%d dneva", "%d dni"]);
|
35
|
+
},
|
36
|
+
month: "en mesec",
|
37
|
+
months: function (value) {
|
38
|
+
return numpf(value, ["%d mesecev", "%d mesec", "%d meseca", "%d mesece"]);
|
39
|
+
},
|
40
|
+
year: "eno leto",
|
41
|
+
years: function (value) {
|
42
|
+
return numpf(value, ["%d let", "%d leto", "%d leti", "%d leta"]);
|
43
|
+
},
|
44
|
+
wordSeparator: " "
|
45
|
+
};
|
46
|
+
}));
|
@@ -0,0 +1,26 @@
|
|
1
|
+
(function (factory) {
|
2
|
+
if (typeof define === 'function' && define.amd) {
|
3
|
+
define(['jquery'], factory);
|
4
|
+
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
5
|
+
factory(require('jquery'));
|
6
|
+
} else {
|
7
|
+
factory(jQuery);
|
8
|
+
}
|
9
|
+
}(function (jQuery) {
|
10
|
+
// Albanian SQ
|
11
|
+
jQuery.timeago.settings.strings["sq"] = {
|
12
|
+
suffixAgo: "më parë",
|
13
|
+
suffixFromNow: "tani",
|
14
|
+
seconds: "më pak se një minutë",
|
15
|
+
minute: "rreth një minutë",
|
16
|
+
minutes: "%d minuta",
|
17
|
+
hour: "rreth një orë",
|
18
|
+
hours: "rreth %d orë",
|
19
|
+
day: "një ditë",
|
20
|
+
days: "%d ditë",
|
21
|
+
month: "rreth një muaj",
|
22
|
+
months: "%d muaj",
|
23
|
+
year: "rreth një vit",
|
24
|
+
years: "%d vjet"
|
25
|
+
};
|
26
|
+
}));
|
@@ -1,49 +1,54 @@
|
|
1
|
-
|
2
|
-
(function
|
3
|
-
|
1
|
+
(function (factory) {
|
2
|
+
if (typeof define === 'function' && define.amd) {
|
3
|
+
define(['jquery'], factory);
|
4
|
+
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
5
|
+
factory(require('jquery'));
|
6
|
+
} else {
|
7
|
+
factory(jQuery);
|
8
|
+
}
|
9
|
+
}(function (jQuery) {
|
10
|
+
// Serbian
|
11
|
+
var numpf = function (n, f, s, t) {
|
12
|
+
var n10;
|
13
|
+
n10 = n % 10;
|
14
|
+
if (n10 === 1 && (n === 1 || n > 20)) {
|
15
|
+
return f;
|
16
|
+
} else if (n10 > 1 && n10 < 5 && (n > 20 || n < 10)) {
|
17
|
+
return s;
|
18
|
+
} else {
|
19
|
+
return t;
|
20
|
+
}
|
21
|
+
};
|
4
22
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
},
|
38
|
-
month: "месец дана",
|
39
|
-
months: function (value) {
|
40
|
-
return numpf(value, "%d месец", "%d месеца", "%d месеци");
|
41
|
-
},
|
42
|
-
year: "годину дана",
|
43
|
-
years: function (value) {
|
44
|
-
return numpf(value, "%d годину", "%d године", "%d година");
|
45
|
-
},
|
46
|
-
wordSeparator: " "
|
47
|
-
};
|
48
|
-
|
49
|
-
}).call(this);
|
23
|
+
jQuery.timeago.settings.strings["sr"] = {
|
24
|
+
prefixAgo: "пре",
|
25
|
+
prefixFromNow: "за",
|
26
|
+
suffixAgo: null,
|
27
|
+
suffixFromNow: null,
|
28
|
+
second: "секунд",
|
29
|
+
seconds: function (value) {
|
30
|
+
return numpf(value, "%d секунд", "%d секунде", "%d секунди");
|
31
|
+
},
|
32
|
+
minute: "један минут",
|
33
|
+
minutes: function (value) {
|
34
|
+
return numpf(value, "%d минут", "%d минута", "%d минута");
|
35
|
+
},
|
36
|
+
hour: "један сат",
|
37
|
+
hours: function (value) {
|
38
|
+
return numpf(value, "%d сат", "%d сата", "%d сати");
|
39
|
+
},
|
40
|
+
day: "један дан",
|
41
|
+
days: function (value) {
|
42
|
+
return numpf(value, "%d дан", "%d дана", "%d дана");
|
43
|
+
},
|
44
|
+
month: "месец дана",
|
45
|
+
months: function (value) {
|
46
|
+
return numpf(value, "%d месец", "%d месеца", "%d месеци");
|
47
|
+
},
|
48
|
+
year: "годину дана",
|
49
|
+
years: function (value) {
|
50
|
+
return numpf(value, "%d годину", "%d године", "%d година");
|
51
|
+
},
|
52
|
+
wordSeparator: " "
|
53
|
+
};
|
54
|
+
}));
|
@@ -1,18 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
1
|
+
(function (factory) {
|
2
|
+
if (typeof define === 'function' && define.amd) {
|
3
|
+
define(['jquery'], factory);
|
4
|
+
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
5
|
+
factory(require('jquery'));
|
6
|
+
} else {
|
7
|
+
factory(jQuery);
|
8
|
+
}
|
9
|
+
}(function (jQuery) {
|
10
|
+
// Swedish
|
11
|
+
jQuery.timeago.settings.strings["sv"] = {
|
12
|
+
prefixAgo: "för",
|
13
|
+
prefixFromNow: "om",
|
14
|
+
suffixAgo: "sedan",
|
15
|
+
suffixFromNow: "",
|
16
|
+
seconds: "mindre än en minut",
|
17
|
+
minute: "ungefär en minut",
|
18
|
+
minutes: "%d minuter",
|
19
|
+
hour: "ungefär en timme",
|
20
|
+
hours: "ungefär %d timmar",
|
21
|
+
day: "en dag",
|
22
|
+
days: "%d dagar",
|
23
|
+
month: "ungefär en månad",
|
24
|
+
months: "%d månader",
|
25
|
+
year: "ungefär ett år",
|
26
|
+
years: "%d år"
|
27
|
+
};
|
28
|
+
}));
|
@@ -1,20 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
(function (factory) {
|
2
|
+
if (typeof define === 'function' && define.amd) {
|
3
|
+
define(['jquery'], factory);
|
4
|
+
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
5
|
+
factory(require('jquery'));
|
6
|
+
} else {
|
7
|
+
factory(jQuery);
|
8
|
+
}
|
9
|
+
}(function (jQuery) {
|
10
|
+
// Thai
|
11
|
+
jQuery.timeago.settings.strings["th"] = {
|
12
|
+
prefixAgo: null,
|
13
|
+
prefixFromNow: null,
|
14
|
+
suffixAgo: "ที่แล้ว",
|
15
|
+
suffixFromNow: "จากตอนนี้",
|
16
|
+
seconds: "น้อยกว่าหนึ่งนาที",
|
17
|
+
minute: "ประมาณหนึ่งนาที",
|
18
|
+
minutes: "%d นาที",
|
19
|
+
hour: "ประมาณหนึ่งชั่วโมง",
|
20
|
+
hours: "ประมาณ %d ชั่วโมง",
|
21
|
+
day: "หนึ่งวัน",
|
22
|
+
days: "%d วัน",
|
23
|
+
month: "ประมาณหนึ่งเดือน",
|
24
|
+
months: "%d เดือน",
|
25
|
+
year: "ประมาณหนึ่งปี",
|
26
|
+
years: "%d ปี",
|
27
|
+
wordSeparator: "",
|
28
|
+
numbers: []
|
29
|
+
};
|
30
|
+
}));
|
@@ -1,20 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
(function (factory) {
|
2
|
+
if (typeof define === 'function' && define.amd) {
|
3
|
+
define(['jquery'], factory);
|
4
|
+
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
5
|
+
factory(require('jquery'));
|
6
|
+
} else {
|
7
|
+
factory(jQuery);
|
8
|
+
}
|
9
|
+
}(function (jQuery) {
|
10
|
+
// Turkish shortened
|
11
|
+
jQuery.timeago.settings.strings["tr-short"] = {
|
12
|
+
prefixAgo: null,
|
13
|
+
prefixFromNow: null,
|
14
|
+
suffixAgo: "",
|
15
|
+
suffixFromNow: "",
|
16
|
+
seconds: "1dk",
|
17
|
+
minute: "1dk",
|
18
|
+
minutes: "%ddk",
|
19
|
+
hour: "1s",
|
20
|
+
hours: "%ds",
|
21
|
+
day: "1g",
|
22
|
+
days: "%dg",
|
23
|
+
month: "1ay",
|
24
|
+
months: "%day",
|
25
|
+
year: "1y",
|
26
|
+
years: "%dy",
|
27
|
+
wordSeparator: " ",
|
28
|
+
numbers: []
|
29
|
+
};
|
30
|
+
}));
|
@@ -1,16 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
(function (factory) {
|
2
|
+
if (typeof define === 'function' && define.amd) {
|
3
|
+
define(['jquery'], factory);
|
4
|
+
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
5
|
+
factory(require('jquery'));
|
6
|
+
} else {
|
7
|
+
factory(jQuery);
|
8
|
+
}
|
9
|
+
}(function (jQuery) {
|
10
|
+
// Turkish
|
11
|
+
jQuery.timeago.settings.strings["tr"] = {
|
12
|
+
suffixAgo: 'önce',
|
13
|
+
suffixFromNow: null,
|
14
|
+
seconds: 'birkaç saniye',
|
15
|
+
minute: '1 dakika',
|
16
|
+
minutes: '%d dakika',
|
17
|
+
hour: '1 saat',
|
18
|
+
hours: '%d saat',
|
19
|
+
day: '1 gün',
|
20
|
+
days: '%d gün',
|
21
|
+
month: '1 ay',
|
22
|
+
months: '%d ay',
|
23
|
+
year: '1 yıl',
|
24
|
+
years: '%d yıl'
|
25
|
+
};
|
26
|
+
}));
|