Commit 3e33eb67 authored by Antoni Bella Pérez's avatar Antoni Bella Pérez 🚲
Browse files

l10n improves: Revision and add more semantic markup

parent 7246d1ff
Pipeline #244671 passed with stage
in 13 minutes and 27 seconds
......@@ -54,7 +54,7 @@ public:
setContextText(AgentActionManager::CreateAgentInstance, AgentActionManager::ErrorMessageText, ki18n("Could not create agent instance: %1"));
setContextText(AgentActionManager::CreateAgentInstance, AgentActionManager::ErrorMessageTitle, i18n("Agent instance creation failed"));
setContextText(AgentActionManager::CreateAgentInstance, AgentActionManager::ErrorMessageTitle, i18nc("@title:window", "Agent Instance Creation Failed"));
setContextText(AgentActionManager::DeleteAgentInstance, AgentActionManager::MessageBoxTitle, i18nc("@title:window", "Delete Agent Instance?"));
......
......@@ -53,7 +53,7 @@ AgentConfigurationDialog::AgentConfigurationDialog(const AgentInstance &instance
: QDialog(parent)
, d(new AgentConfigurationDialogPrivate(this))
{
setWindowTitle(i18nc("%1 = agent name", "%1 Configuration", instance.name()));
setWindowTitle(i18nc("@title:window, %1 = agent name", "%1 Configuration", instance.name()));
setWindowIcon(instance.type().icon());
auto l = new QVBoxLayout(this);
......
......@@ -282,7 +282,7 @@ void CollectionDialogPrivate::slotAddChildCollection()
void CollectionDialogPrivate::slotCollectionCreationResult(KJob *job)
{
if (job->error()) {
QMessageBox::critical(mParent, i18n("Folder creation failed"), i18n("Could not create folder: %1", job->errorString()));
QMessageBox::critical(mParent, i18nc("@title:window", "Folder Creation Failed"), i18n("Could not create folder: %1", job->errorString()));
}
}
......
......@@ -140,7 +140,7 @@ void CollectionRequesterPrivate::init()
collectionDialog = new CollectionDialog(q);
collectionDialog->setWindowIcon(QIcon::fromTheme(QStringLiteral("akonadi")));
collectionDialog->setWindowTitle(i18nc("@title:window", "Select a collection"));
collectionDialog->setWindowTitle(i18nc("@title:window", "Select a Collection"));
collectionDialog->setSelectionMode(QAbstractItemView::SingleSelection);
collectionDialog->changeCollectionDialogOptions(CollectionDialog::KeepTreeExpanded);
}
......
......@@ -647,7 +647,7 @@ void SelfTestDialog::saveReport()
QFile file(fileName);
if (!file.open(QFile::ReadWrite)) {
QMessageBox::critical(this, i18n("Error"), i18n("Could not open file '%1'", fileName));
QMessageBox::critical(this, i18nc("@title:window", "Error"), i18n("Could not open file '%1'", fileName));
return;
}
......
......@@ -348,7 +348,7 @@ public:
setContextText(StandardActionManager::CreateCollection, StandardActionManager::DialogTitle, i18nc("@title:window", "New Folder"));
setContextText(StandardActionManager::CreateCollection, StandardActionManager::DialogText, i18nc("@label:textbox name of Akonadi folder", "Name"));
setContextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageText, ki18n("Could not create folder: %1"));
setContextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageTitle, i18n("Folder creation failed"));
setContextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Folder Creation Failed"));
setContextText(
StandardActionManager::DeleteCollections,
......@@ -356,25 +356,25 @@ public:
ki18np("Do you really want to delete this folder and all its sub-folders?", "Do you really want to delete %1 folders and all their sub-folders?"));
setContextText(StandardActionManager::DeleteCollections,
StandardActionManager::MessageBoxTitle,
ki18ncp("@title:window", "Delete folder?", "Delete folders?"));
ki18ncp("@title:window", "Delete Folder?", "Delete Folders?"));
setContextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageText, ki18n("Could not delete folder: %1"));
setContextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageTitle, i18n("Folder deletion failed"));
setContextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Folder Deletion Failed"));
setContextText(StandardActionManager::CollectionProperties, StandardActionManager::DialogTitle, ki18nc("@title:window", "Properties of Folder %1"));
setContextText(StandardActionManager::DeleteItems,
StandardActionManager::MessageBoxText,
ki18np("Do you really want to delete the selected item?", "Do you really want to delete %1 items?"));
setContextText(StandardActionManager::DeleteItems, StandardActionManager::MessageBoxTitle, ki18ncp("@title:window", "Delete item?", "Delete items?"));
setContextText(StandardActionManager::DeleteItems, StandardActionManager::MessageBoxTitle, ki18ncp("@title:window", "Delete Item?", "Delete Items?"));
setContextText(StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageText, ki18n("Could not delete item: %1"));
setContextText(StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageTitle, i18n("Item deletion failed"));
setContextText(StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Item Deletion Failed"));
setContextText(StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogTitle, i18nc("@title:window", "Rename Favorite"));
setContextText(StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogText, i18nc("@label:textbox name of the folder", "Name:"));
setContextText(StandardActionManager::CreateResource, StandardActionManager::DialogTitle, i18nc("@title:window", "New Resource"));
setContextText(StandardActionManager::CreateResource, StandardActionManager::ErrorMessageText, ki18n("Could not create resource: %1"));
setContextText(StandardActionManager::CreateResource, StandardActionManager::ErrorMessageTitle, i18n("Resource creation failed"));
setContextText(StandardActionManager::CreateResource, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Resource Creation Failed"));
setContextText(StandardActionManager::DeleteResources,
StandardActionManager::MessageBoxText,
......@@ -384,7 +384,7 @@ public:
ki18ncp("@title:window", "Delete Resource?", "Delete Resources?"));
setContextText(StandardActionManager::Paste, StandardActionManager::ErrorMessageText, ki18n("Could not paste data: %1"));
setContextText(StandardActionManager::Paste, StandardActionManager::ErrorMessageTitle, i18n("Paste failed"));
setContextText(StandardActionManager::Paste, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Paste Failed"));
mDelayedUpdateTimer.setSingleShot(true);
QObject::connect(&mDelayedUpdateTimer, &QTimer::timeout, q, [this]() {
......@@ -736,11 +736,11 @@ public:
}
if (name.contains(QLatin1Char('/'))) {
KMessageBox::error(parentWidget, i18n("We can not add \"/\" in folder name."), i18n("Create new folder error"));
KMessageBox::error(parentWidget, i18n("We can not add \"/\" in folder name."), i18nc("@title:window", "Create New Folder Error"));
return;
}
if (name.startsWith(QLatin1Char('.')) || name.endsWith(QLatin1Char('.'))) {
KMessageBox::error(parentWidget, i18n("We can not add \".\" at begin or end of folder name."), i18n("Create new folder error"));
KMessageBox::error(parentWidget, i18n("We can not add \".\" at begin or end of folder name."), i18nc("@title:window", "Create New Folder Error"));
return;
}
......
......@@ -90,7 +90,7 @@ public:
QObject::connect(job, &SubscriptionJob::result, q, [this](KJob *job) {
if (job->error()) {
qCWarning(AKONADIWIDGETS_LOG) << job->errorString();
KMessageBox::error(q, i18n("Failed to update subscription: %1", job->errorString()), i18nc("@title", "Subscription Error"));
KMessageBox::error(q, i18n("Failed to update subscription: %1", job->errorString()), i18nc("@title:window", "Subscription Error"));
q->reject();
}
q->accept();
......
......@@ -113,7 +113,7 @@ void TagEditWidgetPrivate::slotCreateTag()
void TagEditWidgetPrivate::slotCreateTagFinished(KJob *job)
{
if (job->error()) {
KMessageBox::error(d, i18n("Failed to create a new tag"), i18n("An error occurred while creating a new tag"));
KMessageBox::error(d, i18n("Failed to create a new tag"), i18nc("@title:window", "An Error Occurred while Creating a New Tag"));
}
ui.newTagEdit->setEnabled(true);
......@@ -162,7 +162,7 @@ void TagEditWidgetPrivate::deleteTag()
Q_ASSERT(m_deleteCandidate.isValid());
const auto tag = m_deleteCandidate.data(Akonadi::TagModel::TagRole).value<Akonadi::Tag>();
const QString text = xi18nc("@info", "Do you really want to remove the tag <resource>%1</resource>?", tag.name());
const QString caption = i18nc("@title", "Delete tag");
const QString caption = i18nc("@title:window", "Delete Tag");
if (KMessageBox::questionYesNo(d, text, caption, KStandardGuiItem::del(), KStandardGuiItem::cancel()) == KMessageBox::Yes) {
new TagDeleteJob(tag, this);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment