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,31 @@
|
|
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
|
+
// Spanish shortened
|
11
|
+
jQuery.timeago.settings.strings["es-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: "1me",
|
24
|
+
months: "%dme",
|
25
|
+
year: "1a",
|
26
|
+
years: "%da",
|
27
|
+
wordSeparator: " ",
|
28
|
+
numbers: []
|
29
|
+
};
|
30
|
+
}));
|
31
|
+
|
@@ -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
|
+
// Spanish
|
11
|
+
jQuery.timeago.settings.strings["es"] = {
|
12
|
+
prefixAgo: "hace",
|
13
|
+
prefixFromNow: "dentro de",
|
14
|
+
suffixAgo: "",
|
15
|
+
suffixFromNow: "",
|
16
|
+
seconds: "menos de un minuto",
|
17
|
+
minute: "un minuto",
|
18
|
+
minutes: "unos %d minutos",
|
19
|
+
hour: "una hora",
|
20
|
+
hours: "%d horas",
|
21
|
+
day: "un día",
|
22
|
+
days: "%d días",
|
23
|
+
month: "un mes",
|
24
|
+
months: "%d meses",
|
25
|
+
year: "un año",
|
26
|
+
years: "%d años"
|
27
|
+
};
|
28
|
+
}));
|
29
|
+
|
@@ -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
|
+
// Estonian
|
11
|
+
jQuery.timeago.settings.strings["et"] = {
|
12
|
+
prefixAgo: null,
|
13
|
+
prefixFromNow: null,
|
14
|
+
suffixAgo: "tagasi",
|
15
|
+
suffixFromNow: "pärast",
|
16
|
+
seconds: function(n, d) { return d < 0 ? "vähem kui minuti aja" : "vähem kui minut aega"; },
|
17
|
+
minute: function(n, d) { return d < 0 ? "umbes minuti aja" : "umbes minut aega"; },
|
18
|
+
minutes: function(n, d) { return d < 0 ? "%d minuti" : "%d minutit"; },
|
19
|
+
hour: function(n, d) { return d < 0 ? "umbes tunni aja" : "umbes tund aega"; },
|
20
|
+
hours: function(n, d) { return d < 0 ? "%d tunni" : "%d tundi"; },
|
21
|
+
day: function(n, d) { return d < 0 ? "umbes päeva" : "umbes päev"; },
|
22
|
+
days: "%d päeva",
|
23
|
+
month: function(n, d) { return d < 0 ? "umbes kuu aja" : "umbes kuu aega"; },
|
24
|
+
months: function(n, d) { return d < 0 ? "%d kuu" : "%d kuud"; },
|
25
|
+
year: function(n, d) { return d < 0 ? "umbes aasta aja" : "umbes aasta aega"; },
|
26
|
+
years: function(n, d) { return d < 0 ? "%d aasta" : "%d aastat"; }
|
27
|
+
};
|
28
|
+
}));
|
@@ -1,17 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
+
jQuery.timeago.settings.strings["eu"] = {
|
11
|
+
prefixAgo: "duela",
|
12
|
+
prefixFromNow: "hemendik",
|
13
|
+
suffixAgo: "",
|
14
|
+
suffixFromNow: "barru",
|
15
|
+
seconds: "minutu bat bainu gutxiago",
|
16
|
+
minute: "minutu bat",
|
17
|
+
minutes: "%d minutu inguru",
|
18
|
+
hour: "ordu bat",
|
19
|
+
hours: "%d ordu",
|
20
|
+
day: "egun bat",
|
21
|
+
days: "%d egun",
|
22
|
+
month: "hilabete bat",
|
23
|
+
months: "%d hilabete",
|
24
|
+
year: "urte bat",
|
25
|
+
years: "%d urte"
|
26
|
+
};
|
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
|
+
// persion shortened
|
11
|
+
jQuery.timeago.settings.strings["fa-short"] = {
|
12
|
+
prefixAgo: null,
|
13
|
+
prefixFromNow: null,
|
14
|
+
suffixAgo: "",
|
15
|
+
suffixFromNow: "",
|
16
|
+
seconds: "1دقیقه",
|
17
|
+
minute: "1دقیقه",
|
18
|
+
minutes: "%dدقیقه",
|
19
|
+
hour: "1ساعت",
|
20
|
+
hours: "%dساعت",
|
21
|
+
day: "1روز",
|
22
|
+
days: "%dروز",
|
23
|
+
month: "1ماه",
|
24
|
+
months: "%dماه",
|
25
|
+
year: "1سال",
|
26
|
+
years: "%dسال",
|
27
|
+
wordSeparator: " ",
|
28
|
+
numbers: ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹']
|
29
|
+
};
|
30
|
+
}));
|
@@ -1,22 +1,32 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
+
// Persian
|
11
|
+
// Use DIR attribute for RTL text in Persian Language for ABBR tag .
|
12
|
+
// By MB.seifollahi@gmail.com
|
13
|
+
jQuery.timeago.settings.strings["fa"] = {
|
14
|
+
prefixAgo: null,
|
15
|
+
prefixFromNow: null,
|
16
|
+
suffixAgo: "پیش",
|
17
|
+
suffixFromNow: "از حال",
|
18
|
+
seconds: "کمتر از یک دقیقه",
|
19
|
+
minute: "حدود یک دقیقه",
|
20
|
+
minutes: "%d دقیقه",
|
21
|
+
hour: "حدود یک ساعت",
|
22
|
+
hours: "حدود %d ساعت",
|
23
|
+
day: "یک روز",
|
24
|
+
days: "%d روز",
|
25
|
+
month: "حدود یک ماه",
|
26
|
+
months: "%d ماه",
|
27
|
+
year: "حدود یک سال",
|
28
|
+
years: "%d سال",
|
29
|
+
wordSeparator: " ",
|
30
|
+
numbers: ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹']
|
31
|
+
};
|
32
|
+
}));
|
@@ -1,28 +1,38 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
+
// Finnish
|
11
|
+
jQuery.timeago.settings.strings["fi"] = {
|
12
|
+
prefixAgo: null,
|
13
|
+
prefixFromNow: null,
|
14
|
+
suffixAgo: "sitten",
|
15
|
+
suffixFromNow: "tulevaisuudessa",
|
16
|
+
seconds: "alle minuutti",
|
17
|
+
minute: "minuutti",
|
18
|
+
minutes: "%d minuuttia",
|
19
|
+
hour: "tunti",
|
20
|
+
hours: "%d tuntia",
|
21
|
+
day: "päivä",
|
22
|
+
days: "%d päivää",
|
23
|
+
month: "kuukausi",
|
24
|
+
months: "%d kuukautta",
|
25
|
+
year: "vuosi",
|
26
|
+
years: "%d vuotta"
|
27
|
+
};
|
28
|
+
|
29
|
+
// The above is not a great localization because one would usually
|
30
|
+
// write "2 days ago" in Finnish as "2 päivää sitten", however
|
31
|
+
// one would write "2 days into the future" as "2:n päivän päästä"
|
32
|
+
// which cannot be achieved with localization support this simple.
|
33
|
+
// This is because Finnish has word suffixes (attached directly
|
34
|
+
// to the end of the word). The word "day" is "päivä" in Finnish.
|
35
|
+
// As workaround, the above localizations will say
|
36
|
+
// "2 päivää tulevaisuudessa" which is understandable but
|
37
|
+
// not as fluent.
|
38
|
+
}));
|
@@ -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
|
+
// French shortened
|
11
|
+
jQuery.timeago.settings.strings["fr-short"] = {
|
12
|
+
prefixAgo: "il y a",
|
13
|
+
prefixFromNow: "d'ici",
|
14
|
+
seconds: "moins d'une minute",
|
15
|
+
minute: "une minute",
|
16
|
+
minutes: "%d minutes",
|
17
|
+
hour: "une heure",
|
18
|
+
hours: "%d heures",
|
19
|
+
day: "un jour",
|
20
|
+
days: "%d jours",
|
21
|
+
month: "un mois",
|
22
|
+
months: "%d mois",
|
23
|
+
year: "un an",
|
24
|
+
years: "%d ans"
|
25
|
+
};
|
26
|
+
}));
|
@@ -1,17 +1,27 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
+
// French
|
11
|
+
jQuery.timeago.settings.strings["fr"] = {
|
12
|
+
// environ ~= about, it's optional
|
13
|
+
prefixAgo: "il y a",
|
14
|
+
prefixFromNow: "d'ici",
|
15
|
+
seconds: "moins d'une minute",
|
16
|
+
minute: "environ une minute",
|
17
|
+
minutes: "environ %d minutes",
|
18
|
+
hour: "environ une heure",
|
19
|
+
hours: "environ %d heures",
|
20
|
+
day: "environ un jour",
|
21
|
+
days: "environ %d jours",
|
22
|
+
month: "environ un mois",
|
23
|
+
months: "environ %d mois",
|
24
|
+
year: "un an",
|
25
|
+
years: "%d ans"
|
26
|
+
};
|
27
|
+
}));
|