i18n_screwdriver 3.0.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/i18n_screwdriver/translation.rb +2 -2
- data/lib/i18n_screwdriver/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b179342ac69a06ad03d10ab4a0424425aff3e70
|
4
|
+
data.tar.gz: a297fa182258a5797556d89ade2b6f3d12da91c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8daaa73824b66d11c1973720d885a7b7324c87d57b6008318bab1c46a9be95a087d3d7c34018be89e8ca47da2f8d3449d2009e8d4d610fddb30610704c1f0ac4
|
7
|
+
data.tar.gz: c0315f66acb6c611152c91a81849184585d8a3f68f006aacf0fa2b30d32b4d625b40d29b7d046c87149b52af4c4961750651ba1552d698345f5b866635d01f22
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module I18nScrewdriver
|
2
|
-
class Translation <
|
2
|
+
class Translation < String
|
3
3
|
attr_accessor :text, :options
|
4
4
|
|
5
5
|
def self.new(text, options = {}, &block)
|
@@ -12,7 +12,7 @@ module I18nScrewdriver
|
|
12
12
|
urls_to_interpolate_count = translation.scan(/<<.+?>>/).count
|
13
13
|
raise ArgumentError, "too few urls specified" if urls.count < urls_to_interpolate_count
|
14
14
|
if urls.count > urls_to_interpolate_count
|
15
|
-
raise ArgumentError, "
|
15
|
+
raise ArgumentError, "too many urls specified (#{urls.count} <> #{urls_to_interpolate_count})" unless urls.last.is_a?(Hash)
|
16
16
|
translation = new(translation % urls.last, :raw => true)
|
17
17
|
end
|
18
18
|
translation.linkify(block.binding, urls)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n_screwdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Miesel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|