phrase 0.4.18 → 0.4.19
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/lib/phrase/api/client.rb
CHANGED
@@ -101,7 +101,7 @@ class Phrase::Api::Client
|
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
104
|
-
def upload(filename, file_content, tags=[], locale=nil, format=nil, update_translations=false, skip_unverification=false)
|
104
|
+
def upload(filename, file_content, tags=[], locale=nil, format=nil, update_translations=false, skip_unverification=false, skip_upload_tags=false)
|
105
105
|
begin
|
106
106
|
params = {
|
107
107
|
"file_format" => format,
|
@@ -109,7 +109,8 @@ class Phrase::Api::Client
|
|
109
109
|
"file_content" => file_content,
|
110
110
|
"tags[]" => tags,
|
111
111
|
"update_translations" => update_translations ? "1" : "0",
|
112
|
-
"skip_unverification" => skip_unverification ? "1" : "0"
|
112
|
+
"skip_unverification" => skip_unverification ? "1" : "0",
|
113
|
+
"skip_upload_tags" => skip_upload_tags ? "1" : "0"
|
113
114
|
}
|
114
115
|
params["locale_name"] = locale unless locale.nil?
|
115
116
|
perform_api_request("/translation_keys/upload", :post, params)
|
data/lib/phrase/tool/commands.rb
CHANGED
@@ -15,6 +15,7 @@ class Phrase::Tool::Commands::Push < Phrase::Tool::Commands::Base
|
|
15
15
|
@recursive = @options.get(:recursive)
|
16
16
|
@update_translations = @options.get(:update_translations)
|
17
17
|
@skip_unverification = @options.get(:skip_unverification)
|
18
|
+
@skip_upload_tags = @options.get(:skip_upload_tags)
|
18
19
|
end
|
19
20
|
|
20
21
|
def execute!
|
@@ -82,7 +83,7 @@ private
|
|
82
83
|
locale = Phrase::Tool::Locale.find_default_locale.try(:name)
|
83
84
|
end
|
84
85
|
locale = @locale if @locale
|
85
|
-
api_client.upload(file, file_content(file), @tags, locale, @format, @update_translations, @skip_unverification)
|
86
|
+
api_client.upload(file, file_content(file), @tags, locale, @format, @update_translations, @skip_unverification, @skip_upload_tags)
|
86
87
|
print_message "OK".green
|
87
88
|
rescue Exception => e
|
88
89
|
print_error "Failed"
|
@@ -67,6 +67,10 @@ class OptionsFactory
|
|
67
67
|
set[:skip_unverification] = skip_unverification
|
68
68
|
end
|
69
69
|
|
70
|
+
opts.on("--skip-upload-tags", "Don't create upload tags automatically") do |skip_upload_tags|
|
71
|
+
set[:skip_upload_tags] = skip_upload_tags
|
72
|
+
end
|
73
|
+
|
70
74
|
opts.on("--secret=YOUR_AUTH_TOKEN", String, "The Auth Token to use for this operation instead of the saved one (optional)") do |secret|
|
71
75
|
set[:secret] = secret
|
72
76
|
end
|
data/lib/phrase/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phrase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.19
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|