mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Cleanup editor translation related methods
- Unify logic for loading editor/property/doc/extractable translations. - Replace legacy `TranslationServer` methods with translation domains for internal translations. - Only pre-create editor/property/doc translation domains in editor builds. - Prevent adding `null` translation. - Fixes potential loading of duplicated editor translations. - Add internal `has_translation_for_locale()` instead of calling `get_loaded_translations().has()`.
This commit is contained in:
parent
8b4b93a82e
commit
3f03260a21
12 changed files with 77 additions and 163 deletions
|
|
@ -71,6 +71,7 @@ public:
|
|||
StringName get_message_from_translations(const String &p_locale, const StringName &p_message, const StringName &p_context) const;
|
||||
StringName get_message_from_translations(const String &p_locale, const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context) const;
|
||||
PackedStringArray get_loaded_locales() const;
|
||||
bool has_translation_for_locale(const String &p_locale) const;
|
||||
HashSet<Ref<Translation>> get_potential_translations(const String &p_locale) const;
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue