@everymatrix/casino-tournaments-controller 1.43.3 → 1.44.0
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-tournaments-controller",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.44.0",
|
|
4
4
|
"main": "dist/casino-tournaments-controller.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "701410f2b76dfe1ee4038f799b1e8e340c85cdb5"
|
|
39
39
|
}
|
|
@@ -63,7 +63,8 @@
|
|
|
63
63
|
|
|
64
64
|
let tournamentsSearchParams:string;
|
|
65
65
|
let tournamentsUpdateEventSource:EventSourcePolyfill;
|
|
66
|
-
let isLoadTriggered = false
|
|
66
|
+
let isLoadTriggered: boolean = false;
|
|
67
|
+
let clientTranslation: typeof TRANSLATIONS;
|
|
67
68
|
|
|
68
69
|
setupI18n({ withLocale: 'en', translations: {}});
|
|
69
70
|
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
|
|
73
74
|
fetch(url).then((res:any) => res.json())
|
|
74
75
|
.then((res) => {
|
|
76
|
+
clientTranslation = res;
|
|
75
77
|
Object.keys(res).forEach((item:any):void => {
|
|
76
78
|
addNewMessages(item, res[item]);
|
|
77
79
|
});
|
|
@@ -80,6 +82,12 @@
|
|
|
80
82
|
});
|
|
81
83
|
}
|
|
82
84
|
|
|
85
|
+
const applyTranslation = (translation: any) => {
|
|
86
|
+
if(!translation) return;
|
|
87
|
+
Object.keys(translation).forEach((item:any):void => {
|
|
88
|
+
addNewMessages(item, translation[item]);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
83
91
|
|
|
84
92
|
Object.keys(TRANSLATIONS).forEach((item:any) => {
|
|
85
93
|
addNewMessages(item, TRANSLATIONS[item]);
|
|
@@ -99,6 +107,10 @@
|
|
|
99
107
|
|
|
100
108
|
getData(endpoint, 0, tournamentsShownNumber);
|
|
101
109
|
}
|
|
110
|
+
|
|
111
|
+
if(e.data && e.data.type === 'TournamentThumbnailMounted'){
|
|
112
|
+
applyTranslation(clientTranslation);
|
|
113
|
+
}
|
|
102
114
|
}
|
|
103
115
|
|
|
104
116
|
const matchStatus = (status:string) => {
|
|
@@ -376,7 +388,7 @@
|
|
|
376
388
|
|
|
377
389
|
<div bind:this={customStylingContainer}>
|
|
378
390
|
{#if hasErrors}
|
|
379
|
-
<p>{$_('
|
|
391
|
+
<p>{$_('500')}</p>
|
|
380
392
|
<p>{error}</p>
|
|
381
393
|
{:else}
|
|
382
394
|
<div class="TournamentsWrapper" part="TournamentsWrapper">
|
|
@@ -395,9 +407,9 @@
|
|
|
395
407
|
<div class="SecondRow" part="SecondRow">
|
|
396
408
|
{#if tournamentsNumber == 0}
|
|
397
409
|
{#if isLoading}
|
|
398
|
-
<p class="LoadingMessage" part="LoadingMessage">{$_('
|
|
410
|
+
<p class="LoadingMessage" part="LoadingMessage">{$_('loading')}</p>
|
|
399
411
|
{:else}
|
|
400
|
-
<p class="NoTournaments" part="NoTournaments">{$_('
|
|
412
|
+
<p class="NoTournaments" part="NoTournaments">{$_('noTournaments')}</p>
|
|
401
413
|
{/if}
|
|
402
414
|
{:else}
|
|
403
415
|
<casino-tournaments-list-controller
|
|
@@ -424,7 +436,7 @@
|
|
|
424
436
|
{#if !allTournamentsShown}
|
|
425
437
|
<div class="ThirdRow" part="ThirdRow">
|
|
426
438
|
<div class="CenterButton" part="CenterButton">
|
|
427
|
-
<button class="ShowMoreButton" part="ShowMoreButton" on:click="{() => showMoreAction()}" title="Show More">{$_('
|
|
439
|
+
<button class="ShowMoreButton" part="ShowMoreButton" on:click="{() => showMoreAction()}" title="Show More">{$_('showMore')}</button>
|
|
428
440
|
</div>
|
|
429
441
|
</div>
|
|
430
442
|
{/if}
|
package/src/translations.js
CHANGED
|
@@ -1,112 +1,62 @@
|
|
|
1
1
|
export const TRANSLATIONS = {
|
|
2
2
|
"en": {
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"Ongoing": "Ongoing",
|
|
8
|
-
"Finished": "Finished",
|
|
9
|
-
"loading": "Loading, please wait ...",
|
|
10
|
-
"noTournaments": "No tournaments found"
|
|
11
|
-
}
|
|
3
|
+
"500": "500 - Internal server error",
|
|
4
|
+
"showMore": "Show more",
|
|
5
|
+
"loading": "Loading, please wait ...",
|
|
6
|
+
"noTournaments": "No tournaments found"
|
|
12
7
|
},
|
|
13
8
|
"hr": {
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"Ongoing": "U tijeku",
|
|
19
|
-
"Finished": "Završeno",
|
|
20
|
-
"loading": "Učitavanje, molimo pričekajte ...",
|
|
21
|
-
"noTournaments": "Nema pronađenih turnira"
|
|
22
|
-
}
|
|
9
|
+
"500": "500 - Interna pogreška poslužitelja",
|
|
10
|
+
"showMore": "Prikaži više",
|
|
11
|
+
"loading": "Učitavanje, molimo pričekajte ...",
|
|
12
|
+
"noTournaments": "Nema pronađenih turnira"
|
|
23
13
|
},
|
|
24
14
|
"zh-hk": {
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"Ongoing": "進行中",
|
|
30
|
-
"Finished": "完成的",
|
|
31
|
-
"loading": "加載請稍候 ...",
|
|
32
|
-
"noTournaments": "沒有找到比賽"
|
|
33
|
-
}
|
|
15
|
+
"500": "500內部服務器錯誤",
|
|
16
|
+
"showMore": "顯示更多",
|
|
17
|
+
"loading": "加載請稍候 ...",
|
|
18
|
+
"noTournaments": "沒有找到比賽"
|
|
34
19
|
},
|
|
35
20
|
"fr": {
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"Ongoing": "En cours",
|
|
41
|
-
"Finished": "Fini",
|
|
42
|
-
"loading": "Chargement , veuillez patienter ...",
|
|
43
|
-
"noTournaments": "Aucun tournoi trouvé"
|
|
44
|
-
}
|
|
21
|
+
"500": "500 - erreur de serveur interne",
|
|
22
|
+
"showMore": "Afficher plus",
|
|
23
|
+
"loading": "Chargement , veuillez patienter ...",
|
|
24
|
+
"noTournaments": "Aucun tournoi trouvé"
|
|
45
25
|
},
|
|
46
26
|
"ro": {
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"Ongoing": "În curs",
|
|
52
|
-
"Finished": "Finalizat",
|
|
53
|
-
"loading": "Se încarcă, asteptati ...",
|
|
54
|
-
"noTournaments": "Niciun turneu gasit"
|
|
55
|
-
}
|
|
27
|
+
"500": "500 - Internal server error",
|
|
28
|
+
"showMore": "Mai mult",
|
|
29
|
+
"loading": "Se încarcă, asteptati ...",
|
|
30
|
+
"noTournaments": "Niciun turneu gasit"
|
|
56
31
|
},
|
|
57
32
|
"tr": {
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"Ongoing": "Devam ediyor",
|
|
63
|
-
"Finished": "Tamamlanmış",
|
|
64
|
-
"loading": "Yükleniyor, lütfen bekleyin ...",
|
|
65
|
-
"noTournaments": "Turnuva bulunamadı"
|
|
66
|
-
}
|
|
33
|
+
"500": "500 - Dahili sunucu hatası",
|
|
34
|
+
"showMore": "Daha fazla göster",
|
|
35
|
+
"loading": "Yükleniyor, lütfen bekleyin ...",
|
|
36
|
+
"noTournaments": "Turnuva bulunamadı"
|
|
67
37
|
},
|
|
68
38
|
"el": {
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"Ongoing": "Τρέχοντα",
|
|
74
|
-
"Finished": "Ολοκληρωμένα",
|
|
75
|
-
"loading": "Φορτώνει, παρακαλούμε περιμένετε ...",
|
|
76
|
-
"noTournaments": "Δεν βρέθηκαν τουρνουά"
|
|
77
|
-
}
|
|
39
|
+
"500": "500 - Σφάλμα Διακομιστή",
|
|
40
|
+
"showMore": "Περισσότερα",
|
|
41
|
+
"loading": "Φορτώνει, παρακαλούμε περιμένετε ...",
|
|
42
|
+
"noTournaments": "Δεν βρέθηκαν τουρνουά"
|
|
78
43
|
},
|
|
79
44
|
"es": {
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"Ongoing": "En vivo",
|
|
85
|
-
"Finished": "Finalizado",
|
|
86
|
-
"loading": "Cargando …",
|
|
87
|
-
"noTournaments": "No se encontraron Torneos"
|
|
88
|
-
}
|
|
45
|
+
"500": "500 - Error servidor interno",
|
|
46
|
+
"showMore": "Mostrar más",
|
|
47
|
+
"loading": "Cargando …",
|
|
48
|
+
"noTournaments": "No se encontraron Torneos"
|
|
89
49
|
},
|
|
90
50
|
"hu": {
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"Ongoing": "Folyamatban",
|
|
96
|
-
"Finished": "Befejezett",
|
|
97
|
-
"loading": "Betöltés, kérjük várjon...",
|
|
98
|
-
"noTournaments": "Verseny nem található"
|
|
99
|
-
}
|
|
51
|
+
"500": "500 - Belső szerver hiba",
|
|
52
|
+
"showMore": "Mutass többet",
|
|
53
|
+
"loading": "Betöltés, kérjük várjon...",
|
|
54
|
+
"noTournaments": "Verseny nem található"
|
|
100
55
|
},
|
|
101
56
|
"pt": {
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"Ongoing": "Em progresso",
|
|
107
|
-
"Finished": "Finalizado",
|
|
108
|
-
"loading": "Carregando, por favor espere ...",
|
|
109
|
-
"noTournaments": "Nenhum torneio encontrado"
|
|
110
|
-
}
|
|
57
|
+
"500": "Erro 500 - Erro interno do servidor",
|
|
58
|
+
"showMore": "Ver mais",
|
|
59
|
+
"loading": "Carregando, por favor espere ...",
|
|
60
|
+
"noTournaments": "Nenhum torneio encontrado"
|
|
111
61
|
}
|
|
112
62
|
}
|