i18n_screwdriver 7.0 → 7.1

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: 7797459c92084f08967a9f8a3f0cc77595ab3cd6
4
- data.tar.gz: 468500d604d04697ae70dfe7bd7055b83f149a10
3
+ metadata.gz: 664dc4e3b6bb1c67258b51ec66547a7a8938a5f4
4
+ data.tar.gz: 3c41d11e3d34cac784fcd2bc2fec2f925a5ebf99
5
5
  SHA512:
6
- metadata.gz: aea5b4f61054641698e466644cfb5d504e88929791c068528643c2b857b009bda12cd35ccddae164ab2bc377f23f4d2a9982ee45f5d3588d0ad06741fddfca78
7
- data.tar.gz: 979fed750a96ab6dcbe408c8bc9346bc98d27ff4fcbbc8deeec6f1b28f1fd02108c8a3ced26ef6c85ba6246e1eea65e92b88ebce8526c72b13b945e96d3b2228
6
+ metadata.gz: 7008234c2336366b9043a8852794fbe7e27e043d492dd3a1666b485e7cf7319b069f25babf846c0467303e8ef8e4697154d8911c22241e6d40a413fff19c2fd5
7
+ data.tar.gz: 1669696619a0d364080dec760c4cf5fecc6689600da17dddcf2d1a4d29b0210715763b83c169e28c0c86c291c783c972a60d96eb8cac2d8d74d3b4cec2efe178
@@ -108,17 +108,13 @@ module I18nScrewdriver
108
108
  end
109
109
  end
110
110
 
111
- def self.dummy_text
112
- "TRANSLATION_MISSING"
113
- end
114
-
115
111
  def self.update_translations_file(locale, translations)
116
112
  existing_translations = file_with_translations_exists?(locale) ? load_translations(locale) : {}
117
113
  existing_translations.select!{ |k| translations.has_key?(k) }
118
114
 
119
115
  translations.each do |k, v|
120
116
  next if existing_translations[k]
121
- existing_translations[k] = (default_locale == locale) ? v : dummy_text
117
+ existing_translations[k] = (default_locale == locale) ? v : nil
122
118
  end
123
119
 
124
120
  write_translations(locale, existing_translations)
@@ -131,7 +127,8 @@ module I18nScrewdriver
131
127
  end
132
128
 
133
129
  def self.translate(string, options = {})
134
- I18n.translate(generate_key(string), options)
130
+ translation = I18n.translate(generate_key(string), options)
131
+ translation.present? ? translation : "TRANSLATION_MISSING"
135
132
  end
136
133
 
137
134
  def self.extract_text(string)
@@ -1,3 +1,3 @@
1
1
  module I18nScrewdriver
2
- VERSION = "7.0"
2
+ VERSION = "7.1"
3
3
  end
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.0'
4
+ version: '7.1'
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: 2014-10-08 00:00:00.000000000 Z
12
+ date: 2014-10-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec