Translate game map properties trigger messages
This commit is contained in:
parent
460d67534a
commit
b0c0d22f25
6 changed files with 27 additions and 4 deletions
|
@ -16,6 +16,7 @@ import { JitsiCoWebsite } from "../../WebRtc/CoWebsite/JitsiCoWebsite";
|
||||||
import { audioManagerFileStore, audioManagerVisibilityStore } from "../../Stores/AudioManagerStore";
|
import { audioManagerFileStore, audioManagerVisibilityStore } from "../../Stores/AudioManagerStore";
|
||||||
import { iframeListener } from "../../Api/IframeListener";
|
import { iframeListener } from "../../Api/IframeListener";
|
||||||
import { Room } from "../../Connexion/Room";
|
import { Room } from "../../Connexion/Room";
|
||||||
|
import LL from "../../i18n/i18n-svelte";
|
||||||
|
|
||||||
interface OpenCoWebsite {
|
interface OpenCoWebsite {
|
||||||
actionId: string;
|
actionId: string;
|
||||||
|
@ -40,7 +41,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).trigger.newTab();
|
||||||
}
|
}
|
||||||
layoutManagerActionStore.addAction({
|
layoutManagerActionStore.addAction({
|
||||||
uuid: "openTab",
|
uuid: "openTab",
|
||||||
|
@ -96,7 +97,7 @@ export class GameMapPropertiesListener {
|
||||||
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).trigger.jitsiRoom();
|
||||||
}
|
}
|
||||||
layoutManagerActionStore.addAction({
|
layoutManagerActionStore.addAction({
|
||||||
uuid: "jitsi",
|
uuid: "jitsi",
|
||||||
|
@ -265,7 +266,7 @@ export class GameMapPropertiesListener {
|
||||||
websiteTriggerProperty === ON_ACTION_TRIGGER_BUTTON
|
websiteTriggerProperty === ON_ACTION_TRIGGER_BUTTON
|
||||||
) {
|
) {
|
||||||
if (!websiteTriggerMessageProperty) {
|
if (!websiteTriggerMessageProperty) {
|
||||||
websiteTriggerMessageProperty = "Press SPACE or touch here to open web site";
|
websiteTriggerMessageProperty = get(LL).trigger.cowebsite();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.coWebsitesActionTriggerByLayer.set(layer, actionId);
|
this.coWebsitesActionTriggerByLayer.set(layer, actionId);
|
||||||
|
|
|
@ -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 trigger from "./trigger";
|
||||||
|
|
||||||
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,
|
||||||
|
trigger,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default en_US;
|
export default en_US;
|
||||||
|
|
9
front/src/i18n/en-US/trigger.ts
Normal file
9
front/src/i18n/en-US/trigger.ts
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
import type { BaseTranslation } from "../i18n-types";
|
||||||
|
|
||||||
|
const trigger: BaseTranslation = {
|
||||||
|
cowebsite: "Press SPACE or touch here to open web site",
|
||||||
|
jitsiRoom: "Press SPACE or touch here to enter Jitsi Meet room",
|
||||||
|
newTab: "Press SPACE or touch here to open web site in new tab",
|
||||||
|
};
|
||||||
|
|
||||||
|
export default trigger;
|
|
@ -12,6 +12,7 @@ import menu from "./menu";
|
||||||
import report from "./report";
|
import report from "./report";
|
||||||
import warning from "./warning";
|
import warning from "./warning";
|
||||||
import woka from "./woka";
|
import woka from "./woka";
|
||||||
|
import trigger from "./trigger";
|
||||||
|
|
||||||
const fr_FR: Translation = {
|
const fr_FR: Translation = {
|
||||||
...en_US,
|
...en_US,
|
||||||
|
@ -29,6 +30,7 @@ const fr_FR: Translation = {
|
||||||
report,
|
report,
|
||||||
warning,
|
warning,
|
||||||
emoji,
|
emoji,
|
||||||
|
trigger,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default fr_FR;
|
export default fr_FR;
|
||||||
|
|
|
@ -63,7 +63,7 @@ const menu: NonNullable<Translation["menu"]> = {
|
||||||
},
|
},
|
||||||
fullscreen: "Plein écran",
|
fullscreen: "Plein écran",
|
||||||
notifications: "Notifications",
|
notifications: "Notifications",
|
||||||
cowebsiteTrigger: "Demander toujours avant d'ouvrir des sites web et des salles de réunion Jitsi",
|
cowebsiteTrigger: "Demander toujours avant d'ouvrir des sites web et des salles de conférence Jitsi",
|
||||||
ignoreFollowRequest: "Ignorer les demandes de suivi des autres utilisateurs",
|
ignoreFollowRequest: "Ignorer les demandes de suivi des autres utilisateurs",
|
||||||
},
|
},
|
||||||
invite: {
|
invite: {
|
||||||
|
|
9
front/src/i18n/fr-FR/trigger.ts
Normal file
9
front/src/i18n/fr-FR/trigger.ts
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
import type { Translation } from "../i18n-types";
|
||||||
|
|
||||||
|
const trigger: NonNullable<Translation["trigger"]> = {
|
||||||
|
cowebsite: "Appuyez sur ESPACE ou ici pour ouvrir le site Web",
|
||||||
|
jitsiRoom: "Appuyez sur ESPACE ou ici pour entrer dans la salle conférence Jitsi",
|
||||||
|
newTab: "Appuyez sur ESPACE ou ici pour ouvrir le site Web dans un nouvel onglet",
|
||||||
|
};
|
||||||
|
|
||||||
|
export default trigger;
|
Loading…
Add table
Add a link
Reference in a new issue