zendesk_apps_tools 1.18.1 → 1.18.2

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: ac026c3d7f4451520b860f3b7c70923f33fbc1d0
4
- data.tar.gz: 28a1f6fc42f4c19d68c7e40cbf14a527b668815c
3
+ metadata.gz: bfc64c01bafd525a7d0b99f2905a29e63dfd8599
4
+ data.tar.gz: c7f84e9d8c6934d3c78a5c502023a2f8d0213c39
5
5
  SHA512:
6
- metadata.gz: 38c140a39c66cd3be001c0d0f6c88647b8925d6f0e93a4cadb55f78d3a93f350f2fc332ba189a01c9d3d9e1e8582c9785d966414a41094c78973abcd5507a631
7
- data.tar.gz: ff60cc6db9e2b54b341a1ad41574479c147a215a50c369a1ea1d4e9a11336b9808e470b2c887ad292302b0b71dded22eda1618d1f931fcaf7c3b4e06c29bbec3
6
+ metadata.gz: 59fc11dd290bffae7972df0be3272579169dbcea5ac583385039372315355dbf9bccf16169f606cd3c14dc69306bc666ee595df3def99f529c3bdcf338800fd1
7
+ data.tar.gz: bd7d73b4c5fd386bd35a8fa167f3eb5e2e8c2433001cb365e9d944a8a9b0703fc562efaa106e87412001bbe5bffb9fdad6d27ac2c8799da080dd64ed0282d37e
@@ -1,10 +1,14 @@
1
1
  module ZendeskAppsTools
2
2
  class LocaleIdentifier
3
- attr_reader :language_id
3
+ attr_reader :locale_id
4
4
 
5
5
  # Convert :"en-US-x-12" to 'en-US'
6
6
  def initialize(code)
7
- @language_id = code.sub(/-x-.*/, '')
7
+ @locale_id = if code.start_with?('en-US') #default locale
8
+ 'en-US'
9
+ else
10
+ code.sub(/-x-.*/, '').downcase
11
+ end
8
12
  end
9
13
  end
10
14
  end
@@ -67,7 +67,7 @@ module ZendeskAppsTools
67
67
  locale_response = api_request(locale_url, request_builder).body
68
68
  translations = JSON.parse(locale_response)['locale']['translations']
69
69
 
70
- locale_name = ZendeskAppsTools::LocaleIdentifier.new(locale['locale']).language_id
70
+ locale_name = ZendeskAppsTools::LocaleIdentifier.new(locale['locale']).locale_id
71
71
  write_json("#{destination_root}/translations/#{locale_name}.json", nest_translations_hash(translations, key_prefix))
72
72
  end
73
73
  say("Translations updated", :green)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk_apps_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.1
4
+ version: 1.18.2
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: 2014-05-26 00:00:00.000000000 Z
14
+ date: 2014-06-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: thor