diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index e782e1c7096..d9bead1e783 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -4757,6 +4757,12 @@ void EditorInspector::_clear_current_favorites() { void EditorInspector::_notification(int p_what) { switch (p_what) { + case NOTIFICATION_TRANSLATION_CHANGED: { + if (property_name_style == EditorPropertyNameProcessor::STYLE_LOCALIZED) { + update_tree_pending = true; + } + } break; + case NOTIFICATION_THEME_CHANGED: { favorites_category->icon = get_editor_theme_icon(SNAME("Favorites")); @@ -4837,7 +4843,6 @@ void EditorInspector::_notification(int p_what) { } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { - bool needs_update = false; if (!is_sub_inspector() && EditorThemeManager::is_generated_theme_outdated()) { add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree"))); } @@ -4846,16 +4851,12 @@ void EditorInspector::_notification(int p_what) { EditorPropertyNameProcessor::Style style = EditorPropertyNameProcessor::get_settings_style(); if (property_name_style != style) { property_name_style = style; - needs_update = true; + update_tree_pending = true; } } if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/inspector")) { - needs_update = true; - } - - if (needs_update) { - update_tree(); + update_tree_pending = true; } } break; } diff --git a/editor/editor_property_name_processor.cpp b/editor/editor_property_name_processor.cpp index 3055dc494da..1cbb2f3bb54 100644 --- a/editor/editor_property_name_processor.cpp +++ b/editor/editor_property_name_processor.cpp @@ -59,11 +59,7 @@ EditorPropertyNameProcessor::Style EditorPropertyNameProcessor::get_tooltip_styl } bool EditorPropertyNameProcessor::is_localization_available() { - if (!EditorSettings::get_singleton()) { - return false; - } - const Vector forbidden = String("en").split(","); - return !forbidden.has(EDITOR_GET("interface/editor/editor_language")); + return EditorSettings::get_singleton() && EDITOR_GET("interface/editor/editor_language") != "en"; } String EditorPropertyNameProcessor::_capitalize_name(const String &p_name) const { diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 95d6aea6561..3178bab6d95 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -457,8 +457,11 @@ Container *InspectorDock::get_addon_area() { void InspectorDock::_notification(int p_what) { switch (p_what) { + case NOTIFICATION_TRANSLATION_CHANGED: { + update(current); + [[fallthrough]]; + } case NOTIFICATION_THEME_CHANGED: - case NOTIFICATION_TRANSLATION_CHANGED: case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: { resource_new_button->set_button_icon(get_editor_theme_icon(SNAME("New"))); resource_load_button->set_button_icon(get_editor_theme_icon(SNAME("Load")));