sy18nc 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: 9fbbdd1a369fe5cfdb3b20cbcbc59954db4e4114
4
+ data.tar.gz: b62f854428b3d8ddb3ef7c42a14bc9e129bcab1c
5
+ SHA512:
6
+ metadata.gz: dfe1c0596e0d82bc05b990a358a5a9f200e6c246e9b1c42ce738d8d5ab8c394cc177c82977d4a489d09cf1a6fd62432cddaed70bbd9e85f70ab3057fda440eba
7
+ data.tar.gz: 1101cf986aa5b34e8e82c27828431a10a1dafc9a36557198e89dddc29dcba11f5d76f2268e023dbc7d313270604b627257fde4a063f3849dfd0b573f4b3f1b2e
data/README.md CHANGED
@@ -3,15 +3,19 @@
3
3
 
4
4
  # Sy18nc
5
5
 
6
- Simple tool to synchronize Rails .ymls with locales.
6
+ Sy18nc is a simple tool for synchronizing i18n YAML files across different language versions.
7
+
8
+ When working with multiple language versions of your Rails app, it can be hard to keep all of the i18n files up-to-date. Sy18nc frees you from having to manually copy & paste each change from the base .yml file to other language files. With Sy18n you can simply edit your base i18n file (e.g. en.yml) and run a single command - all new/changed keys will be automatically added to other language versions (with annotations, so you can easily find ones that need to be translated).
7
9
 
8
10
  ## Installation
9
11
 
10
12
  Add this line to your application's Gemfile:
11
13
 
12
- group :development do
13
- gem 'sy18nc', '~> 0.2.1'
14
- end
14
+ ```ruby
15
+ group :development do
16
+ gem 'sy18nc', '~> 0.2.1'
17
+ end
18
+ ```
15
19
 
16
20
  And then execute:
17
21
 
@@ -109,8 +113,12 @@ Please post any issues via Github Issues. If you want to contribute, see [Contri
109
113
 
110
114
  # Changelog
111
115
 
116
+ ## 0.3.0
117
+ - Bugfixes
118
+ - Deleting keys deleted from base locale
119
+
112
120
  ## 0.2.1
113
- - Synchronized already synchronized locales already marked as fixme (when key in base locale is changing)
121
+ - Synchronizing already synchronized keys already marked as fixme (when key in base locale is changing)
114
122
  - Fixed bug with creating translations from scratch
115
123
 
116
124
  ## 0.1.0
data/ext/hash.rb CHANGED
@@ -8,12 +8,13 @@ class Hash
8
8
  self[other_key] = if self_value.is_a?(Hash) && other_value.is_a?(Hash)
9
9
  self_value.sy18nc_deep_merge!(other_value)
10
10
  elsif self_value.nil? || self_value.sy18nc_marked_as_fixme?
11
- other_value.sy18nc_mark_fixme!
11
+ other_value.sy18nc_mark_fixme!
12
12
  else
13
13
  self_value
14
14
  end
15
15
  end
16
- self
16
+
17
+ sy18nc_deep_delete_unused!(other_hash)
17
18
  end
18
19
 
19
20
  def sy18nc_deep_delete_unused!(other_hash)
data/ext/object.rb CHANGED
@@ -1,5 +1,13 @@
1
1
  class Object
2
- def sy18nc_append!(val); self end
2
+ def sy18nc_marked_as_fixme?
3
+ false
4
+ end
3
5
 
4
- def sy18nc_mark_fixme!; self end
6
+ def sy18nc_append!(val)
7
+ self
8
+ end
9
+
10
+ def sy18nc_mark_fixme!
11
+ self
12
+ end
5
13
  end
data/ext/string.rb CHANGED
@@ -4,10 +4,7 @@ class String
4
4
  end
5
5
 
6
6
  def sy18nc_mark_fixme!
7
- # skip if it is already marked or its an alias
8
- if sy18nc_marked_as_fixme? || self =~ /\*([a-z]*(\_)?)*/
9
- return self
10
- end
7
+ self if sy18nc_marked_as_fixme?
11
8
 
12
9
  self.replace("#{self} g FIXME")
13
10
  end
@@ -1,3 +1,3 @@
1
1
  module Sy18nc
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sy18nc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michał Darda
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-11-25 00:00:00.000000000 Z
11
+ date: 2013-12-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: psych
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
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: simplecov
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: guard
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ! '>='
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ! '>='
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: guard-rspec
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ! '>='
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ! '>='
124
109
  - !ruby/object:Gem::Version
@@ -168,27 +153,26 @@ files:
168
153
  homepage: https://github.com/michaldarda/sy18nc
169
154
  licenses:
170
155
  - MIT
156
+ metadata: {}
171
157
  post_install_message:
172
158
  rdoc_options: []
173
159
  require_paths:
174
160
  - lib
175
161
  required_ruby_version: !ruby/object:Gem::Requirement
176
- none: false
177
162
  requirements:
178
163
  - - ! '>='
179
164
  - !ruby/object:Gem::Version
180
165
  version: '0'
181
166
  required_rubygems_version: !ruby/object:Gem::Requirement
182
- none: false
183
167
  requirements:
184
168
  - - ! '>='
185
169
  - !ruby/object:Gem::Version
186
170
  version: '0'
187
171
  requirements: []
188
172
  rubyforge_project:
189
- rubygems_version: 1.8.23
173
+ rubygems_version: 2.1.11
190
174
  signing_key:
191
- specification_version: 3
175
+ specification_version: 4
192
176
  summary: Simple tool to synchronize Rails ymls with locales.
193
177
  test_files:
194
178
  - spec/ext_spec.rb