singleton-client-test 0.7.0.30 → 0.7.0.31

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
  SHA256:
3
- metadata.gz: 8bbeb4b91e49f392f67d86832ba947550035c57e5d95ed8a9ba3f7018bea1933
4
- data.tar.gz: 2f42e96d26b18919eca9dde3673b9b9ae20af3f627bf06fd21ebac63ce496e55
3
+ metadata.gz: d36c7df9764afccdd5c3e9ca3dac5123bd9feaedd3ada0a38e386836860f8885
4
+ data.tar.gz: 9cc9248d0b25744fa3168711040e740f9c07124e60a55a9f0b73150a630ca1c4
5
5
  SHA512:
6
- metadata.gz: 19ea390e3e040215ea4dd38d38ae4e36452c217a2e82e22bf638ac08798dda63797be2b346fd3bde89a9c6e5ff5aa415c02a21b0094518a3b698ebb3864ff383
7
- data.tar.gz: dfc215e21a95bf65a7b25799e13f80fc026fdc13e5b0566ab478a4977c5f73041c6754fc88ba8bef48ee2c0e26ee3721c887032614bd350ba125397f489fe35f
6
+ metadata.gz: f7d9c3d03d862fa00b6e75ad17e3d6ebf6382750bdf41630708136439980ee0ee9cbb07768f19f71f0b23ba2c2f3c2dba5e50e4d9afc136b26aa96f326076d89
7
+ data.tar.gz: 0c3b4dbe2f24634090f997b3d980aa7b0a85c41485bd553020fd3e41e196947a3f2a0b27a12da3d87439ecaaee7b903542df4fbbbb4b23ee0021d01ceda96eb5
@@ -86,6 +86,7 @@ module SgtnClient
86
86
  end
87
87
 
88
88
  def self.get_cs(component, locale)
89
+ locale = SgtnClient::LocaleUtil.process_locale(locale)
89
90
  flocale = SgtnClient::LocaleUtil.fallback(locale)
90
91
  cache_key = SgtnClient::CacheUtil.get_cachekey(component, flocale)
91
92
  SgtnClient.logger.debug "[Translation][get_cs]cache_key=#{cache_key}"
@@ -10,6 +10,10 @@ module SgtnClient
10
10
  }
11
11
 
12
12
  class LocaleUtil
13
+ def self.process_locale(locale=nil)
14
+ locale ||= SgtnClient::Config.configurations.default
15
+ locale.to_s
16
+ end
13
17
  def self.fallback(locale)
14
18
  found = SgtnClient::DEFAULT_LOCALES.select {|e| e == locale}
15
19
  if !found.empty?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singleton-client-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.30
4
+ version: 0.7.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware G11n Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-15 00:00:00.000000000 Z
11
+ date: 2022-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client