@everymatrix/casino-game-page 1.0.11 → 1.0.14

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/casino-game-page",
3
- "version": "1.0.11",
3
+ "version": "1.0.14",
4
4
  "main": "dist/casino-game-page.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": "a90b005fe3a45c7d5ba83769886d60c006b3968f"
39
+ "gitHead": "5da9a4e3b1b2d635a921ce3981f56157191f5aa7"
40
40
  }
@@ -21,6 +21,7 @@
21
21
  export let userid:string = ''; // Value for UserID;
22
22
  export let clientstyling:string = '';
23
23
  export let clientstylingurl:string = '';
24
+ export let translationUrl:string = '';
24
25
  export let favorites:string = '';
25
26
 
26
27
  export let loginurl:string = '';
@@ -83,6 +84,19 @@
83
84
 
84
85
  setupI18n({ withLocale: 'en', translations: {}});
85
86
 
87
+ const setTranslationUrl = ():void => {
88
+ let url:string = translationUrl;
89
+
90
+ fetch(url).then((res:any) => res.json())
91
+ .then((res) => {
92
+ Object.keys(res).forEach((item:any):void => {
93
+ addNewMessages(item, res[item]);
94
+ });
95
+ }).catch((err:any) => {
96
+ console.log(err);
97
+ });
98
+ }
99
+
86
100
  Object.keys(GamePageTranslations).forEach((item) => {
87
101
  addNewMessages(item, GamePageTranslations[item]);
88
102
  });
@@ -582,6 +596,7 @@
582
596
  $: endpoint && gameid && lang && createGameURL(gameid, true);
583
597
  $: session && userid && endpoint && setSession();
584
598
  $: checksession == 'false' && session && endpoint && setSession();
599
+ $: translationUrl && setTranslationUrl();
585
600
  $: clientstyling && customStylingContainer && setClientStyling();
586
601
  $: clientstylingurl && customStylingContainer && setClientStylingURL();
587
602
  $: (showModal == 'true') && panicButton && addEventsToDisplayedElements();