copy_tuner_client 0.0.9 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- copy_tuner_client (0.0.9)
4
+ copy_tuner_client (0.0.11)
5
5
  i18n (>= 0.5.0)
6
6
  json
7
7
 
@@ -249,6 +249,11 @@ module CopyTunerClient
249
249
  end
250
250
  end
251
251
 
252
+ # @return [String] current project url by api_key
253
+ def project_url
254
+ URI::Generic.build(scheme: self.protocol, host: self.host, port: self.port.to_i, path: "/projects/#{self.api_key}").to_s
255
+ end
256
+
252
257
  private
253
258
 
254
259
  def default_port
@@ -26,7 +26,7 @@ module CopyTunerClient
26
26
  def translate(locale, key, options = {})
27
27
  content = super(locale, key, options.merge(:fallback => true))
28
28
  if CopyTunerClient.configuration.inline_translation
29
- content = key.to_s
29
+ content = (content.is_a?(Array) ? content : key.to_s)
30
30
  end
31
31
  if content.respond_to?(:html_safe)
32
32
  content.html_safe
@@ -1,6 +1,6 @@
1
1
  module CopyTunerClient
2
2
  # Client version
3
- VERSION = '0.0.9'
3
+ VERSION = '0.0.11'
4
4
 
5
5
  # API version being used to communicate with the server
6
6
  API_VERSION = '2.0'.freeze
@@ -33,3 +33,13 @@
33
33
  <% end %>
34
34
  </div>
35
35
  </div>
36
+
37
+ <hr />
38
+
39
+ <div class="row">
40
+ <div class="span12">
41
+ <a href="<%= CopyTunerClient.configuration.project_url %>" class="btn" target="_blank">
42
+ 翻訳画面を開く
43
+ </a>
44
+ </div>
45
+ </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copy_tuner_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
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: 2013-03-07 00:00:00.000000000 Z
12
+ date: 2013-03-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
@@ -362,7 +362,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
362
362
  version: '0'
363
363
  segments:
364
364
  - 0
365
- hash: 513295443
365
+ hash: -288209489
366
366
  required_rubygems_version: !ruby/object:Gem::Requirement
367
367
  none: false
368
368
  requirements:
@@ -371,7 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
371
371
  version: '0'
372
372
  segments:
373
373
  - 0
374
- hash: 513295443
374
+ hash: -288209489
375
375
  requirements: []
376
376
  rubyforge_project:
377
377
  rubygems_version: 1.8.23