diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2023-05-22 13:07:09 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-23 05:59:49 +0200 |
commit | 02d94a303c8c8329061e990dbe2e9914fae19965 (patch) | |
tree | 3277fa8de6c3b63adcca228269a4f6bacbc963bb /Userland/DevTools/HackStudio | |
parent | 024360e6049c7912cc4000833ba2876fef1b2b32 (diff) | |
download | serenity-02d94a303c8c8329061e990dbe2e9914fae19965.zip |
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.
Diffstat (limited to 'Userland/DevTools/HackStudio')
4 files changed, 23 insertions, 23 deletions
diff --git a/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp b/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp index ecc2ad0d76..64bc8648dc 100644 --- a/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp +++ b/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp @@ -47,7 +47,7 @@ NewProjectDialog::NewProjectDialog(GUI::Window* parent) resize(500, 385); center_on_screen(); set_resizable(false); - set_title("New project"); + set_title("New Project"); auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors(); main_widget->load_from_gml(new_project_dialog_gml).release_value_but_fixme_should_propagate_errors(); @@ -189,13 +189,13 @@ void NewProjectDialog::do_create_project() auto create_in = m_create_in_input->text(); if (!FileSystem::exists(create_in) || !FileSystem::is_directory(create_in)) { - auto result = GUI::MessageBox::show(this, DeprecatedString::formatted("The directory {} does not exist yet, would you like to create it?", create_in), "New project"sv, GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo); + auto result = GUI::MessageBox::show(this, DeprecatedString::formatted("The directory \"{}\" does not exist yet, would you like to create it?", create_in), "New Project"sv, GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo); if (result != GUI::MessageBox::ExecResult::Yes) return; auto created = Core::Directory::create(maybe_project_full_path.value(), Core::Directory::CreateDirectories::Yes); if (created.is_error()) { - GUI::MessageBox::show_error(this, DeprecatedString::formatted("Could not create directory {}", create_in)); + GUI::MessageBox::show_error(this, DeprecatedString::formatted("Could not create directory \"{}\"", create_in)); return; } } diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp index 4addf01f0e..d85061f706 100644 --- a/Userland/DevTools/HackStudio/Editor.cpp +++ b/Userland/DevTools/HackStudio/Editor.cpp @@ -68,7 +68,7 @@ Editor::Editor() create_tokens_info_timer(); set_document(CodeDocument::create()); - m_move_execution_to_line_action = GUI::Action::create("Set execution point to line", [this](auto&) { + m_move_execution_to_line_action = GUI::Action::create("Set Execution Point to Cursor Line", [this](auto&) { VERIFY(is_program_running()); auto success = Debugger::the().set_execution_position(currently_open_file(), cursor().line()); if (success) { diff --git a/Userland/DevTools/HackStudio/FindInFilesWidget.cpp b/Userland/DevTools/HackStudio/FindInFilesWidget.cpp index 3a768794b4..97769c2783 100644 --- a/Userland/DevTools/HackStudio/FindInFilesWidget.cpp +++ b/Userland/DevTools/HackStudio/FindInFilesWidget.cpp @@ -122,8 +122,8 @@ FindInFilesWidget::FindInFilesWidget() m_textbox = top_container.add<GUI::TextBox>(); - m_button = top_container.add<GUI::Button>("Find in files"_string.release_value_but_fixme_should_propagate_errors()); - m_button->set_fixed_width(100); + m_button = top_container.add<GUI::Button>("Find"_string.release_value_but_fixme_should_propagate_errors()); + m_button->set_fixed_width(50); m_result_view = add<GUI::TableView>(); diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 9a970632a6..d4eb125ec5 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -522,7 +522,7 @@ ErrorOr<NonnullRefPtr<GUI::Action>> HackStudioWidget::create_new_file_action(Dep auto icon_no_shadow = TRY(Gfx::Bitmap::load_from_file(icon)); return GUI::Action::create(label, icon_no_shadow, [this, extension](const GUI::Action&) { String filename; - if (GUI::InputBox::show(window(), filename, "Enter name of new file:"sv, "Add new file to project"sv) != GUI::InputBox::ExecResult::OK) + if (GUI::InputBox::show(window(), filename, "Enter a name:"sv, "New File"sv) != GUI::InputBox::ExecResult::OK) return; if (!extension.is_empty() && !AK::StringUtils::ends_with(filename, DeprecatedString::formatted(".{}", extension), CaseSensitivity::CaseSensitive)) { @@ -564,7 +564,7 @@ ErrorOr<NonnullRefPtr<GUI::Action>> HackStudioWidget::create_new_directory_actio auto icon = TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/mkdir.png"sv)); return GUI::Action::create("&Directory...", { Mod_Ctrl | Mod_Shift, Key_N }, icon, [this](const GUI::Action&) { String directory_name; - if (GUI::InputBox::show(window(), directory_name, "Enter name of new directory:"sv, "Add new folder to project"sv) != GUI::InputBox::ExecResult::OK) + if (GUI::InputBox::show(window(), directory_name, "Enter a name:"sv, "New Directory"sv) != GUI::InputBox::ExecResult::OK) return; auto path_to_selected = selected_file_paths(); @@ -658,14 +658,14 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_delete_action() DeprecatedString message; if (files.size() == 1) { LexicalPath file(files[0]); - message = DeprecatedString::formatted("Really remove {} from disk?", file.basename()); + message = DeprecatedString::formatted("Really remove \"{}\" from disk?", file.basename()); } else { - message = DeprecatedString::formatted("Really remove {} files from disk?", files.size()); + message = DeprecatedString::formatted("Really remove \"{}\" files from disk?", files.size()); } auto result = GUI::MessageBox::show(window(), message, - "Confirm deletion"sv, + "Confirm Deletion"sv, GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::OKCancel); if (result == GUI::MessageBox::ExecResult::Cancel) @@ -676,7 +676,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_delete_action() if (lstat(file.characters(), &st) < 0) { GUI::MessageBox::show(window(), DeprecatedString::formatted("lstat ({}) failed: {}", file, strerror(errno)), - "Removal failed"sv, + "Removal Failed"sv, GUI::MessageBox::Type::Error); break; } @@ -686,13 +686,13 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_delete_action() auto& error = result.error(); if (is_directory) { GUI::MessageBox::show(window(), - DeprecatedString::formatted("Removing directory {} from the project failed: {}", file, error), - "Removal failed"sv, + DeprecatedString::formatted("Removing directory \"{}\" from the project failed: {}", file, error), + "Removal Failed"sv, GUI::MessageBox::Type::Error); } else { GUI::MessageBox::show(window(), - DeprecatedString::formatted("Removing file {} from the project failed: {}", file, error), - "Removal failed"sv, + DeprecatedString::formatted("Removing file \"{}\" from the project failed: {}", file, error), + "Removal Failed"sv, GUI::MessageBox::Type::Error); } } @@ -873,7 +873,7 @@ ErrorOr<NonnullRefPtr<GUI::Action>> HackStudioWidget::create_open_action() { auto icon = TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/open.png"sv)); return GUI::Action::create("&Open Project...", { Mod_Ctrl | Mod_Shift, Key_O }, icon, [this](auto&) { - auto open_path = GUI::FilePicker::get_open_filepath(window(), "Open project", m_project->root_path(), true); + auto open_path = GUI::FilePicker::get_open_filepath(window(), "Open Project", m_project->root_path(), true); if (!open_path.has_value()) return; open_project(open_path.value()); @@ -1147,7 +1147,7 @@ void HackStudioWidget::build() { auto result = m_project_builder->build(active_file()); if (result.is_error()) { - GUI::MessageBox::show(window(), DeprecatedString::formatted("{}", result.error()), "Build failed"sv, GUI::MessageBox::Type::Error); + GUI::MessageBox::show(window(), DeprecatedString::formatted("{}", result.error()), "Build Failed"sv, GUI::MessageBox::Type::Error); m_build_action->set_enabled(true); m_stop_action->set_enabled(false); } else { @@ -1159,7 +1159,7 @@ void HackStudioWidget::run() { auto result = m_project_builder->run(active_file()); if (result.is_error()) { - GUI::MessageBox::show(window(), DeprecatedString::formatted("{}", result.error()), "Run failed"sv, GUI::MessageBox::Type::Error); + GUI::MessageBox::show(window(), DeprecatedString::formatted("{}", result.error()), "Run Failed"sv, GUI::MessageBox::Type::Error); m_run_action->set_enabled(true); m_stop_action->set_enabled(false); } else { @@ -1337,7 +1337,7 @@ ErrorOr<void> HackStudioWidget::create_action_tab(GUI::Widget& parent) first_time = false; }; - m_find_in_files_widget = m_action_tab_widget->add_tab<FindInFilesWidget>(TRY("Find in files"_string)); + m_find_in_files_widget = m_action_tab_widget->add_tab<FindInFilesWidget>(TRY("Find"_string)); m_todo_entries_widget = m_action_tab_widget->add_tab<ToDoEntriesWidget>("TODO"_short_string); m_terminal_wrapper = m_action_tab_widget->add_tab<TerminalWrapper>("Console"_short_string, false); auto debug_info_widget = TRY(DebugInfoWidget::create()); @@ -1393,7 +1393,7 @@ void HackStudioWidget::update_recent_projects_submenu() auto recent_projects = read_recent_projects(); if (recent_projects.size() <= 1) { - auto empty_action = GUI::Action::create("Empty...", [](auto&) {}); + auto empty_action = GUI::Action::create("(No recently open files)", [](auto&) {}); empty_action->set_enabled(false); m_recent_projects_submenu->add_action(empty_action); return; @@ -1542,7 +1542,7 @@ ErrorOr<void> HackStudioWidget::create_view_menu(GUI::Window& window) } auto icon = TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-font-editor.png"sv)); - m_editor_font_action = GUI::Action::create("Editor &Font...", icon, + m_editor_font_action = GUI::Action::create("Change &Font...", icon, [&](auto&) { auto picker = GUI::FontPicker::construct(&window, m_editor_font, false); if (picker->exec() == GUI::Dialog::ExecResult::OK) { @@ -1663,7 +1663,7 @@ HackStudioWidget::ContinueDecision HackStudioWidget::warn_unsaved_changes(Deprec if (!any_document_is_dirty()) return ContinueDecision::Yes; - auto result = GUI::MessageBox::show(window(), prompt, "Unsaved changes"sv, GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::YesNoCancel); + auto result = GUI::MessageBox::show(window(), prompt, "Unsaved Changes"sv, GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::YesNoCancel); if (result == GUI::MessageBox::ExecResult::Cancel) return ContinueDecision::No; |