@quenty/clienttranslator 8.14.0 → 8.14.1

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,17 @@
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
+ ## [8.14.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/clienttranslator@8.14.0...@quenty/clienttranslator@8.14.1) (2023-03-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Localization changes on localeId change ([551ce0b](https://github.com/Quenty/NevermoreEngine/commit/551ce0bb8a99f165529ec33d2130f4b65c01d8e8))
12
+
13
+
14
+
15
+
16
+
6
17
  # [8.14.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/clienttranslator@8.13.1...@quenty/clienttranslator@8.14.0) (2023-03-28)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/clienttranslator",
3
- "version": "8.14.0",
3
+ "version": "8.14.1",
4
4
  "description": "Gets local translator for player",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "365473382344edb0db14d40c9392b9774214e29b"
40
+ "gitHead": "2700d8b4f92c7254ad9b8eb3b8ec833bb4d94c85"
41
41
  }
@@ -218,13 +218,18 @@ function JSONTranslator:ObserveFormatByKey(key, argData)
218
218
  return Observable.new(function(sub)
219
219
  local maid = Maid.new()
220
220
 
221
- maid:GivePromise(self._promiseTranslator:Then(function()
221
+ maid:GivePromise(self._promiseTranslator:Then(function(translator)
222
222
  if argObservable then
223
- maid:GiveTask(argObservable:Subscribe(function(args)
224
- sub:Fire(self:FormatByKey(key, args))
223
+ maid:GiveTask(Rx.combineLatest({
224
+ localeId = RxInstanceUtils.observeProperty(translator, "LocaleId");
225
+ args = argObservable;
226
+ }):Subscribe(function(state)
227
+ sub:Fire(self:FormatByKey(key, state.args))
225
228
  end))
226
229
  else
227
- sub:Fire(self:FormatByKey(key, nil))
230
+ maid:GiveTask(RxInstanceUtils.observeProperty(translator, "LocaleId"):Subscribe(function()
231
+ sub:Fire(self:FormatByKey(key, nil))
232
+ end))
228
233
  end
229
234
  end))
230
235