From c9df4f94a42e49a15b45b06dae330f7fba623a92 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 19 Jun 2023 11:53:33 +0200 Subject: [PATCH] Terminal: Fine-tune tooltips And add full stops to ends of tooltips and messages. Change-Id: Ieacb17069fc45591089eebb610d4824195adb660 Reviewed-by: Marcus Tillmanns --- src/plugins/terminal/terminalpane.cpp | 8 ++++---- src/plugins/terminal/terminalsettings.cpp | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/plugins/terminal/terminalpane.cpp b/src/plugins/terminal/terminalpane.cpp index 71e979282bc..d30d7f79357 100644 --- a/src/plugins/terminal/terminalpane.cpp +++ b/src/plugins/terminal/terminalpane.cpp @@ -79,10 +79,10 @@ TerminalPane::TerminalPane(QObject *parent) .toString(QKeySequence::NativeText); if (TerminalSettings::instance().sendEscapeToTerminal.value()) { m_escSettingButton->setText(escKey); - m_escSettingButton->setToolTip(Tr::tr("Sending Esc to terminal instead of Qt Creator")); + m_escSettingButton->setToolTip(Tr::tr("Sends Esc to terminal instead of Qt Creator.")); } else { m_escSettingButton->setText(shiftEsc); - m_escSettingButton->setToolTip(Tr::tr("Press %1 to send Esc to terminal").arg(shiftEsc)); + m_escSettingButton->setToolTip(Tr::tr("Press %1 to send Esc to terminal.").arg(shiftEsc)); } }; @@ -252,10 +252,10 @@ void TerminalPane::initActions() TerminalSettings::instance().lockKeyboard.setValue(locked); if (locked) { lockKeyboard.setIcon(LOCK_KEYBOARD_ICON.icon()); - lockKeyboard.setToolTip(Tr::tr("Keyboard shortcuts will be sent to the Terminal")); + lockKeyboard.setToolTip(Tr::tr("Sends keyboard shortcuts to Terminal.")); } else { lockKeyboard.setIcon(UNLOCK_KEYBOARD_ICON.icon()); - lockKeyboard.setToolTip(Tr::tr("Keyboard shortcuts will be sent to Qt Creator")); + lockKeyboard.setToolTip(Tr::tr("Sends keyboard shortcuts to Qt Creator.")); } }; diff --git a/src/plugins/terminal/terminalsettings.cpp b/src/plugins/terminal/terminalsettings.cpp index 06903c4d4c5..bb90e24bec8 100644 --- a/src/plugins/terminal/terminalsettings.cpp +++ b/src/plugins/terminal/terminalsettings.cpp @@ -110,7 +110,7 @@ static expected_str loadItermColors(const FilePath &path) QFile f(path.toFSPathString()); const bool opened = f.open(QIODevice::ReadOnly); if (!opened) - return make_unexpected(Tr::tr("Failed to open file")); + return make_unexpected(Tr::tr("Failed to open file.")); QXmlStreamReader reader(&f); while (!reader.atEnd() && reader.readNextStartElement()) { @@ -191,7 +191,7 @@ static expected_str loadVsCodeColors(const FilePath &path) const QJsonObject root = doc.object(); const auto itColors = root.find("colors"); if (itColors == root.end()) - return make_unexpected(Tr::tr("No colors found")); + return make_unexpected(Tr::tr("No colors found.")); const QJsonObject colors = itColors->toObject(); @@ -252,7 +252,7 @@ static expected_str loadKonsoleColorScheme(const FilePath &path) auto parseColor = [](const QStringList &parts) -> expected_str { if (parts.size() != 3 && parts.size() != 4) - return make_unexpected(Tr::tr("Invalid color format")); + return make_unexpected(Tr::tr("Invalid color format.")); int alpha = parts.size() == 4 ? parts[3].toInt() : 255; return QColor(parts[0].toInt(), parts[1].toInt(), parts[2].toInt(), alpha); }; @@ -351,7 +351,7 @@ static expected_str loadColorScheme(const FilePath &path) else if (path.suffix() == "theme" || path.completeSuffix() == "theme.txt") return loadXFCE4ColorScheme(path); - return make_unexpected(Tr::tr("Unknown color scheme format")); + return make_unexpected(Tr::tr("Unknown color scheme format.")); } static TerminalSettings *s_instance; @@ -375,7 +375,7 @@ TerminalSettings::TerminalSettings() enableTerminal.setSettingsKey("EnableTerminal"); enableTerminal.setLabelText(Tr::tr("Use internal terminal")); enableTerminal.setToolTip( - Tr::tr("If enabled, use the internal terminal when \"Run In Terminal\" is " + Tr::tr("Uses the internal terminal when \"Run In Terminal\" is " "enabled and for \"Open Terminal here\".")); enableTerminal.setDefaultValue(true); @@ -387,7 +387,7 @@ TerminalSettings::TerminalSettings() fontSize.setSettingsKey("FontSize"); fontSize.setLabelText(Tr::tr("Size:")); - fontSize.setToolTip(Tr::tr("The font size used in the terminal. (in points)")); + fontSize.setToolTip(Tr::tr("The font size used in the terminal (in points).")); fontSize.setDefaultValue(defaultFontSize()); fontSize.setRange(1, 100); @@ -414,13 +414,13 @@ TerminalSettings::TerminalSettings() sendEscapeToTerminal.setSettingsKey("SendEscapeToTerminal"); sendEscapeToTerminal.setLabelText(Tr::tr("Send escape key to terminal")); sendEscapeToTerminal.setToolTip( - Tr::tr("If enabled, pressing the escape key will send it to the terminal " + Tr::tr("Sends the escape key to the terminal when pressed" "instead of closing the terminal.")); sendEscapeToTerminal.setDefaultValue(false); audibleBell.setSettingsKey("AudibleBell"); audibleBell.setLabelText(Tr::tr("Audible bell")); - audibleBell.setToolTip(Tr::tr("If enabled, the terminal will beep when a bell " + audibleBell.setToolTip(Tr::tr("Makes the terminal beep when a bell " "character is received.")); audibleBell.setDefaultValue(true);