i18n trigger message
This commit is contained in:
parent
55bb6fa930
commit
8c1b55f5db
@ -11,6 +11,7 @@ import type { ITiledMapLayer } from "../Map/ITiledMap";
|
||||
import { GameMapProperties } from "./GameMapProperties";
|
||||
import { iframeListener } from "../../Api/IframeListener";
|
||||
import type { Subscription } from "rxjs";
|
||||
import { LL } from "../../i18n/i18n-svelte";
|
||||
|
||||
enum OpenCoWebsiteState {
|
||||
LOADING,
|
||||
@ -42,7 +43,7 @@ export class GameMapPropertiesListener {
|
||||
if (forceTrigger || openWebsiteTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
||||
let message = allProps.get(GameMapProperties.OPEN_WEBSITE_TRIGGER_MESSAGE);
|
||||
if (message === undefined) {
|
||||
message = "Press SPACE or touch here to open web site in new tab";
|
||||
message = get(LL).message.openWebsiteTabTrigger();
|
||||
}
|
||||
layoutManagerActionStore.addAction({
|
||||
uuid: "openTab",
|
||||
@ -144,7 +145,7 @@ export class GameMapPropertiesListener {
|
||||
|
||||
const createWebsiteTrigger = () => {
|
||||
if (!websiteTriggerMessageProperty) {
|
||||
websiteTriggerMessageProperty = "Press SPACE or touch here to open web site";
|
||||
websiteTriggerMessageProperty = get(LL).message.openWebsiteTrigger();
|
||||
}
|
||||
|
||||
this.coWebsitesOpenByLayer.set(layer, {
|
||||
|
@ -91,7 +91,7 @@ import { MapStore } from "../../Stores/Utils/MapStore";
|
||||
import { followUsersColorStore } from "../../Stores/FollowStore";
|
||||
import Camera = Phaser.Cameras.Scene2D.Camera;
|
||||
import { GameSceneUserInputHandler } from "../UserInput/GameSceneUserInputHandler";
|
||||
import { locale } from "../../i18n/i18n-svelte";
|
||||
import { locale, LL } from "../../i18n/i18n-svelte";
|
||||
import { i18nJson } from "../../i18n/locales";
|
||||
|
||||
export interface GameSceneInitInterface {
|
||||
@ -1001,7 +1001,7 @@ export class GameScene extends DirtyScene {
|
||||
if (forceTrigger || jitsiTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
||||
let message = allProps.get(GameMapProperties.JITSI_TRIGGER_MESSAGE);
|
||||
if (message === undefined) {
|
||||
message = "Press SPACE or touch here to enter Jitsi Meet room";
|
||||
message = get(LL).message.openJitsiTrigger();
|
||||
}
|
||||
layoutManagerActionStore.addAction({
|
||||
uuid: "jitsi",
|
||||
|
@ -8,6 +8,7 @@ import error from "./error";
|
||||
import follow from "./follow";
|
||||
import login from "./login";
|
||||
import menu from "./menu";
|
||||
import message from "./message";
|
||||
import report from "./report";
|
||||
import warning from "./warning";
|
||||
import woka from "./woka";
|
||||
@ -29,6 +30,7 @@ const de_DE: Translation = {
|
||||
report,
|
||||
warning,
|
||||
emoji,
|
||||
message,
|
||||
};
|
||||
|
||||
export default de_DE;
|
||||
|
9
front/src/i18n/de-DE/message.ts
Normal file
9
front/src/i18n/de-DE/message.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import type { Translation } from "../i18n-types";
|
||||
|
||||
const message: NonNullable<Translation["message"]> = {
|
||||
openWebsiteTrigger: "Drücke LEERTASTE oder tippe hier um die Webseite zu öffnen",
|
||||
openWebsiteTabTrigger: "Drücke LEERTASTE oder tippe hier um die Webseite in einem neuen Tab zu öffnen",
|
||||
openJitsiTrigger: "Drücke LEERTASTE oder tippe hier um dem Jitsi Meet Raum beizutreten",
|
||||
};
|
||||
|
||||
export default message;
|
@ -11,6 +11,7 @@ import menu from "./menu";
|
||||
import report from "./report";
|
||||
import warning from "./warning";
|
||||
import emoji from "./emoji";
|
||||
import message from "./message";
|
||||
|
||||
const en_US: BaseTranslation = {
|
||||
language: "English",
|
||||
@ -27,6 +28,7 @@ const en_US: BaseTranslation = {
|
||||
report,
|
||||
warning,
|
||||
emoji,
|
||||
message,
|
||||
};
|
||||
|
||||
export default en_US;
|
||||
|
9
front/src/i18n/en-US/message.ts
Normal file
9
front/src/i18n/en-US/message.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import type { BaseTranslation } from "../i18n-types";
|
||||
|
||||
const message: BaseTranslation = {
|
||||
openWebsiteTrigger: "Press SPACE or touch here to open web site",
|
||||
openWebsiteTabTrigger: "Press SPACE or touch here to open web site in new tab",
|
||||
openJitsiTrigger: "Press SPACE or touch here to enter Jitsi Meet room",
|
||||
};
|
||||
|
||||
export default message;
|
Loading…
Reference in New Issue
Block a user