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 +4 -4
- data/lib/i18n_screwdriver.rb +3 -4
- data/lib/i18n_screwdriver/version.rb +1 -1
- data/lib/tasks/i18n.rake +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 985f287225f7ed2e2ca841b194933300f765507e
|
4
|
+
data.tar.gz: 8f4a5a9b52d1e4d816185a245f7ca7eb68273b74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 066ea43385e0fb9b4a6dbfb837fdc332da787fce9e44f8f5d9d933ec7f521c2fa09d2f8687dcdee6044a2b42e630c733bbe376876ec5189b0c7dfbcddfed7e38
|
7
|
+
data.tar.gz: 72661a41c29c395445c8728c424a0d98c3cf8d5193fb44b4dd57f0b8fe27895a2351c6d81f3dc55dede5fb3a994ce827b88509b3a8a690c4f6a7bbc7244e155a
|
data/lib/i18n_screwdriver.rb
CHANGED
@@ -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
|
-
|
135
|
-
|
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)
|
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 [
|
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: '
|
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-
|
12
|
+
date: 2015-09-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|