@everymatrix/casino-collections-providers 1.0.13 → 1.0.15

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-collections-providers",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "main": "index.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
  }
@@ -12,6 +12,7 @@
12
12
  export let titletype:string = '';
13
13
  export let clientstyling:string = '';
14
14
  export let clientstylingurl:string = '';
15
+ export let translationUrl:string = '';
15
16
 
16
17
  let gameCategories:Array<any> = [];
17
18
  let isLoading:boolean = true;
@@ -28,6 +29,19 @@
28
29
  let userAgent:string = window.navigator.userAgent;
29
30
  let mobile:boolean;
30
31
 
32
+ const setTranslationUrl = ():void => {
33
+ let url:string = translationUrl;
34
+
35
+ fetch(url).then((res:any) => res.json())
36
+ .then((res) => {
37
+ Object.keys(res).forEach((item:any):void => {
38
+ addNewMessages(item, res[item]);
39
+ });
40
+ }).catch((err:any) => {
41
+ console.log(err);
42
+ });
43
+ }
44
+
31
45
  Object.keys(Translations).forEach((item:any):void => {
32
46
  addNewMessages(item, Translations[item]);
33
47
  });
@@ -162,6 +176,7 @@
162
176
  $: lang && setActiveLanguage();
163
177
  $: clientstyling && customStylingContainer && setClientStyling();
164
178
  $: clientstylingurl && customStylingContainer && setClientStylingURL();
179
+ $: translationUrl && setTranslationUrl();
165
180
 
166
181
  </script>
167
182