@everymatrix/player-account-gaming-limits 1.0.13 → 1.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-account-gaming-limits",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "main": "dist/player-account-gaming-limits.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "4b2bbc7cb2c3424950a39147a985ac5d38207cdf"
39
+ "gitHead": "0ee1d4bccc4964628711251119148f0a04ba10df"
40
40
  }
@@ -15,6 +15,20 @@
15
15
  export let lang:string = 'en';
16
16
  export let playercurrency:string = '';
17
17
  export let separatelimits:string = 'true';
18
+ export let translationUrl:string = '';
19
+
20
+ const setTranslationUrl = ():void => {
21
+ let url:string = translationUrl;
22
+
23
+ fetch(url).then((res:any) => res.json())
24
+ .then((res) => {
25
+ Object.keys(res).forEach((item:any):void => {
26
+ addNewMessages(item, res[item]);
27
+ });
28
+ }).catch((err:any) => {
29
+ console.log(err);
30
+ });
31
+ }
18
32
 
19
33
  Object.keys(PlayerGamingLimitsCardTranslations).forEach((item) => {
20
34
  addNewMessages(item, PlayerGamingLimitsCardTranslations[item]);
@@ -86,6 +100,7 @@
86
100
  });
87
101
 
88
102
  $: lang && setActiveLanguage();
103
+ $: translationUrl && setTranslationUrl();
89
104
  </script>
90
105
 
91
106