1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:37:44 +00:00

Base+Userland: Apply Human Interface Guidelines to Object text

Corrects a slew of titles, buttons, labels, menu items and status bars
for capitalization, ellipses and punctuation.

Rewords a few actions and dialogs to use uniform language and
punctuation.
This commit is contained in:
thankyouverycool 2023-05-22 13:07:09 -04:00 committed by Andreas Kling
parent 024360e604
commit 02d94a303c
77 changed files with 195 additions and 188 deletions

View file

@ -368,17 +368,20 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (!should_confirm_close)
return GUI::MessageBox::ExecResult::OK;
Optional<DeprecatedString> close_message;
auto title = "Running Process"sv;
if (tty_has_foreground_process()) {
close_message = "There is still a process running in this terminal. Closing the terminal will kill it.";
close_message = "Close Terminal and kill its foreground process?";
} else {
auto child_process_count = shell_child_process_count();
if (child_process_count > 1)
close_message = DeprecatedString::formatted("There are {} background processes running in this terminal. Closing the terminal may kill them.", child_process_count);
else if (child_process_count == 1)
close_message = "There is a background process running in this terminal. Closing the terminal may kill it.";
if (child_process_count > 1) {
title = "Running Processes"sv;
close_message = DeprecatedString::formatted("Close Terminal and kill its {} background processes?", child_process_count);
} else if (child_process_count == 1) {
close_message = "Close Terminal and kill its background process?";
}
}
if (close_message.has_value())
return GUI::MessageBox::show(window, *close_message, "Close this terminal?"sv, GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::OKCancel);
return GUI::MessageBox::show(window, *close_message, title, GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::OKCancel);
return GUI::MessageBox::ExecResult::OK;
};