Replace cookie by local storage to store language
This commit is contained in:
parent
8286cdd41d
commit
41ef9fd49f
5 changed files with 10 additions and 34 deletions
|
@ -76,7 +76,7 @@ import { userIsAdminStore } from "../../Stores/GameStore";
|
|||
import { contactPageStore } from "../../Stores/MenuStore";
|
||||
import type { WasCameraUpdatedEvent } from "../../Api/Events/WasCameraUpdatedEvent";
|
||||
import { audioManagerFileStore, audioManagerVisibilityStore } from "../../Stores/AudioManagerStore";
|
||||
import { Translator } from "../../Translator/Translator";
|
||||
import { translator } from "../../Translator/Translator";
|
||||
|
||||
import EVENT_TYPE = Phaser.Scenes.Events;
|
||||
import Texture = Phaser.Textures.Texture;
|
||||
|
@ -212,7 +212,6 @@ export class GameScene extends DirtyScene {
|
|||
private loader: Loader;
|
||||
private lastCameraEvent: WasCameraUpdatedEvent | undefined;
|
||||
private firstCameraUpdateSent: boolean = false;
|
||||
private translator: Translator;
|
||||
|
||||
constructor(private room: Room, MapUrlFile: string, customKey?: string | undefined) {
|
||||
super({
|
||||
|
@ -232,7 +231,6 @@ export class GameScene extends DirtyScene {
|
|||
this.connectionAnswerPromiseResolve = resolve;
|
||||
});
|
||||
this.loader = new Loader(this);
|
||||
this.translator = Translator.getInstance();
|
||||
}
|
||||
|
||||
//hook preload scene
|
||||
|
@ -1324,7 +1322,7 @@ ${escapedMessage}
|
|||
startLayerName: this.startPositionCalculator.startLayerName,
|
||||
uuid: localUserStore.getLocalUser()?.uuid,
|
||||
nickname: this.playerName,
|
||||
language: Translator.getStringByLanguage(this.translator.getCurrentLanguage()),
|
||||
language: translator.getStringByLanguage(translator.getCurrentLanguage()),
|
||||
roomId: this.roomUrl,
|
||||
tags: this.connection ? this.connection.getAllTags() : [],
|
||||
variables: this.sharedVariablesManager.variables,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue