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