rake-pipeline-i18n-filters 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.
@@ -36,12 +36,11 @@ module Rake::Pipeline::I18n::Filters
|
|
36
36
|
# @param [FileWrapper] output a single {FileWrapper}
|
37
37
|
# object representing the output.
|
38
38
|
def generate_output(inputs, output)
|
39
|
-
js_dec = 'I18n.translations = I18n.translations || {};'
|
40
39
|
output_hash = {}
|
41
40
|
inputs.each do |input|
|
42
41
|
output_hash.deep_merge! YAML.load(input.read)
|
43
42
|
end
|
44
|
-
output.write "
|
43
|
+
output.write "I18n.translations = #{output_hash.to_json};"
|
45
44
|
end
|
46
45
|
|
47
46
|
private
|
data/spec/i18n_js_filter_spec.rb
CHANGED
@@ -20,7 +20,7 @@ EOF
|
|
20
20
|
|
21
21
|
# not using heredoc as it adds an extra \n to the end
|
22
22
|
let(:expected_i18n_js) {
|
23
|
-
"I18n.translations =
|
23
|
+
"I18n.translations = {\"en\":{\"foo\":\"bar\",\"hoge\":\"hoge\"},\"ja\":{\"foo\":\"バー\",\"hoge\":\"ホゲ\"}};"
|
24
24
|
}
|
25
25
|
def input_file(name, content)
|
26
26
|
MemoryFileWrapper.new('/path/to/input', name, 'UTF-8', content)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-pipeline-i18n-filters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -83,7 +83,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
segments:
|
85
85
|
- 0
|
86
|
-
hash:
|
86
|
+
hash: 4185059654656647175
|
87
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
88
|
none: false
|
89
89
|
requirements:
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
segments:
|
94
94
|
- 0
|
95
|
-
hash:
|
95
|
+
hash: 4185059654656647175
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
98
|
rubygems_version: 1.8.24
|