Tr/VCS: Fix various issues with translations

Inserting the name for the "commit" operation into messages relies on a
certain sentence structure and doesn't work with translations. Same for
"optional" error messages. Use different complete messages for the
different cases instead.

Avoid explicit line endings, use automatic word wrap instead.

Add some quotes and full stops.

Fix message with plural.

Don't use %n for constant number (inline in message with assert).

Improve confusing tool tip for instant blame.

Change-Id: Ic8453763279753ebd5898858951acddcf311e6e4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Eike Ziller
2023-05-31 09:54:53 +02:00
parent ff2ed7d94b
commit 7bd06829c4
12 changed files with 84 additions and 31 deletions

View File

@@ -593,9 +593,27 @@ bool VcsBasePluginPrivate::enableMenuAction(ActionState as, QAction *menuAction)
QString VcsBasePluginPrivate::commitDisplayName() const
{
//: Name of the "commit" action of the VCS
return Tr::tr("Commit", "name of \"commit\" action of the VCS.");
}
QString VcsBasePluginPrivate::commitAbortTitle() const
{
return Tr::tr("Close Commit Editor");
}
QString VcsBasePluginPrivate::commitAbortMessage() const
{
return Tr::tr("Closing this editor will abort the commit.");
}
QString VcsBasePluginPrivate::commitErrorMessage(const QString &error) const
{
if (error.isEmpty())
return Tr::tr("Cannot commit.");
return Tr::tr("Cannot commit: %1.").arg(error);
}
void VcsBasePluginPrivate::commitFromEditor()
{
QTC_ASSERT(m_submitEditor, return);