Minor Terminal fixes

In the Terminal settings window, the pop-up help text for
"Tab title:" had two entries for "%% - The character '%'.".
Removed one of the entries.

Fixed the spelling of some constants: kTooTip* vs kToolTip*

Changing the window title and tab title directly will now
show the same tool-tips as the Terminal settings window.

Change-Id: Ic36cc1f8af0305b757105a229203115efee870c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4989
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Máximo Castañeda <antiswen@yahoo.es>
This commit is contained in:
Zakero 2022-02-21 20:48:23 -06:00 committed by Máximo Castañeda
parent 7753e163c9
commit 11dc1393cf
4 changed files with 11 additions and 10 deletions

View File

@ -127,7 +127,7 @@ AppearancePrefView::AppearancePrefView(const char* name,
new BMessage(MSG_TAB_TITLE_SETTING_CHANGED));
fTabTitle->SetToolTip(BString(B_TRANSLATE(
"The pattern specifying the tab titles. The following placeholders\n"
"can be used:")) << "\n" << kTooTipSetTabTitlePlaceholders
"can be used:")) << "\n" << kToolTipSetTabTitlePlaceholders
<< "\n" << kToolTipCommonTitlePlaceholders);
fWindowTitle = new BTextControl("windowTitle", B_TRANSLATE("Window title:"),
@ -136,7 +136,7 @@ AppearancePrefView::AppearancePrefView(const char* name,
new BMessage(MSG_WINDOW_TITLE_SETTING_CHANGED));
fWindowTitle->SetToolTip(BString(B_TRANSLATE(
"The pattern specifying the window titles. The following placeholders\n"
"can be used:")) << "\n" << kTooTipSetWindowTitlePlaceholders
"can be used:")) << "\n" << kToolTipSetWindowTitlePlaceholders
<< "\n" << kToolTipCommonTitlePlaceholders);
BLayoutBuilder::Group<>(this)

View File

@ -13,16 +13,15 @@
#define B_TRANSLATION_CONTEXT "Terminal ToolTips"
const char* const kTooTipSetTabTitlePlaceholders = B_TRANSLATE(
const char* const kToolTipSetTabTitlePlaceholders = B_TRANSLATE(
"\t%d\t-\tThe current working directory of the active process.\n"
"\t\t\tOptionally the maximum number of path components can be\n"
"\t\t\tspecified. E.g. '%2d' for at most two components.\n"
"\t%i\t-\tThe index of the tab.\n"
"\t%e\t-\tThe encoding of the current tab. Not shown for UTF-8.\n"
"\t%p\t-\tThe name of the active process.\n"
"\t%%\t-\tThe character '%'.");
"\t%p\t-\tThe name of the active process.");
const char* const kTooTipSetWindowTitlePlaceholders = B_TRANSLATE(
const char* const kToolTipSetWindowTitlePlaceholders = B_TRANSLATE(
"\t%d\t-\tThe current working directory of the active process in the\n"
"\t\t\tcurrent tab. Optionally the maximum number of path components\n"
"\t\t\tcan be specified. E.g. '%2d' for at most two components.\n"

View File

@ -146,8 +146,8 @@ static const char* const PREF_TAB_TITLE = "Tab title";
static const char* const PREF_WINDOW_TITLE = "Window title";
// shared strings
extern const char* const kTooTipSetTabTitlePlaceholders;
extern const char* const kTooTipSetWindowTitlePlaceholders;
extern const char* const kToolTipSetTabTitlePlaceholders;
extern const char* const kToolTipSetWindowTitlePlaceholders;
extern const char* const kToolTipCommonTitlePlaceholders;
extern const char* const kShellEscapeCharacters;

View File

@ -1913,7 +1913,8 @@ TermWindow::_OpenSetTabTitleDialog(int32 index)
BString toolTip = BString(B_TRANSLATE(
"The pattern specifying the current tab title. The following "
"placeholders\n"
"can be used:\n")) << kTooTipSetTabTitlePlaceholders;
"can be used:\n")) << kToolTipSetTabTitlePlaceholders << "\n"
<< kToolTipCommonTitlePlaceholders;
fSetTabTitleDialog = new SetTitleDialog(
B_TRANSLATE("Set tab title"), B_TRANSLATE("Tab title:"),
toolTip);
@ -1942,7 +1943,8 @@ TermWindow::_OpenSetWindowTitleDialog()
BString toolTip = BString(B_TRANSLATE(
"The pattern specifying the window title. The following placeholders\n"
"can be used:\n")) << kTooTipSetTabTitlePlaceholders;
"can be used:\n")) << kToolTipSetWindowTitlePlaceholders << "\n"
<< kToolTipCommonTitlePlaceholders;
fSetWindowTitleDialog = new SetTitleDialog(B_TRANSLATE("Set window title"),
B_TRANSLATE("Window title:"), toolTip);