rails-timeago 2.11.1 → 2.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 451de3b31b875a6fbdefda94b6cf282b11bfaa4f
4
- data.tar.gz: b522158ef1b4928d4dd8acf884da39d24afc9cbe
3
+ metadata.gz: c3971dee99418c7d0a887a2ee284462164f4425c
4
+ data.tar.gz: 140775cc1bbca77aa129c29cea12feef527a3c02
5
5
  SHA512:
6
- metadata.gz: dc3b2de4dee9c432c058356fc34fd3b5c8f3809abe1e2f4ec37e96b84be4fe180509290ac38f17480762e991857474b3ecb65d51437ca6bc04158f6168381e6c
7
- data.tar.gz: cbfb3ac280c018041995f7712f9bac9a5d5f69c265e50f23dd01aeed0f4c7347f4fd17955f26bd1e77df5ac057d8e250068e7c748f10b925f57e8011ac975b17
6
+ metadata.gz: 54d9932d4f4759d1d4746d9fc7e90171e19c52c7a0836d2467d437d5bb85f92e3cd3f0b1c7f19472cae9e423c1820a4673ed18cf691a4b4d2dafb03cb6c6f9bf
7
+ data.tar.gz: 9360e4e073df3a5d55e9015bef4a16c37a3141213c291a6ed8d5fb9ad50ce6643eed018dda120d53b89928603bf66d20dd10b11841bb685c1b2452a0107c0341
data/README.md CHANGED
@@ -1,4 +1,9 @@
1
- # rails-timeago [![Gem Version](https://badge.fury.io/rb/rails-timeago.png)](http://badge.fury.io/rb/rails-timeago) [![Build Status](https://travis-ci.org/jgraichen/rails-timeago.png?branch=master)](https://travis-ci.org/jgraichen/rails-timeago) [![Code Climate](https://codeclimate.com/github/jgraichen/rails-timeago.png)](https://codeclimate.com/github/jgraichen/rails-timeago) [![Dependency Status](https://gemnasium.com/jgraichen/rails-timeago.png)](https://gemnasium.com/jgraichen/rails-timeago)
1
+ # rails-timeago
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/rails-timeago.svg)](http://badge.fury.io/rb/rails-timeago)
4
+ [![Build Status](https://travis-ci.org/jgraichen/rails-timeago.png?branch=master)](https://travis-ci.org/jgraichen/rails-timeago)
5
+ [![Code Climate](https://codeclimate.com/github/jgraichen/rails-timeago.png)](https://codeclimate.com/github/jgraichen/rails-timeago)
6
+ [![Dependency Status](https://gemnasium.com/jgraichen/rails-timeago.png)](https://gemnasium.com/jgraichen/rails-timeago)
2
7
 
3
8
  **rails-timeago** provides a timeago_tag helper to create time tags usable for
4
9
  [jQuery Timeago](https://github.com/rmm5t/jquery-timeago) plugin.
@@ -33,11 +33,13 @@
33
33
  //= require locales/jquery.timeago.nl.js
34
34
  //= require locales/jquery.timeago.no.js
35
35
  //= require locales/jquery.timeago.pl.js
36
+ //= require locales/jquery.timeago.pt-br-short.js
36
37
  //= require locales/jquery.timeago.pt-br.js
37
38
  //= require locales/jquery.timeago.pt.js
38
39
  //= require locales/jquery.timeago.ro.js
39
40
  //= require locales/jquery.timeago.rs.js
40
41
  //= require locales/jquery.timeago.ru.js
42
+ //= require locales/jquery.timeago.si.js
41
43
  //= require locales/jquery.timeago.sk.js
42
44
  //= require locales/jquery.timeago.sl.js
43
45
  //= require locales/jquery.timeago.sv.js
@@ -4,7 +4,7 @@
4
4
  //= require jquery.timeago
5
5
 
6
6
  (function($) {
7
- $(document).on('ready page:load', function() {
7
+ $(document).on('ready page:load ajax:success', function() {
8
8
  $('time[data-time-ago]').timeago();
9
9
  });
10
10
  })(jQuery);
@@ -2,8 +2,8 @@ module Rails
2
2
  module Timeago
3
3
  module VERSION
4
4
  MAJOR = 2
5
- MINOR = 11
6
- PATCH = 1
5
+ MINOR = 12
6
+ PATCH = 0
7
7
  STAGE = nil
8
8
 
9
9
  def self.to_s
@@ -11,7 +11,7 @@
11
11
  * For usage and examples, visit:
12
12
  * http://timeago.yarp.com/
13
13
  *
14
- * Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
14
+ * Copyright (c) 2008-2015, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
15
15
  */
16
16
 
17
17
  (function (factory) {
@@ -9,16 +9,16 @@
9
9
  prefixFromNow: 'za',
10
10
  suffixAgo: null,
11
11
  suffixFromNow: null,
12
- seconds: function(n, d) {return f(n, d, ['méně než minutou', 'méně než minutu'])},
13
- minute: function(n, d) {return f(n, d, ['minutou', 'minutu'])},
14
- minutes: function(n, d) {return f(n, d, ['%d minutami', '%d minuty', '%d minut'])},
15
- hour: function(n, d) {return f(n, d, ['hodinou', 'hodinu'])},
16
- hours: function(n, d) {return f(n, d, ['%d hodinami', '%d hodiny', '%d hodin'])},
17
- day: function(n, d) {return f(n, d, ['%d dnem', '%d den'])},
18
- days: function(n, d) {return f(n, d, ['%d dny', '%d dny', '%d dní'])},
19
- month: function(n, d) {return f(n, d, ['%d měsícem', '%d měsíc'])},
20
- months: function(n, d) {return f(n, d, ['%d měsící', '%d měsíce', '%d měsíců'])},
21
- year: function(n, d) {return f(n, d, ['%d rokem', '%d rok'])},
22
- years: function(n, d) {return f(n, d, ['%d lety', '%d roky', '%d let'])}
12
+ seconds: function(n, d) {return f(n, d, ['méně než minutou', 'méně než minutu']);},
13
+ minute: function(n, d) {return f(n, d, ['minutou', 'minutu']);},
14
+ minutes: function(n, d) {return f(n, d, ['%d minutami', '%d minuty', '%d minut']);},
15
+ hour: function(n, d) {return f(n, d, ['hodinou', 'hodinu']);},
16
+ hours: function(n, d) {return f(n, d, ['%d hodinami', '%d hodiny', '%d hodin']);},
17
+ day: function(n, d) {return f(n, d, ['%d dnem', '%d den']);},
18
+ days: function(n, d) {return f(n, d, ['%d dny', '%d dny', '%d dní']);},
19
+ month: function(n, d) {return f(n, d, ['%d měsícem', '%d měsíc']);},
20
+ months: function(n, d) {return f(n, d, ['%d měsíci', '%d měsíce', '%d měsíců']);},
21
+ year: function(n, d) {return f(n, d, ['%d rokem', '%d rok']);},
22
+ years: function(n, d) {return f(n, d, ['%d lety', '%d roky', '%d let']);}
23
23
  };
24
24
  })();
@@ -4,15 +4,15 @@ jQuery.timeago.settings.strings["et"] = {
4
4
  prefixFromNow: null,
5
5
  suffixAgo: "tagasi",
6
6
  suffixFromNow: "pärast",
7
- seconds: function(n, d) { return d < 0 ? "vähem kui minuti aja" : "vähem kui minut aega" },
8
- minute: function(n, d) { return d < 0 ? "umbes minuti aja" : "umbes minut aega" },
9
- minutes: function(n, d) { return d < 0 ? "%d minuti" : "%d minutit" },
10
- hour: function(n, d) { return d < 0 ? "umbes tunni aja" : "umbes tund aega" },
11
- hours: function(n, d) { return d < 0 ? "%d tunni" : "%d tundi" },
12
- day: function(n, d) { return d < 0 ? "umbes päeva" : "umbes päev" },
13
- days: function(n, d) { return d < 0 ? "%d päeva" : "%d päeva" },
14
- month: function(n, d) { return d < 0 ? "umbes kuu aja" : "umbes kuu aega" },
15
- months: function(n, d) { return d < 0 ? "%d kuu" : "%d kuud" },
16
- year: function(n, d) { return d < 0 ? "umbes aasta aja" : "umbes aasta aega" },
17
- years: function(n, d) { return d < 0 ? "%d aasta" : "%d aastat" }
7
+ seconds: function(n, d) { return d < 0 ? "vähem kui minuti aja" : "vähem kui minut aega"; },
8
+ minute: function(n, d) { return d < 0 ? "umbes minuti aja" : "umbes minut aega"; },
9
+ minutes: function(n, d) { return d < 0 ? "%d minuti" : "%d minutit"; },
10
+ hour: function(n, d) { return d < 0 ? "umbes tunni aja" : "umbes tund aega"; },
11
+ hours: function(n, d) { return d < 0 ? "%d tunni" : "%d tundi"; },
12
+ day: function(n, d) { return d < 0 ? "umbes päeva" : "umbes päev"; },
13
+ days: function(n, d) { return d < 0 ? "%d päeva" : "%d päeva"; },
14
+ month: function(n, d) { return d < 0 ? "umbes kuu aja" : "umbes kuu aega"; },
15
+ months: function(n, d) { return d < 0 ? "%d kuu" : "%d kuud"; },
16
+ year: function(n, d) { return d < 0 ? "umbes aasta aja" : "umbes aasta aega"; },
17
+ years: function(n, d) { return d < 0 ? "%d aasta" : "%d aastat"; }
18
18
  };
@@ -6,11 +6,11 @@ jQuery.timeago.settings.strings["he"] = {
6
6
  minute: "דקה",
7
7
  minutes: "%d דקות",
8
8
  hour: "שעה",
9
- hours: function(number){return (number==2) ? "שעתיים" : "%d שעות"},
9
+ hours: function(number){return (number==2) ? "שעתיים" : "%d שעות";},
10
10
  day: "יום",
11
- days: function(number){return (number==2) ? "יומיים" : "%d ימים"},
11
+ days: function(number){return (number==2) ? "יומיים" : "%d ימים";},
12
12
  month: "חודש",
13
- months: function(number){return (number==2) ? "חודשיים" : "%d חודשים"},
13
+ months: function(number){return (number==2) ? "חודשיים" : "%d חודשים";},
14
14
  year: "שנה",
15
- years: function(number){return (number==2) ? "שנתיים" : "%d שנים"}
15
+ years: function(number){return (number==2) ? "שנתיים" : "%d שנים";}
16
16
  };
@@ -16,5 +16,5 @@
16
16
  months: "%d месеци",
17
17
  year: "%d година",
18
18
  years: "%d години"
19
- }
19
+ };
20
20
  })();
@@ -0,0 +1,20 @@
1
+ // Portuguese Brasil shortened
2
+ jQuery.timeago.settings.strings["pt-br-short"] = {
3
+ prefixAgo: null,
4
+ prefixFromNow: null,
5
+ suffixAgo: "",
6
+ suffixFromNow: "",
7
+ seconds: "1m",
8
+ minute: "1m",
9
+ minutes: "%dm",
10
+ hour: "1h",
11
+ hours: "%dh",
12
+ day: "1d",
13
+ days: "%dd",
14
+ month: "1M",
15
+ months: "%dM",
16
+ year: "1a",
17
+ years: "%da",
18
+ wordSeparator: " ",
19
+ numbers: []
20
+ };
@@ -0,0 +1,18 @@
1
+ // Sinhalese (SI)
2
+ jQuery.timeago.settings.strings["si"] = {
3
+ prefixAgo: null,
4
+ prefixFromNow: null,
5
+ suffixAgo: "පෙර",
6
+ suffixFromNow: "පසුව",
7
+ seconds: "තත්පර කිහිපයකට",
8
+ minute: "මිනිත්තුවකට පමණ",
9
+ minutes: "මිනිත්තු %d කට",
10
+ hour: "පැයක් පමණ ",
11
+ hours: "පැය %d කට පමණ",
12
+ day: "දවසක ට",
13
+ days: "දවස් %d කට ",
14
+ month: "මාසයක් පමණ",
15
+ months: "මාස %d කට",
16
+ year: "වසරක් පමණ",
17
+ years: "වසරක් %d කට පමණ"
18
+ };
@@ -1,42 +1,38 @@
1
1
  // Slovenian with support for dual
2
2
  (function () {
3
3
  var numpf;
4
- numpf = function (n, d, m) {
5
- if (n == 2) {
6
- return d;
7
- } else {
8
- return m;
9
- }
4
+ numpf = function (n, a) {
5
+ return a[n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0];
10
6
  };
11
7
 
12
8
  jQuery.timeago.settings.strings["sl"] = {
13
- prefixAgo: "pred",
9
+ prefixAgo: null,
14
10
  prefixFromNow: "čez",
15
- suffixAgo: null,
11
+ suffixAgo: "nazaj",
16
12
  suffixFromNow: null,
17
13
  second: "sekundo",
18
14
  seconds: function (value) {
19
- return numpf(value, "%d sekundama", "%d sekundami");
15
+ return numpf(value, ["%d sekund", "%d sekundo", "%d sekundi", "%d sekunde"]);
20
16
  },
21
17
  minute: "minuto",
22
18
  minutes: function (value) {
23
- return numpf(value, "%d minutama", "%d minutami");
19
+ return numpf(value, ["%d minut", "%d minuto", "%d minuti", "%d minute"]);
24
20
  },
25
- hour: "uro",
21
+ hour: "eno uro",
26
22
  hours: function (value) {
27
- return numpf(value, "%d urama", "%d urami");
23
+ return numpf(value, ["%d ur", "%d uro", "%d uri", "%d ure"]);
28
24
  },
29
- day: "dnevom",
25
+ day: "en dan",
30
26
  days: function (value) {
31
- return numpf(value, "%d dnevi", "%d dnevi");
27
+ return numpf(value, ["%d dni", "%d dan", "%d dneva", "%d dni"]);
32
28
  },
33
- month: "enim mescem",
29
+ month: "en mesec",
34
30
  months: function (value) {
35
- return numpf(value, "%d mesecema", "%d meseci");
31
+ return numpf(value, ["%d mescov", "%d mesec", "%d mesca", "%d mesce"]);
36
32
  },
37
- year: "enim letom",
33
+ year: "eno leto",
38
34
  years: function (value) {
39
- return numpf(value, "%d letoma", "%d leti");
35
+ return numpf(value, ["%d let", "%d leto", "%d leti", "%d leta"]);
40
36
  },
41
37
  wordSeparator: " "
42
38
  };
@@ -6,14 +6,14 @@ jQuery.timeago.settings.strings["uz"] = {
6
6
  suffixFromNow: null,
7
7
  seconds: "bir necha soniya",
8
8
  minute: "1 daqiqa",
9
- minutes: function(value) { return "%d daqiqa" },
9
+ minutes: function(value) { return "%d daqiqa"; },
10
10
  hour: "1 soat",
11
- hours: function(value) { return "%d soat" },
11
+ hours: function(value) { return "%d soat"; },
12
12
  day: "1 kun",
13
- days: function(value) { return "%d kun" },
13
+ days: function(value) { return "%d kun"; },
14
14
  month: "1 oy",
15
- months: function(value) { return "%d oy" },
15
+ months: function(value) { return "%d oy"; },
16
16
  year: "1 yil",
17
- years: function(value) { return "%d yil" },
17
+ years: function(value) { return "%d yil"; },
18
18
  wordSeparator: " "
19
19
  };
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-timeago
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.1
4
+ version: 2.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-07 00:00:00.000000000 Z
11
+ date: 2015-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -109,11 +109,13 @@ files:
109
109
  - vendor/assets/javascripts/locales/jquery.timeago.nl.js
110
110
  - vendor/assets/javascripts/locales/jquery.timeago.no.js
111
111
  - vendor/assets/javascripts/locales/jquery.timeago.pl.js
112
+ - vendor/assets/javascripts/locales/jquery.timeago.pt-br-short.js
112
113
  - vendor/assets/javascripts/locales/jquery.timeago.pt-br.js
113
114
  - vendor/assets/javascripts/locales/jquery.timeago.pt.js
114
115
  - vendor/assets/javascripts/locales/jquery.timeago.ro.js
115
116
  - vendor/assets/javascripts/locales/jquery.timeago.rs.js
116
117
  - vendor/assets/javascripts/locales/jquery.timeago.ru.js
118
+ - vendor/assets/javascripts/locales/jquery.timeago.si.js
117
119
  - vendor/assets/javascripts/locales/jquery.timeago.sk.js
118
120
  - vendor/assets/javascripts/locales/jquery.timeago.sl.js
119
121
  - vendor/assets/javascripts/locales/jquery.timeago.sv.js
@@ -144,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
146
  version: '0'
145
147
  requirements: []
146
148
  rubyforge_project:
147
- rubygems_version: 2.2.2
149
+ rubygems_version: 2.4.6
148
150
  signing_key:
149
151
  specification_version: 4
150
152
  summary: A Rails Helper to create time tags usable for jQuery Timeago plugin