@quenty/gameconfig 3.4.1 → 4.0.0

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [4.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/gameconfig@3.4.1...@quenty/gameconfig@4.0.0) (2022-08-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Fix localization failure occuring on GameConfigAssets where source would be the same across the same asset so the cloud table wouldn't publish ([23c78ab](https://github.com/Quenty/NevermoreEngine/commit/23c78abbb5f1dcf2de8c8c855dfe20a8a58b4e53))
12
+
13
+
14
+ ### Features
15
+
16
+ * Add ServiceName to most services for faster debugging ([39fc3f4](https://github.com/Quenty/NevermoreEngine/commit/39fc3f4f2beb92fff49b2264424e07af7907324e))
17
+
18
+
19
+
20
+
21
+
6
22
  ## [3.4.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/gameconfig@3.4.0...@quenty/gameconfig@3.4.1) (2022-08-11)
7
23
 
8
24
  **Note:** Version bump only for package @quenty/gameconfig
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/gameconfig",
3
- "version": "3.4.1",
3
+ "version": "4.0.0",
4
4
  "description": "Configuration service to specify Roblox badges, products, and other specific assets.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,28 +27,29 @@
27
27
  "access": "public"
28
28
  },
29
29
  "dependencies": {
30
- "@quenty/attributeutils": "^6.2.0",
30
+ "@quenty/attributeutils": "^7.0.0",
31
31
  "@quenty/badgeutils": "^5.1.0",
32
32
  "@quenty/baseobject": "^5.1.0",
33
- "@quenty/binder": "^6.3.0",
34
- "@quenty/brio": "^6.2.0",
35
- "@quenty/clienttranslator": "^6.3.1",
36
- "@quenty/cmdrservice": "^5.4.0",
37
- "@quenty/instanceutils": "^5.2.0",
33
+ "@quenty/binder": "^7.0.0",
34
+ "@quenty/brio": "^7.0.0",
35
+ "@quenty/clienttranslator": "^7.0.0",
36
+ "@quenty/cmdrservice": "^6.0.0",
37
+ "@quenty/instanceutils": "^6.0.0",
38
38
  "@quenty/loader": "^5.0.0",
39
39
  "@quenty/maid": "^2.4.0",
40
40
  "@quenty/marketplaceutils": "^5.1.0",
41
- "@quenty/observablecollection": "^3.3.1",
41
+ "@quenty/observablecollection": "^4.0.0",
42
42
  "@quenty/preferredparentutils": "^2.2.0",
43
43
  "@quenty/promise": "^5.1.0",
44
+ "@quenty/pseudolocalize": "^3.0.0",
44
45
  "@quenty/remotefunctionutils": "^5.1.0",
45
46
  "@quenty/remoting": "^5.2.0",
46
- "@quenty/rx": "^5.2.0",
47
- "@quenty/rxbinderutils": "^6.3.0",
47
+ "@quenty/rx": "^6.0.0",
48
+ "@quenty/rxbinderutils": "^7.0.0",
48
49
  "@quenty/servicebag": "^5.1.0",
49
- "@quenty/statestack": "^6.2.0",
50
- "@quenty/string": "^2.3.0",
50
+ "@quenty/statestack": "^7.0.0",
51
+ "@quenty/string": "^3.0.0",
51
52
  "@quenty/table": "^3.1.0"
52
53
  },
53
- "gitHead": "45ffe88b893e29690163a42c3830c983f6098a59"
54
+ "gitHead": "dbb62609f980983cc32da90acfef13e30ed41113"
54
55
  }
@@ -10,6 +10,7 @@ local RxStateStackUtils = require("RxStateStackUtils")
10
10
  local Rx = require("Rx")
11
11
 
12
12
  local GameConfigCommandServiceClient = {}
13
+ GameConfigCommandServiceClient.ServiceName = "GameConfigCommandServiceClient"
13
14
 
14
15
  function GameConfigCommandServiceClient:Init(serviceBag)
15
16
  assert(not self._serviceBag, "Already initialized")
@@ -7,6 +7,7 @@ local require = require(script.Parent.loader).load(script)
7
7
  local GameConfigAssetBase = require("GameConfigAssetBase")
8
8
  local GameConfigTranslator = require("GameConfigTranslator")
9
9
  local Rx = require("Rx")
10
+ local PseudoLocalize = require("PseudoLocalize")
10
11
 
11
12
  local GameConfigAssetClient = setmetatable({}, GameConfigAssetBase)
12
13
  GameConfigAssetClient.ClassName = "GameConfigAssetClient"
@@ -38,21 +39,26 @@ function GameConfigAssetClient:ObserveTranslatedName()
38
39
  -- TODO: Multicast
39
40
 
40
41
  return Rx.combineLatest({
42
+ assetKey = self:ObserveAssetKey();
41
43
  translationKey = self:ObserveNameTranslationKey();
42
44
  text = self:ObserveCloudName();
43
45
  }):Pipe({
46
+ Rx.throttleDefer();
44
47
  Rx.switchMap(function(state)
45
- if type(state.translationKey) == "string" and state.text then
48
+ if type(state.translationKey) == "string" and state.text and state.assetKey then
46
49
  -- Immediately write if necessary
47
50
 
48
51
  local localizationTable = self._configTranslator:GetLocalizationTable()
49
52
  local key = state.translationKey
50
- local source = ""
51
- local context = ""
53
+ local source = state.text
54
+ local context = ("GameConfigAsset.%s"):format(state.assetKey)
52
55
  local localeId = "en"
53
56
  local value = state.text
54
57
 
55
58
  localizationTable:SetEntryValue(key, source, context, localeId, value)
59
+ localizationTable:SetEntryValue(key, source, context,
60
+ PseudoLocalize.getDefaultPseudoLocaleId(),
61
+ PseudoLocalize.pseudoLocalize(value))
56
62
 
57
63
  return self._configTranslator:ObserveFormatByKey(state.translationKey)
58
64
  else
@@ -70,21 +76,26 @@ function GameConfigAssetClient:ObserveTranslatedDescription()
70
76
  -- TODO: Multicast
71
77
 
72
78
  return Rx.combineLatest({
79
+ assetKey = self:ObserveAssetKey();
73
80
  translationKey = self:ObserveDescriptionTranslationKey();
74
81
  text = self:ObserveCloudDescription();
75
82
  }):Pipe({
83
+ Rx.throttleDefer();
76
84
  Rx.switchMap(function(state)
77
- if type(state.translationKey) == "string" and state.text then
85
+ if type(state.translationKey) == "string" and state.text and state.assetKey then
78
86
  -- Immediately write if necessary
79
87
 
80
88
  local localizationTable = self._configTranslator:GetLocalizationTable()
81
89
  local key = state.translationKey
82
- local source = ""
83
- local context = ""
90
+ local source = state.text
91
+ local context = ("GameConfigAsset.%s"):format(state.assetKey)
84
92
  local localeId = "en"
85
93
  local value = state.text
86
94
 
87
95
  localizationTable:SetEntryValue(key, source, context, localeId, value)
96
+ localizationTable:SetEntryValue(key, source, context,
97
+ PseudoLocalize.getDefaultPseudoLocaleId(),
98
+ PseudoLocalize.pseudoLocalize(value))
88
99
 
89
100
  return self._configTranslator:ObserveFormatByKey(state.translationKey)
90
101
  else
@@ -8,6 +8,7 @@ local Maid = require("Maid")
8
8
  local GameConfigPicker = require("GameConfigPicker")
9
9
 
10
10
  local GameConfigServiceClient = {}
11
+ GameConfigServiceClient.ServiceName = "GameConfigServiceClient"
11
12
 
12
13
  function GameConfigServiceClient:Init(serviceBag)
13
14
  assert(not self._serviceBag, "Already initialized")
@@ -5,4 +5,4 @@
5
5
 
6
6
  local require = require(script.Parent.loader).load(script)
7
7
 
8
- return require("JSONTranslator").new("en", {})
8
+ return require("JSONTranslator").new("GameConfigTranslator", "en", {})
@@ -11,6 +11,7 @@ local GameConfigCmdrUtils = require("GameConfigCmdrUtils")
11
11
  local BadgeUtils = require("BadgeUtils")
12
12
 
13
13
  local GameConfigCommandService = {}
14
+ GameConfigCommandService.ServiceName = "GameConfigCommandService"
14
15
 
15
16
  function GameConfigCommandService:Init(serviceBag)
16
17
  assert(not self._serviceBag, "Already initialized")
@@ -16,6 +16,7 @@ local GameConfigAssetTypes = require("GameConfigAssetTypes")
16
16
  local GameConfigServiceConstants = require("GameConfigServiceConstants")
17
17
 
18
18
  local GameConfigService = {}
19
+ GameConfigService.ServiceName = "GameConfigService"
19
20
 
20
21
  function GameConfigService:Init(serviceBag)
21
22
  assert(not self._serviceBag, "Already initialized")