idiom 0.0.2 → 0.0.3
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.
- data/History.txt +3 -0
- data/LICENSE +1 -1
- data/README.rdoc +5 -2
- data/VERSION +1 -1
- data/idiom.gemspec +2 -1
- data/lib/idiom.rb +7 -5
- metadata +2 -1
data/History.txt
ADDED
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
= idiom
|
2
2
|
|
3
|
-
|
3
|
+
Translate the internationalized content of your application through Google Translate.
|
4
|
+
|
5
|
+
Takes a filename in either Yaml or Yahoo Resource Bundle format and translates the results with Google Translate, writing the content where it is usable in your app.
|
6
|
+
|
4
7
|
|
5
8
|
== Note on Patches/Pull Requests
|
6
9
|
|
@@ -14,4 +17,4 @@ Description goes here.
|
|
14
17
|
|
15
18
|
== Copyright
|
16
19
|
|
17
|
-
Copyright (c) 2010
|
20
|
+
Copyright (c) 2010 Capital Thought. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/idiom.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{idiom}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeff Coleman"]
|
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
".document",
|
23
23
|
".gitignore",
|
24
24
|
"Gemfile",
|
25
|
+
"History.txt",
|
25
26
|
"LICENSE",
|
26
27
|
"README.rdoc",
|
27
28
|
"Rakefile",
|
data/lib/idiom.rb
CHANGED
@@ -64,7 +64,7 @@ module Idiom #:nodoc:
|
|
64
64
|
Idiom::Yaml.new({:source => path}.merge(options)).generate
|
65
65
|
end
|
66
66
|
if path =~ /\.pres$/i
|
67
|
-
Idiom::Yrb.new({:source => path}.merge(options)).generate
|
67
|
+
Idiom::Yrb.new({:source => path, :languages => ["de-DE"]}.merge(options)).generate
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
@@ -180,9 +180,9 @@ module Idiom #:nodoc:
|
|
180
180
|
|
181
181
|
@lines.each do |line|
|
182
182
|
new_line = yield line
|
183
|
-
output << new_line
|
183
|
+
output << new_line
|
184
184
|
end
|
185
|
-
output.
|
185
|
+
output.compact.join("\n")
|
186
186
|
end
|
187
187
|
|
188
188
|
def parse(p)
|
@@ -196,6 +196,7 @@ module Idiom #:nodoc:
|
|
196
196
|
if File.exists?(path)
|
197
197
|
keys = parse(path)
|
198
198
|
@all_keys = @all_keys.merge(keys)
|
199
|
+
$stdout.puts @all_keys.inspect
|
199
200
|
end
|
200
201
|
end
|
201
202
|
end
|
@@ -203,8 +204,9 @@ module Idiom #:nodoc:
|
|
203
204
|
end
|
204
205
|
|
205
206
|
def destination_file_or_directory(lang)
|
206
|
-
if
|
207
|
-
|
207
|
+
if use_directories?
|
208
|
+
dir = File.dirname(destination_path(lang))
|
209
|
+
"#{dir}/*.#{extension}"
|
208
210
|
else
|
209
211
|
destination_path(lang)
|
210
212
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: idiom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Coleman
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- .document
|
66
66
|
- .gitignore
|
67
67
|
- Gemfile
|
68
|
+
- History.txt
|
68
69
|
- LICENSE
|
69
70
|
- README.rdoc
|
70
71
|
- Rakefile
|