i18n_checker 0.2.0 → 0.2.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: 0b3dfa7d91d83ae12f4fac222f03b586b233ff51
4
- data.tar.gz: 05deb6f41ac172a7c94d72391b248acef04b41e8
3
+ metadata.gz: 9607a3e59428a3dfa046b5a42d494cc3a72ca793
4
+ data.tar.gz: 5ef70c86648059fee29f83c8bac3f645b2b72bfd
5
5
  SHA512:
6
- metadata.gz: e3f14b54918d9781c5767ee4c879dbb4cf25e2786dea4ed4951cbbb8bb4c9a205e328700f4f0daa519d61d02b50381abd52498679e55c205a190146037f970b5
7
- data.tar.gz: 7b13bdb096146bb7dca8a9e575f83f736002f5e078669c6d64232a4d466ade9c54e61f1fb8468ceea4f40dbe568333c2f9c3bbe9b7ca417fe761e6e8b096fe82
6
+ metadata.gz: 3fa10307135742d472e83c7bbc2f87d18bfc7199dac3c112e2f34c5961a8cc28d6b2a3bf6bad4317f9ec8ea067c4af5cea619892c6563878e4a2856c3dfe427a
7
+ data.tar.gz: 8c98e0689824e94298fd57d3f6bd7e1c68df399e3db61631f0203cb24823719d795c8298789263b1c763189d52578e39f98987d53e0386ba53d382043884e6d8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- i18n_checker (0.2.0)
4
+ i18n_checker (0.2.1)
5
5
  colorator (~> 1.1.0)
6
6
  haml_parser (~> 0.4)
7
7
  parser
@@ -6,6 +6,10 @@ module I18nChecker
6
6
  def initialize(locale_texts = [])
7
7
  @locale_texts = locale_texts
8
8
  end
9
+
10
+ def empty?
11
+ locale_texts.empty?
12
+ end
9
13
  end
10
14
  end
11
15
  end
@@ -3,7 +3,20 @@ require 'colorator'
3
3
  module I18nChecker
4
4
  module Reporter
5
5
  class DefaultReporter < DetectResultReporter
6
+ CHECK_COMPLETED = 'Translation text checking is complete.'
7
+
6
8
  def report(result)
9
+ return passed if result.empty?
10
+ failed(result)
11
+ end
12
+
13
+ def passed
14
+ logger.info CHECK_COMPLETED.green
15
+ logger.info 'There was no translated text that can not be referenced'.green
16
+ end
17
+
18
+ def failed(result)
19
+ logger.info CHECK_COMPLETED.red
7
20
  logger.info 'There are settings where translated text can not be found'.red
8
21
  result.locale_texts.each do |locale_text|
9
22
  logger.info " #{locale_text.file_name.cyan}"
@@ -1,3 +1,3 @@
1
1
  module I18nChecker
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - holyshared