DriveSetup: More correct translation behavior
The application name should never appear in a translatable string. Otherwise it will always show translated in the app, even if the user configured the Locale prefs to not "Translate app and folder names". Always concatenate the B_TRANSLATE_SYSTEM_NAME'ed string. Change-Id: I511c870bef6efc11dbde52203ecd411c2009495b Reviewed-on: https://review.haiku-os.org/c/haiku/+/10218 Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -531,8 +531,9 @@ MainWindow::MessageReceived(BMessage* message)
|
|||||||
fRegisterFilePanel = new(std::nothrow) BFilePanel(B_OPEN_PANEL,
|
fRegisterFilePanel = new(std::nothrow) BFilePanel(B_OPEN_PANEL,
|
||||||
new BMessenger(this), NULL, B_FILE_NODE, false,
|
new BMessenger(this), NULL, B_FILE_NODE, false,
|
||||||
new BMessage(MSG_REGISTER), NULL, true);
|
new BMessage(MSG_REGISTER), NULL, true);
|
||||||
fRegisterFilePanel->Window()->SetTitle(B_TRANSLATE(
|
BString title(B_TRANSLATE("%appname%: Register disk image"));
|
||||||
"DriveSetup: Register disk image"));
|
title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("DriveSetup"));
|
||||||
|
fRegisterFilePanel->Window()->SetTitle(title);
|
||||||
fRegisterFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, B_TRANSLATE("Register"));
|
fRegisterFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, B_TRANSLATE("Register"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -571,8 +572,9 @@ MainWindow::MessageReceived(BMessage* message)
|
|||||||
fWriteImageFilePanel = new(std::nothrow) BFilePanel(
|
fWriteImageFilePanel = new(std::nothrow) BFilePanel(
|
||||||
B_OPEN_PANEL, new BMessenger(this), NULL, B_FILE_NODE,
|
B_OPEN_PANEL, new BMessenger(this), NULL, B_FILE_NODE,
|
||||||
false, new BMessage(MSG_WRITE), NULL, true);
|
false, new BMessage(MSG_WRITE), NULL, true);
|
||||||
fWriteImageFilePanel->Window()->SetTitle(B_TRANSLATE(
|
BString title(B_TRANSLATE("%appname%: Select disk image"));
|
||||||
"DriveSetup: Select disk image"));
|
title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("DriveSetup"));
|
||||||
|
fWriteImageFilePanel->Window()->SetTitle(title);
|
||||||
fWriteImageFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, B_TRANSLATE("Write"));
|
fWriteImageFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, B_TRANSLATE("Write"));
|
||||||
}
|
}
|
||||||
if (fWriteImageFilePanel != NULL)
|
if (fWriteImageFilePanel != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user