Skip to content

Commit 1301343

Browse files
committed
Improve auto-translation of editor's top & bottom bars
- The main menu - The run bar - The update spinner - The bottom panel buttons
1 parent 46c495c commit 1301343

22 files changed

+87
-77
lines changed

editor/editor_audio_buses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ void EditorAudioBuses::_rebuild_buses() {
11071107

11081108
EditorAudioBuses *EditorAudioBuses::register_editor() {
11091109
EditorAudioBuses *audio_buses = memnew(EditorAudioBuses);
1110-
EditorNode::get_bottom_panel()->add_item(TTR("Audio"), audio_buses, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_audio_bottom_panel", TTRC("Toggle Audio Bottom Panel"), KeyModifierMask::ALT | Key::A));
1110+
EditorNode::get_bottom_panel()->add_item(TTRC("Audio"), audio_buses, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_audio_bottom_panel", TTRC("Toggle Audio Bottom Panel"), KeyModifierMask::ALT | Key::A));
11111111
return audio_buses;
11121112
}
11131113

editor/editor_node.cpp

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ void EditorNode::_update_update_spinner() {
10091009
update_popup->set_item_checked(update_popup->get_item_index(SPINNER_UPDATE_WHEN_CHANGED), !update_continuously);
10101010

10111011
if (update_continuously) {
1012-
update_spinner->set_tooltip_text(TTR("Spins when the editor window redraws.\nUpdate Continuously is enabled, which can increase power usage. Click to disable it."));
1012+
update_spinner->set_tooltip_text(TTRC("Spins when the editor window redraws.\nUpdate Continuously is enabled, which can increase power usage. Click to disable it."));
10131013

10141014
// Use a different color for the update spinner when Update Continuously is enabled,
10151015
// as this feature should only be enabled for troubleshooting purposes.
@@ -1018,7 +1018,7 @@ void EditorNode::_update_update_spinner() {
10181018
const bool dark_theme = EditorThemeManager::is_dark_theme();
10191019
update_spinner->set_self_modulate(theme->get_color(SNAME("error_color"), EditorStringName(Editor)) * (dark_theme ? Color(1.1, 1.1, 1.1) : Color(4.25, 4.25, 4.25)));
10201020
} else {
1021-
update_spinner->set_tooltip_text(TTR("Spins when the editor window redraws."));
1021+
update_spinner->set_tooltip_text(TTRC("Spins when the editor window redraws."));
10221022
update_spinner->set_self_modulate(Color(1, 1, 1));
10231023
}
10241024

@@ -7046,7 +7046,8 @@ void EditorNode::_add_renderer_entry(const String &p_renderer_name, bool p_mark_
70467046
item_text = TTR("Compatibility");
70477047
}
70487048
if (p_mark_overridden) {
7049-
item_text += " " + TTR("(Overridden)");
7049+
// TRANSLATORS: The placeholder is the rendering method that has overridden the default one.
7050+
item_text = vformat(TTR("%s (Overridden)"), item_text);
70507051
}
70517052
renderer->add_item(item_text);
70527053
}
@@ -7944,7 +7945,7 @@ EditorNode::EditorNode() {
79447945

79457946
recent_scenes = memnew(PopupMenu);
79467947
recent_scenes->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
7947-
file_menu->add_submenu_node_item(TTR("Open Recent"), recent_scenes, SCENE_OPEN_RECENT);
7948+
file_menu->add_submenu_node_item(TTRC("Open Recent"), recent_scenes, SCENE_OPEN_RECENT);
79487949
recent_scenes->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_open_recent_scene));
79497950

79507951
file_menu->add_separator();
@@ -7961,7 +7962,7 @@ EditorNode::EditorNode() {
79617962

79627963
file_menu->add_separator();
79637964
export_as_menu = memnew(PopupMenu);
7964-
file_menu->add_submenu_node_item(TTR("Export As..."), export_as_menu);
7965+
file_menu->add_submenu_node_item(TTRC("Export As..."), export_as_menu);
79657966
export_as_menu->add_shortcut(ED_SHORTCUT("editor/export_as_mesh_library", TTRC("MeshLibrary...")), FILE_EXPORT_MESH_LIBRARY);
79667967
export_as_menu->connect("index_pressed", callable_mp(this, &EditorNode::_export_as_menu_option));
79677968

@@ -8004,21 +8005,21 @@ EditorNode::EditorNode() {
80048005
project_menu->add_shortcut(ED_GET_SHORTCUT("editor/find_in_files"), PROJECT_FIND_IN_FILES);
80058006

80068007
project_menu->add_separator();
8007-
project_menu->add_item(TTR("Version Control"), PROJECT_VERSION_CONTROL);
8008+
project_menu->add_item(TTRC("Version Control"), PROJECT_VERSION_CONTROL);
80088009

80098010
project_menu->add_separator();
80108011
project_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/export", TTRC("Export..."), Key::NONE, TTRC("Export")), PROJECT_EXPORT);
8011-
project_menu->add_item(TTR("Pack Project as ZIP..."), PROJECT_PACK_AS_ZIP);
8012+
project_menu->add_item(TTRC("Pack Project as ZIP..."), PROJECT_PACK_AS_ZIP);
80128013
#ifndef ANDROID_ENABLED
8013-
project_menu->add_item(TTR("Install Android Build Template..."), PROJECT_INSTALL_ANDROID_SOURCE);
8014-
project_menu->add_item(TTR("Open User Data Folder"), PROJECT_OPEN_USER_DATA_FOLDER);
8014+
project_menu->add_item(TTRC("Install Android Build Template..."), PROJECT_INSTALL_ANDROID_SOURCE);
8015+
project_menu->add_item(TTRC("Open User Data Folder"), PROJECT_OPEN_USER_DATA_FOLDER);
80158016
#endif
80168017

80178018
project_menu->add_separator();
80188019

80198020
tool_menu = memnew(PopupMenu);
80208021
tool_menu->connect("index_pressed", callable_mp(this, &EditorNode::_tool_menu_option));
8021-
project_menu->add_submenu_node_item(TTR("Tools"), tool_menu);
8022+
project_menu->add_submenu_node_item(TTRC("Tools"), tool_menu);
80228023
tool_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/orphan_resource_explorer", TTRC("Orphan Resource Explorer...")), TOOLS_ORPHAN_RESOURCES);
80238024
tool_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/engine_compilation_configuration_editor", TTRC("Engine Compilation Configuration Editor...")), TOOLS_BUILD_PROFILE_MANAGER);
80248025
tool_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/upgrade_project", TTRC("Upgrade Project Files...")), TOOLS_PROJECT_UPGRADE);
@@ -8070,18 +8071,18 @@ EditorNode::EditorNode() {
80708071
settings_menu->add_shortcut(ED_SHORTCUT("editor/command_palette", TTRC("Command Palette..."), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::P), EDITOR_COMMAND_PALETTE);
80718072
settings_menu->add_separator();
80728073

8073-
settings_menu->add_submenu_node_item(TTR("Editor Docks"), editor_dock_manager->get_docks_menu());
8074+
settings_menu->add_submenu_node_item(TTRC("Editor Docks"), editor_dock_manager->get_docks_menu());
80748075

80758076
editor_layouts = memnew(PopupMenu);
8076-
settings_menu->add_submenu_node_item(TTR("Editor Layout"), editor_layouts);
8077+
settings_menu->add_submenu_node_item(TTRC("Editor Layout"), editor_layouts);
80778078
editor_layouts->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_layout_menu_option));
80788079
settings_menu->add_separator();
80798080

80808081
ED_SHORTCUT_AND_COMMAND("editor/take_screenshot", TTRC("Take Screenshot"), KeyModifierMask::CTRL | Key::F12);
80818082
ED_SHORTCUT_OVERRIDE("editor/take_screenshot", "macos", KeyModifierMask::META | Key::F12);
80828083
settings_menu->add_shortcut(ED_GET_SHORTCUT("editor/take_screenshot"), EDITOR_TAKE_SCREENSHOT);
80838084

8084-
settings_menu->set_item_tooltip(-1, TTR("Screenshots are stored in the user data folder (\"user://\")."));
8085+
settings_menu->set_item_tooltip(-1, TTRC("Screenshots are stored in the user data folder (\"user://\")."));
80858086

80868087
ED_SHORTCUT_AND_COMMAND("editor/fullscreen_mode", TTRC("Toggle Fullscreen"), KeyModifierMask::SHIFT | Key::F11);
80878088
ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::F);
@@ -8091,19 +8092,19 @@ EditorNode::EditorNode() {
80918092
#ifndef ANDROID_ENABLED
80928093
if (OS::get_singleton()->get_data_path() == OS::get_singleton()->get_config_path()) {
80938094
// Configuration and data folders are located in the same place (Windows/macOS).
8094-
settings_menu->add_item(TTR("Open Editor Data/Settings Folder"), EDITOR_OPEN_DATA_FOLDER);
8095+
settings_menu->add_item(TTRC("Open Editor Data/Settings Folder"), EDITOR_OPEN_DATA_FOLDER);
80958096
} else {
80968097
// Separate configuration and data folders (Linux).
8097-
settings_menu->add_item(TTR("Open Editor Data Folder"), EDITOR_OPEN_DATA_FOLDER);
8098-
settings_menu->add_item(TTR("Open Editor Settings Folder"), EDITOR_OPEN_CONFIG_FOLDER);
8098+
settings_menu->add_item(TTRC("Open Editor Data Folder"), EDITOR_OPEN_DATA_FOLDER);
8099+
settings_menu->add_item(TTRC("Open Editor Settings Folder"), EDITOR_OPEN_CONFIG_FOLDER);
80998100
}
81008101
settings_menu->add_separator();
81018102
#endif
81028103

8103-
settings_menu->add_item(TTR("Manage Editor Features..."), EDITOR_MANAGE_FEATURE_PROFILES);
8104-
settings_menu->add_item(TTR("Manage Export Templates..."), EDITOR_MANAGE_EXPORT_TEMPLATES);
8104+
settings_menu->add_item(TTRC("Manage Editor Features..."), EDITOR_MANAGE_FEATURE_PROFILES);
8105+
settings_menu->add_item(TTRC("Manage Export Templates..."), EDITOR_MANAGE_EXPORT_TEMPLATES);
81058106
#if !defined(ANDROID_ENABLED) && !defined(WEB_ENABLED)
8106-
settings_menu->add_item(TTR("Configure FBX Importer..."), EDITOR_CONFIGURE_FBX_IMPORTER);
8107+
settings_menu->add_item(TTRC("Configure FBX Importer..."), EDITOR_CONFIGURE_FBX_IMPORTER);
81078108
#endif
81088109

81098110
help_menu = memnew(PopupMenu);
@@ -8156,7 +8157,9 @@ EditorNode::EditorNode() {
81568157
renderer->set_theme_type_variation("TopBarOptionButton");
81578158
renderer->set_fit_to_longest_item(false);
81588159
renderer->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
8159-
renderer->set_tooltip_text(TTR("Choose a rendering method.\n\nNotes:\n- On mobile platforms, the Mobile rendering method is used if Forward+ is selected here.\n- On the web platform, the Compatibility rendering method is always used."));
8160+
renderer->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
8161+
renderer->set_tooltip_auto_translate_mode(AUTO_TRANSLATE_MODE_ALWAYS);
8162+
renderer->set_tooltip_text(TTRC("Choose a rendering method.\n\nNotes:\n- On mobile platforms, the Mobile rendering method is used if Forward+ is selected here.\n- On the web platform, the Compatibility rendering method is always used."));
81608163
renderer->set_accessibility_name(TTRC("Rendering Method"));
81618164

81628165
right_menu_hb->add_child(renderer);
@@ -8220,10 +8223,10 @@ EditorNode::EditorNode() {
82208223
update_spinner->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
82218224
update_spinner->set_accessibility_name(TTRC("Update Mode"));
82228225
PopupMenu *p = update_spinner->get_popup();
8223-
p->add_radio_check_item(TTR("Update Continuously"), SPINNER_UPDATE_CONTINUOUSLY);
8224-
p->add_radio_check_item(TTR("Update When Changed"), SPINNER_UPDATE_WHEN_CHANGED);
8226+
p->add_radio_check_item(TTRC("Update Continuously"), SPINNER_UPDATE_CONTINUOUSLY);
8227+
p->add_radio_check_item(TTRC("Update When Changed"), SPINNER_UPDATE_WHEN_CHANGED);
82258228
p->add_separator();
8226-
p->add_item(TTR("Hide Update Spinner"), SPINNER_UPDATE_SPINNER_HIDE);
8229+
p->add_item(TTRC("Hide Update Spinner"), SPINNER_UPDATE_SPINNER_HIDE);
82278230
_update_update_spinner();
82288231

82298232
// Instantiate and place editor docks.
@@ -8291,7 +8294,7 @@ EditorNode::EditorNode() {
82918294
center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
82928295

82938296
log = memnew(EditorLog);
8294-
Button *output_button = bottom_panel->add_item(TTR("Output"), log, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_output_bottom_panel", TTRC("Toggle Output Bottom Panel"), KeyModifierMask::ALT | Key::O));
8297+
Button *output_button = bottom_panel->add_item(TTRC("Output"), log, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_output_bottom_panel", TTRC("Toggle Output Bottom Panel"), KeyModifierMask::ALT | Key::O));
82958298
log->set_tool_button(output_button);
82968299

82978300
center_split->connect(SceneStringName(resized), callable_mp(this, &EditorNode::_vp_resized));
@@ -8479,8 +8482,8 @@ EditorNode::EditorNode() {
84798482

84808483
vcs_actions_menu = VersionControlEditorPlugin::get_singleton()->get_version_control_actions_panel();
84818484
vcs_actions_menu->connect("index_pressed", callable_mp(this, &EditorNode::_version_control_menu_option));
8482-
vcs_actions_menu->add_item(TTR("Create/Override Version Control Metadata..."), VCS_METADATA);
8483-
vcs_actions_menu->add_item(TTR("Version Control Settings..."), VCS_SETTINGS);
8485+
vcs_actions_menu->add_item(TTRC("Create/Override Version Control Metadata..."), VCS_METADATA);
8486+
vcs_actions_menu->add_item(TTRC("Version Control Settings..."), VCS_SETTINGS);
84848487
project_menu->set_item_submenu_node(project_menu->get_item_index(PROJECT_VERSION_CONTROL), vcs_actions_menu);
84858488

84868489
add_editor_plugin(memnew(AudioBusesEditorPlugin(audio_bus_editor)));

editor/editor_run_native.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ void EditorRunNative::_notification(int p_what) {
8181
}
8282
if (popup->get_item_count() == 0) {
8383
remote_debug->set_disabled(true);
84-
remote_debug->set_tooltip_text(TTR("No Remote Deploy export presets configured."));
84+
remote_debug->set_tooltip_text(TTRC("No Remote Deploy export presets configured."));
8585
} else {
8686
remote_debug->set_disabled(false);
87-
remote_debug->set_tooltip_text(TTR("Remote Deploy"));
87+
remote_debug->set_tooltip_text(TTRC("Remote Deploy"));
8888
}
8989

9090
first = false;
@@ -199,8 +199,9 @@ EditorRunNative::EditorRunNative() {
199199
remote_debug = memnew(MenuButton);
200200
remote_debug->set_flat(false);
201201
remote_debug->set_theme_type_variation("RunBarButton");
202+
remote_debug->get_popup()->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
202203
remote_debug->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorRunNative::start_run_native));
203-
remote_debug->set_tooltip_text(TTR("Remote Deploy"));
204+
remote_debug->set_tooltip_text(TTRC("Remote Deploy"));
204205
remote_debug->set_accessibility_name(TTRC("Remote Deploy"));
205206
remote_debug->set_disabled(true);
206207

editor/gui/editor_bottom_panel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ EditorBottomPanel::EditorBottomPanel() {
306306
item_vbox->add_child(bottom_hbox);
307307

308308
left_button = memnew(Button);
309-
left_button->set_tooltip_text(TTR("Scroll Left\nHold Ctrl to scroll to the begin.\nHold Shift to scroll one page."));
309+
left_button->set_tooltip_text(TTRC("Scroll Left\nHold Ctrl to scroll to the begin.\nHold Shift to scroll one page."));
310310
left_button->set_accessibility_name(TTRC("Scroll Left"));
311311
left_button->set_theme_type_variation("BottomPanelButton");
312312
left_button->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
@@ -323,7 +323,7 @@ EditorBottomPanel::EditorBottomPanel() {
323323
bottom_hbox->add_child(button_scroll);
324324

325325
right_button = memnew(Button);
326-
right_button->set_tooltip_text(TTR("Scroll Right\nHold Ctrl to scroll to the end.\nHold Shift to scroll one page."));
326+
right_button->set_tooltip_text(TTRC("Scroll Right\nHold Ctrl to scroll to the end.\nHold Shift to scroll one page."));
327327
right_button->set_accessibility_name(TTRC("Scroll Right"));
328328
right_button->set_theme_type_variation("BottomPanelButton");
329329
right_button->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
@@ -355,7 +355,7 @@ EditorBottomPanel::EditorBottomPanel() {
355355
pin_button->hide();
356356
pin_button->set_theme_type_variation("FlatMenuButton");
357357
pin_button->set_toggle_mode(true);
358-
pin_button->set_tooltip_text(TTR("Pin Bottom Panel Switching"));
358+
pin_button->set_tooltip_text(TTRC("Pin Bottom Panel Switching"));
359359
pin_button->set_accessibility_name(TTRC("Pin Bottom Panel"));
360360
pin_button->connect(SceneStringName(toggled), callable_mp(this, &EditorBottomPanel::_pin_button_toggled));
361361

editor/gui/editor_run_bar.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ void EditorRunBar::_reset_play_buttons() {
119119

120120
play_button->set_pressed(false);
121121
play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
122-
play_button->set_tooltip_text(TTR("Play the project."));
122+
play_button->set_tooltip_text(TTRC("Play the project."));
123123

124124
play_scene_button->set_pressed(false);
125125
play_scene_button->set_button_icon(get_editor_theme_icon(SNAME("PlayScene")));
126-
play_scene_button->set_tooltip_text(TTR("Play the edited scene."));
126+
play_scene_button->set_tooltip_text(TTRC("Play the edited scene."));
127127

128128
play_custom_scene_button->set_pressed(false);
129129
play_custom_scene_button->set_button_icon(get_editor_theme_icon(SNAME("PlayCustom")));
130-
play_custom_scene_button->set_tooltip_text(TTR("Play a custom scene."));
130+
play_custom_scene_button->set_tooltip_text(TTRC("Play a custom scene."));
131131
}
132132

133133
void EditorRunBar::_update_play_buttons() {
@@ -152,7 +152,7 @@ void EditorRunBar::_update_play_buttons() {
152152
if (active_button) {
153153
active_button->set_pressed(true);
154154
active_button->set_button_icon(get_editor_theme_icon(SNAME("Reload")));
155-
active_button->set_tooltip_text(TTR("Reload the played scene."));
155+
active_button->set_tooltip_text(TTRC("Reload the played scene."));
156156
}
157157
}
158158

@@ -518,6 +518,7 @@ EditorRunBar::EditorRunBar() {
518518

519519
// Use a button for the indicator since it comes with a background panel and pixel perfect centering of an icon.
520520
profiler_autostart_indicator = memnew(Button);
521+
profiler_autostart_indicator->set_tooltip_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
521522
profiler_autostart_indicator->set_icon_alignment(HORIZONTAL_ALIGNMENT_CENTER);
522523
profiler_autostart_indicator->set_focus_mode(FOCUS_ACCESSIBILITY);
523524
profiler_autostart_indicator->set_theme_type_variation("ProfilerAutostartIndicator");
@@ -678,6 +679,6 @@ EditorRunBar::EditorRunBar() {
678679
write_movie_panel->add_child(write_movie_button);
679680
write_movie_button->set_theme_type_variation("RunBarButtonMovieMakerDisabled");
680681
write_movie_button->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
681-
write_movie_button->set_tooltip_text(TTR("Enable Movie Maker mode.\nThe project will run at stable FPS and the visual and audio output will be recorded to a video file."));
682+
write_movie_button->set_tooltip_text(TTRC("Enable Movie Maker mode.\nThe project will run at stable FPS and the visual and audio output will be recorded to a video file."));
682683
write_movie_button->set_accessibility_name(TTRC("Enable Movie Maker Mode"));
683684
}

editor/gui/editor_toaster.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,12 @@ void EditorToaster::_auto_hide_or_free_toasts() {
236236
}
237237

238238
if (toasts.is_empty()) {
239-
main_button->set_tooltip_text(TTR("No notifications."));
239+
main_button->set_tooltip_text(TTRC("No notifications."));
240240
main_button->set_modulate(Color(0.5, 0.5, 0.5));
241241
main_button->set_disabled(true);
242242
set_process_internal(false);
243243
} else {
244-
main_button->set_tooltip_text(TTR("Show notifications."));
244+
main_button->set_tooltip_text(TTRC("Show notifications."));
245245
main_button->set_modulate(Color(1, 1, 1));
246246
main_button->set_disabled(false);
247247
}
@@ -342,6 +342,7 @@ void EditorToaster::_repop_old() {
342342
Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_time, const String &p_tooltip) {
343343
// Create the panel according to the severity.
344344
PanelContainer *panel = memnew(PanelContainer);
345+
panel->set_tooltip_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
345346
panel->set_tooltip_text(p_tooltip);
346347
switch (p_severity) {
347348
case SEVERITY_INFO:
@@ -435,10 +436,12 @@ void EditorToaster::_popup_str(const String &p_message, Severity p_severity, con
435436
hb->add_theme_constant_override("separation", 0);
436437

437438
Label *label = memnew(Label);
439+
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
438440
label->set_focus_mode(FOCUS_ACCESSIBILITY);
439441
hb->add_child(label);
440442

441443
Label *count_label = memnew(Label);
444+
count_label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
442445
hb->add_child(count_label);
443446

444447
control = popup(hb, p_severity, default_message_duration, p_tooltip);
@@ -576,7 +579,7 @@ EditorToaster::EditorToaster() {
576579
// Main button.
577580
main_button = memnew(Button);
578581
main_button->set_accessibility_name(TTRC("Notifications"));
579-
main_button->set_tooltip_text(TTR("No notifications."));
582+
main_button->set_tooltip_text(TTRC("No notifications."));
580583
main_button->set_modulate(Color(0.5, 0.5, 0.5));
581584
main_button->set_disabled(true);
582585
main_button->set_theme_type_variation("FlatMenuButton");
@@ -593,7 +596,7 @@ EditorToaster::EditorToaster() {
593596

594597
disable_notifications_button = memnew(Button);
595598
disable_notifications_button->set_accessibility_name(TTRC("Silence Notifications"));
596-
disable_notifications_button->set_tooltip_text(TTR("Silence the notifications."));
599+
disable_notifications_button->set_tooltip_text(TTRC("Silence the notifications."));
597600
disable_notifications_button->set_flat(true);
598601
disable_notifications_button->connect(SceneStringName(pressed), callable_mp(this, &EditorToaster::_set_notifications_enabled).bind(false));
599602
disable_notifications_panel->add_child(disable_notifications_button);

editor/gui/editor_version_button.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ void EditorVersionButton::_notification(int p_what) {
6464
set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
6565
set_text(_get_version_string(format));
6666
} break;
67+
68+
case NOTIFICATION_TRANSLATION_CHANGED: {
69+
String build_date;
70+
if (GODOT_VERSION_TIMESTAMP > 0) {
71+
build_date = Time::get_singleton()->get_datetime_string_from_unix_time(GODOT_VERSION_TIMESTAMP, true) + " UTC";
72+
} else {
73+
build_date = TTR("(unknown)");
74+
}
75+
set_tooltip_text(vformat(TTR("Git commit date: %s\nClick to copy the version information."), build_date));
76+
} break;
6777
}
6878
}
6979

@@ -74,12 +84,4 @@ void EditorVersionButton::pressed() {
7484
EditorVersionButton::EditorVersionButton(VersionFormat p_format) {
7585
format = p_format;
7686
set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
77-
78-
String build_date;
79-
if (GODOT_VERSION_TIMESTAMP > 0) {
80-
build_date = Time::get_singleton()->get_datetime_string_from_unix_time(GODOT_VERSION_TIMESTAMP, true) + " UTC";
81-
} else {
82-
build_date = TTR("(unknown)");
83-
}
84-
set_tooltip_text(vformat(TTR("Git commit date: %s\nClick to copy the version information."), build_date));
8587
}

0 commit comments

Comments
 (0)