You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-04 17:04:49 +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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user