zendesk_apps_support 4.1.0 → 4.2.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: 449bb01da83e188fc02e7e128f06603ef635fa61
4
- data.tar.gz: ba5becce7a36d0a6f6de94ca2b6f0fc5bfcd7ddb
3
+ metadata.gz: 2179c4d2a6cf6a2163ce8c20f1d338911f294048
4
+ data.tar.gz: d6c1780a2ef2167d19f934aac565eb84e64e21d8
5
5
  SHA512:
6
- metadata.gz: a8cc4270f6283719ddd650b3f7d67940efe84bcaff8a12db143de2ec65027d72a34e8bb667339bf965addf2c29b732c294a4a18638ae6fc8925d6a8421dfd14b
7
- data.tar.gz: c0d356946db015d422fdea255341b34f9efc8f23caa565f185972b145243ec4d18b7150811cc46ceb02fe81605c3c71a60d89de9defbf9b69d17cd0ead81a29e
6
+ metadata.gz: 91d7bca13f6989964ae6831bc44e758576986ce63ed6c567b113989b6d7eb1f2f5c2a8e43de6c243680725fdeabe3783a6da0cc70c9ace92136337c878e792ec
7
+ data.tar.gz: 6cf4cdeb0da373b898cccc7449083b77ae84312d191364323f47ea4a5613f8afcac62627fe1e01b7ac49aa8d72a023021cea91163bb0f7527a06047f143294c4
@@ -222,7 +222,7 @@ module ZendeskAppsSupport
222
222
  return {} unless File.directory?(translation_dir)
223
223
 
224
224
  locale_path = "#{translation_dir}/#{manifest.default_locale}.json"
225
- default_translations = process_translations(locale_path)
225
+ default_translations = process_translations(locale_path, default_locale: true)
226
226
 
227
227
  Dir["#{translation_dir}/*.json"].each_with_object({}) do |path, memo|
228
228
  locale = File.basename(path, File.extname(path))
@@ -249,9 +249,9 @@ module ZendeskAppsSupport
249
249
  result
250
250
  end
251
251
 
252
- def process_translations(locale_path)
252
+ def process_translations(locale_path, default_locale: false)
253
253
  translations = File.exist?(locale_path) ? JSON.parse(File.read(locale_path)) : {}
254
- translations['app'].delete('name') if translations.key?('app')
254
+ translations['app'].delete('name') if !default_locale && translations.key?('app')
255
255
  translations['app'].delete('package') if translations.key?('app')
256
256
  remove_zendesk_keys(translations)
257
257
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk_apps_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James A. Rosen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-08-31 00:00:00.000000000 Z
14
+ date: 2017-09-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: i18n