i18n-extra_translations 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/i18n/extra_translations.rb +9 -0
- data/lib/i18n/extra_translations/store.rb +4 -0
- metadata +7 -11
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 19528008f7ba6b285732a7fb31fd68bb203a9f4e
|
4
|
+
data.tar.gz: c125cfc86c15babb57d98ef6f8344711aa8fa4a7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 356b06afb96bd2d7902d3358e99a45f3686fe10dabcda5dbc635ab5b56701ac70b453e7532467a6064996215514e6781844b50e1b49a5cd4801324113cfa70a4
|
7
|
+
data.tar.gz: e44c2e81b44aa291cdf9ed3b81aa9425a335c0068956493f0a198bed7d9c6220abd04d0358608e6ee9630f532424ba09b48f97269c410e583165350066e0c231
|
@@ -7,6 +7,15 @@ module I18n
|
|
7
7
|
autoload :SimpleExtension, 'i18n/extra_translations/simple_extension.rb'
|
8
8
|
autoload :Server, 'i18n/extra_translations/server.rb'
|
9
9
|
|
10
|
+
class UnexpectedTranslationError < StandardError
|
11
|
+
attr_reader :original_exception
|
12
|
+
|
13
|
+
def initialize(message, original_exception)
|
14
|
+
super(message)
|
15
|
+
@original_exception = original_exception
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
10
19
|
class << self
|
11
20
|
attr_writer :extra_translations
|
12
21
|
def extra_translations
|
@@ -15,6 +15,10 @@ module I18n
|
|
15
15
|
l = keys.pop.to_s
|
16
16
|
h = keys.inject(self) { |h, k| h.key?(k.to_s) ? h[k.to_s] : (h[k.to_s] = {}) }
|
17
17
|
h[l] = value
|
18
|
+
rescue
|
19
|
+
raise UnexpectedTranslationError.new(
|
20
|
+
"Check your translations arround: #{keys.join('.')}",
|
21
|
+
$!)
|
18
22
|
end
|
19
23
|
end
|
20
24
|
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-extra_translations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.6
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Nicolas ZERMATI
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-04-14 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: i18n
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -40,27 +37,26 @@ files:
|
|
40
37
|
- lib/i18n/extra_translations/store.rb
|
41
38
|
homepage: https://github.com/nicoolas25/i18n-extra_translations
|
42
39
|
licenses: []
|
40
|
+
metadata: {}
|
43
41
|
post_install_message:
|
44
42
|
rdoc_options: []
|
45
43
|
require_paths:
|
46
44
|
- lib
|
47
45
|
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
-
none: false
|
49
46
|
requirements:
|
50
|
-
- -
|
47
|
+
- - '>='
|
51
48
|
- !ruby/object:Gem::Version
|
52
49
|
version: '0'
|
53
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
51
|
requirements:
|
56
|
-
- -
|
52
|
+
- - '>='
|
57
53
|
- !ruby/object:Gem::Version
|
58
54
|
version: '0'
|
59
55
|
requirements: []
|
60
56
|
rubyforge_project:
|
61
|
-
rubygems_version: 1.
|
57
|
+
rubygems_version: 2.1.11
|
62
58
|
signing_key:
|
63
|
-
specification_version:
|
59
|
+
specification_version: 4
|
64
60
|
summary: Find missing and extra translations in Rails application.
|
65
61
|
test_files: []
|
66
62
|
has_rdoc:
|