You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use this plugin with a TypeScript template it doesn't load the "i18n" in Scene and shows a console error, but the game works.
Current Behavior
It doesn't translate any text if I create a new text object usign: "this.add.text()" :
this.add this.text(this.cameras.main.width - 15, 40, "word-hello-key")
, but it works if I extend the Phaser.GameObjects.Text class:
console error:
phaser3-template-typescript/src/scripts/scenes/mainScene.ts
./src/scripts/scenes/mainScene.ts
[tsl] ERROR in phaser3-template-typescript/src/scripts/scenes/mainScene.ts(13,10)
TS2339: Property 'i18n' does not exist on type 'MainScene'.
Possible Solution
Maybe I have to load in another way?
Steps to Reproduce (for bugs)
To reproduce just clone this template, https://github.com/yandeu/phaser-project-template , then follow the plugin steps:
1- install plugin npm i --save @koreez/phaser3-i18n
2- import & load plugin in game.ts (add import & plugins.scene into configuration)
3- initialize plugin in
Your Environment
Linux, Chrome Version 83.0.4103.61
The text was updated successfully, but these errors were encountered:
Hi!,
Expected Behavior
When I use this plugin with a TypeScript template it doesn't load the "i18n" in Scene and shows a console error, but the game works.
Current Behavior
It doesn't translate any text if I create a new text object usign: "this.add.text()" :
this.add
this.text(this.cameras.main.width - 15, 40, "word-hello-key")
, but it works if I extend the Phaser.GameObjects.Text class:
TypeScript template:
https://github.com/yandeu/phaser-project-template
console error:
phaser3-template-typescript/src/scripts/scenes/mainScene.ts
./src/scripts/scenes/mainScene.ts
[tsl] ERROR in phaser3-template-typescript/src/scripts/scenes/mainScene.ts(13,10)
TS2339: Property 'i18n' does not exist on type 'MainScene'.
Possible Solution
Maybe I have to load in another way?
Steps to Reproduce (for bugs)
To reproduce just clone this template, https://github.com/yandeu/phaser-project-template , then follow the plugin steps:
1- install plugin
npm i --save @koreez/phaser3-i18n
2- import & load plugin in game.ts (add import &
plugins.scene
into configuration)3- initialize plugin in
Your Environment
Linux, Chrome Version 83.0.4103.61
The text was updated successfully, but these errors were encountered: