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:
@@ -619,15 +619,16 @@ void SubmitEditorWidget::verifyDescription()
|
||||
|
||||
d->descriptionHint->setText(hints.join("<br>"));
|
||||
if (!d->descriptionHint->text().isEmpty()) {
|
||||
static_assert(MaxSubjectLength == 72); // change the translated message below when changing
|
||||
d->descriptionHint->setToolTip(
|
||||
Tr::tr("<p>Writing good commit messages</p>"
|
||||
"<ul>"
|
||||
"<li>Avoid very short commit messages.</li>"
|
||||
"<li>Consider the first line as subject (like in email) "
|
||||
"and keep it shorter than %n characters.</li>"
|
||||
"<li>Consider the first line as a subject (like in emails) "
|
||||
"and keep it shorter than 72 characters.</li>"
|
||||
"<li>After an empty second line, a longer description can be added.</li>"
|
||||
"<li>Describe why the change was done, not how it was done.</li>"
|
||||
"</ul>", nullptr, MaxSubjectLength));
|
||||
"</ul>"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user