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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7af1f5a125b10e4a986bc7a835fc3910a1ee7003ccd0895f15c2a6ff69bd810
4
- data.tar.gz: be7f8fa25ddeea2ad234a7367e73473459396bfa065af3c089bd0c45008d37d4
3
+ metadata.gz: 9706603db34833023db1043e091ba300736bd6cdad4c30babf6fd93201938845
4
+ data.tar.gz: 6776cb6a0bc3bbec601e98aeb92e4aef7c6e09f794a5cd2bffdc25315b40baf7
5
5
  SHA512:
6
- metadata.gz: ee9949e34a98cd27a75637622a41775e83c35750c7290eca6be3742fcb356aa61dad08f1aad8225a598d52f669f4ddca277688677adf31a3c329ed4b8b6af5af
7
- data.tar.gz: bee22684c81bbb29909d0fe60ff44269c84f5a1ecc096227e474737a91dfe48329281e6b793d60cce7b1eda476620f8ddab470a622e16e8eb65e82bd11f4bd1e
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
- return sprintf s % args
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 = SgtnClient::Source.getSources(component, default)
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
@@ -1,3 +1,3 @@
1
1
 
2
- VERSION_INFO = [0, 1, 5].freeze
2
+ VERSION_INFO = [0, 1, 7].freeze
3
3
  VERSION = VERSION_INFO.map(&:to_s).join('.').freeze
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.2
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-09-09 00:00:00.000000000 Z
11
+ date: 2021-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client