forked from qt-creator/qt-creator
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:
@@ -226,6 +226,10 @@ public:
|
||||
void discardCommit() override { cleanCommitMessageFile(); }
|
||||
|
||||
QString commitDisplayName() const final;
|
||||
QString commitAbortTitle() const final;
|
||||
QString commitAbortMessage() const final;
|
||||
QString commitErrorMessage(const QString &error) const final;
|
||||
|
||||
void p4Diff(const PerforceDiffParameters &p);
|
||||
|
||||
void openCurrentFile();
|
||||
@@ -1443,9 +1447,27 @@ void PerforceDiffConfig::triggerReRun()
|
||||
|
||||
QString PerforcePluginPrivate::commitDisplayName() const
|
||||
{
|
||||
//: Name of the "commit" action of the VCS
|
||||
return Tr::tr("Submit");
|
||||
}
|
||||
|
||||
QString PerforcePluginPrivate::commitAbortTitle() const
|
||||
{
|
||||
return Tr::tr("Close Submit Editor");
|
||||
}
|
||||
|
||||
QString PerforcePluginPrivate::commitAbortMessage() const
|
||||
{
|
||||
return Tr::tr("Closing this editor will abort the submit.");
|
||||
}
|
||||
|
||||
QString PerforcePluginPrivate::commitErrorMessage(const QString &error) const
|
||||
{
|
||||
if (error.isEmpty())
|
||||
return Tr::tr("Cannot submit.");
|
||||
return Tr::tr("Cannot submit: %1.").arg(error);
|
||||
}
|
||||
|
||||
void PerforcePluginPrivate::p4Diff(const FilePath &workingDir, const QStringList &files)
|
||||
{
|
||||
PerforceDiffParameters p;
|
||||
|
||||
Reference in New Issue
Block a user