web_translate_it 1.8.1.1 → 1.8.1.2
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.md +2 -1
- data/lib/web_translate_it/command_line.rb +4 -4
- data/lib/web_translate_it/util.rb +13 -0
- data/version.yml +1 -1
- metadata +2 -2
data/history.md
CHANGED
@@ -14,7 +14,7 @@ module WebTranslateIt
|
|
14
14
|
def pull
|
15
15
|
STDOUT.sync = true
|
16
16
|
`#{configuration.before_pull}` if configuration.before_pull
|
17
|
-
puts "Pulling files ".
|
17
|
+
puts "Pulling files ".titleize
|
18
18
|
WebTranslateIt::Util.http_connection do |http|
|
19
19
|
fetch_locales_to_pull.each do |locale|
|
20
20
|
configuration.files.find_all{ |file| file.locale == locale }.each do |file|
|
@@ -28,7 +28,7 @@ module WebTranslateIt
|
|
28
28
|
def push
|
29
29
|
STDOUT.sync = true
|
30
30
|
`#{configuration.before_push}` if configuration.before_push
|
31
|
-
puts "Pushing files ".
|
31
|
+
puts "Pushing files ".titleize
|
32
32
|
WebTranslateIt::Util.http_connection do |http|
|
33
33
|
fetch_locales_to_push(configuration).each do |locale|
|
34
34
|
configuration.files.find_all{ |file| file.locale == locale }.each do |file|
|
@@ -86,13 +86,13 @@ module WebTranslateIt
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def match
|
89
|
-
puts "Matching local files with File Manager".
|
89
|
+
puts "Matching local files with File Manager".titleize
|
90
90
|
puts ""
|
91
91
|
configuration.files.find_all{ |mf| mf.locale == configuration.source_locale }.each do |master_file|
|
92
92
|
if !File.exists?(master_file.file_path)
|
93
93
|
puts master_file.file_path.failure + " (#{master_file.locale})"
|
94
94
|
else
|
95
|
-
puts master_file.file_path.
|
95
|
+
puts master_file.file_path.important + " (#{master_file.locale})"
|
96
96
|
end
|
97
97
|
configuration.files.find_all{ |f| f.master_id == master_file.id }.each do |file|
|
98
98
|
if !File.exists?(file.file_path)
|
@@ -135,14 +135,27 @@ class String
|
|
135
135
|
include ANSI::Mixin
|
136
136
|
|
137
137
|
def success
|
138
|
+
return self if RUBY_PLATFORM.downcase.include?("mingw32")
|
138
139
|
self.green
|
139
140
|
end
|
140
141
|
|
141
142
|
def failure
|
143
|
+
return self if RUBY_PLATFORM.downcase.include?("mingw32")
|
142
144
|
self.red.bold
|
143
145
|
end
|
144
146
|
|
145
147
|
def checksumify
|
148
|
+
return self[0..6] if RUBY_PLATFORM.downcase.include?("mingw32")
|
146
149
|
self[0..6].yellow
|
147
150
|
end
|
151
|
+
|
152
|
+
def titleize
|
153
|
+
return self if RUBY_PLATFORM.downcase.include?("mingw32")
|
154
|
+
self.bold.underline
|
155
|
+
end
|
156
|
+
|
157
|
+
def important
|
158
|
+
return self if RUBY_PLATFORM.downcase.include?("mingw32")
|
159
|
+
self.bold
|
160
|
+
end
|
148
161
|
end
|
data/version.yml
CHANGED