er18ern 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/er18ern/version.rb +1 -1
  2. data/lib/er18ern.rb +17 -0
  3. metadata +5 -5
@@ -1,3 +1,3 @@
1
1
  module Er18Ern
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/er18ern.rb CHANGED
@@ -174,6 +174,23 @@ module Er18Ern
174
174
  end
175
175
  end
176
176
 
177
+ def copy_missing_into!(place)
178
+ en_source_yaml["en"]
179
+ output = YAML::load_file(File.expand_path("#{place}.yml", self.locales_dir))
180
+ traverse = Proc.new do |x, y|
181
+ if x.is_a?(Hash)
182
+ x.each do |k, v|
183
+ y[k] ||= v
184
+ traverse.call(v, y[k])
185
+ end
186
+ end
187
+ end
188
+ traverse.call(en_source_yaml["en"], output[place])
189
+ File.open(File.expand_path("#{place}.yml", self.locales_dir), "w") do |fp|
190
+ fp.write(output.to_yaml)
191
+ end
192
+ end
193
+
177
194
  private
178
195
 
179
196
  def doitstuff(enstuff, found_keys, locale, stuff)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: er18ern
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jacob & Others too ashamed to admit it
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-08-22 00:00:00 Z
18
+ date: 2012-10-30 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: ermahgerd
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  requirements: []
75
75
 
76
76
  rubyforge_project:
77
- rubygems_version: 1.8.10
77
+ rubygems_version: 1.8.24
78
78
  signing_key:
79
79
  specification_version: 3
80
80
  summary: i18n helpers