Updated to use B_TRANSLATE* macros. relates to #5408.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36663 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4e689749d8
commit
04bcc0b403
@ -55,17 +55,19 @@ void
|
||||
BootManager::AboutRequested()
|
||||
{
|
||||
BString aboutText;
|
||||
const char* title = TR_CMT("Haiku Boot Manager", "About text title");
|
||||
const char* title = B_TRANSLATE_COMMENT("Haiku Boot Manager",
|
||||
"About text title");
|
||||
aboutText <<
|
||||
title << "\n\n" <<
|
||||
TR("written by") << "\n"
|
||||
B_TRANSLATE("written by") << "\n"
|
||||
"\tDavid Dengg\n"
|
||||
"\tMichael Pfeiffer\n"
|
||||
"\n" <<
|
||||
TR_CMT("Copyright %year, Haiku Inc.\n", "Leave %year untranslated");
|
||||
B_TRANSLATE_COMMENT("Copyright %year, Haiku Inc.\n",
|
||||
"Leave %year untranslated");
|
||||
aboutText.ReplaceLast("%year", "2008-2010");
|
||||
BAlert *alert = new BAlert("about",
|
||||
aboutText.String(), TR("OK"));
|
||||
aboutText.String(), B_TRANSLATE("OK"));
|
||||
BTextView *view = alert->TextView();
|
||||
BFont font;
|
||||
|
||||
|
@ -155,8 +155,8 @@ BootManagerController::_HasSelectedPartitions()
|
||||
}
|
||||
|
||||
BAlert* alert = new BAlert("info",
|
||||
TR("At least one partition must be selected!"),
|
||||
TR_CMT("OK", "Button"));
|
||||
B_TRANSLATE("At least one partition must be selected!"),
|
||||
B_TRANSLATE_COMMENT("OK", "Button"));
|
||||
alert->Go();
|
||||
|
||||
return false;
|
||||
@ -166,10 +166,10 @@ BootManagerController::_HasSelectedPartitions()
|
||||
bool
|
||||
BootManagerController::_WriteBootMenu()
|
||||
{
|
||||
BAlert* alert = new BAlert("confirm", TR("About to write the boot menu "
|
||||
"to disk. Are you sure you want to continue?"),
|
||||
TR_CMT("Write boot menu", "Button"),
|
||||
TR_CMT("Back", "Button"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
BAlert* alert = new BAlert("confirm", B_TRANSLATE("About to write the "
|
||||
"boot menu to disk. Are you sure you want to continue?"),
|
||||
B_TRANSLATE_COMMENT("Write boot menu", "Button"),
|
||||
B_TRANSLATE_COMMENT("Back", "Button"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
|
||||
if (alert->Go() == 1)
|
||||
return false;
|
||||
@ -199,15 +199,15 @@ BootManagerController::_RestoreMBR()
|
||||
fSettings.FindString("file", &path);
|
||||
|
||||
BString message;
|
||||
message << TR_CMT("About to restore the Master Boot Record (MBR) of"
|
||||
" %disk from %file. Do you wish to continue?",
|
||||
message << B_TRANSLATE_COMMENT("About to restore the Master Boot Record "
|
||||
"(MBR) of %disk from %file. Do you wish to continue?",
|
||||
"Don't translate the place holders: %disk and %file");
|
||||
message.ReplaceFirst("%disk", disk);
|
||||
message.ReplaceFirst("%file", path);
|
||||
|
||||
BAlert* alert = new BAlert("confirm", message.String(),
|
||||
TR_CMT("Restore MBR", "Button"),
|
||||
TR_CMT("Back", "Button"),
|
||||
B_TRANSLATE_COMMENT("Restore MBR", "Button"),
|
||||
B_TRANSLATE_COMMENT("Back", "Button"),
|
||||
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
if (alert->Go() == 1)
|
||||
return false;
|
||||
@ -232,7 +232,7 @@ BootManagerController::CreatePage(int32 state, WizardView* wizard)
|
||||
case kStateErrorEntry:
|
||||
page = _CreateErrorEntryPage(frame);
|
||||
wizard->SetPreviousButtonHidden(true);
|
||||
wizard->SetNextButtonLabel(TR_CMT("Done", "Button"));
|
||||
wizard->SetNextButtonLabel(B_TRANSLATE_COMMENT("Done", "Button"));
|
||||
break;
|
||||
case kStateSaveMBR:
|
||||
page = _CreateSaveMBRPage(frame);
|
||||
@ -250,21 +250,21 @@ BootManagerController::CreatePage(int32 state, WizardView* wizard)
|
||||
break;
|
||||
case kStateInstallSummary:
|
||||
page = _CreateInstallSummaryPage(frame);
|
||||
wizard->SetNextButtonLabel(TR_CMT("Next", "Button"));
|
||||
wizard->SetNextButtonLabel(B_TRANSLATE_COMMENT("Next", "Button"));
|
||||
break;
|
||||
case kStateInstalled:
|
||||
page = _CreateInstalledPage(frame);
|
||||
wizard->SetNextButtonLabel(TR_CMT("Done", "Button"));
|
||||
wizard->SetNextButtonLabel(B_TRANSLATE_COMMENT("Done", "Button"));
|
||||
break;
|
||||
case kStateUninstall:
|
||||
page = _CreateUninstallPage(frame);
|
||||
wizard->SetPreviousButtonHidden(false);
|
||||
wizard->SetNextButtonLabel(TR_CMT("Next", "Button"));
|
||||
wizard->SetNextButtonLabel(B_TRANSLATE_COMMENT("Next", "Button"));
|
||||
break;
|
||||
case kStateUninstalled:
|
||||
// TODO prevent overwriting MBR after clicking "Previous"
|
||||
page = _CreateUninstalledPage(frame);
|
||||
wizard->SetNextButtonLabel(TR_CMT("Done", "Button"));
|
||||
wizard->SetNextButtonLabel(B_TRANSLATE_COMMENT("Done", "Button"));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -279,15 +279,17 @@ BootManagerController::_CreateErrorEntryPage(BRect frame)
|
||||
|
||||
if (fReadPartitionsStatus == kErrorBootSectorTooSmall)
|
||||
description <<
|
||||
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"
|
||||
B_TRANSLATE_COMMENT("Partition table not compatible", "Title") <<
|
||||
"\n\n" <<
|
||||
B_TRANSLATE("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_CMT("Error reading partition table", "Title") << "\n\n" <<
|
||||
TR("Boot Manager is unable to read the partition table!");
|
||||
B_TRANSLATE_COMMENT("Error reading partition table", "Title") <<
|
||||
"\n\n" <<
|
||||
B_TRANSLATE("Boot Manager is unable to read the partition table!");
|
||||
|
||||
return new DescriptionPage(frame, "errorEntry", description.String(), true);
|
||||
}
|
||||
@ -301,8 +303,8 @@ BootManagerController::_CreateSaveMBRPage(BRect frame)
|
||||
fSettings.FindString("disk", &disk);
|
||||
|
||||
description <<
|
||||
TR_CMT("Backup Master Boot Record", "Title") << "\n\n" <<
|
||||
TR("The Master Boot Record (MBR) of the boot device:\n"
|
||||
B_TRANSLATE_COMMENT("Backup Master Boot Record", "Title") << "\n\n" <<
|
||||
B_TRANSLATE("The Master Boot Record (MBR) of the boot device:\n"
|
||||
"\t%s\n"
|
||||
"will now be saved to disk. Please select a file to "
|
||||
"save the MBR into.\n\n"
|
||||
@ -326,8 +328,10 @@ BootManagerController::_CreateMBRSavedPage(BRect frame)
|
||||
|
||||
if (fSaveMBRStatus == B_OK) {
|
||||
description <<
|
||||
TR_CMT("Old Master Boot Record saved", "Title") << "\n\n" <<
|
||||
TR("The old Master Boot Record was successfully save to %s.") <<
|
||||
B_TRANSLATE_COMMENT("Old Master Boot Record saved", "Title") <<
|
||||
"\n\n" <<
|
||||
B_TRANSLATE("The old Master Boot Record was successfully save to "
|
||||
"%s.") <<
|
||||
"\n";
|
||||
} else {
|
||||
description <<
|
||||
|
@ -32,7 +32,8 @@
|
||||
|
||||
BootManagerWindow::BootManagerWindow()
|
||||
:
|
||||
BWindow(BRect(100, 100, 500, 400), TR_CMT("Boot Manager", "Window Title"),
|
||||
BWindow(BRect(100, 100, 500, 400), B_TRANSLATE_COMMENT("Boot Manager",
|
||||
"Window Title"),
|
||||
B_TITLED_WINDOW,
|
||||
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE)
|
||||
{
|
||||
|
@ -45,14 +45,14 @@ typedef struct {
|
||||
|
||||
static const TimeoutOption gTimeoutOptions[] =
|
||||
{
|
||||
{ 0, TR_MARK("Immediately")},
|
||||
{ 1, TR_MARK("After one second")},
|
||||
{ 2, TR_MARK("After two seconds")},
|
||||
{ 3, TR_MARK("After three seconds")},
|
||||
{ 4, TR_MARK("After four seconds")},
|
||||
{ 5, TR_MARK("After five seconds")},
|
||||
{ 60, TR_MARK("After one minute")},
|
||||
{ kTimeoutIndefinitely, TR_MARK("Never")}
|
||||
{ 0, B_TRANSLATE_MARK("Immediately")},
|
||||
{ 1, B_TRANSLATE_MARK("After one second")},
|
||||
{ 2, B_TRANSLATE_MARK("After two seconds")},
|
||||
{ 3, B_TRANSLATE_MARK("After three seconds")},
|
||||
{ 4, B_TRANSLATE_MARK("After four seconds")},
|
||||
{ 5, B_TRANSLATE_MARK("After five seconds")},
|
||||
{ 60, B_TRANSLATE_MARK("After one minute")},
|
||||
{ kTimeoutIndefinitely, B_TRANSLATE_MARK("Never")}
|
||||
};
|
||||
|
||||
|
||||
@ -160,8 +160,8 @@ DefaultPartitionPage::_BuildUI()
|
||||
|
||||
BString text;
|
||||
text <<
|
||||
TR_CMT("Default Partition", "Title") << "\n\n" <<
|
||||
TR("Please specify a default partition and a timeout.\n"
|
||||
B_TRANSLATE_COMMENT("Default Partition", "Title") << "\n\n" <<
|
||||
B_TRANSLATE("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 "
|
||||
"can also have the boot menu wait indefinitely for you "
|
||||
@ -176,7 +176,8 @@ DefaultPartitionPage::_BuildUI()
|
||||
|
||||
BPopUpMenu* popUpMenu = _CreatePopUpMenu();
|
||||
fDefaultPartition = new BMenuField(rect, "partitions",
|
||||
TR_CMT("Default Partition:", "Menu field label"), popUpMenu);
|
||||
B_TRANSLATE_COMMENT("Default Partition:", "Menu field label"),
|
||||
popUpMenu);
|
||||
float divider = be_plain_font->StringWidth(fDefaultPartition->Label()) + 3;
|
||||
fDefaultPartition->SetDivider(divider);
|
||||
AddChild(fDefaultPartition);
|
||||
@ -197,7 +198,8 @@ DefaultPartitionPage::_BuildUI()
|
||||
B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP);
|
||||
fTimeoutSlider->SetModificationMessage(new BMessage(kMsgTimeout));
|
||||
fTimeoutSlider->SetValue(sliderValue);
|
||||
fTimeoutSlider->SetLimitLabels(TR("Immediately"),TR("Never"));
|
||||
fTimeoutSlider->SetLimitLabels(B_TRANSLATE("Immediately"),
|
||||
B_TRANSLATE("Never"));
|
||||
fTimeoutSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
||||
fTimeoutSlider->SetHashMarkCount(kNumberOfTimeoutOptions);
|
||||
fTimeoutSlider->ResizeToPreferred();
|
||||
@ -216,7 +218,7 @@ DefaultPartitionPage::_CreatePopUpMenu()
|
||||
BMenuItem* selectedItem = NULL;
|
||||
int32 selectedItemIndex = 0;
|
||||
|
||||
BPopUpMenu* menu = new BPopUpMenu(TR_CMT("Partitions",
|
||||
BPopUpMenu* menu = new BPopUpMenu(B_TRANSLATE_COMMENT("Partitions",
|
||||
"Pop up menu title"));
|
||||
BMessage message;
|
||||
for (int32 i = 0; fSettings->FindMessage("partition", i, &message) == B_OK;
|
||||
@ -247,8 +249,8 @@ DefaultPartitionPage::_CreatePopUpMenu()
|
||||
void
|
||||
DefaultPartitionPage::_GetTimeoutLabel(int32 timeout, BString& label)
|
||||
{
|
||||
const char* text = TR(get_label_for_timeout(timeout));
|
||||
label = TR("Timeout: %s");
|
||||
const char* text = B_TRANSLATE(get_label_for_timeout(timeout));
|
||||
label = B_TRANSLATE("Timeout: %s");
|
||||
label.ReplaceFirst("%s", text);
|
||||
}
|
||||
|
||||
|
@ -66,8 +66,8 @@ EntryPage::_BuildUI()
|
||||
|
||||
BString text;
|
||||
text <<
|
||||
TR_CMT("Install boot menu", "Title") << "\n\n" <<
|
||||
TR("Choose this option to install a boot menu, "
|
||||
B_TRANSLATE_COMMENT("Install boot menu", "Title") << "\n\n" <<
|
||||
B_TRANSLATE("Choose this option to install a boot menu, "
|
||||
"allowing you to select which operating "
|
||||
"system to boot when you turn on your "
|
||||
"computer.") << "\n";
|
||||
@ -83,8 +83,8 @@ EntryPage::_BuildUI()
|
||||
|
||||
text.Truncate(0);
|
||||
text <<
|
||||
TR_CMT("Uninstall boot menu", "Title") << "\n\n" <<
|
||||
TR("Choose this option to remove the boot menu "
|
||||
B_TRANSLATE_COMMENT("Uninstall boot menu", "Title") << "\n\n" <<
|
||||
B_TRANSLATE("Choose this option to remove the boot menu "
|
||||
"previously installed by this program.\n");
|
||||
fUninstallText = CreateDescription(textRect, "uninstallText", text);
|
||||
MakeHeading(fUninstallText);
|
||||
|
@ -102,7 +102,8 @@ FileSelectionPage::_BuildUI(const char* description)
|
||||
BString file;
|
||||
fSettings->FindString("file", &file);
|
||||
|
||||
fSelect = new BButton(rect, "select", TR_CMT("Select", "Button"),
|
||||
fSelect = new BButton(rect, "select",
|
||||
B_TRANSLATE_COMMENT("Select", "Button"),
|
||||
new BMessage(kMsgOpenFilePanel),
|
||||
B_FOLLOW_RIGHT);
|
||||
fSelect->ResizeToPreferred();
|
||||
@ -110,7 +111,7 @@ FileSelectionPage::_BuildUI(const char* description)
|
||||
float selectLeft = rect.right - fSelect->Bounds().Width();
|
||||
rect.right = selectLeft - kFileButtonDistance;
|
||||
fFile = new BTextControl(rect, "file",
|
||||
TR_CMT("File:", "Text control label"),
|
||||
B_TRANSLATE_COMMENT("File:", "Text control label"),
|
||||
file.String(), new BMessage());
|
||||
fFile->SetDivider(be_plain_font->StringWidth(fFile->Label()) + 5);
|
||||
AddChild(fFile);
|
||||
|
@ -191,7 +191,7 @@ PartitionRecorder::_Record(BPartition* partition)
|
||||
fIndex ++;
|
||||
BString number;
|
||||
number << fIndex;
|
||||
buffer << TR_CMT("Unnamed %d",
|
||||
buffer << B_TRANSLATE_COMMENT("Unnamed %d",
|
||||
"Default name of a partition whose name could not be read from "
|
||||
"disk; characters in codepage 437 are allowed only");
|
||||
buffer.ReplaceFirst("%d", number);
|
||||
@ -200,7 +200,8 @@ PartitionRecorder::_Record(BPartition* partition)
|
||||
|
||||
const char* type = partition->Type();
|
||||
if (type == NULL)
|
||||
type = TR_CMT("Unknown", "Text is shown for an unknown partition type");
|
||||
type = B_TRANSLATE_COMMENT("Unknown", "Text is shown for an unknown "
|
||||
"partition type");
|
||||
|
||||
BMessage message;
|
||||
// Data as required by BootLoader.h
|
||||
|
@ -99,8 +99,8 @@ PartitionsPage::_BuildUI()
|
||||
|
||||
BString text;
|
||||
text <<
|
||||
TR_CMT("Partitions", "Title") << "\n\n" <<
|
||||
TR("The following partitions were detected. Please "
|
||||
B_TRANSLATE_COMMENT("Partitions", "Title") << "\n\n" <<
|
||||
B_TRANSLATE("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 "
|
||||
"partitions as you would like them to appear in the "
|
||||
|
@ -51,8 +51,8 @@ UninstallPage::_BuildUI()
|
||||
|
||||
BString text;
|
||||
text <<
|
||||
TR_CMT("Uninstall Boot Manager", "Title") << "\n\n" <<
|
||||
TR("Please locate the Master Boot Record (MBR) save file to "
|
||||
B_TRANSLATE_COMMENT("Uninstall Boot Manager", "Title") << "\n\n" <<
|
||||
B_TRANSLATE("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.");
|
||||
fDescription = CreateDescription(rect, "description", text);
|
||||
|
@ -145,13 +145,14 @@ WizardView::_BuildUI()
|
||||
AddChild(fSeparator);
|
||||
|
||||
fPrevious = new BButton(BRect(0, 0, 100, 20), "previous",
|
||||
TR_CMT("Previous", "Button"),
|
||||
B_TRANSLATE_COMMENT("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_CMT("Next", "Button"),
|
||||
fNext = new BButton(BRect(0, 0, 100, 20), "next",
|
||||
B_TRANSLATE_COMMENT("Next", "Button"),
|
||||
new BMessage(kMessageNext),
|
||||
B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
|
||||
AddChild(fNext);
|
||||
|
Loading…
Reference in New Issue
Block a user