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 { GameMapProperties } from "./GameMapProperties";
|
||||||
import { iframeListener } from "../../Api/IframeListener";
|
import { iframeListener } from "../../Api/IframeListener";
|
||||||
import type { Subscription } from "rxjs";
|
import type { Subscription } from "rxjs";
|
||||||
|
import { LL } from "../../i18n/i18n-svelte";
|
||||||
|
|
||||||
enum OpenCoWebsiteState {
|
enum OpenCoWebsiteState {
|
||||||
LOADING,
|
LOADING,
|
||||||
@ -42,7 +43,7 @@ export class GameMapPropertiesListener {
|
|||||||
if (forceTrigger || openWebsiteTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
if (forceTrigger || openWebsiteTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
||||||
let message = allProps.get(GameMapProperties.OPEN_WEBSITE_TRIGGER_MESSAGE);
|
let message = allProps.get(GameMapProperties.OPEN_WEBSITE_TRIGGER_MESSAGE);
|
||||||
if (message === undefined) {
|
if (message === undefined) {
|
||||||
message = "Press SPACE or touch here to open web site in new tab";
|
message = get(LL).message.openWebsiteTabTrigger();
|
||||||
}
|
}
|
||||||
layoutManagerActionStore.addAction({
|
layoutManagerActionStore.addAction({
|
||||||
uuid: "openTab",
|
uuid: "openTab",
|
||||||
@ -144,7 +145,7 @@ export class GameMapPropertiesListener {
|
|||||||
|
|
||||||
const createWebsiteTrigger = () => {
|
const createWebsiteTrigger = () => {
|
||||||
if (!websiteTriggerMessageProperty) {
|
if (!websiteTriggerMessageProperty) {
|
||||||
websiteTriggerMessageProperty = "Press SPACE or touch here to open web site";
|
websiteTriggerMessageProperty = get(LL).message.openWebsiteTrigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.coWebsitesOpenByLayer.set(layer, {
|
this.coWebsitesOpenByLayer.set(layer, {
|
||||||
|
@ -91,7 +91,7 @@ import { MapStore } from "../../Stores/Utils/MapStore";
|
|||||||
import { followUsersColorStore } from "../../Stores/FollowStore";
|
import { followUsersColorStore } from "../../Stores/FollowStore";
|
||||||
import Camera = Phaser.Cameras.Scene2D.Camera;
|
import Camera = Phaser.Cameras.Scene2D.Camera;
|
||||||
import { GameSceneUserInputHandler } from "../UserInput/GameSceneUserInputHandler";
|
import { GameSceneUserInputHandler } from "../UserInput/GameSceneUserInputHandler";
|
||||||
import { locale } from "../../i18n/i18n-svelte";
|
import { locale, LL } from "../../i18n/i18n-svelte";
|
||||||
import { i18nJson } from "../../i18n/locales";
|
import { i18nJson } from "../../i18n/locales";
|
||||||
|
|
||||||
export interface GameSceneInitInterface {
|
export interface GameSceneInitInterface {
|
||||||
@ -1001,7 +1001,7 @@ export class GameScene extends DirtyScene {
|
|||||||
if (forceTrigger || jitsiTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
if (forceTrigger || jitsiTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
||||||
let message = allProps.get(GameMapProperties.JITSI_TRIGGER_MESSAGE);
|
let message = allProps.get(GameMapProperties.JITSI_TRIGGER_MESSAGE);
|
||||||
if (message === undefined) {
|
if (message === undefined) {
|
||||||
message = "Press SPACE or touch here to enter Jitsi Meet room";
|
message = get(LL).message.openJitsiTrigger();
|
||||||
}
|
}
|
||||||
layoutManagerActionStore.addAction({
|
layoutManagerActionStore.addAction({
|
||||||
uuid: "jitsi",
|
uuid: "jitsi",
|
||||||
|
@ -8,6 +8,7 @@ import error from "./error";
|
|||||||
import follow from "./follow";
|
import follow from "./follow";
|
||||||
import login from "./login";
|
import login from "./login";
|
||||||
import menu from "./menu";
|
import menu from "./menu";
|
||||||
|
import message from "./message";
|
||||||
import report from "./report";
|
import report from "./report";
|
||||||
import warning from "./warning";
|
import warning from "./warning";
|
||||||
import woka from "./woka";
|
import woka from "./woka";
|
||||||
@ -29,6 +30,7 @@ const de_DE: Translation = {
|
|||||||
report,
|
report,
|
||||||
warning,
|
warning,
|
||||||
emoji,
|
emoji,
|
||||||
|
message,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default de_DE;
|
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 report from "./report";
|
||||||
import warning from "./warning";
|
import warning from "./warning";
|
||||||
import emoji from "./emoji";
|
import emoji from "./emoji";
|
||||||
|
import message from "./message";
|
||||||
|
|
||||||
const en_US: BaseTranslation = {
|
const en_US: BaseTranslation = {
|
||||||
language: "English",
|
language: "English",
|
||||||
@ -27,6 +28,7 @@ const en_US: BaseTranslation = {
|
|||||||
report,
|
report,
|
||||||
warning,
|
warning,
|
||||||
emoji,
|
emoji,
|
||||||
|
message,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default en_US;
|
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