singleton-ruby 0.1.8 → 0.1.9
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/source.rb +4 -3
- data/lib/sgtn-client/formatters/plurals/plural_formatter.rb +1 -1
- data/lib/version.rb +1 -1
- 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: 8b9a86b24b35f77b5d2abea8686d2ab8a9819ea5e5b4957e6997234262d4cc24
|
|
4
|
+
data.tar.gz: 9328b24f10c0a97a77cc6b7168fdadedc9b3a935b7c54409b260d9c03440d7fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cec4722423baf395e872eef3e07c444ec4c3001e6b86b50fab653782ed460e3504fd2145445970fedf3f62332c0f4c8384cd54794eeb8069f91bcf9baf16b29e
|
|
7
|
+
data.tar.gz: ce55d5ee39549d7137b095e3541200d6d26c2fd26ae0fdaf594bf2aaacf3cfca8b11c680be2973d9bda1fff1ba5416fa5a8a0d21544439f5fdc4b92451cdc581
|
|
@@ -17,11 +17,12 @@ module SgtnClient
|
|
|
17
17
|
else
|
|
18
18
|
SgtnClient.logger.debug "Getting sources from cache with key: " + cache_key
|
|
19
19
|
end
|
|
20
|
-
if items.nil?
|
|
20
|
+
if items.nil? || items[locale][key].nil?
|
|
21
|
+
SgtnClient.logger.debug "Source not found, return key: " + key
|
|
21
22
|
return key
|
|
23
|
+
else
|
|
24
|
+
return items[locale][key]
|
|
22
25
|
end
|
|
23
|
-
str = items[locale][key]
|
|
24
|
-
return str
|
|
25
26
|
end
|
|
26
27
|
|
|
27
28
|
def self.getSources(component, locale)
|
|
@@ -14,7 +14,7 @@ module SgtnClient
|
|
|
14
14
|
reg = Regexp.union(
|
|
15
15
|
/%<(\{.*?\})>/
|
|
16
16
|
)
|
|
17
|
-
string.gsub(reg) do
|
|
17
|
+
string.gsub(reg) do
|
|
18
18
|
count_placeholder, patterns = if $1
|
|
19
19
|
pluralization_hash = JSON.parse($1)
|
|
20
20
|
if pluralization_hash.is_a?(Hash) && pluralization_hash.size == 1
|
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: singleton-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.9
|
|
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: 2021-11-
|
|
11
|
+
date: 2021-11-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|