From 083b07d88d6115259e0d4d8b94945d5fff77324b Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 28 Oct 2022 01:13:43 -0700 Subject: [PATCH] Fix profile import/export menu items. 1) In English-language menus, menu item text should use title case, with most words capitalized. (I leave it to the Transifexors to capitalize appropriately for other languages.) 2) Menu items that pop up dialogs should have "..." at the end of the text. --- ui/qt/main_status_bar.cpp | 8 ++++---- ui/qt/profile_dialog.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/qt/main_status_bar.cpp b/ui/qt/main_status_bar.cpp index 54f2deccef..c8daddd26f 100644 --- a/ui/qt/main_status_bar.cpp +++ b/ui/qt/main_status_bar.cpp @@ -570,9 +570,9 @@ void MainStatusBar::showProfileMenu(const QPoint &global_pos, Qt::MouseButton bu #ifdef HAVE_MINIZIP QMenu * importMenu = new QMenu(tr("Import")); - action = importMenu->addAction(tr("from zip file"), this, SLOT(manageProfile())); + action = importMenu->addAction(tr("From Zip File..."), this, SLOT(manageProfile())); action->setProperty("dialog_action_", (int)ProfileDialog::ImportZipProfile); - action = importMenu->addAction(tr("from directory"), this, SLOT(manageProfile())); + action = importMenu->addAction(tr("From Directory..."), this, SLOT(manageProfile())); action->setProperty("dialog_action_", (int)ProfileDialog::ImportDirProfile); ctx_menu_->addMenu(importMenu); @@ -581,11 +581,11 @@ void MainStatusBar::showProfileMenu(const QPoint &global_pos, Qt::MouseButton bu QMenu * exportMenu = new QMenu(tr("Export"), ctx_menu_); if (enable_edit) { - action = exportMenu->addAction(tr("selected personal profile"), this, SLOT(manageProfile())); + action = exportMenu->addAction(tr("Selected Personal Profile..."), this, SLOT(manageProfile())); action->setProperty("dialog_action_", (int)ProfileDialog::ExportSingleProfile); action->setEnabled(enable_edit); } - action = exportMenu->addAction(tr("all personal profiles"), this, SLOT(manageProfile())); + action = exportMenu->addAction(tr("All Personal Profiles..."), this, SLOT(manageProfile())); action->setProperty("dialog_action_", (int)ProfileDialog::ExportAllProfiles); ctx_menu_->addMenu(exportMenu); } diff --git a/ui/qt/profile_dialog.cpp b/ui/qt/profile_dialog.cpp index 81fbddb133..5f89a7f4dd 100644 --- a/ui/qt/profile_dialog.cpp +++ b/ui/qt/profile_dialog.cpp @@ -81,17 +81,17 @@ ProfileDialog::ProfileDialog(QWidget *parent) : export_button_ = pd_ui_->buttonBox->addButton(tr("Export", "noun"), QDialogButtonBox::ActionRole); QMenu * importMenu = new QMenu(import_button_); - QAction * entry = importMenu->addAction(tr("from zip file")); + QAction * entry = importMenu->addAction(tr("From Zip File...")); connect(entry, &QAction::triggered, this, &ProfileDialog::importFromZip); - entry = importMenu->addAction(tr("from directory")); + entry = importMenu->addAction(tr("From Directory...")); connect(entry, &QAction::triggered, this, &ProfileDialog::importFromDirectory); import_button_->setMenu(importMenu); QMenu * exportMenu = new QMenu(export_button_); - export_selected_entry_ = exportMenu->addAction(tr("%Ln selected personal profile(s)", "", 0)); + export_selected_entry_ = exportMenu->addAction(tr("%Ln Selected Personal Profile(s)...", "", 0)); export_selected_entry_->setProperty(PROFILE_EXPORT_PROPERTY, PROFILE_EXPORT_SELECTED); connect(export_selected_entry_, &QAction::triggered, this, &ProfileDialog::exportProfiles); - entry = exportMenu->addAction(tr("all personal profiles")); + entry = exportMenu->addAction(tr("All Personal Profiles...")); entry->setProperty(PROFILE_EXPORT_PROPERTY, PROFILE_EXPORT_ALL); connect(entry, &QAction::triggered, this, &ProfileDialog::exportProfiles); export_button_->setMenu(exportMenu); @@ -293,7 +293,7 @@ void ProfileDialog::updateWidgets() /* multiple profiles are being selected, copy is no longer allowed */ pd_ui_->copyToolButton->setEnabled(false); - msg = tr("%Ln selected personal profile(s)", "", user_profiles); + msg = tr("%Ln Selected Personal Profile(s)...", "", user_profiles); pd_ui_->hintLabel->setText(msg); #ifdef HAVE_MINIZIP export_selected_entry_->setText(msg); @@ -311,7 +311,7 @@ void ProfileDialog::updateWidgets() pd_ui_->hintLabel->setToolTip(index.data(Qt::ToolTipRole).toString()); if (! index.data(ProfileModel::DATA_IS_GLOBAL).toBool() && ! index.data(ProfileModel::DATA_IS_DEFAULT).toBool()) - msg = tr("%Ln selected personal profile(s)", "", 1); + msg = tr("%Ln Selected Personal Profile(s)...", "", 1); } pd_ui_->copyToolButton->setEnabled(true);