godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.61k stars 21.1k forks source link

Cannot use translations in editor plugins #43553

Open devvoid opened 3 years ago

devvoid commented 3 years ago

Godot version: Godot 3.2.3

OS/device including version: Ubuntu 20.04 LTS

Issue description: Translations can't be used in editor plugins, making supporting multiple languages difficult.

Steps to reproduce:

  1. Add a translation file to the project, either through Project Settings or via TranslationServer.add_translation
  2. Attempt to use a translation key
  3. See how it doesn't work in the editor, but DOES work when the game is launched.

Minimal reproduction project: TranslationServerInEditor.zip

Calinou commented 3 years ago

The translation system is only designed to work while the project is running, not in the editor. Therefore, I consider this to be more of a feature request than a bug.

devvoid commented 3 years ago

Ah, gotcha.

Since the editor is translated, is there a way for plugins to use that system?

Calinou commented 3 years ago

Since the editor is translated, is there a way for plugins to use that system?

It works using .po files included at compile-time in the editor binary, so no.

AnidemDex commented 3 years ago

I've opened a similar issue on #46271 and made a plugin as a workaround for that (wich is being used on some plugins)