tolk 1.9.3 → 2.0.0

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: 6a68491dc91c4792169da0679d7f1012611a7b82
4
- data.tar.gz: d3e08f6d4c002218f23fa9a9cd885f44ca0a2805
3
+ metadata.gz: 90462539c407ff422fdf13f5fbac68457c8c2807
4
+ data.tar.gz: cb5c5bc05f5a99a785c7d75261de04aceddf4d80
5
5
  SHA512:
6
- metadata.gz: 6465ecbd40a7753dcc54e98db489605934846f2426b75904ac4dce556300d1dad66e24ec9c6acd3f70ed3c6c686962f10a29367dd380a24163e2f1fef70b7ce2
7
- data.tar.gz: b1f2d096f85f3b0e1a0cb6eaeefebc811f067f8a6e5ef13f86253db3bd7f19c71dfb6203f91dd777c131a67033c24f3a08988641070acee97128ce6ee30e885b
6
+ metadata.gz: ab4f1e9ad6b85a8baef406004c20814397eaf725c6271970043929a08c24a10c8de6dcf1d265673db61d1ea5a97f9c6ba0fe61eb110465ea1a3d94fc43fb7545
7
+ data.tar.gz: 43907b282e5a3eda7f190b9eb7d0bab377ebb3b6bf166fcddcfbdd66b1d1eb38a50271b0475035eebe4fc76101c03232392898901b62d001e44793961a94ae17
@@ -6,7 +6,7 @@ module Tolk
6
6
  protect_from_forgery
7
7
 
8
8
  cattr_accessor :authenticator
9
- before_filter :authenticate
9
+ before_action :authenticate
10
10
 
11
11
  def authenticate
12
12
  # self.authenticator.bind(self).call if self.authenticator && self.authenticator.respond_to?(:call)
@@ -1,7 +1,7 @@
1
1
  module Tolk
2
2
  class LocalesController < Tolk::ApplicationController
3
- before_filter :find_locale, :only => [:show, :all, :update, :updated]
4
- before_filter :ensure_no_primary_locale, :only => [:all, :update, :show, :updated]
3
+ before_action :find_locale, :only => [:show, :all, :update, :updated]
4
+ before_action :ensure_no_primary_locale, :only => [:all, :update, :show, :updated]
5
5
 
6
6
  def index
7
7
  @locales = Tolk::Locale.secondary_locales.sort_by(&:language_name)
@@ -46,6 +46,7 @@ module Tolk
46
46
  def dump_all
47
47
  Tolk::Locale.dump_all
48
48
  I18n.reload!
49
+ I18n::JS.export if defined? I18n::JS
49
50
  redirect_to request.referrer
50
51
  end
51
52
 
@@ -1,6 +1,6 @@
1
1
  module Tolk
2
2
  class SearchesController < Tolk::ApplicationController
3
- before_filter :find_locale
3
+ before_action :find_locale
4
4
 
5
5
  def show
6
6
  @phrases = @locale.search_phrases(params[:q], params[:scope].to_sym, params[:k], params[pagination_param])
@@ -59,7 +59,7 @@ module Tolk
59
59
  end
60
60
  super unless value == text
61
61
  else
62
- value = value.strip if value.is_a?(String)
62
+ value = value.strip if value.is_a?(String) && Tolk.config.strip_texts
63
63
  super unless value.to_s == text
64
64
  end
65
65
  end
@@ -20,9 +20,14 @@ module Tolk
20
20
  # reject files of type xxx.en.yml when syncing locales
21
21
  attr_accessor :block_xxx_en_yml_locale_files
22
22
 
23
+ # strip translation texts automatically
24
+ attr_accessor :strip_texts
25
+
23
26
  def reset
24
27
  @exclude_gems_token = false
25
28
 
29
+ @strip_texts = true
30
+
26
31
  @block_xxx_en_yml_locale_files = true # keep compat with older versions
27
32
 
28
33
  @dump_path = Proc.new { "#{Rails.application.root}/config/locales" }
@@ -1,3 +1,3 @@
1
1
  module Tolk
2
- VERSION = "1.9.3"
2
+ VERSION = "2.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tolk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-05-21 00:00:00.000000000 Z
15
+ date: 2016-10-21 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rails
@@ -21,9 +21,6 @@ dependencies:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
23
  version: '4.0'
24
- - - "<"
25
- - !ruby/object:Gem::Version
26
- version: '4.3'
27
24
  type: :runtime
28
25
  prerelease: false
29
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,9 +28,6 @@ dependencies:
31
28
  - - ">="
32
29
  - !ruby/object:Gem::Version
33
30
  version: '4.0'
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '4.3'
37
31
  - !ruby/object:Gem::Dependency
38
32
  name: safe_yaml
39
33
  requirement: !ruby/object:Gem::Requirement
@@ -177,7 +171,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
171
  requirements:
178
172
  - - ">="
179
173
  - !ruby/object:Gem::Version
180
- version: 1.9.3
174
+ version: 2.0.0
181
175
  required_rubygems_version: !ruby/object:Gem::Requirement
182
176
  requirements:
183
177
  - - ">="
@@ -185,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
179
  version: '0'
186
180
  requirements: []
187
181
  rubyforge_project:
188
- rubygems_version: 2.4.6
182
+ rubygems_version: 2.4.5
189
183
  signing_key:
190
184
  specification_version: 4
191
185
  summary: Rails engine providing web interface for managing i18n yaml files