From c7e6a67024c9c70c5a32b8e6839b097e65fda008 Mon Sep 17 00:00:00 2001 From: Michael Pfeiffer Date: Wed, 10 Mar 2010 18:11:58 +0000 Subject: [PATCH] Added translation comments. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35800 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/bootman/BootManagerController.cpp | 42 +++++++++++----------- src/apps/bootman/BootManagerWindow.cpp | 3 +- src/apps/bootman/DefaultPartitionPage.cpp | 10 +++--- src/apps/bootman/EntryPage.cpp | 4 +-- src/apps/bootman/FileSelectionPage.cpp | 7 ++-- src/apps/bootman/PartitionsPage.cpp | 2 +- src/apps/bootman/UninstallPage.cpp | 2 +- src/apps/bootman/WizardView.cpp | 5 +-- 8 files changed, 41 insertions(+), 34 deletions(-) diff --git a/src/apps/bootman/BootManagerController.cpp b/src/apps/bootman/BootManagerController.cpp index b7afa70312..fbba2c7bed 100644 --- a/src/apps/bootman/BootManagerController.cpp +++ b/src/apps/bootman/BootManagerController.cpp @@ -156,7 +156,7 @@ BootManagerController::_HasSelectedPartitions() BAlert* alert = new BAlert("info", TR("At least one partition must be selected!"), - TR("OK")); + TR_CMT("OK", "Button")); alert->Go(); return false; @@ -168,8 +168,8 @@ BootManagerController::_WriteBootMenu() { BAlert* alert = new BAlert("confirm", TR("About to write the boot menu " "to disk. Are you sure you want to continue?"), - TR("Write boot menu"), - TR("Back"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + TR_CMT("Write boot menu", "Button"), + TR_CMT("Back", "Button"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); if (alert->Go() == 1) return false; @@ -206,7 +206,8 @@ BootManagerController::_RestoreMBR() message.ReplaceFirst("%file", path); BAlert* alert = new BAlert("confirm", message.String(), - TR("Restore MBR"), TR("Back"), + TR_CMT("Restore MBR", "Button"), + TR_CMT("Back", "Button"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); if (alert->Go() == 1) return false; @@ -231,7 +232,7 @@ BootManagerController::CreatePage(int32 state, WizardView* wizard) case kStateErrorEntry: page = _CreateErrorEntryPage(frame); wizard->SetPreviousButtonHidden(true); - wizard->SetNextButtonLabel(TR("Done")); + wizard->SetNextButtonLabel(TR_CMT("Done", "Button")); break; case kStateSaveMBR: page = _CreateSaveMBRPage(frame); @@ -249,11 +250,11 @@ BootManagerController::CreatePage(int32 state, WizardView* wizard) break; case kStateInstallSummary: page = _CreateInstallSummaryPage(frame); - wizard->SetNextButtonLabel(TR("Next")); + wizard->SetNextButtonLabel(TR_CMT("Next", "Button")); break; case kStateInstalled: page = _CreateInstalledPage(frame); - wizard->SetNextButtonLabel(TR("Done")); + wizard->SetNextButtonLabel(TR_CMT("Done", "Button")); break; case kStateUninstall: page = _CreateUninstallPage(frame); @@ -278,14 +279,14 @@ BootManagerController::_CreateErrorEntryPage(BRect frame) if (fReadPartitionsStatus == kErrorBootSectorTooSmall) description << - TR("Partition table not compatible") << "\n\n" << + TR_CMT("Partition table not compatible", "Title") << "\n\n" << TR("The partition table of the first hard disk is not compatible " "with Boot Manager.\n" "Boot Manager needs 2 KB available space before the first " "partition."); else description << - TR("Error reading partition table") << "\n\n" << + TR_CMT("Error reading partition table", "Title") << "\n\n" << TR("Boot Manager is unable to read the partition table!"); return new DescriptionPage(frame, "errorEntry", description.String(), true); @@ -300,7 +301,7 @@ BootManagerController::_CreateSaveMBRPage(BRect frame) fSettings.FindString("disk", &disk); description << - TR("Backup Master Boot Record") << "\n\n" << + TR_CMT("Backup Master Boot Record", "Title") << "\n\n" << TR("The Master Boot Record (MBR) of the boot device:\n" "\t%s\n" "will now be saved to disk. Please select a file to " @@ -325,12 +326,12 @@ BootManagerController::_CreateMBRSavedPage(BRect frame) if (fSaveMBRStatus == B_OK) { description << - TR("Old Master Boot Record saved") << "\n\n" << + TR_CMT("Old Master Boot Record saved", "Title") << "\n\n" << TR("The old Master Boot Record was successfully save to %s.") << "\n"; } else { description << - TR("Old Master Boot Record Saved failure") << "\n\n" << + TR_CMT("Old Master Boot Record Saved failure", "Title") << "\n\n" << TR("The old Master Boot Record could not be saved to %s") << "\n"; } @@ -348,7 +349,7 @@ BootManagerController::_CreateInstallSummaryPage(BRect frame) fSettings.FindString("disk", &disk); description << - TR("Summary") << "\n\n" << + TR_CMT("Summary", "Title") << "\n\n" << TR("About to write the following boot menu to the boot disk " "(%s). Please verify the information below before continuing.") << "\n\n"; @@ -384,12 +385,12 @@ BootManagerController::_CreateInstalledPage(BRect frame) if (fWriteBootMenuStatus == B_OK) { description << - TR("Installation of boot menu completed") << "\n\n" << + TR_CMT("Installation of boot menu completed", "Title") << "\n\n" << TR("The boot manager has been successfully installed " "on your system."); } else { description << - TR("Installation of boot menu failed") << "\n\n" << + TR_CMT("Installation of boot menu failed", "Title") << "\n\n" << TR("An error occurred writing the boot menu. " "The Master Boot Record might be destroyed, " "you should restore the MBR now!"); @@ -405,13 +406,13 @@ BootManagerController::_CreateUninstallPage(BRect frame) BString description; description << - TR("Uninstall boot manager") << "\n\n" << + TR_CMT("Uninstall boot manager", "Title") << "\n\n" << TR("Please locate the Master Boot Record (MBR) save file to " "restore from. This is the file that was created when the " "boot manager was first installed."); - return new FileSelectionPage(&fSettings, frame, "restoreMBR", description.String(), - B_OPEN_PANEL); + return new FileSelectionPage(&fSettings, frame, "restoreMBR", + description.String(), B_OPEN_PANEL); } @@ -426,14 +427,15 @@ BootManagerController::_CreateUninstalledPage(BRect frame) if (fRestoreMBRStatus == B_OK) { description << - TR("Uninstallation of boot menu completed") << "\n\n" << + TR_CMT("Uninstallation of boot menu completed", "Title") << + "\n\n" << TR("The Master Boot Record of the boot device " "(%s) has been successfully restored from %s."); description.ReplaceFirst("%s", disk); description.ReplaceLast("%s", file); } else { description << - TR("Uninstallation of boot menu failed") << "\n\n" << + TR_CMT("Uninstallation of boot menu failed", "Title") << "\n\n" << TR("The Master Boot Record could not be restored!"); } diff --git a/src/apps/bootman/BootManagerWindow.cpp b/src/apps/bootman/BootManagerWindow.cpp index 050528d8d2..2bba855195 100644 --- a/src/apps/bootman/BootManagerWindow.cpp +++ b/src/apps/bootman/BootManagerWindow.cpp @@ -27,7 +27,8 @@ BootManagerWindow::BootManagerWindow() - : BWindow(BRect(100, 100, 500, 400), TR("Boot Manager"), B_TITLED_WINDOW, + : BWindow(BRect(100, 100, 500, 400), TR_CMT("Boot Manager", "Window Title"), + B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE) { float minWidth, maxWidth, minHeight, maxHeight; diff --git a/src/apps/bootman/DefaultPartitionPage.cpp b/src/apps/bootman/DefaultPartitionPage.cpp index 9b681144ae..d4fc0db2c3 100644 --- a/src/apps/bootman/DefaultPartitionPage.cpp +++ b/src/apps/bootman/DefaultPartitionPage.cpp @@ -95,7 +95,7 @@ DefaultPartitionPage::_BuildUI() BString text; text << - TR("Default Partition") << "\n\n" << + TR_CMT("Default Partition", "Title") << "\n\n" << TR("Please specify a default partition and a timeout.\n" "The boot menu will load the default partition after " "the timeout unless you select another partition. You " @@ -110,7 +110,7 @@ DefaultPartitionPage::_BuildUI() BPopUpMenu* popUpMenu = _CreatePopUpMenu(); fDefaultPartition = new BMenuField(rect, "partitions", - TR("Default Partition:"), popUpMenu); + TR_CMT("Default Partition:", "Menu field label"), popUpMenu); float divider = be_plain_font->StringWidth(fDefaultPartition->Label()) + 3; fDefaultPartition->SetDivider(divider); AddChild(fDefaultPartition); @@ -141,9 +141,11 @@ DefaultPartitionPage::_CreatePopUpMenu() BMenuItem* selectedItem = NULL; int32 selectedItemIndex = 0; - BPopUpMenu* menu = new BPopUpMenu(TR("Partitions")); + BPopUpMenu* menu = new BPopUpMenu(TR_CMT("Partitions", + "Pop up menu title")); BMessage message; - for (int32 i = 0; fSettings->FindMessage("partition", i, &message) == B_OK; i ++) { + for (int32 i = 0; fSettings->FindMessage("partition", i, &message) == B_OK; + i ++) { bool show; if (message.FindBool("show", &show) != B_OK || !show) diff --git a/src/apps/bootman/EntryPage.cpp b/src/apps/bootman/EntryPage.cpp index 3df3be5bc9..57c59edeb3 100644 --- a/src/apps/bootman/EntryPage.cpp +++ b/src/apps/bootman/EntryPage.cpp @@ -65,7 +65,7 @@ EntryPage::_BuildUI() BString text; text << - TR("Install boot menu") << "\n\n" << + TR_CMT("Install boot menu", "Title") << "\n\n" << TR("Choose this option to install a boot menu, " "allowing you to select which operating " "system to boot when you turn on your " @@ -82,7 +82,7 @@ EntryPage::_BuildUI() text.Truncate(0); text << - TR("Uninstall boot menu") << "\n\n" << + TR_CMT("Uninstall boot menu", "Title") << "\n\n" << TR("Choose this option to remove the boot menu " "previously installed by this program.\n"); fUninstallText = CreateDescription(textRect, "uninstallText", text); diff --git a/src/apps/bootman/FileSelectionPage.cpp b/src/apps/bootman/FileSelectionPage.cpp index 2b8fc68d6c..f7b6a6d2c4 100644 --- a/src/apps/bootman/FileSelectionPage.cpp +++ b/src/apps/bootman/FileSelectionPage.cpp @@ -102,12 +102,13 @@ FileSelectionPage::_BuildUI(const char* description) fSettings->FindString("file", &file); // TODO align text and button - fFile = new BTextControl(rect, "file", TR("File:"), file.String(), - new BMessage()); + fFile = new BTextControl(rect, "file", + TR_CMT("File:", "Text control label"), + file.String(), new BMessage()); fFile->SetDivider(be_plain_font->StringWidth(fFile->Label()) + 5); AddChild(fFile); - fSelect = new BButton(rect, "select", TR("Select"), + fSelect = new BButton(rect, "select", TR_CMT("Select", "Button"), new BMessage(kMsgOpenFilePanel), B_FOLLOW_RIGHT); fSelect->ResizeToPreferred(); diff --git a/src/apps/bootman/PartitionsPage.cpp b/src/apps/bootman/PartitionsPage.cpp index 011d166331..72e98cc697 100644 --- a/src/apps/bootman/PartitionsPage.cpp +++ b/src/apps/bootman/PartitionsPage.cpp @@ -98,7 +98,7 @@ PartitionsPage::_BuildUI() BString text; text << - TR("Partitions") << "\n\n" << + TR_CMT("Partitions", "Title") << "\n\n" << TR("The following partitions were detected. Please " "check the box next to the partitions to be included " "in the boot menu. You can also set the names of the " diff --git a/src/apps/bootman/UninstallPage.cpp b/src/apps/bootman/UninstallPage.cpp index dd5b51d350..187d841083 100644 --- a/src/apps/bootman/UninstallPage.cpp +++ b/src/apps/bootman/UninstallPage.cpp @@ -50,7 +50,7 @@ UninstallPage::_BuildUI() BString text; text << - TR("Uninstall Boot Manager") << "\n\n" << + TR_CMT("Uninstall Boot Manager", "Title") << "\n\n" << TR("Please locate the Master Boot Record (MBR) save file to " "restore from. This is the file that was created when the " "boot manager was first installed."); diff --git a/src/apps/bootman/WizardView.cpp b/src/apps/bootman/WizardView.cpp index 91cf15e2c8..aa4daab3eb 100644 --- a/src/apps/bootman/WizardView.cpp +++ b/src/apps/bootman/WizardView.cpp @@ -143,13 +143,14 @@ WizardView::_BuildUI() B_FOLLOW_LEFT_RIGHT | B_FOLLOW_BOTTOM); AddChild(fSeparator); - fPrevious = new BButton(BRect(0, 0, 100, 20), "previous", TR("Previous"), + fPrevious = new BButton(BRect(0, 0, 100, 20), "previous", + TR_CMT("Previous", "Button"), new BMessage(kMessagePrevious), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM); AddChild(fPrevious); fPrevious->ResizeToPreferred(); - fNext = new BButton(BRect(0, 0, 100, 20), "next", TR("Next"), + fNext = new BButton(BRect(0, 0, 100, 20), "next", TR_CMT("Next", "Button"), new BMessage(kMessageNext), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM); AddChild(fNext);