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.
This commit is contained in:
Guy Harris 2022-10-28 01:13:43 -07:00
parent 86af1d6707
commit 083b07d88d
2 changed files with 10 additions and 10 deletions

View File

@ -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);
}

View File

@ -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);