phrase 0.4.19 → 0.4.20
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
@@ -92,7 +92,7 @@ class Phrase::Api::Client
|
|
92
92
|
locale: name,
|
93
93
|
tag: tag,
|
94
94
|
updated_since: updated_since,
|
95
|
-
include_empty_translations: include_empty_translations
|
95
|
+
include_empty_translations: include_empty_translations ? "1" : nil
|
96
96
|
}
|
97
97
|
content = perform_api_request("/translations/download", :get, params)
|
98
98
|
return content
|
data/lib/phrase/formats.rb
CHANGED
@@ -25,6 +25,7 @@ module Phrase
|
|
25
25
|
autoload :Yaml, 'phrase/formats/yaml'
|
26
26
|
autoload :YamlSymfony, 'phrase/formats/yaml_symfony'
|
27
27
|
autoload :PhpArray, 'phrase/formats/php_array'
|
28
|
+
autoload :Laravel, 'phrase/formats/laravel'
|
28
29
|
|
29
30
|
class Base
|
30
31
|
def self.supports_extension?(extension)
|
@@ -89,6 +90,7 @@ module Phrase
|
|
89
90
|
yml: Phrase::Formats::Yaml,
|
90
91
|
yml_symfony: Phrase::Formats::YamlSymfony,
|
91
92
|
php_array: Phrase::Formats::PhpArray,
|
93
|
+
laravel: Phrase::Formats::Laravel,
|
92
94
|
}
|
93
95
|
|
94
96
|
def self.config
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
module Formats
|
5
|
+
class Laravel < Phrase::Formats::Base
|
6
|
+
def self.filename_for_locale(locale)
|
7
|
+
"phrase.#{locale.name}.php"
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.locale_aware?
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.extensions
|
15
|
+
[:php]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -30,11 +30,19 @@ class Phrase::Tool::Commands::Push < Phrase::Tool::Commands::Base
|
|
30
30
|
print_message "Could not find any files to upload".light_red
|
31
31
|
exit_command
|
32
32
|
else
|
33
|
-
|
33
|
+
interruptable_upload_files(files)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
private
|
38
|
+
def interruptable_upload_files(files)
|
39
|
+
begin
|
40
|
+
Thread.new(files){ upload_files(files) }.join
|
41
|
+
rescue SystemExit, Interrupt, Exception
|
42
|
+
print_error "Failed"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
38
46
|
def choose_files_to_upload(file_names, recursive=false)
|
39
47
|
files = []
|
40
48
|
|
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.20
|
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-
|
12
|
+
date: 2014-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|
@@ -221,6 +221,7 @@ files:
|
|
221
221
|
- lib/phrase/formats/gettext_template.rb
|
222
222
|
- lib/phrase/formats/ini.rb
|
223
223
|
- lib/phrase/formats/json.rb
|
224
|
+
- lib/phrase/formats/laravel.rb
|
224
225
|
- lib/phrase/formats/node_json.rb
|
225
226
|
- lib/phrase/formats/php_array.rb
|
226
227
|
- lib/phrase/formats/plist.rb
|