Skip to content

Commit c825fcf

Browse files
committed
Merge pull request #107624 from timothyqiu/top-bottom-atr
Improve auto-translation of editor's top & bottom bars
2 parents 8f6597a + 1301343 commit c825fcf

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
@@ -1049,7 +1049,7 @@ void EditorNode::_update_update_spinner() {
10491049
update_popup->set_item_checked(update_popup->get_item_index(SPINNER_UPDATE_WHEN_CHANGED), !update_continuously);
10501050

10511051
if (update_continuously) {
1052-
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."));
1052+
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."));
10531053

10541054
// Use a different color for the update spinner when Update Continuously is enabled,
10551055
// as this feature should only be enabled for troubleshooting purposes.
@@ -1058,7 +1058,7 @@ void EditorNode::_update_update_spinner() {
10581058
const bool dark_theme = EditorThemeManager::is_dark_theme();
10591059
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)));
10601060
} else {
1061-
update_spinner->set_tooltip_text(TTR("Spins when the editor window redraws."));
1061+
update_spinner->set_tooltip_text(TTRC("Spins when the editor window redraws."));
10621062
update_spinner->set_self_modulate(Color(1, 1, 1));
10631063
}
10641064

@@ -7079,7 +7079,8 @@ void EditorNode::_add_renderer_entry(const String &p_renderer_name, bool p_mark_
70797079
item_text = TTR("Compatibility");
70807080
}
70817081
if (p_mark_overridden) {
7082-
item_text += " " + TTR("(Overridden)");
7082+
// TRANSLATORS: The placeholder is the rendering method that has overridden the default one.
7083+
item_text = vformat(TTR("%s (Overridden)"), item_text);
70837084
}
70847085
renderer->add_item(item_text);
70857086
}
@@ -7977,7 +7978,7 @@ EditorNode::EditorNode() {
79777978

79787979
recent_scenes = memnew(PopupMenu);
79797980
recent_scenes->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
7980-
file_menu->add_submenu_node_item(TTR("Open Recent"), recent_scenes, SCENE_OPEN_RECENT);
7981+
file_menu->add_submenu_node_item(TTRC("Open Recent"), recent_scenes, SCENE_OPEN_RECENT);
79817982
recent_scenes->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_open_recent_scene));
79827983

79837984
file_menu->add_separator();
@@ -7994,7 +7995,7 @@ EditorNode::EditorNode() {
79947995

79957996
file_menu->add_separator();
79967997
export_as_menu = memnew(PopupMenu);
7997-
file_menu->add_submenu_node_item(TTR("Export As..."), export_as_menu);
7998+
file_menu->add_submenu_node_item(TTRC("Export As..."), export_as_menu);
79987999
export_as_menu->add_shortcut(ED_SHORTCUT("editor/export_as_mesh_library", TTRC("MeshLibrary...")), FILE_EXPORT_MESH_LIBRARY);
79998000
export_as_menu->connect("index_pressed", callable_mp(this, &EditorNode::_export_as_menu_option));
80008001

@@ -8037,21 +8038,21 @@ EditorNode::EditorNode() {
80378038
project_menu->add_shortcut(ED_GET_SHORTCUT("editor/find_in_files"), PROJECT_FIND_IN_FILES);
80388039

80398040
project_menu->add_separator();
8040-
project_menu->add_item(TTR("Version Control"), PROJECT_VERSION_CONTROL);
8041+
project_menu->add_item(TTRC("Version Control"), PROJECT_VERSION_CONTROL);
80418042

80428043
project_menu->add_separator();
80438044
project_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/export", TTRC("Export..."), Key::NONE, TTRC("Export")), PROJECT_EXPORT);
8044-
project_menu->add_item(TTR("Pack Project as ZIP..."), PROJECT_PACK_AS_ZIP);
8045+
project_menu->add_item(TTRC("Pack Project as ZIP..."), PROJECT_PACK_AS_ZIP);
80458046
#ifndef ANDROID_ENABLED
8046-
project_menu->add_item(TTR("Install Android Build Template..."), PROJECT_INSTALL_ANDROID_SOURCE);
8047-
project_menu->add_item(TTR("Open User Data Folder"), PROJECT_OPEN_USER_DATA_FOLDER);
8047+
project_menu->add_item(TTRC("Install Android Build Template..."), PROJECT_INSTALL_ANDROID_SOURCE);
8048+
project_menu->add_item(TTRC("Open User Data Folder"), PROJECT_OPEN_USER_DATA_FOLDER);
80488049
#endif
80498050

80508051
project_menu->add_separator();
80518052

80528053
tool_menu = memnew(PopupMenu);
80538054
tool_menu->connect("index_pressed", callable_mp(this, &EditorNode::_tool_menu_option));
8054-
project_menu->add_submenu_node_item(TTR("Tools"), tool_menu);
8055+
project_menu->add_submenu_node_item(TTRC("Tools"), tool_menu);
80558056
tool_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/orphan_resource_explorer", TTRC("Orphan Resource Explorer...")), TOOLS_ORPHAN_RESOURCES);
80568057
tool_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/engine_compilation_configuration_editor", TTRC("Engine Compilation Configuration Editor...")), TOOLS_BUILD_PROFILE_MANAGER);
80578058
tool_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/upgrade_project", TTRC("Upgrade Project Files...")), TOOLS_PROJECT_UPGRADE);
@@ -8103,18 +8104,18 @@ EditorNode::EditorNode() {
81038104
settings_menu->add_shortcut(ED_SHORTCUT("editor/command_palette", TTRC("Command Palette..."), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::P), EDITOR_COMMAND_PALETTE);
81048105
settings_menu->add_separator();
81058106

8106-
settings_menu->add_submenu_node_item(TTR("Editor Docks"), editor_dock_manager->get_docks_menu());
8107+
settings_menu->add_submenu_node_item(TTRC("Editor Docks"), editor_dock_manager->get_docks_menu());
81078108

81088109
editor_layouts = memnew(PopupMenu);
8109-
settings_menu->add_submenu_node_item(TTR("Editor Layout"), editor_layouts);
8110+
settings_menu->add_submenu_node_item(TTRC("Editor Layout"), editor_layouts);
81108111
editor_layouts->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_layout_menu_option));
81118112
settings_menu->add_separator();
81128113

81138114
ED_SHORTCUT_AND_COMMAND("editor/take_screenshot", TTRC("Take Screenshot"), KeyModifierMask::CTRL | Key::F12);
81148115
ED_SHORTCUT_OVERRIDE("editor/take_screenshot", "macos", KeyModifierMask::META | Key::F12);
81158116
settings_menu->add_shortcut(ED_GET_SHORTCUT("editor/take_screenshot"), EDITOR_TAKE_SCREENSHOT);
81168117

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

81198120
ED_SHORTCUT_AND_COMMAND("editor/fullscreen_mode", TTRC("Toggle Fullscreen"), KeyModifierMask::SHIFT | Key::F11);
81208121
ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::F);
@@ -8124,19 +8125,19 @@ EditorNode::EditorNode() {
81248125
#ifndef ANDROID_ENABLED
81258126
if (OS::get_singleton()->get_data_path() == OS::get_singleton()->get_config_path()) {
81268127
// Configuration and data folders are located in the same place (Windows/macOS).
8127-
settings_menu->add_item(TTR("Open Editor Data/Settings Folder"), EDITOR_OPEN_DATA_FOLDER);
8128+
settings_menu->add_item(TTRC("Open Editor Data/Settings Folder"), EDITOR_OPEN_DATA_FOLDER);
81288129
} else {
81298130
// Separate configuration and data folders (Linux).
8130-
settings_menu->add_item(TTR("Open Editor Data Folder"), EDITOR_OPEN_DATA_FOLDER);
8131-
settings_menu->add_item(TTR("Open Editor Settings Folder"), EDITOR_OPEN_CONFIG_FOLDER);
8131+
settings_menu->add_item(TTRC("Open Editor Data Folder"), EDITOR_OPEN_DATA_FOLDER);
8132+
settings_menu->add_item(TTRC("Open Editor Settings Folder"), EDITOR_OPEN_CONFIG_FOLDER);
81328133
}
81338134
settings_menu->add_separator();
81348135
#endif
81358136

8136-
settings_menu->add_item(TTR("Manage Editor Features..."), EDITOR_MANAGE_FEATURE_PROFILES);
8137-
settings_menu->add_item(TTR("Manage Export Templates..."), EDITOR_MANAGE_EXPORT_TEMPLATES);
8137+
settings_menu->add_item(TTRC("Manage Editor Features..."), EDITOR_MANAGE_FEATURE_PROFILES);
8138+
settings_menu->add_item(TTRC("Manage Export Templates..."), EDITOR_MANAGE_EXPORT_TEMPLATES);
81388139
#if !defined(ANDROID_ENABLED) && !defined(WEB_ENABLED)
8139-
settings_menu->add_item(TTR("Configure FBX Importer..."), EDITOR_CONFIGURE_FBX_IMPORTER);
8140+
settings_menu->add_item(TTRC("Configure FBX Importer..."), EDITOR_CONFIGURE_FBX_IMPORTER);
81408141
#endif
81418142

81428143
help_menu = memnew(PopupMenu);
@@ -8189,7 +8190,9 @@ EditorNode::EditorNode() {
81898190
renderer->set_theme_type_variation("TopBarOptionButton");
81908191
renderer->set_fit_to_longest_item(false);
81918192
renderer->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
8192-
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."));
8193+
renderer->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
8194+
renderer->set_tooltip_auto_translate_mode(AUTO_TRANSLATE_MODE_ALWAYS);
8195+
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."));
81938196
renderer->set_accessibility_name(TTRC("Rendering Method"));
81948197

81958198
right_menu_hb->add_child(renderer);
@@ -8253,10 +8256,10 @@ EditorNode::EditorNode() {
82538256
update_spinner->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
82548257
update_spinner->set_accessibility_name(TTRC("Update Mode"));
82558258
PopupMenu *p = update_spinner->get_popup();
8256-
p->add_radio_check_item(TTR("Update Continuously"), SPINNER_UPDATE_CONTINUOUSLY);
8257-
p->add_radio_check_item(TTR("Update When Changed"), SPINNER_UPDATE_WHEN_CHANGED);
8259+
p->add_radio_check_item(TTRC("Update Continuously"), SPINNER_UPDATE_CONTINUOUSLY);
8260+
p->add_radio_check_item(TTRC("Update When Changed"), SPINNER_UPDATE_WHEN_CHANGED);
82588261
p->add_separator();
8259-
p->add_item(TTR("Hide Update Spinner"), SPINNER_UPDATE_SPINNER_HIDE);
8262+
p->add_item(TTRC("Hide Update Spinner"), SPINNER_UPDATE_SPINNER_HIDE);
82608263
_update_update_spinner();
82618264

82628265
// Instantiate and place editor docks.
@@ -8324,7 +8327,7 @@ EditorNode::EditorNode() {
83248327
center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
83258328

83268329
log = memnew(EditorLog);
8327-
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));
8330+
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));
83288331
log->set_tool_button(output_button);
83298332

83308333
center_split->connect(SceneStringName(resized), callable_mp(this, &EditorNode::_vp_resized));
@@ -8512,8 +8515,8 @@ EditorNode::EditorNode() {
85128515

85138516
vcs_actions_menu = VersionControlEditorPlugin::get_singleton()->get_version_control_actions_panel();
85148517
vcs_actions_menu->connect("index_pressed", callable_mp(this, &EditorNode::_version_control_menu_option));
8515-
vcs_actions_menu->add_item(TTR("Create/Override Version Control Metadata..."), VCS_METADATA);
8516-
vcs_actions_menu->add_item(TTR("Version Control Settings..."), VCS_SETTINGS);
8518+
vcs_actions_menu->add_item(TTRC("Create/Override Version Control Metadata..."), VCS_METADATA);
8519+
vcs_actions_menu->add_item(TTRC("Version Control Settings..."), VCS_SETTINGS);
85178520
project_menu->set_item_submenu_node(project_menu->get_item_index(PROJECT_VERSION_CONTROL), vcs_actions_menu);
85188521

85198522
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)