Localize unnamed project name in editor window title

(cherry picked from commit 35d087813981d05a699221f6bc7e5c72fc55c665)
This commit is contained in:
Haoyu Qiu 2022-04-11 12:50:10 +08:00 committed by Relintai
parent 794c54a386
commit 0658cad124

View File

@ -370,7 +370,7 @@ void EditorNode::_update_scene_tabs() {
void EditorNode::_update_title() { void EditorNode::_update_title() {
const String appname = ProjectSettings::get_singleton()->get("application/config/name"); const String appname = ProjectSettings::get_singleton()->get("application/config/name");
String title = (appname.empty() ? "Unnamed Project" : appname) + String(" - ") + VERSION_NAME; String title = (appname.empty() ? TTR("Unnamed Project") : appname) + String(" - ") + VERSION_NAME;
const String edited = editor_data.get_edited_scene_root() ? editor_data.get_edited_scene_root()->get_filename() : String(); const String edited = editor_data.get_edited_scene_root() ? editor_data.get_edited_scene_root()->get_filename() : String();
if (!edited.empty()) { if (!edited.empty()) {
// Display the edited scene name before the program name so that it can be seen in the OS task bar. // Display the edited scene name before the program name so that it can be seen in the OS task bar.