tolk 4.2.0 → 4.3.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 +4 -4
- data/lib/tolk/config.rb +3 -0
- data/lib/tolk/sync.rb +10 -0
- data/lib/tolk/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 16e13f007c1439906c3231b8f392450bb0a5537b6ef7b9f04b6ecc33475131b2
|
|
4
|
+
data.tar.gz: 90014d2dde967571b20d112584ff2bb5b69e4e75f0ba45eff8e24cbe9746e461
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f66f126b8023ed812ee3f1a5e8a28a9f7392a77b7cf6af9b5a58b2e1e3e87081a1eef484939833424acdb18e2bf0992d8214be56fbb199f8f536b259cd966704
|
|
7
|
+
data.tar.gz: 66d9c79259a92f84cdbcea223142ebce7ae445ceb350119c751a6e9070ea1610baf3e5d611b9b8d0d3fcb4207a61975a9553545edda2169edf9f0effd1531aeb
|
data/lib/tolk/config.rb
CHANGED
|
@@ -20,6 +20,9 @@ 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
|
+
# specify an array of files to skip ["devise"] will skip devise.<locale>.yml when syncing locales.
|
|
24
|
+
attr_accessor :ignore_locale_files
|
|
25
|
+
|
|
23
26
|
# strip translation texts automatically
|
|
24
27
|
attr_accessor :strip_texts
|
|
25
28
|
|
data/lib/tolk/sync.rb
CHANGED
|
@@ -25,6 +25,16 @@ module Tolk
|
|
|
25
25
|
translations_files = translations_files.reject(&locale_block_filter)
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
if Tolk.config.ignore_locale_files.present?
|
|
29
|
+
locale_block_filter = Proc.new do |file_name|
|
|
30
|
+
directory_path = Rails.root.join('config', 'locales', 'final_separator').to_s.gsub("final_separator", "")
|
|
31
|
+
normalized_file_name = file_name.gsub(directory_path, "").split('.').first
|
|
32
|
+
Tolk.config.ignore_locale_files.include?(normalized_file_name)
|
|
33
|
+
end
|
|
34
|
+
translations_files = translations_files.reject(&locale_block_filter)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
|
|
28
38
|
I18n.backend.load_translations(translations_files)
|
|
29
39
|
else
|
|
30
40
|
I18n.backend.send :init_translations unless I18n.backend.initialized? # force load
|
data/lib/tolk/version.rb
CHANGED
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: 4.
|
|
4
|
+
version: 4.3.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: 2022-
|
|
15
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: rails
|
|
@@ -160,6 +160,20 @@ dependencies:
|
|
|
160
160
|
- - "~>"
|
|
161
161
|
- !ruby/object:Gem::Version
|
|
162
162
|
version: '5.5'
|
|
163
|
+
- !ruby/object:Gem::Dependency
|
|
164
|
+
name: appraisal
|
|
165
|
+
requirement: !ruby/object:Gem::Requirement
|
|
166
|
+
requirements:
|
|
167
|
+
- - ">="
|
|
168
|
+
- !ruby/object:Gem::Version
|
|
169
|
+
version: '0'
|
|
170
|
+
type: :development
|
|
171
|
+
prerelease: false
|
|
172
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
173
|
+
requirements:
|
|
174
|
+
- - ">="
|
|
175
|
+
- !ruby/object:Gem::Version
|
|
176
|
+
version: '0'
|
|
163
177
|
description: Tolk is a web interface for doing i18n translations packaged as an engine
|
|
164
178
|
for Rails applications.
|
|
165
179
|
email: david@loudthinking.com
|
|
@@ -232,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
232
246
|
- !ruby/object:Gem::Version
|
|
233
247
|
version: '0'
|
|
234
248
|
requirements: []
|
|
235
|
-
rubygems_version: 3.3.
|
|
249
|
+
rubygems_version: 3.3.10
|
|
236
250
|
signing_key:
|
|
237
251
|
specification_version: 4
|
|
238
252
|
summary: Rails engine providing web interface for managing i18n yaml files
|