latest dev + i18n
This commit is contained in:
@@ -92,6 +92,7 @@ import { followUsersColorStore } from "../../Stores/FollowStore";
|
||||
import Camera = Phaser.Cameras.Scene2D.Camera;
|
||||
import { GameSceneUserInputHandler } from "../UserInput/GameSceneUserInputHandler";
|
||||
import { locale } from "../../i18n/i18n-svelte";
|
||||
import { i18nJson } from "../../i18n/locales";
|
||||
|
||||
export interface GameSceneInitInterface {
|
||||
initPosition: PointInterface | null;
|
||||
@@ -1066,7 +1067,7 @@ export class GameScene extends DirtyScene {
|
||||
);
|
||||
return;
|
||||
}
|
||||
const escapedMessage = HtmlUtils.sanitize(openPopupEvent.message);
|
||||
const escapedMessage = HtmlUtils.sanitize(i18nJson(openPopupEvent.message));
|
||||
let html = `<div id="container" hidden><div class="nes-container with-title is-centered">`;
|
||||
html += escapedMessage;
|
||||
if (openPopupEvent.input) {
|
||||
@@ -1080,7 +1081,9 @@ export class GameScene extends DirtyScene {
|
||||
for (const button of openPopupEvent.buttons) {
|
||||
html += `<button type="button" class="nes-btn is-${HtmlUtils.escapeHtml(
|
||||
button.className ?? ""
|
||||
)}" id="popup-${openPopupEvent.popupId}-${id}">${HtmlUtils.escapeHtml(button.label)}</button>`;
|
||||
)}" id="popup-${openPopupEvent.popupId}-${id}">${HtmlUtils.escapeHtml(
|
||||
i18nJson(button.label)
|
||||
)}</button>`;
|
||||
id++;
|
||||
}
|
||||
html += "</div>";
|
||||
|
||||
Reference in New Issue
Block a user