i18n-tasks 0.1.3 → 0.1.4

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: cc1e95e2717382abb299d60e4b207b2b0152bc66
4
- data.tar.gz: 4bf82fe58f91e8513f7f8b37aa2ebb4cee2c8d87
3
+ metadata.gz: dfe7323638e8b9f562528fbe39b95485723ad281
4
+ data.tar.gz: e400db0a471a49ef707b2649ce5f61794a8dafae
5
5
  SHA512:
6
- metadata.gz: 0b37c93c586cdd40a0222d91d8b0d92c93f8a21ce3738a54f4c90f4d22c36e63f7782e8e3107dbe395c1e0277f9a4e957470bf89f6000f6b1cef9e22a9da2d04
7
- data.tar.gz: 1a92543a5ace12423673f658bd9b951d520abe22209325feafd9eafced5fc349a6810d3a69d5ca04dbcddb0dd53b0a5a5cccfb1da1a915cb7943eccb983803ce
6
+ metadata.gz: 89c721ee39ed8d8921ec6b4db5dce0b6392d300e9ec4940f9eeaab0869e186f5019a35a1224c3156777d9d580a1378c4eb4056fdf9b307224bd971a5d524d1c3
7
+ data.tar.gz: 6517a687403394655ea9c6e96f057b88c6d49f66fa4249fb2f60d97a2117d865d991e555a41ca839200d927a98cb665e078394301778b4d76d0bcc1ca18742f2
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## v0.1.4
2
+
3
+ * Fix relative keys in partials (@paulfioravanti)
4
+ * Fix i18n:missing when nothing is missing (@tamtamchik)
5
+
1
6
  ## v0.1.3
2
7
 
3
8
  * detect countable keys as used for unused task
@@ -96,7 +96,7 @@ module I18n
96
96
  # normalized path
97
97
  path = Pathname.new(File.expand_path path).relative_path_from(Pathname.new(Dir.pwd)).to_s
98
98
  # key prefix based on path
99
- prefix = path.gsub(%r(app/views/|(\.[^/]+)*$), '').tr('/', '.')
99
+ prefix = path.gsub(%r(app/views/|(\.[^/]+)*$), '').tr('/', '.').gsub(%r(\._), '.')
100
100
  "#{prefix}#{key}"
101
101
  end
102
102
 
@@ -7,9 +7,13 @@ module I18n
7
7
 
8
8
  def missing(missing)
9
9
  $stderr.puts bold cyan "Missing keys and translations (#{missing.length})"
10
- $stderr.puts "#{bold 'Legend:'} #{red '✗'} key missing, #{yellow bold '∅'} translation blank, #{blue bold '='} value equal to base locale; #{cyan 'value in base locale'}"
11
- key_col_width = missing.map { |x| x[:key] }.max_by(&:length).length + 2
12
- missing.each { |m| print_missing_translation m, key_col_width: key_col_width }
10
+ if missing.present?
11
+ $stderr.puts "#{bold 'Legend:'} #{red '✗'} key missing, #{yellow bold '∅'} translation blank, #{blue bold '='} value equal to base locale; #{cyan 'value in base locale'}"
12
+ key_col_width = missing.map { |x| x[:key] }.max_by(&:length).length + 2
13
+ missing.each { |m| print_missing_translation m, key_col_width: key_col_width }
14
+ else
15
+ $stderr.puts(bold green 'Good job! No translations missing!')
16
+ end
13
17
  end
14
18
 
15
19
  def unused(unused)
@@ -1,5 +1,5 @@
1
1
  module I18n
2
2
  module Tasks
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
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.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-22 00:00:00.000000000 Z
11
+ date: 2013-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails