@everymatrix/casino-game-page 0.0.203 → 0.0.207

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": "0.0.203",
3
+ "version": "0.0.207",
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": "31d7d9eeef7e68b954b83fb3dde25db05d8edf74"
39
+ "gitHead": "1769a90f32edd782f70c332e0834a59951c3be6d"
40
40
  }
@@ -276,7 +276,7 @@
276
276
 
277
277
  const toggleDeposit = () => {
278
278
  if (depositevent) {
279
- window.postMessage(depositevent, window.location.href);
279
+ window.postMessage({ type: depositevent }, window.location.href);
280
280
  window.postMessage({ type: 'ModalClosed' }, window.location.href);
281
281
  }
282
282
 
package/src/i18n.js CHANGED
@@ -6,12 +6,22 @@ import {
6
6
  } from 'svelte-i18n';
7
7
 
8
8
  function setupI18n({ withLocale: _locale, translations }) {
9
- dictionary.set(translations);
10
- locale.set(_locale);
9
+ locale.subscribe((data) => {
10
+ if (data == null) {
11
+ dictionary.set(translations);
12
+ locale.set(_locale);
13
+ }
14
+ }); // maybe we will need this to make sure that the i18n is set up only once
15
+ /*dictionary.set(translations);
16
+ locale.set(_locale);*/
11
17
  }
12
18
 
13
19
  function addNewMessages(lang, dict) {
14
20
  addMessages(lang, dict);
15
21
  }
16
22
 
17
- export { _, setupI18n, addNewMessages };
23
+ function setLocale(_locale) {
24
+ locale.set(_locale);
25
+ }
26
+
27
+ export { _, setupI18n, addNewMessages, setLocale };
package/src/en.js DELETED
@@ -1,9 +0,0 @@
1
- export const en = {
2
- gamePage: {
3
- signIn: 'SIGN IN',
4
- register: 'REGISTER',
5
- deposit: 'DEPOSIT',
6
- playForFun: 'PLAY FOR FUN',
7
- playNow: 'PLAY NOW'
8
- }
9
- }