translation 0.9.3 → 0.9.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94dc2d0e546ae004e8ae914c8bfd395d28629564
4
- data.tar.gz: b00e1f359c37f4e713cb7f8571ef00e622678045
3
+ metadata.gz: 177d0f379cbac2f9d701245ed60658f36b038443
4
+ data.tar.gz: 6c58ffb3793de7ce6cc4c990815f73d2be59889f
5
5
  SHA512:
6
- metadata.gz: 897218dbb8451fcd9bbc0d7a7282ed2d22c12e77505e59637e496f65d997e762bafbe331368be7a9fa9f30faa2eb3a7fb1ecb2996e31c8375607c2bb90a6304a
7
- data.tar.gz: 72fdf56c92ff8a8aaebdca5cb018c543c879fa30b503275a0e258dc17305000d8da392223065a37b6c9b657c756f04a5ae398cbe0a66c37c3fd7580a628453a4
6
+ metadata.gz: 3d769627f2f86828f676678c83a030a3ae38576b2c0357f9cdc5e08b5cbe5a8101a915d128264646426374d645cb1283d3bcb2c197ca537a6e4e700ccdd18e68
7
+ data.tar.gz: 9995cc00333af2cc1ba10e739efc1442b0a2314c5eaa96534f8fd0d1815d155d2280a0c67236c1fe4b1e2010fe3b92d91d6cc9e6bd79c813e4ce800234039c62
data/README.md CHANGED
@@ -21,13 +21,13 @@ And finish by inititalizing your translation project with :
21
21
 
22
22
  ## Synchronization
23
23
 
24
- To get new translations from Translation.io and to send new translatable strings, simply run :
24
+ To send new translatable keys/strings and get new translations from Translation.io, simply run :
25
25
 
26
26
  bundle exec rake translation:sync
27
27
 
28
28
  ## Purge
29
29
 
30
- If you need to remove unused keys taking the current branch as reference :
30
+ If you need to remove unused keys/strings from Translation.io using the current branch as reference :
31
31
 
32
32
  bundle exec rake translation:purge
33
33
 
@@ -55,7 +55,7 @@ module TranslationIO
55
55
  end
56
56
 
57
57
  TranslationIO.info "Collecting YAML localization entries"
58
- uri = URI("http://#{TranslationIO.client.endpoint}/projects/#{TranslationIO.client.api_key}/fill_yaml_localizations")
58
+ uri = URI("#{TranslationIO.client.endpoint}/projects/#{TranslationIO.client.api_key}/fill_yaml_localizations")
59
59
  parsed_response = BaseOperation.perform_request(uri, params)
60
60
 
61
61
  unless parsed_response.nil?
@@ -26,6 +26,7 @@ module TranslationIO
26
26
  })
27
27
 
28
28
  http = Net::HTTP.new(uri.host, uri.port)
29
+ http.use_ssl = uri.scheme == 'https'
29
30
  http.read_timeout = 500
30
31
 
31
32
  request = Net::HTTP::Post.new(uri.request_uri)
@@ -28,7 +28,7 @@ module TranslationIO
28
28
  CreateYamlPoFilesStep.new(source_locale, target_locales, yaml_file_paths).run(params)
29
29
 
30
30
  TranslationIO.info "Sending data to server"
31
- uri = URI("http://#{client.endpoint}/projects/#{client.api_key}/init")
31
+ uri = URI("#{client.endpoint}/projects/#{client.api_key}/init")
32
32
  parsed_response = BaseOperation.perform_request(uri, params)
33
33
 
34
34
  unless parsed_response.nil?
@@ -28,7 +28,7 @@ module TranslationIO
28
28
  params['purge'] = 'true'
29
29
  end
30
30
 
31
- uri = URI("http://#{client.endpoint}/projects/#{client.api_key}/sync")
31
+ uri = URI("#{client.endpoint}/projects/#{client.api_key}/sync")
32
32
  parsed_response = BaseOperation.perform_request(uri, params)
33
33
 
34
34
  unless parsed_response.nil?
@@ -10,7 +10,7 @@ module TranslationIO
10
10
  self.locales_path = File.join('config', 'locales', 'gettext')
11
11
  self.source_locale = :en
12
12
  self.target_locales = []
13
- self.endpoint = 'api.translation.io/api'
13
+ self.endpoint = 'https://translation.io/api'
14
14
  self.verbose = 1
15
15
  self.test = false
16
16
  end
@@ -26,7 +26,7 @@ module TranslationIO
26
26
  end
27
27
 
28
28
  def source_files
29
- paths = Dir['**/*.{rb,erb,html.erb,xml.erb}'].select do |p|
29
+ paths = Dir['**/*.{rb,erb,ruby,rabl}'].select do |p|
30
30
  !p.start_with?('vendor/') && !p.start_with?('tmp/')
31
31
  end
32
32
 
@@ -1,11 +1,19 @@
1
1
  require 'gettext/tools'
2
2
 
3
3
  namespace :translation do
4
+
5
+ DESCRIPTIONS = { :init => "Initialize your Translation.io project",
6
+ :sync => "Send new translatable keys/strings and get new translations from Translation.io",
7
+ :purge => "Remove unused keys/strings from Translation.io using the current branch as reference"
8
+ }
9
+
10
+ desc "Get configuration infos of Translation gem"
4
11
  task :config => :environment do
5
12
  puts TranslationIO.config
6
13
  end
7
14
 
8
- [ :init, :sync, :purge ].each do |t|
15
+ DESCRIPTIONS.each_pair do |t, description|
16
+ desc description
9
17
  task t => :environment do
10
18
  if TranslationIO.client
11
19
  TranslationIO.client.send(t)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: translation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aurelien Malisart
@@ -9,62 +9,62 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-11 00:00:00.000000000 Z
12
+ date: 2014-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gettext
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 3.1.2
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 3.1.2
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rails
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  description: Rails translation made _("simple") with YAML and GetText.
@@ -73,23 +73,24 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - README.md
76
77
  - lib/translation.rb
78
+ - lib/translation_io/client.rb
79
+ - lib/translation_io/client/base_operation.rb
77
80
  - lib/translation_io/client/base_operation/create_new_mo_files_step.rb
78
81
  - lib/translation_io/client/base_operation/dump_haml_gettext_keys_step.rb
79
82
  - lib/translation_io/client/base_operation/dump_slim_gettext_keys_step.rb
80
83
  - lib/translation_io/client/base_operation/save_new_po_files_step.rb
81
84
  - lib/translation_io/client/base_operation/save_new_yaml_files_step.rb
82
85
  - lib/translation_io/client/base_operation/save_special_yaml_files_step.rb
83
- - lib/translation_io/client/base_operation.rb
86
+ - lib/translation_io/client/init_operation.rb
84
87
  - lib/translation_io/client/init_operation/cleanup_yaml_files_step.rb
85
88
  - lib/translation_io/client/init_operation/create_yaml_po_files_step.rb
86
89
  - lib/translation_io/client/init_operation/update_and_collect_po_files_step.rb
87
90
  - lib/translation_io/client/init_operation/update_pot_file_step.rb
88
- - lib/translation_io/client/init_operation.rb
91
+ - lib/translation_io/client/sync_operation.rb
89
92
  - lib/translation_io/client/sync_operation/create_yaml_pot_file_step.rb
90
93
  - lib/translation_io/client/sync_operation/update_and_collect_pot_file_step.rb
91
- - lib/translation_io/client/sync_operation.rb
92
- - lib/translation_io/client.rb
93
94
  - lib/translation_io/config.rb
94
95
  - lib/translation_io/controller.rb
95
96
  - lib/translation_io/extractor.rb
@@ -98,8 +99,7 @@ files:
98
99
  - lib/translation_io/tasks.rb
99
100
  - lib/translation_io/yaml_conversion.rb
100
101
  - lib/translation_io/yaml_entry.rb
101
- - README.md
102
- homepage: http://rails.translation.io
102
+ homepage: http://translation.io
103
103
  licenses:
104
104
  - MIT
105
105
  metadata: {}
@@ -109,19 +109,18 @@ require_paths:
109
109
  - lib
110
110
  required_ruby_version: !ruby/object:Gem::Requirement
111
111
  requirements:
112
- - - '>='
112
+ - - ">="
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - '>='
117
+ - - ">="
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.0.0
122
+ rubygems_version: 2.2.0
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Rails translation made _("simple") with YAML and GetText.
126
126
  test_files: []
127
- has_rdoc: false