translations 0.2.1 → 0.3.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: e28ee8f0e179b90ce804bcee3e8a3868816ac8be
4
- data.tar.gz: 580d261a8700e421a06653b97031bfff1c19b51c
3
+ metadata.gz: 54777423ede4e043e6d0045c688ccfa4da176cfe
4
+ data.tar.gz: 3f2e352105786cb13371989f52cc6abbfd71b2e4
5
5
  SHA512:
6
- metadata.gz: f1b638b563e18fd031479c35d9c3b59a2fdef7f33f561371889e655bb0952cba21db76e11b6897869fd4b8604925784ad0551a16222dd8bb65849d1c65ba3715
7
- data.tar.gz: 88de48ba8652cc51f6573e918f94501272c887254d83e2c97b4eb57f280a2dffa487ae45f32d845a211c0c7cd1aea415098466fd10c846b815b409c3140a312d
6
+ metadata.gz: 0a6e2a9e75107c6534f9fb2ccd2e47fbe58dd3caec25c04027d86f205c973f766687f72f04619e83b433bc8bb1670e80ec59ccd4fb3d4d303aba3b209fdf3ac8
7
+ data.tar.gz: 1c07599efb79696a90b9a98818628134180d10de451855fa38910feb34f2efb74c05e24fecfe7e52e18eb1a0d76db36baedc44104dd83afb110a019e36fff409
data/.gitignore CHANGED
@@ -1,3 +1,6 @@
1
+ # Bundler settings
2
+ .bundle
3
+
1
4
  # Project files
2
5
  .idea
3
6
  *.iml
data/Gemfile.lock CHANGED
@@ -1,31 +1,36 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- translations (0.2.1)
4
+ translations (0.3.0)
5
5
  thor (~> 0.18.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- diff-lcs (1.1.3)
10
+ diff-lcs (1.2.5)
11
11
  predicated (0.2.6)
12
- rspec (2.13.0)
13
- rspec-core (~> 2.13.0)
14
- rspec-expectations (~> 2.13.0)
15
- rspec-mocks (~> 2.13.0)
16
- rspec-core (2.13.1)
17
- rspec-expectations (2.13.0)
18
- diff-lcs (>= 1.1.3, < 2.0)
19
- rspec-mocks (2.13.1)
20
- ruby2ruby (2.0.3)
12
+ rake (10.3.2)
13
+ rspec (3.0.0)
14
+ rspec-core (~> 3.0.0)
15
+ rspec-expectations (~> 3.0.0)
16
+ rspec-mocks (~> 3.0.0)
17
+ rspec-core (3.0.4)
18
+ rspec-support (~> 3.0.0)
19
+ rspec-expectations (3.0.4)
20
+ diff-lcs (>= 1.2.0, < 2.0)
21
+ rspec-support (~> 3.0.0)
22
+ rspec-mocks (3.0.4)
23
+ rspec-support (~> 3.0.0)
24
+ rspec-support (3.0.4)
25
+ ruby2ruby (2.1.2)
21
26
  ruby_parser (~> 3.1)
22
27
  sexp_processor (~> 4.0)
23
- ruby_parser (3.1.1)
28
+ ruby_parser (3.6.2)
24
29
  sexp_processor (~> 4.1)
25
- sexp_processor (4.1.4)
30
+ sexp_processor (4.4.4)
26
31
  thor (0.18.1)
27
- wrong (0.7.0)
28
- diff-lcs (~> 1.1.2)
32
+ wrong (0.7.1)
33
+ diff-lcs (~> 1.2.5)
29
34
  predicated (~> 0.2.6)
30
35
  ruby2ruby (>= 2.0.1)
31
36
  ruby_parser (>= 3.0.1)
@@ -35,6 +40,7 @@ PLATFORMS
35
40
  ruby
36
41
 
37
42
  DEPENDENCIES
38
- rspec (~> 2.13)
43
+ rake (~> 10.3)
44
+ rspec (~> 3.0)
39
45
  translations!
40
46
  wrong (~> 0.7)
data/README.md CHANGED
@@ -29,6 +29,7 @@ Currently there are some commands to alter your translation files:
29
29
  And there are commands to view your translations:
30
30
 
31
31
  - `view`: View all translations for a given key
32
+ - `validate`: Validate that a translations has all keys, that are in the master
32
33
 
33
34
  For more info just run `translations help <command>`.
34
35
 
@@ -41,6 +41,24 @@ module Translations
41
41
  end
42
42
  end
43
43
 
44
+ desc "validate LOCALE", "Validate that LOCALE contains all keys from master"
45
+ def validate locale
46
+ translations = serializer.translations
47
+ translation = translations.for_locale(locale)
48
+ keys = translation.missing_keys_from_translation(translations.master)
49
+
50
+ if keys.length > 0
51
+ say "Missing keys in #{locale}"
52
+ say
53
+
54
+ keys.each do |key|
55
+ say "- #{key}"
56
+ end
57
+
58
+ exit 1
59
+ end
60
+ end
61
+
44
62
  desc "remove KEYS", "Remove KEYS from all locales"
45
63
  def remove *keys
46
64
  translations = serializer.translations
@@ -1,3 +1,3 @@
1
1
  module Translations
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
data/translations.gemspec CHANGED
@@ -14,7 +14,8 @@ Gem::Specification.new do |gem|
14
14
 
15
15
  gem.add_dependency "thor", "~> 0.18.1"
16
16
 
17
- gem.add_development_dependency "rspec", "~> 2.13"
17
+ gem.add_development_dependency "rake", "~> 10.3"
18
+ gem.add_development_dependency "rspec", "~> 3.0"
18
19
  gem.add_development_dependency "wrong", "~> 0.7"
19
20
 
20
21
  gem.files = `git ls-files`.split($/)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: translations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Lienen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-23 00:00:00.000000000 Z
11
+ date: 2014-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -24,20 +24,34 @@ dependencies:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.18.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.3'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rspec
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - ~>
32
46
  - !ruby/object:Gem::Version
33
- version: '2.13'
47
+ version: '3.0'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - ~>
39
53
  - !ruby/object:Gem::Version
40
- version: '2.13'
54
+ version: '3.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: wrong
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -60,7 +74,6 @@ executables:
60
74
  extensions: []
61
75
  extra_rdoc_files: []
62
76
  files:
63
- - .bundle/config
64
77
  - .gitignore
65
78
  - .rspec
66
79
  - .ruby-version
@@ -104,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
117
  version: '0'
105
118
  requirements: []
106
119
  rubyforge_project:
107
- rubygems_version: 2.0.2
120
+ rubygems_version: 2.2.2
108
121
  signing_key:
109
122
  specification_version: 4
110
123
  summary: Stop wasting time altering the structure of your i18n files
data/.bundle/config DELETED
@@ -1,4 +0,0 @@
1
- ---
2
- BUNDLE_PATH: vendor/bundle
3
- BUNDLE_DISABLE_SHARED_GEMS: '1'
4
- BUNDLE_BIN: stubs