rails-timeago 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# rails-timeago [](https://travis-ci.org/jgraichen/rails-timeago) [](https://codeclimate.com/github/jgraichen/rails-timeago)
|
1
|
+
# rails-timeago [](http://badge.fury.io/rb/rails-timeago) [](https://travis-ci.org/jgraichen/rails-timeago) [](https://codeclimate.com/github/jgraichen/rails-timeago) [](https://gemnasium.com/jgraichen/rails-timeago)
|
2
2
|
|
3
3
|
**rails-timeago** provides a timeago_tag helper to create time tags usable for
|
4
4
|
[jQuery Timeago](https://github.com/rmm5t/jquery-timeago) plugin.
|
@@ -29,6 +29,7 @@
|
|
29
29
|
//= require locales/jquery.timeago.ko.js
|
30
30
|
//= require locales/jquery.timeago.uz.js
|
31
31
|
//= require locales/jquery.timeago.cz.js
|
32
|
+
//= require locales/jquery.timeago.sl.js
|
32
33
|
//= require locales/jquery.timeago.hu.js
|
33
34
|
//= require locales/jquery.timeago.id.js
|
34
35
|
//= require locales/jquery.timeago.hr.js
|
@@ -40,6 +40,7 @@
|
|
40
40
|
settings: {
|
41
41
|
refreshMillis: 60000,
|
42
42
|
allowFuture: false,
|
43
|
+
localeTitle: false,
|
43
44
|
lang: "en",
|
44
45
|
strings: { "en": {
|
45
46
|
prefixAgo: null,
|
@@ -161,7 +162,9 @@
|
|
161
162
|
if (!element.data("timeago")) {
|
162
163
|
element.data("timeago", { datetime: $t.datetime(element) });
|
163
164
|
var text = $.trim(element.text());
|
164
|
-
if (
|
165
|
+
if ($t.settings.localeTitle) {
|
166
|
+
element.attr("title", element.data('timeago').datetime.toLocaleString())
|
167
|
+
} else if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) {
|
165
168
|
element.attr("title", text);
|
166
169
|
}
|
167
170
|
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
// Slovenian with support for dual
|
2
|
+
(function () {
|
3
|
+
var numpf;
|
4
|
+
numpf = function (n, d, m) {
|
5
|
+
if (n == 2) {
|
6
|
+
return d;
|
7
|
+
} else {
|
8
|
+
return m;
|
9
|
+
}
|
10
|
+
};
|
11
|
+
|
12
|
+
jQuery.timeago.settings.strings["sl"] = {
|
13
|
+
prefixAgo: "pred",
|
14
|
+
prefixFromNow: "čez",
|
15
|
+
suffixAgo: null,
|
16
|
+
suffixFromNow: null,
|
17
|
+
second: "sekundo",
|
18
|
+
seconds: function (value) {
|
19
|
+
return numpf(value, "%d sekundama", "%d sekundami");
|
20
|
+
},
|
21
|
+
minute: "minuto",
|
22
|
+
minutes: function (value) {
|
23
|
+
return numpf(value, "%d minutama", "%d minutami");
|
24
|
+
},
|
25
|
+
hour: "uro",
|
26
|
+
hours: function (value) {
|
27
|
+
return numpf(value, "%d urama", "%d urami");
|
28
|
+
},
|
29
|
+
day: "dnevom",
|
30
|
+
days: function (value) {
|
31
|
+
return numpf(value, "%d dnevi", "%d dnevi");
|
32
|
+
},
|
33
|
+
month: "enim mescem",
|
34
|
+
months: function (value) {
|
35
|
+
return numpf(value, "%d mesecema", "%d meseci");
|
36
|
+
},
|
37
|
+
year: "enim letom",
|
38
|
+
years: function (value) {
|
39
|
+
return numpf(value, "%d letoma", "%d leti");
|
40
|
+
},
|
41
|
+
wordSeparator: " "
|
42
|
+
};
|
43
|
+
|
44
|
+
}).call(this);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-timeago
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- vendor/assets/javascripts/locales/jquery.timeago.ro.js
|
115
115
|
- vendor/assets/javascripts/locales/jquery.timeago.ru.js
|
116
116
|
- vendor/assets/javascripts/locales/jquery.timeago.sk.js
|
117
|
+
- vendor/assets/javascripts/locales/jquery.timeago.sl.js
|
117
118
|
- vendor/assets/javascripts/locales/jquery.timeago.sv.js
|
118
119
|
- vendor/assets/javascripts/locales/jquery.timeago.th.js
|
119
120
|
- vendor/assets/javascripts/locales/jquery.timeago.tr.js
|
@@ -135,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
136
|
version: '0'
|
136
137
|
segments:
|
137
138
|
- 0
|
138
|
-
hash:
|
139
|
+
hash: -1792870913031009367
|
139
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
141
|
none: false
|
141
142
|
requirements:
|
@@ -144,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
145
|
version: '0'
|
145
146
|
segments:
|
146
147
|
- 0
|
147
|
-
hash:
|
148
|
+
hash: -1792870913031009367
|
148
149
|
requirements: []
|
149
150
|
rubyforge_project:
|
150
151
|
rubygems_version: 1.8.25
|