i18n-tasks 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ffa593b45f4a5d40746da85f93879fffce47423
4
- data.tar.gz: 689a92c8047df2b9b56638e2a9f3b9c46c43e115
3
+ metadata.gz: ac7538e11e298ebabf1e830a5f15ea1cff8840f2
4
+ data.tar.gz: 05f55075453893e51bce68373cf088eb7388ca2c
5
5
  SHA512:
6
- metadata.gz: 6d988d11c0b8690cb5596845a61b818eb9aa0702c6b84075c65b99a9fe0670c2435dfdc746d1cb5b92fb1f6929e9fc73b9bf7e8e8c76ab199a7c2517bfda782d
7
- data.tar.gz: b071f96e5d5b912c95848ea6b363185b26a216fc968ae9657e1d28950b753f0933b9fc9c8f29e105a1ff2e8a4a324fc706ed33e53128c9074411980830628d2f
6
+ metadata.gz: 8c2cbdfff3303c74416ae6f18e18b5774f0b092202ec457403c0c8794438d54eeb2875ff8e2c05f90cf8ec693190e2e06585fd9cb2b33b286b20737e81a1dcb5
7
+ data.tar.gz: abba37a5247bfa46d53dbdfca35d01fd916378a3f5b333b02d7c9a265e148270f63b0c0aaed50bdb6bc9ad2be621e5b38cb84522d9460a7d5b7618d4d1362117
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.8.1
2
+
3
+ * The default config file now excludes `app/assets/images` and app/assets/fonts`. Add `*.otf` to ignored extensions.
4
+ * If an error message occurs when scanning, the error message now includes the filename [#141](https://github.com/glebm/i18n-tasks/issues/141).
5
+
1
6
  ## 0.8.0
2
7
 
3
8
  * Parse command line arguments with `optparse`. Remove dependency on Slop.
data/README.md CHANGED
@@ -19,13 +19,13 @@ Thus addressing the two main problems of [i18n gem][i18n-gem] design:
19
19
 
20
20
  i18n-tasks can be used with any project using the ruby [i18n gem][i18n-gem] (default in Rails).
21
21
 
22
- Add it to the Gemfile:
22
+ Add i18n-tasks to the Gemfile:
23
23
 
24
24
  ```ruby
25
- gem 'i18n-tasks', '~> 0.8.0'
25
+ gem 'i18n-tasks', '~> 0.8.1'
26
26
  ```
27
27
 
28
- Copy default [configuration file](#configuration) (optional):
28
+ Copy the default [configuration file](#configuration):
29
29
 
30
30
  ```console
31
31
  $ cp $(i18n-tasks gem-path)/templates/config/i18n-tasks.yml config/
@@ -4,86 +4,19 @@
4
4
  # You can find the default config here: https://github.com/glebm/i18n-tasks/blob/master/templates/config/i18n-tasks.yml
5
5
 
6
6
  base_locale: en
7
- ## i18n-tasks detects locales automatically from the existing locale files
8
- ## uncomment to set locales explicitly
9
- # locales: [en, es, fr]
10
-
11
- ## i18n-tasks report locale, default: en, available: en, ru
12
7
  internal_locale: en
13
8
 
14
- # Read and write locale data
15
9
  data:
16
- ## by default, translation data are read from the file system, or you can provide a custom data adapter
17
- # adapter: I18n::Tasks::Data::FileSystem
18
-
19
- # Locale files to read from
20
10
  read:
21
11
  - config/locales/%{locale}.yml
22
- # - config/locales/*.%{locale}.yml
23
- # - config/locales/**/*.%{locale}.yml
24
-
25
- # key => file routes, matched top to bottom
26
12
  write:
27
- ## E.g., write devise and simple form keys to their respective files
28
- # - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
29
- # Catch-all
30
13
  - config/locales/%{locale}.yml
31
- # `i18n-tasks normalize -p` will force move the keys according to these rules
32
-
33
- # YAML / JSON serializer options, passed to load / dump / parse / serialize
34
14
  yaml:
35
15
  write:
36
16
  ## do not wrap lines at 80 characters (override default)
37
17
  line_width: 96
38
- json:
39
- write:
40
- # pretty print JSON
41
- indent: ' '
42
- space: ' '
43
- object_nl: "\n"
44
- array_nl: "\n"
45
18
 
46
19
  # Find translate calls
47
20
  search:
48
- ## Default scanner finds t() and I18n.t() calls
49
- # scanner: I18n::Tasks::Scanners::PatternWithScopeScanner
50
-
51
- ## Paths to search in, passed to File.find
52
21
  paths:
53
22
  - lib/
54
-
55
- ## Root for resolving relative keys (default)
56
- # relative_roots:
57
- # - app/views
58
-
59
- ## File.fnmatch patterns to exclude from search (default)
60
- # exclude: ["*.jpg", "*.png", "*.gif", "*.svg", "*.ico", "*.eot", "*.ttf", "*.woff", "*.pdf"]
61
-
62
- ## Or, File.fnmatch patterns to include
63
- # include: ["*.rb", "*.html.slim"]
64
-
65
- ## Google Translate
66
- # translation:
67
- # # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
68
- # api_key: "AbC-dEf5"
69
-
70
- ## Consider these keys not missing
71
- # ignore_missing:
72
- # - pagination.views.*
73
-
74
- ## Consider these keys used
75
- # ignore_unused:
76
- # - 'simple_form.{yes,no}'
77
- # - 'simple_form.{placeholders,hints,labels}.*'
78
- # - 'simple_form.{error_notification,required}.:'
79
-
80
- ## Exclude these keys from `i18n-tasks eq-base' report
81
- # ignore_eq_base:
82
- # all:
83
- # - common.ok
84
- # fr,es:
85
- # - common.brand
86
-
87
- ## Exclude these keys from all of the reports
88
- # ignore:
89
- # - kaminari.*
@@ -10,7 +10,7 @@ module I18n::Tasks::Scanners
10
10
 
11
11
  attr_reader :config, :key_filter, :ignore_lines_res
12
12
 
13
- ALWAYS_EXCLUDE = %w(*.jpg *.png *.gif *.svg *.ico *.eot *.ttf *.woff *.woff2 *.pdf
13
+ ALWAYS_EXCLUDE = %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf
14
14
  *.css *.sass *.scss *.less *.yml *.json)
15
15
 
16
16
  def initialize(config = {})
@@ -22,6 +22,8 @@ module I18n::Tasks::Scanners
22
22
  keys << [key, data: location]
23
23
  end
24
24
  keys
25
+ rescue Exception => e
26
+ raise ::I18n::Tasks::CommandError.new("Error scanning #{path}: #{e.message}")
25
27
  end
26
28
 
27
29
  def default_pattern
@@ -1,6 +1,6 @@
1
1
  # coding: utf-8
2
2
  module I18n
3
3
  module Tasks
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.1'
5
5
  end
6
6
  end
@@ -40,7 +40,6 @@ data:
40
40
 
41
41
  ## Pretty-print JSON:
42
42
  # json:
43
- #
44
43
  # write:
45
44
  # indent: ' '
46
45
  # space: ' '
@@ -61,8 +60,10 @@ search:
61
60
  # - app/presenters
62
61
 
63
62
  ## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
64
- ## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json)
65
- # exclude: []
63
+ ## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json)
64
+ exclude:
65
+ - app/assets/images
66
+ - app/assets/fonts
66
67
 
67
68
  ## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`:
68
69
  ## 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: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-31 00:00:00.000000000 Z
11
+ date: 2015-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubis