bing_translate_yaml 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tasks/translate_task.rake +5 -1
- metadata +4 -4
@@ -81,7 +81,11 @@ def translate_string(source)
|
|
81
81
|
xml = Net::HTTP.get_response(URI.parse(url)).body
|
82
82
|
|
83
83
|
doc = REXML::Document.new(xml)
|
84
|
-
|
84
|
+
if element = doc.elements["string"]
|
85
|
+
dest = element.text.html_safe.gsub("% {", "%{")
|
86
|
+
else
|
87
|
+
dest = ""
|
88
|
+
end
|
85
89
|
|
86
90
|
puts "#{source} => #{dest}"
|
87
91
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bing_translate_yaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Lasse Bunk
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-05-
|
18
|
+
date: 2012-05-15 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: bing_translate_yaml is a simple Ruby on Rails plugin to translate your YAML files using Bing.
|