web_translate_it 1.4.5 → 1.4.6
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/README.md +1 -1
- data/history.md +7 -2
- data/lib/web_translate_it/command_line.rb +2 -0
- data/lib/web_translate_it/translation_file.rb +1 -1
- data/version.yml +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -70,7 +70,7 @@ Fetch the latest translations for all the languages defined in Web Translate It
|
|
70
70
|
|
71
71
|
Upload to Web Translate It your files in a specific locale defined in Web Translate It’s interface.
|
72
72
|
|
73
|
-
Read more about
|
73
|
+
Read more about [Rails integration in the wiki](http://wiki.github.com/AtelierConvivialite/webtranslateit/).
|
74
74
|
|
75
75
|
|
76
76
|
## Supported Rails Versions
|
data/history.md
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
-
##
|
1
|
+
## Version 1.4.6 /2010-02-04
|
2
|
+
|
3
|
+
* Add feedback when using the `wti command`.
|
4
|
+
* Fix bug where fetch requests were not using the conditional get requests feature.
|
5
|
+
|
6
|
+
## Version 1.4.5 /2010-02-02
|
2
7
|
|
3
8
|
* Improved documentation
|
4
9
|
* Web Translate is now an executable: `wti`
|
5
10
|
|
6
|
-
## Version 1.4.4 / 2010-02-
|
11
|
+
## Version 1.4.4 / 2010-02-01
|
7
12
|
|
8
13
|
* Add generator to automatically configure your project, given a Web Translate It API key.
|
9
14
|
* Remove rake trans:config, as configuration is now handled by the generator.
|
@@ -36,6 +36,7 @@ OPTION
|
|
36
36
|
end
|
37
37
|
configuration.files.each do |file|
|
38
38
|
locales.each do |locale|
|
39
|
+
puts "Fetching #{file.file_path_for_locale(locale)}…"
|
39
40
|
file.fetch(locale)
|
40
41
|
end
|
41
42
|
end
|
@@ -51,6 +52,7 @@ OPTION
|
|
51
52
|
end
|
52
53
|
configuration.files.each do |file|
|
53
54
|
locales.each do |locale|
|
55
|
+
puts "Uploading #{file.file_path} in #{locale}…"
|
54
56
|
file.upload(locale)
|
55
57
|
end
|
56
58
|
end
|
@@ -35,7 +35,7 @@ module WebTranslateIt
|
|
35
35
|
def fetch(locale, force = false)
|
36
36
|
WebTranslateIt::Util.http_connection do |http|
|
37
37
|
request = Net::HTTP::Get.new(api_url(locale))
|
38
|
-
request.add_field('If-Modified-Since', last_modification(
|
38
|
+
request.add_field('If-Modified-Since', last_modification(file_path_for_locale(locale))) if File.exist?(file_path_for_locale(locale)) and !force
|
39
39
|
response = http.request(request)
|
40
40
|
File.open(file_path_for_locale(locale), 'w'){ |file| file << response.body } if response.code.to_i == 200 and response.body != ''
|
41
41
|
response.code.to_i
|
data/version.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web_translate_it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "\xC3\x89douard Bri\xC3\xA8re"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-04 00:00:00 +01:00
|
13
13
|
default_executable: wti
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|