i18n_screwdriver 7.5 → 8.0

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: 94bd26e4628cc630514ad733d735a604e65659a2
4
- data.tar.gz: 074a5fbf05496fc63f0dc03fbbc477098b40190a
3
+ metadata.gz: 985f287225f7ed2e2ca841b194933300f765507e
4
+ data.tar.gz: 8f4a5a9b52d1e4d816185a245f7ca7eb68273b74
5
5
  SHA512:
6
- metadata.gz: 2bd45ff11f2994dd24be3899623eeb558a7552fd6f84e8b2c174161096e517ef3749484288880def27eef43ef571b6abc8678481172de6660303e4a62d0c4cc6
7
- data.tar.gz: 36808961678afd19b0625adcc9677ad423340e0a2b2d87e14453eac930a3849e91d5c2e0c7e9b32b79e1045df44b9db5c10568ab8ed0d6f7e640a300bb5f66d7
6
+ metadata.gz: 066ea43385e0fb9b4a6dbfb837fdc332da787fce9e44f8f5d9d933ec7f521c2fa09d2f8687dcdee6044a2b42e630c733bbe376876ec5189b0c7dfbcddfed7e38
7
+ data.tar.gz: 72661a41c29c395445c8728c424a0d98c3cf8d5193fb44b4dd57f0b8fe27895a2351c6d81f3dc55dede5fb3a994ce827b88509b3a8a690c4f6a7bbc7244e155a
@@ -4,8 +4,6 @@ require "i18n_screwdriver/translation_helper"
4
4
  require "i18n_screwdriver/rails"
5
5
 
6
6
  module I18nScrewdriver
7
- DUMMY_TEXT = "TRANSLATION_MISSING"
8
-
9
7
  Error = Class.new(StandardError)
10
8
 
11
9
  def self.filename_for_locale(locale)
@@ -131,8 +129,9 @@ module I18nScrewdriver
131
129
  end
132
130
 
133
131
  def self.translate(string, options = {})
134
- translation = I18n.translate(generate_key(string), options)
135
- translation.present? ? translation : DUMMY_TEXT
132
+ I18n.translate!(generate_key(string), options)
133
+ rescue I18n::MissingTranslationData
134
+ I18n.translate(string, options)
136
135
  end
137
136
 
138
137
  def self.extract_text(string)
@@ -1,3 +1,3 @@
1
1
  module I18nScrewdriver
2
- VERSION = "7.5"
2
+ VERSION = "8.0"
3
3
  end
data/lib/tasks/i18n.rake CHANGED
@@ -29,7 +29,7 @@ namespace :i18n do
29
29
 
30
30
  puts "Translating #{translations.keys.size} entries from <#{default_locale}> to <#{locale}> (enter :q to save and quit, ctrl-c to abort):"
31
31
  texts.keys.sort.each do |key|
32
- next unless [I18nScrewdriver::DUMMY_TEXT, "", nil].include?(translations[key])
32
+ next unless ["", nil].include?(translations[key])
33
33
  puts "> #{texts[key]}"
34
34
  input = STDIN.gets.chomp
35
35
  break if input == ":q"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_screwdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: '7.5'
4
+ version: '8.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Miesel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-04 00:00:00.000000000 Z
12
+ date: 2015-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec