mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +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
|
|
@ -1327,16 +1327,10 @@ void EditorSettings::setup_language() {
|
|||
TranslationServer::get_singleton()->set_locale(lang);
|
||||
return; // Default, nothing to do.
|
||||
}
|
||||
// Load editor translation for configured/detected locale.
|
||||
|
||||
load_editor_translations(lang);
|
||||
load_property_translations(lang);
|
||||
|
||||
// Load class reference translation.
|
||||
load_doc_translations(lang);
|
||||
|
||||
// Load extractable translation for projects.
|
||||
load_extractable_translations(lang);
|
||||
|
||||
TranslationServer::get_singleton()->set_locale(lang);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue