File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -504,10 +504,10 @@ String TranslationServer::get_tool_locale() {
504504#ifdef TOOLS_ENABLED
505505 if (Engine::get_singleton ()->is_editor_hint () || Engine::get_singleton ()->is_project_manager_hint ()) {
506506 const PackedStringArray &locales = editor_domain->get_loaded_locales ();
507- if (locales.is_empty ( )) {
508- return " en " ;
507+ if (locales.has (locale )) {
508+ return locale ;
509509 }
510- return locales[ 0 ] ;
510+ return " en " ;
511511 } else {
512512#else
513513 {
Original file line number Diff line number Diff line change @@ -658,6 +658,10 @@ bool EditorNode::_is_project_data_missing() {
658658
659659void EditorNode::_notification (int p_what) {
660660 switch (p_what) {
661+ case NOTIFICATION_TRANSLATION_CHANGED: {
662+ callable_mp (this , &EditorNode::_titlebar_resized).call_deferred ();
663+ } break ;
664+
661665 case NOTIFICATION_POSTINITIALIZE: {
662666 EditorHelp::generate_doc ();
663667#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED)
Original file line number Diff line number Diff line change @@ -97,6 +97,10 @@ void ProjectManager::_notification(int p_what) {
9797 _titlebar_resized ();
9898 } break ;
9999
100+ case NOTIFICATION_TRANSLATION_CHANGED: {
101+ _titlebar_resized ();
102+ } break ;
103+
100104 case NOTIFICATION_VISIBILITY_CHANGED: {
101105 set_process_shortcut_input (is_visible_in_tree ());
102106 } break ;
You can’t perform that action at this time.
0 commit comments