singleton-client-test 0.7.0.30 → 0.7.0.31
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 +4 -4
- data/lib/sgtn-client/api/translation.rb +1 -0
- data/lib/sgtn-client/util/locale-util.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d36c7df9764afccdd5c3e9ca3dac5123bd9feaedd3ada0a38e386836860f8885
|
4
|
+
data.tar.gz: 9cc9248d0b25744fa3168711040e740f9c07124e60a55a9f0b73150a630ca1c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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-
|
11
|
+
date: 2022-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|