zendesk_apps_support 1.17.2 → 1.17.3

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: 5a4456bc6e8b042ab159e7cdc95c70343796525d
4
- data.tar.gz: 1277915e7d74645722c62932010cee346b3ea580
3
+ metadata.gz: a4d927adbda6fe920190214ccfbbd373d8d9e28e
4
+ data.tar.gz: 202f75fc4cf732419ef542a7ed2f14d977dc3274
5
5
  SHA512:
6
- metadata.gz: b6d3dc0bd36bdefde2f8896189a544281bfa81d791f79f43104024486adbe6593426e00f08d0d3cdc811188a972e0ba80d44282d7c772b0c6fc37b6216c7c95b
7
- data.tar.gz: 9998cd1f7bdbc622567685375453090868296c3fabacfaa119f20c27628f5de5b456f52d8c6c5aafe69a109b6439ae6724e0c27c0e48501aa9ebc0e26101d724
6
+ metadata.gz: e251244dd55571b6a65b673955ee14dede36fd92472019afb93cc1f9211f14a4a540564911cad7bf20dcf9fd446e4e251f375a27d7219a078fe9bb115b75863f
7
+ data.tar.gz: 867c3b961471acac33874a59d9b58382dbd15fa578247421872d711444c5d6a89d28e653fe197f27ce433bb2b3b5c0a4b7c3fd5967c65c366459aaef9492a2ec
@@ -84,15 +84,17 @@ module ZendeskAppsSupport
84
84
  read_json('requirements.json')
85
85
  end
86
86
 
87
- def translations
88
- read_json('translations/en.json', false)
87
+ def translations(locale)
88
+ file_path = "translations/#{locale}.json"
89
+ file_path = "translations/en.json" unless file_exists?(file_path)
90
+ read_json(file_path, false)
89
91
  end
90
92
 
91
- def app_translations
92
- remove_zendesk_keys(translations)
93
+ def app_translations(locale)
94
+ remove_zendesk_keys(translations(locale))
93
95
  end
94
96
 
95
- def readified_js(app_name, app_id, asset_url_prefix, settings = {})
97
+ def readified_js(app_name, app_id, asset_url_prefix, settings = {}, locale = 'en')
96
98
  manifest = manifest_json
97
99
  source = app_js
98
100
  name = app_name || manifest[:name] || 'Local App'
@@ -119,7 +121,7 @@ module ZendeskAppsSupport
119
121
  asset_url_prefix: asset_url_prefix,
120
122
  app_class_name: app_class_name,
121
123
  author: author,
122
- translations: app_translations,
124
+ translations: app_translations(locale),
123
125
  framework_version: framework_version,
124
126
  templates: templates,
125
127
  settings: settings,
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: 1.17.2
4
+ version: 1.17.3
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: 2015-03-30 00:00:00.000000000 Z
14
+ date: 2015-05-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: i18n