i18n-tasks 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/i18n-tasks.gemspec +2 -0
- data/lib/i18n/tasks/cli.rb +4 -3
- data/lib/i18n/tasks/concurrent/cached_value.rb +0 -2
- data/lib/i18n/tasks/data/tree/siblings.rb +0 -1
- data/lib/i18n/tasks/used_keys.rb +1 -1
- data/lib/i18n/tasks/version.rb +1 -1
- data/templates/config/i18n-tasks.yml +3 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76a7092606f1ea327f57a9a2bc0489c07d5349f61b6b742415d0dd367b243237
|
4
|
+
data.tar.gz: dd87c3098d774df0fe685829cefe3716e9cd42156cb483762a491174d0eaf733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7341b68328712adcbbb7b28b9c83695a56fcaac29eb9d7303c8866cf0f6004bd7e85065a1684a3acb1597786c1993b876e8eab04f5db555d95563f43976e7934
|
7
|
+
data.tar.gz: 8b8f93c545f0cc80b3ee36610751db469c1cf6c47df4ba9376189c926480dc0a96d678545c90163f2f24f1826beeaaff1e24ec9bc273a24541e715b0701ceb61
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ i18n-tasks can be used with any project using the ruby [i18n gem][i18n-gem] (def
|
|
24
24
|
Add i18n-tasks to the Gemfile:
|
25
25
|
|
26
26
|
```ruby
|
27
|
-
gem 'i18n-tasks', '~> 1.0.
|
27
|
+
gem 'i18n-tasks', '~> 1.0.11'
|
28
28
|
```
|
29
29
|
|
30
30
|
Copy the default [configuration file](#configuration):
|
data/i18n-tasks.gemspec
CHANGED
@@ -22,6 +22,8 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
|
|
22
22
|
cp $(bundle exec i18n-tasks gem-path)/templates/config/i18n-tasks.yml config/
|
23
23
|
# Add an RSpec for missing and unused keys:
|
24
24
|
cp $(bundle exec i18n-tasks gem-path)/templates/rspec/i18n_spec.rb spec/
|
25
|
+
# Or for minitest:
|
26
|
+
cp $(bundle exec i18n-tasks gem-path)/templates/minitest/i18n_test.rb test/
|
25
27
|
TEXT
|
26
28
|
s.homepage = 'https://github.com/glebm/i18n-tasks'
|
27
29
|
s.metadata = {
|
data/lib/i18n/tasks/cli.rb
CHANGED
@@ -36,11 +36,12 @@ class I18n::Tasks::CLI
|
|
36
36
|
def run(argv)
|
37
37
|
argv.each_with_index do |arg, i|
|
38
38
|
if ['--config', '-c'].include?(arg)
|
39
|
-
|
40
|
-
|
39
|
+
_, config_file = argv.slice!(i, 2)
|
40
|
+
if File.exist?(config_file)
|
41
|
+
@config_file = config_file
|
41
42
|
break
|
42
43
|
else
|
43
|
-
error "Config file doesn't exist: #{
|
44
|
+
error "Config file doesn't exist: #{config_file}", 128
|
44
45
|
end
|
45
46
|
end
|
46
47
|
end
|
data/lib/i18n/tasks/used_keys.rb
CHANGED
@@ -30,7 +30,7 @@ module I18n::Tasks
|
|
30
30
|
|
31
31
|
ALWAYS_EXCLUDE = %w[*.jpg *.jpeg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less
|
32
32
|
*.yml *.json *.zip *.tar.gz *.swf *.flv *.mp3 *.wav *.flac *.webm *.mp4 *.ogg *.opus
|
33
|
-
*.webp *.map].freeze
|
33
|
+
*.webp *.map *.xlsx].freeze
|
34
34
|
|
35
35
|
# Find all keys in the source and return a forest with the keys in absolute form and their occurrences.
|
36
36
|
#
|
data/lib/i18n/tasks/version.rb
CHANGED
@@ -72,11 +72,13 @@ search:
|
|
72
72
|
# -
|
73
73
|
|
74
74
|
## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
|
75
|
-
##
|
75
|
+
## *.jpg *.jpeg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less
|
76
|
+
## *.yml *.json *.zip *.tar.gz *.swf *.flv *.mp3 *.wav *.flac *.webm *.mp4 *.ogg *.opus *.webp *.map *.xlsx
|
76
77
|
exclude:
|
77
78
|
- app/assets/images
|
78
79
|
- app/assets/fonts
|
79
80
|
- app/assets/videos
|
81
|
+
- app/assets/builds
|
80
82
|
|
81
83
|
## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`:
|
82
84
|
## If specified, this settings takes priority over `exclude`, but `exclude` still applies.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -420,6 +420,8 @@ post_install_message: |
|
|
420
420
|
cp $(bundle exec i18n-tasks gem-path)/templates/config/i18n-tasks.yml config/
|
421
421
|
# Add an RSpec for missing and unused keys:
|
422
422
|
cp $(bundle exec i18n-tasks gem-path)/templates/rspec/i18n_spec.rb spec/
|
423
|
+
# Or for minitest:
|
424
|
+
cp $(bundle exec i18n-tasks gem-path)/templates/minitest/i18n_test.rb test/
|
423
425
|
rdoc_options: []
|
424
426
|
require_paths:
|
425
427
|
- lib
|