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,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
|
+
// Portuguese Brasil shortened
|
11
|
+
jQuery.timeago.settings.strings["pt-br-short"] = {
|
12
|
+
prefixAgo: null,
|
13
|
+
prefixFromNow: null,
|
14
|
+
suffixAgo: "",
|
15
|
+
suffixFromNow: "",
|
16
|
+
seconds: "1m",
|
17
|
+
minute: "1m",
|
18
|
+
minutes: "%dm",
|
19
|
+
hour: "1h",
|
20
|
+
hours: "%dh",
|
21
|
+
day: "1d",
|
22
|
+
days: "%dd",
|
23
|
+
month: "1M",
|
24
|
+
months: "%dM",
|
25
|
+
year: "1a",
|
26
|
+
years: "%da",
|
27
|
+
wordSeparator: " ",
|
28
|
+
numbers: []
|
29
|
+
};
|
30
|
+
}));
|
@@ -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
|
+
// Brazilian Portuguese
|
11
|
+
jQuery.timeago.settings.strings["pt-br"] = {
|
12
|
+
prefixAgo: "há",
|
13
|
+
prefixFromNow: "em",
|
14
|
+
suffixAgo: null,
|
15
|
+
suffixFromNow: null,
|
16
|
+
seconds: "alguns segundos",
|
17
|
+
minute: "um minuto",
|
18
|
+
minutes: "%d minutos",
|
19
|
+
hour: "uma hora",
|
20
|
+
hours: "%d horas",
|
21
|
+
day: "um dia",
|
22
|
+
days: "%d dias",
|
23
|
+
month: "um mês",
|
24
|
+
months: "%d meses",
|
25
|
+
year: "um ano",
|
26
|
+
years: "%d anos"
|
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
|
+
// Portuguese shortened
|
11
|
+
jQuery.timeago.settings.strings["pt-short"] = {
|
12
|
+
prefixAgo: null,
|
13
|
+
prefixFromNow: null,
|
14
|
+
suffixAgo: "",
|
15
|
+
suffixFromNow: "",
|
16
|
+
seconds: "1m",
|
17
|
+
minute: "1m",
|
18
|
+
minutes: "%dm",
|
19
|
+
hour: "1h",
|
20
|
+
hours: "%dh",
|
21
|
+
day: "1d",
|
22
|
+
days: "%dd",
|
23
|
+
month: "1M",
|
24
|
+
months: "%dM",
|
25
|
+
year: "1a",
|
26
|
+
years: "%da",
|
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
|
+
// Portuguese
|
11
|
+
jQuery.timeago.settings.strings["pt"] = {
|
12
|
+
suffixAgo: "atrás",
|
13
|
+
suffixFromNow: "a partir de agora",
|
14
|
+
seconds: "menos de um minuto",
|
15
|
+
minute: "cerca de um minuto",
|
16
|
+
minutes: "%d minutos",
|
17
|
+
hour: "cerca de uma hora",
|
18
|
+
hours: "cerca de %d horas",
|
19
|
+
day: "um dia",
|
20
|
+
days: "%d dias",
|
21
|
+
month: "cerca de um mês",
|
22
|
+
months: "%d meses",
|
23
|
+
year: "cerca de um ano",
|
24
|
+
years: "%d anos"
|
25
|
+
};
|
26
|
+
}));
|
@@ -1,18 +1,29 @@
|
|
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
|
+
// Romanian
|
11
|
+
jQuery.timeago.settings.strings["ro"] = {
|
12
|
+
prefixAgo: "acum",
|
13
|
+
prefixFromNow: "in timp de",
|
14
|
+
suffixAgo: "",
|
15
|
+
suffixFromNow: "",
|
16
|
+
seconds: "mai putin de un minut",
|
17
|
+
minute: "un minut",
|
18
|
+
minutes: "%d minute",
|
19
|
+
hour: "o ora",
|
20
|
+
hours: "%d ore",
|
21
|
+
day: "o zi",
|
22
|
+
days: "%d zile",
|
23
|
+
month: "o luna",
|
24
|
+
months: "%d luni",
|
25
|
+
year: "un an",
|
26
|
+
years: "%d ani"
|
27
|
+
};
|
28
|
+
}));
|
29
|
+
|
@@ -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: "mesec dana",
|
39
|
-
months: function (value) {
|
40
|
-
return numpf(value, "%d mesec", "%d meseca", "%d meseci");
|
41
|
-
},
|
42
|
-
year: "godinu dana",
|
43
|
-
years: function (value) {
|
44
|
-
return numpf(value, "%d godinu", "%d godine", "%d godina");
|
45
|
-
},
|
46
|
-
wordSeparator: " "
|
47
|
-
};
|
48
|
-
|
49
|
-
}).call(this);
|
23
|
+
jQuery.timeago.settings.strings["rs"] = {
|
24
|
+
prefixAgo: "pre",
|
25
|
+
prefixFromNow: "za",
|
26
|
+
suffixAgo: null,
|
27
|
+
suffixFromNow: null,
|
28
|
+
second: "sekund",
|
29
|
+
seconds: function (value) {
|
30
|
+
return numpf(value, "%d sekund", "%d sekunde", "%d sekundi");
|
31
|
+
},
|
32
|
+
minute: "oko minut",
|
33
|
+
minutes: function (value) {
|
34
|
+
return numpf(value, "%d minut", "%d minuta", "%d minuta");
|
35
|
+
},
|
36
|
+
hour: "oko jedan sat",
|
37
|
+
hours: function (value) {
|
38
|
+
return numpf(value, "%d sat", "%d sata", "%d sati");
|
39
|
+
},
|
40
|
+
day: "jedan dan",
|
41
|
+
days: function (value) {
|
42
|
+
return numpf(value, "%d dan", "%d dana", "%d dana");
|
43
|
+
},
|
44
|
+
month: "mesec dana",
|
45
|
+
months: function (value) {
|
46
|
+
return numpf(value, "%d mesec", "%d meseca", "%d meseci");
|
47
|
+
},
|
48
|
+
year: "godinu dana",
|
49
|
+
years: function (value) {
|
50
|
+
return numpf(value, "%d godinu", "%d godine", "%d godina");
|
51
|
+
},
|
52
|
+
wordSeparator: " "
|
53
|
+
};
|
54
|
+
}));
|
@@ -1,5 +1,13 @@
|
|
1
|
-
|
2
|
-
(function
|
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
|
+
// Russian
|
3
11
|
function numpf(n, f, s, t) {
|
4
12
|
// f - 1, 21, 31, ...
|
5
13
|
// s - 2-4, 22-24, 32-34 ...
|
@@ -32,4 +40,4 @@
|
|
32
40
|
year: "год",
|
33
41
|
years: function(value) { return numpf(value, "%d год", "%d года", "%d лет"); }
|
34
42
|
};
|
35
|
-
})
|
43
|
+
}));
|
@@ -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
|
+
// Kinyarwanda
|
11
|
+
jQuery.timeago.settings.strings["rw"] = {
|
12
|
+
prefixAgo: "hashize",
|
13
|
+
prefixFromNow: "mu",
|
14
|
+
suffixAgo: null,
|
15
|
+
suffixFromNow: null,
|
16
|
+
seconds: "amasegonda macye",
|
17
|
+
minute: "umunota",
|
18
|
+
minutes: "iminota %d",
|
19
|
+
hour: "isaha",
|
20
|
+
hours: "amasaha %d",
|
21
|
+
day: "umunsi",
|
22
|
+
days: "iminsi %d",
|
23
|
+
month: "ukwezi",
|
24
|
+
months: "amezi %d",
|
25
|
+
year: "umwaka",
|
26
|
+
years: "imyaka %d",
|
27
|
+
wordSeparator: " ",
|
28
|
+
numbers: []
|
29
|
+
};
|
30
|
+
}));
|
@@ -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
|
+
// Sinhalese (SI)
|
11
|
+
jQuery.timeago.settings.strings["si"] = {
|
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
|
+
};
|
28
|
+
}));
|