⛏️ index : haiku.git

author Humdinger <humdinger@mailbox.org> 2026-01-09 15:09:17.0 +01:00:00
committer waddlesplash <waddlesplash@gmail.com> 2026-01-09 20:34:06.0 +00:00:00
commit
b34fdb56552f3f4ecd9d4ca34b76acf2be37b62c [patch]
tree
16e5fecc58cb553592b43853f82df5f66ba270cc
parent
d8170f64691740a9b1798182642e8e5d6462c63c
download
b34fdb56552f3f4ecd9d4ca34b76acf2be37b62c.tar.gz

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 <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

Diff

 src/apps/drivesetup/MainWindow.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/apps/drivesetup/MainWindow.cpp b/src/apps/drivesetup/MainWindow.cpp
index 48e6926..dbb87ff 100644
--- a/src/apps/drivesetup/MainWindow.cpp
+++ b/src/apps/drivesetup/MainWindow.cpp
@@ -531,8 +531,9 @@
				fRegisterFilePanel = new(std::nothrow) BFilePanel(B_OPEN_PANEL,
					new BMessenger(this), NULL, B_FILE_NODE, false,
					new BMessage(MSG_REGISTER), NULL, true);
				fRegisterFilePanel->Window()->SetTitle(B_TRANSLATE(
					"DriveSetup: Register disk image"));
				BString title(B_TRANSLATE("%appname%: Register disk image"));
				title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("DriveSetup"));
				fRegisterFilePanel->Window()->SetTitle(title);
				fRegisterFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, B_TRANSLATE("Register"));
			}

@@ -571,8 +572,9 @@
					fWriteImageFilePanel = new(std::nothrow) BFilePanel(
						B_OPEN_PANEL, new BMessenger(this), NULL, B_FILE_NODE,
						false, new BMessage(MSG_WRITE), NULL, true);
					fWriteImageFilePanel->Window()->SetTitle(B_TRANSLATE(
						"DriveSetup: Select disk image"));
					BString title(B_TRANSLATE("%appname%: Select disk image"));
					title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("DriveSetup"));
					fWriteImageFilePanel->Window()->SetTitle(title);
					fWriteImageFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, B_TRANSLATE("Write"));
				}
				if (fWriteImageFilePanel != NULL)