@everymatrix/casino-403 1.0.13 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/casino-403.js +2 -2
- package/dist/casino-403.js.map +1 -1
- package/package.json +2 -2
- package/src/Casino_403.svelte +15 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@everymatrix/casino-403",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.14",
|
4
4
|
"main": "dist/casino-403.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": "
|
39
|
+
"gitHead": "5da9a4e3b1b2d635a921ce3981f56157191f5aa7"
|
40
40
|
}
|
package/src/Casino_403.svelte
CHANGED
@@ -5,6 +5,20 @@
|
|
5
5
|
import { Translations } from './translations';
|
6
6
|
|
7
7
|
export let lang:string = 'en';
|
8
|
+
export let translationUrl:string = '';
|
9
|
+
|
10
|
+
const setTranslationUrl = ():void => {
|
11
|
+
let url:string = translationUrl;
|
12
|
+
|
13
|
+
fetch(url).then((res:any) => res.json())
|
14
|
+
.then((res) => {
|
15
|
+
Object.keys(res).forEach((item:any):void => {
|
16
|
+
addNewMessages(item, res[item]);
|
17
|
+
});
|
18
|
+
}).catch((err:any) => {
|
19
|
+
console.log(err);
|
20
|
+
});
|
21
|
+
}
|
8
22
|
|
9
23
|
Object.keys(Translations).forEach((item:any):void => {
|
10
24
|
addNewMessages(item, Translations[item]);
|
@@ -19,6 +33,7 @@
|
|
19
33
|
}
|
20
34
|
|
21
35
|
$: lang && setActiveLanguage();
|
36
|
+
$: translationUrl && setTranslationUrl();
|
22
37
|
</script>
|
23
38
|
|
24
39
|
<div class="PageWrapper">
|