@energy8platform/shell 0.2.3 → 0.4.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/dist/html.cjs.js +154 -68
- package/dist/html.cjs.js.map +1 -1
- package/dist/html.d.ts +2 -2
- package/dist/html.esm.js +154 -68
- package/dist/html.esm.js.map +1 -1
- package/dist/index.cjs.js +154 -68
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +154 -68
- package/dist/index.esm.js.map +1 -1
- package/dist/pixi.cjs.js +153 -68
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +2 -2
- package/dist/pixi.esm.js +153 -68
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +4 -1
- package/src/core/i18n.ts +7 -66
- package/src/core/locales.ts +151 -1
- package/src/core/version.ts +1 -1
package/dist/html.cjs.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var social = require('@energy8platform/game-sdk/social');
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* Minimal typed event emitter — internal utility for platform-core.
|
|
5
7
|
*
|
|
@@ -189,7 +191,7 @@ function formatCurrency(value, currency, variableDecimals = false) {
|
|
|
189
191
|
// Keys are the English source strings exactly as they appear at t('…') call sites.
|
|
190
192
|
// Entries within each language block are sorted alphabetically by key for diff stability.
|
|
191
193
|
// 'en' is omitted: the resolver returns the source string unchanged for English.
|
|
192
|
-
const
|
|
194
|
+
const BASE_LOCALES = {
|
|
193
195
|
da: {
|
|
194
196
|
DISCLAIMER: 'Ansvarsfraskrivelse',
|
|
195
197
|
Activate: 'Aktivér',
|
|
@@ -1046,78 +1048,160 @@ const LOCALES = {
|
|
|
1046
1048
|
'Winning shapes': '赢利图形',
|
|
1047
1049
|
},
|
|
1048
1050
|
};
|
|
1051
|
+
// ── Legal disclaimer body (Stake canonical lines) ──────────────────────────────────────────────
|
|
1052
|
+
// Kept in a separate block (grouped per language, not interleaved) because these are long legal
|
|
1053
|
+
// sentences, MACHINE-TRANSLATED and pending native QA. The keys are the exact English source lines
|
|
1054
|
+
// the Stake bridge emits (see @energy8platform/stake-bridge `buildDisclaimer`). The copyright/brand
|
|
1055
|
+
// line ("TM and © {year} Stake Engine.") is deliberately omitted — it renders verbatim.
|
|
1056
|
+
const D = {
|
|
1057
|
+
L1: 'Malfunction voids all wins and plays.',
|
|
1058
|
+
L2: 'A consistent internet connection is required. In the event of a disconnection, reload the game to finish any uncompleted rounds.',
|
|
1059
|
+
L3: 'The expected return is calculated over many plays.',
|
|
1060
|
+
L4: 'The game display is not representative of any physical device and is for illustrative purposes only.',
|
|
1061
|
+
L5: 'Winnings are settled according to the amount received from the Remote Game Server and not from events within the web browser.',
|
|
1062
|
+
};
|
|
1063
|
+
const DISCLAIMER_LOCALES = {
|
|
1064
|
+
da: {
|
|
1065
|
+
[D.L1]: 'Fejlfunktion annullerer alle gevinster og spil.',
|
|
1066
|
+
[D.L2]: 'En stabil internetforbindelse er påkrævet. I tilfælde af en afbrydelse skal du genindlæse spillet for at afslutte eventuelle uafsluttede runder.',
|
|
1067
|
+
[D.L3]: 'Det forventede afkast beregnes over mange spil.',
|
|
1068
|
+
[D.L4]: 'Spillets visning svarer ikke til nogen fysisk enhed og er kun til illustrative formål.',
|
|
1069
|
+
[D.L5]: 'Gevinster afregnes i henhold til det beløb, der modtages fra Remote Game Server, og ikke ud fra hændelser i webbrowseren.',
|
|
1070
|
+
},
|
|
1071
|
+
de: {
|
|
1072
|
+
[D.L1]: 'Eine Fehlfunktion macht alle Gewinne und Spiele ungültig.',
|
|
1073
|
+
[D.L2]: 'Eine stabile Internetverbindung ist erforderlich. Im Falle einer Unterbrechung lade das Spiel neu, um nicht abgeschlossene Runden zu beenden.',
|
|
1074
|
+
[D.L3]: 'Der erwartete Ertrag wird über viele Spiele berechnet.',
|
|
1075
|
+
[D.L4]: 'Die Spieldarstellung entspricht keinem physischen Gerät und dient nur zur Veranschaulichung.',
|
|
1076
|
+
[D.L5]: 'Gewinne werden gemäß dem vom Remote Game Server erhaltenen Betrag abgerechnet und nicht anhand von Ereignissen im Webbrowser.',
|
|
1077
|
+
},
|
|
1078
|
+
es: {
|
|
1079
|
+
[D.L1]: 'Un fallo anula todas las ganancias y jugadas.',
|
|
1080
|
+
[D.L2]: 'Se requiere una conexión a internet estable. En caso de desconexión, vuelve a cargar el juego para terminar las rondas no completadas.',
|
|
1081
|
+
[D.L3]: 'El retorno esperado se calcula a lo largo de muchas jugadas.',
|
|
1082
|
+
[D.L4]: 'La visualización del juego no representa ningún dispositivo físico y tiene fines meramente ilustrativos.',
|
|
1083
|
+
[D.L5]: 'Las ganancias se liquidan según el importe recibido del Remote Game Server y no según los eventos ocurridos en el navegador web.',
|
|
1084
|
+
},
|
|
1085
|
+
fi: {
|
|
1086
|
+
[D.L1]: 'Toimintahäiriö mitätöi kaikki voitot ja pelit.',
|
|
1087
|
+
[D.L2]: 'Vakaa internetyhteys vaaditaan. Jos yhteys katkeaa, lataa peli uudelleen suorittaaksesi keskeneräiset kierrokset loppuun.',
|
|
1088
|
+
[D.L3]: 'Odotettu palautus lasketaan monen pelin perusteella.',
|
|
1089
|
+
[D.L4]: 'Pelin näkymä ei vastaa mitään fyysistä laitetta ja on tarkoitettu vain havainnollistamiseen.',
|
|
1090
|
+
[D.L5]: 'Voitot maksetaan Remote Game Serverin ilmoittaman summan mukaan, ei verkkoselaimen tapahtumien perusteella.',
|
|
1091
|
+
},
|
|
1092
|
+
fr: {
|
|
1093
|
+
[D.L1]: 'Un dysfonctionnement annule tous les gains et les parties.',
|
|
1094
|
+
[D.L2]: 'Une connexion internet stable est requise. En cas de déconnexion, rechargez le jeu pour terminer les tours non achevés.',
|
|
1095
|
+
[D.L3]: 'Le retour attendu est calculé sur de nombreuses parties.',
|
|
1096
|
+
[D.L4]: "L'affichage du jeu ne représente aucun appareil physique et sert uniquement à des fins d'illustration.",
|
|
1097
|
+
[D.L5]: 'Les gains sont réglés en fonction du montant reçu du Remote Game Server et non des événements survenus dans le navigateur web.',
|
|
1098
|
+
},
|
|
1099
|
+
hi: {
|
|
1100
|
+
[D.L1]: 'खराबी सभी जीत और खेलों को रद्द कर देती है।',
|
|
1101
|
+
[D.L2]: 'एक स्थिर इंटरनेट कनेक्शन आवश्यक है। कनेक्शन टूटने की स्थिति में, अधूरे राउंड पूरे करने के लिए गेम को फिर से लोड करें।',
|
|
1102
|
+
[D.L3]: 'अपेक्षित रिटर्न की गणना कई खेलों पर की जाती है।',
|
|
1103
|
+
[D.L4]: 'गेम का प्रदर्शन किसी भौतिक उपकरण का प्रतिनिधित्व नहीं करता और केवल उदाहरण के उद्देश्य से है।',
|
|
1104
|
+
[D.L5]: 'जीत का निपटान Remote Game Server से प्राप्त राशि के अनुसार किया जाता है, न कि वेब ब्राउज़र के भीतर की घटनाओं के आधार पर।',
|
|
1105
|
+
},
|
|
1106
|
+
id: {
|
|
1107
|
+
[D.L1]: 'Malfungsi membatalkan semua kemenangan dan permainan.',
|
|
1108
|
+
[D.L2]: 'Koneksi internet yang stabil diperlukan. Jika terjadi pemutusan koneksi, muat ulang permainan untuk menyelesaikan ronde yang belum selesai.',
|
|
1109
|
+
[D.L3]: 'Perkiraan pengembalian dihitung dari banyak permainan.',
|
|
1110
|
+
[D.L4]: 'Tampilan permainan tidak mewakili perangkat fisik mana pun dan hanya untuk tujuan ilustrasi.',
|
|
1111
|
+
[D.L5]: 'Kemenangan diselesaikan sesuai dengan jumlah yang diterima dari Remote Game Server dan bukan dari peristiwa di dalam peramban web.',
|
|
1112
|
+
},
|
|
1113
|
+
ja: {
|
|
1114
|
+
[D.L1]: '誤作動が発生した場合、すべての勝利とプレイは無効となります。',
|
|
1115
|
+
[D.L2]: '安定したインターネット接続が必要です。接続が切断された場合は、ゲームを再読み込みして未完了のラウンドを終了してください。',
|
|
1116
|
+
[D.L3]: '期待される還元率は多数のプレイにわたって計算されます。',
|
|
1117
|
+
[D.L4]: 'ゲームの表示は物理的な機器を表すものではなく、あくまで説明のためのものです。',
|
|
1118
|
+
[D.L5]: '賞金はウェブブラウザ内のイベントではなく、Remote Game Server から受信した金額に基づいて確定されます。',
|
|
1119
|
+
},
|
|
1120
|
+
ko: {
|
|
1121
|
+
[D.L1]: '오작동이 발생하면 모든 당첨과 플레이가 무효가 됩니다.',
|
|
1122
|
+
[D.L2]: '안정적인 인터넷 연결이 필요합니다. 연결이 끊긴 경우 게임을 새로 고침하여 완료되지 않은 라운드를 마치십시오.',
|
|
1123
|
+
[D.L3]: '예상 환급률은 여러 번의 플레이에 걸쳐 계산됩니다.',
|
|
1124
|
+
[D.L4]: '게임 화면은 실제 기기를 나타내지 않으며 설명을 위한 용도로만 제공됩니다.',
|
|
1125
|
+
[D.L5]: '당첨금은 웹 브라우저 내의 이벤트가 아니라 Remote Game Server에서 수신한 금액에 따라 정산됩니다.',
|
|
1126
|
+
},
|
|
1127
|
+
pl: {
|
|
1128
|
+
[D.L1]: 'Awaria unieważnia wszystkie wygrane i gry.',
|
|
1129
|
+
[D.L2]: 'Wymagane jest stabilne połączenie internetowe. W przypadku rozłączenia załaduj grę ponownie, aby dokończyć niezakończone rundy.',
|
|
1130
|
+
[D.L3]: 'Oczekiwany zwrot jest obliczany na przestrzeni wielu gier.',
|
|
1131
|
+
[D.L4]: 'Wyświetlanie gry nie odzwierciedla żadnego fizycznego urządzenia i służy wyłącznie celom ilustracyjnym.',
|
|
1132
|
+
[D.L5]: 'Wygrane są rozliczane zgodnie z kwotą otrzymaną z Remote Game Server, a nie na podstawie zdarzeń w przeglądarce internetowej.',
|
|
1133
|
+
},
|
|
1134
|
+
pt: {
|
|
1135
|
+
[D.L1]: 'Uma falha anula todos os ganhos e jogadas.',
|
|
1136
|
+
[D.L2]: 'É necessária uma ligação à internet estável. Em caso de desconexão, recarregue o jogo para concluir as rondas não terminadas.',
|
|
1137
|
+
[D.L3]: 'O retorno esperado é calculado ao longo de muitas jogadas.',
|
|
1138
|
+
[D.L4]: 'A apresentação do jogo não representa nenhum dispositivo físico e destina-se apenas a fins ilustrativos.',
|
|
1139
|
+
[D.L5]: 'Os ganhos são liquidados de acordo com o valor recebido do Remote Game Server e não com base em eventos ocorridos no navegador web.',
|
|
1140
|
+
},
|
|
1141
|
+
ru: {
|
|
1142
|
+
[D.L1]: 'Сбой аннулирует все выигрыши и игры.',
|
|
1143
|
+
[D.L2]: 'Требуется стабильное интернет-соединение. В случае разрыва соединения перезагрузите игру, чтобы завершить незаконченные раунды.',
|
|
1144
|
+
[D.L3]: 'Ожидаемый возврат рассчитывается на основе множества игр.',
|
|
1145
|
+
[D.L4]: 'Отображение игры не соответствует какому-либо физическому устройству и приводится исключительно в иллюстративных целях.',
|
|
1146
|
+
[D.L5]: 'Выигрыши начисляются в соответствии с суммой, полученной от Remote Game Server, а не на основе событий в веб-браузере.',
|
|
1147
|
+
},
|
|
1148
|
+
tr: {
|
|
1149
|
+
[D.L1]: 'Arıza, tüm kazançları ve oyunları geçersiz kılar.',
|
|
1150
|
+
[D.L2]: 'Kararlı bir internet bağlantısı gereklidir. Bağlantının kesilmesi durumunda, tamamlanmamış turları bitirmek için oyunu yeniden yükleyin.',
|
|
1151
|
+
[D.L3]: 'Beklenen getiri, çok sayıda oyun üzerinden hesaplanır.',
|
|
1152
|
+
[D.L4]: 'Oyun görüntüsü herhangi bir fiziksel cihazı temsil etmez ve yalnızca açıklama amaçlıdır.',
|
|
1153
|
+
[D.L5]: "Kazançlar, web tarayıcısındaki olaylara göre değil, Remote Game Server'dan alınan tutara göre ödenir.",
|
|
1154
|
+
},
|
|
1155
|
+
vi: {
|
|
1156
|
+
[D.L1]: 'Sự cố sẽ hủy bỏ mọi phần thắng và lượt chơi.',
|
|
1157
|
+
[D.L2]: 'Cần có kết nối internet ổn định. Trong trường hợp mất kết nối, hãy tải lại trò chơi để hoàn tất các vòng chưa hoàn thành.',
|
|
1158
|
+
[D.L3]: 'Lợi nhuận kỳ vọng được tính trên nhiều lượt chơi.',
|
|
1159
|
+
[D.L4]: 'Hiển thị của trò chơi không đại diện cho bất kỳ thiết bị vật lý nào và chỉ nhằm mục đích minh họa.',
|
|
1160
|
+
[D.L5]: 'Phần thắng được thanh toán theo số tiền nhận được từ Remote Game Server chứ không dựa trên các sự kiện trong trình duyệt web.',
|
|
1161
|
+
},
|
|
1162
|
+
zh: {
|
|
1163
|
+
[D.L1]: '故障将使所有奖金和游戏无效。',
|
|
1164
|
+
[D.L2]: '需要稳定的网络连接。如果连接中断,请重新加载游戏以完成未结束的回合。',
|
|
1165
|
+
[D.L3]: '预期回报是根据多次游戏计算得出的。',
|
|
1166
|
+
[D.L4]: '游戏显示并不代表任何实体设备,仅供说明之用。',
|
|
1167
|
+
[D.L5]: '奖金根据从 Remote Game Server 收到的金额结算,而非依据网页浏览器内的事件。',
|
|
1168
|
+
},
|
|
1169
|
+
};
|
|
1170
|
+
// ── Replay summary labels ──────────────────────────────────────────────────────────────────────
|
|
1171
|
+
// The replay modal (html + pixi) renders these row labels via host.t(); grouped here (merged into
|
|
1172
|
+
// LOCALES below) so the whole replay screen localizes. Terminology matches the base Bet/Win keys.
|
|
1173
|
+
const REPLAY_LOCALES = {
|
|
1174
|
+
da: { Mode: 'Tilstand', 'Base bet': 'Grundindsats', 'Cost multiplier': 'Omkostningsmultiplikator', 'Total cost': 'Samlede omkostninger', 'Win multiplier': 'Gevinstmultiplikator' },
|
|
1175
|
+
de: { Mode: 'Modus', 'Base bet': 'Grundeinsatz', 'Cost multiplier': 'Kostenmultiplikator', 'Total cost': 'Gesamtkosten', 'Win multiplier': 'Gewinnmultiplikator' },
|
|
1176
|
+
es: { Mode: 'Modo', 'Base bet': 'Apuesta base', 'Cost multiplier': 'Multiplicador de coste', 'Total cost': 'Coste total', 'Win multiplier': 'Multiplicador de premio' },
|
|
1177
|
+
fi: { Mode: 'Tila', 'Base bet': 'Peruspanos', 'Cost multiplier': 'Kustannuskerroin', 'Total cost': 'Kokonaiskustannus', 'Win multiplier': 'Voittokerroin' },
|
|
1178
|
+
fr: { Mode: 'Mode', 'Base bet': 'Mise de base', 'Cost multiplier': 'Multiplicateur de coût', 'Total cost': 'Coût total', 'Win multiplier': 'Multiplicateur de gain' },
|
|
1179
|
+
hi: { Mode: 'मोड', 'Base bet': 'आधार दांव', 'Cost multiplier': 'लागत गुणक', 'Total cost': 'कुल लागत', 'Win multiplier': 'जीत गुणक' },
|
|
1180
|
+
id: { Mode: 'Mode', 'Base bet': 'Taruhan dasar', 'Cost multiplier': 'Pengganda biaya', 'Total cost': 'Total biaya', 'Win multiplier': 'Pengganda kemenangan' },
|
|
1181
|
+
ja: { Mode: 'モード', 'Base bet': '基本ベット', 'Cost multiplier': 'コスト倍率', 'Total cost': '合計コスト', 'Win multiplier': '当選倍率' },
|
|
1182
|
+
ko: { Mode: '모드', 'Base bet': '기본 베팅', 'Cost multiplier': '비용 배수', 'Total cost': '총 비용', 'Win multiplier': '당첨 배수' },
|
|
1183
|
+
pl: { Mode: 'Tryb', 'Base bet': 'Zakład podstawowy', 'Cost multiplier': 'Mnożnik kosztu', 'Total cost': 'Całkowity koszt', 'Win multiplier': 'Mnożnik wygranej' },
|
|
1184
|
+
pt: { Mode: 'Modo', 'Base bet': 'Aposta base', 'Cost multiplier': 'Multiplicador de custo', 'Total cost': 'Custo total', 'Win multiplier': 'Multiplicador de ganho' },
|
|
1185
|
+
ru: { Mode: 'Режим', 'Base bet': 'Базовая ставка', 'Cost multiplier': 'Множитель стоимости', 'Total cost': 'Общая стоимость', 'Win multiplier': 'Множитель выигрыша' },
|
|
1186
|
+
tr: { Mode: 'Mod', 'Base bet': 'Temel bahis', 'Cost multiplier': 'Maliyet çarpanı', 'Total cost': 'Toplam maliyet', 'Win multiplier': 'Kazanç çarpanı' },
|
|
1187
|
+
vi: { Mode: 'Chế độ', 'Base bet': 'Cược cơ bản', 'Cost multiplier': 'Hệ số chi phí', 'Total cost': 'Tổng chi phí', 'Win multiplier': 'Hệ số thắng' },
|
|
1188
|
+
zh: { Mode: '模式', 'Base bet': '基础投注', 'Cost multiplier': '成本倍数', 'Total cost': '总成本', 'Win multiplier': '奖金倍数' },
|
|
1189
|
+
};
|
|
1190
|
+
/** Merge the base UI catalog with the separately-authored disclaimer + replay lines, per language. */
|
|
1191
|
+
const LOCALES = Object.fromEntries(Object.keys(BASE_LOCALES).map((l) => [
|
|
1192
|
+
l,
|
|
1193
|
+
{ ...BASE_LOCALES[l], ...DISCLAIMER_LOCALES[l], ...REPLAY_LOCALES[l] },
|
|
1194
|
+
]));
|
|
1049
1195
|
|
|
1050
1196
|
// Social-casino language. English is the source (and, for now, the only) language; `socialize`
|
|
1051
1197
|
// rewrites the restricted gambling vocabulary into social-safe phrasing while preserving case.
|
|
1052
1198
|
//
|
|
1053
|
-
//
|
|
1054
|
-
//
|
|
1055
|
-
//
|
|
1056
|
-
//
|
|
1057
|
-
// Conflicting duplicates in the source table are resolved to a single replacement here
|
|
1058
|
-
// (betting→playing, total bet→total play, paid out→won, pays out→win).
|
|
1059
|
-
const RULES = [
|
|
1060
|
-
['be awarded to player’s accounts', 'appear in player’s accounts'],
|
|
1061
|
-
["be awarded to player's accounts", "appear in player's accounts"],
|
|
1062
|
-
['place your bets', 'come and play / join in the game'],
|
|
1063
|
-
['at the cost of', 'for'],
|
|
1064
|
-
['cost of', 'can be played for'],
|
|
1065
|
-
['win feature', 'play feature'],
|
|
1066
|
-
['total bet', 'total play'],
|
|
1067
|
-
['buy bonus', 'get bonus'],
|
|
1068
|
-
['bonus buy', 'bonus / feature'],
|
|
1069
|
-
['pay out', 'win / won'],
|
|
1070
|
-
['paid out', 'won'],
|
|
1071
|
-
['pays out', 'win'],
|
|
1072
|
-
['payout', 'win'], // single word; "pay out" (spaced) is handled above
|
|
1073
|
-
['paytable', 'win table'],
|
|
1074
|
-
['paylines', 'winlines'],
|
|
1075
|
-
['payline', 'winline'],
|
|
1076
|
-
['bet/s', 'play/s'],
|
|
1077
|
-
['betting', 'playing'],
|
|
1078
|
-
['rebet', 'respin'],
|
|
1079
|
-
['stake', 'play amount'],
|
|
1080
|
-
['payer', 'winner'],
|
|
1081
|
-
['bets', 'plays'],
|
|
1082
|
-
['pays', 'wins'],
|
|
1083
|
-
['paid', 'won'],
|
|
1084
|
-
['bought', 'instantly triggered'],
|
|
1085
|
-
['purchase', 'play'],
|
|
1086
|
-
['price', 'play'],
|
|
1087
|
-
['cost', 'play'], // standalone; the "cost of" / "at the cost of" phrases above win first
|
|
1088
|
-
['deposit', 'get coins'],
|
|
1089
|
-
['withdraw', 'redeem'],
|
|
1090
|
-
['currency', 'token'],
|
|
1091
|
-
['gamble', 'play'],
|
|
1092
|
-
['wager', 'play'],
|
|
1093
|
-
['credit', 'balance'],
|
|
1094
|
-
['money', 'coins'],
|
|
1095
|
-
['cash', 'coins'],
|
|
1096
|
-
['fund', 'balance'],
|
|
1097
|
-
['bet', 'play'],
|
|
1098
|
-
['pay', 'win'],
|
|
1099
|
-
['buy', 'play'],
|
|
1100
|
-
];
|
|
1101
|
-
const MAP = new Map(RULES.map(([k, v]) => [k.toLowerCase(), v]));
|
|
1102
|
-
const escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\/]/g, '\\$&');
|
|
1103
|
-
// Letter-bounded so we only swap whole words/phrases (e.g. "pay" inside "Autoplay" is left alone).
|
|
1104
|
-
const PATTERN = new RegExp(`(?<![A-Za-z])(?:${RULES.map(([k]) => escapeRe(k)).join('|')})(?![A-Za-z])`, 'gi');
|
|
1105
|
-
/** Carry the matched text's capitalisation onto the replacement: ALL CAPS → upper, Capitalised
|
|
1106
|
-
* (first letter) → capitalise the replacement's first letter, otherwise lower-case as written. */
|
|
1107
|
-
function applyCase(match, repl) {
|
|
1108
|
-
const letters = match.replace(/[^A-Za-z]/g, '');
|
|
1109
|
-
if (letters && letters === letters.toUpperCase())
|
|
1110
|
-
return repl.toUpperCase();
|
|
1111
|
-
if (/^[^A-Za-z]*[A-Z]/.test(match))
|
|
1112
|
-
return repl.charAt(0).toUpperCase() + repl.slice(1);
|
|
1113
|
-
return repl;
|
|
1114
|
-
}
|
|
1199
|
+
// The replacement dictionary is NOT kept here — it lives in the platform-wide canonical module
|
|
1200
|
+
// `@energy8platform/game-sdk/social`, the same table the game canvas and the Stake bridge use, so
|
|
1201
|
+
// the chrome never drifts from the games. Modelled as the `en-social` pseudo-locale in createI18n.
|
|
1115
1202
|
/** Rewrite restricted gambling terms in `text` to social-safe phrasing, preserving case. */
|
|
1116
1203
|
function socialize(text) {
|
|
1117
|
-
return
|
|
1118
|
-
const repl = MAP.get(m.toLowerCase());
|
|
1119
|
-
return repl == null ? m : applyCase(m, repl);
|
|
1120
|
-
});
|
|
1204
|
+
return social.applySocialReplacements(text);
|
|
1121
1205
|
}
|
|
1122
1206
|
const LANGS = ['de', 'en', 'es', 'fi', 'fr', 'hi', 'id', 'ja', 'ko', 'pl', 'pt', 'ru', 'tr', 'vi', 'zh', 'da'];
|
|
1123
1207
|
const LANG_SET = new Set(LANGS);
|
|
@@ -1126,6 +1210,8 @@ function normalizeLang(code) {
|
|
|
1126
1210
|
return (LANG_SET.has(base) ? base : 'en');
|
|
1127
1211
|
}
|
|
1128
1212
|
function createI18n(opts) {
|
|
1213
|
+
// Social is the `en-social` pseudo-locale: it rewrites the English source. Non-English locales are
|
|
1214
|
+
// authored social-safe already, so `socialize` only runs on the English source string.
|
|
1129
1215
|
const lang = normalizeLang(opts.language);
|
|
1130
1216
|
const t = (src) => {
|
|
1131
1217
|
if (lang === 'en')
|
|
@@ -1352,7 +1438,7 @@ class KeyboardController {
|
|
|
1352
1438
|
|
|
1353
1439
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1354
1440
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1355
|
-
const PACKAGE_VERSION = '0.
|
|
1441
|
+
const PACKAGE_VERSION = '0.4.0';
|
|
1356
1442
|
|
|
1357
1443
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1358
1444
|
function resolveConfig(config) {
|