singleton-ruby-test 0.6.0.2 → 0.6.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sgtn-client/api/translation.rb +14 -2
- 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: 9706603db34833023db1043e091ba300736bd6cdad4c30babf6fd93201938845
|
4
|
+
data.tar.gz: 6776cb6a0bc3bbec601e98aeb92e4aef7c6e09f794a5cd2bffdc25315b40baf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5332ffb272c097ef0e00851e49a6e8cc75af79f3ef64f20c6ac5a75dbb3fd9a3ddb58e8ffdf463c1e8c711edb0afe62cd3279165101539a3fa1655280b1d1d51
|
7
|
+
data.tar.gz: 751187ca2041d68b9607b41956d2bd8b70f6fa71e56d09fc5612aed4207adb04f31813d01549199d63a7c8d4b7400065d417155110ef5314430f9d3a6bb3da41
|
@@ -36,7 +36,14 @@ module SgtnClient
|
|
36
36
|
|
37
37
|
def self.getString_f(component, key, args, locale)
|
38
38
|
s = getString(component, key, locale)
|
39
|
-
|
39
|
+
if args.is_a?(Hash)
|
40
|
+
args.each do |source, arg|
|
41
|
+
s.gsub! "{#{source}}", arg
|
42
|
+
end
|
43
|
+
elsif args.is_a?(Array)
|
44
|
+
s = sprintf s % args
|
45
|
+
end
|
46
|
+
return s
|
40
47
|
end
|
41
48
|
|
42
49
|
def self.getStrings(component, locale)
|
@@ -52,7 +59,12 @@ module SgtnClient
|
|
52
59
|
|
53
60
|
default = SgtnClient::Config.configurations.default
|
54
61
|
if items.nil? || items["messages"] == nil
|
55
|
-
items =
|
62
|
+
items = {}
|
63
|
+
s = SgtnClient::Source.getSources(component, default)
|
64
|
+
default_component, value = s.first
|
65
|
+
items["component"] = default_component
|
66
|
+
items["messages"] = value
|
67
|
+
items["locale"] = 'source'
|
56
68
|
end
|
57
69
|
return items
|
58
70
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: singleton-ruby-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.0.
|
4
|
+
version: 0.6.0.3
|
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
|
+
date: 2021-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|