Updated to use B_TRANSLATE* macros. relates to #5408.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36667 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -79,9 +79,9 @@ InstallerApp::MessageReceived(BMessage* message)
|
||||
void
|
||||
InstallerApp::AboutRequested()
|
||||
{
|
||||
BAlert *alert = new BAlert("about", TR("Installer\n"
|
||||
BAlert *alert = new BAlert("about", B_TRANSLATE("Installer\n"
|
||||
"\twritten by Jérôme Duval and Stephan Aßmus\n"
|
||||
"\tCopyright 2005-2010, Haiku.\n\n"), TR("OK"));
|
||||
"\tCopyright 2005-2010, Haiku.\n\n"), B_TRANSLATE("OK"));
|
||||
BTextView *view = alert->TextView();
|
||||
BFont font;
|
||||
|
||||
@@ -102,15 +102,15 @@ InstallerApp::ReadyToRun()
|
||||
// Initilialize the Locale Kit
|
||||
be_locale->GetAppCatalog(&fCatalog);
|
||||
|
||||
const char* infoText = TR(
|
||||
const char* infoText = B_TRANSLATE(
|
||||
"Welcome to the Haiku Installer!\n\n"
|
||||
|
||||
|
||||
"IMPORTANT INFORMATION BEFORE INSTALLING HAIKU\n\n"
|
||||
|
||||
|
||||
"This is alpha-quality software! It means there is a high risk of "
|
||||
"losing important data. Make frequent backups! You have been "
|
||||
"warned.\n\n"
|
||||
|
||||
|
||||
"1) If you are installing Haiku onto real hardware (not inside an "
|
||||
"emulator) it is recommended that you have already prepared a hard "
|
||||
"disk partition. The Installer and the DriveSetup tool offer to "
|
||||
@@ -123,40 +123,40 @@ InstallerApp::ReadyToRun()
|
||||
"reboot into Haiku to continue with the installation. You could for "
|
||||
"example use the GParted Live-CD, it can also resize existing "
|
||||
"partitions to make room.\n\n"
|
||||
|
||||
|
||||
"2) The Installer will take no steps to integrate Haiku into an "
|
||||
"existing boot menu. The Haiku partition itself will be made "
|
||||
"bootable. If you have GRUB already installed, edit your "
|
||||
"/boot/grub/menu.lst by launching your favorite editor from a "
|
||||
"Terminal like this:\n\n"
|
||||
|
||||
|
||||
"\tsudo <your favorite text editor> /boot/grub/menu.lst\n\n"
|
||||
|
||||
|
||||
"You'll note that GRUB uses a different naming strategy for hard "
|
||||
"drives than Linux.\n\n"
|
||||
|
||||
|
||||
"With GRUB it's: (hdN,n)\n\n"
|
||||
|
||||
|
||||
"All harddisks start with \"hd\"\n"
|
||||
"\"N\" is the hard disk number, starting with \"0\".\n"
|
||||
"\"n\" is the partition number, also starting with \"0\".\n"
|
||||
"The first logical partition always has the number 4, regardless of "
|
||||
"the number of primary partitions.\n\n"
|
||||
|
||||
|
||||
"So behind the other menu entries towards the bottom of the file, add "
|
||||
"something similar to these lines:\n\n"
|
||||
|
||||
|
||||
"\t# Haiku on /dev/sda7\n"
|
||||
"\ttitle\t\t\t\tHaiku\n"
|
||||
"\trootnoverify\t\t(hd0,6)\n"
|
||||
"\tchainloader\t\t+1\n\n"
|
||||
|
||||
|
||||
"You can see the correct partition in GParted for example.\n\n"
|
||||
|
||||
|
||||
"3) When you successfully boot into Haiku for the first time, make "
|
||||
"sure to read our \"Welcome\" documentation, there is a link on the "
|
||||
"Desktop.\n\n"
|
||||
|
||||
|
||||
"Have fun and thanks a lot for trying out Haiku! We hope you like it!"
|
||||
);
|
||||
|
||||
@@ -172,17 +172,17 @@ InstallerApp::ReadyToRun()
|
||||
BScrollView* scrollView = new BScrollView("eulaScroll",
|
||||
textView, B_WILL_DRAW, false, true);
|
||||
|
||||
BButton* cancelButton = new BButton(TR("Quit"),
|
||||
BButton* cancelButton = new BButton(B_TRANSLATE("Quit"),
|
||||
new BMessage(B_QUIT_REQUESTED));
|
||||
cancelButton->SetTarget(this);
|
||||
|
||||
BButton* continueButton = new BButton(TR("Continue"),
|
||||
BButton* continueButton = new BButton(B_TRANSLATE("Continue"),
|
||||
new BMessage(kMsgAgree));
|
||||
continueButton->SetTarget(this);
|
||||
continueButton->MakeDefault(true);
|
||||
|
||||
BRect eulaFrame = BRect(0, 0, 600, 450);
|
||||
fEULAWindow = new BWindow(eulaFrame, TR("README"),
|
||||
fEULAWindow = new BWindow(eulaFrame, B_TRANSLATE("README"),
|
||||
B_MODAL_WINDOW, B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE
|
||||
| B_AUTO_UPDATE_SIZE_LIMITS);
|
||||
|
||||
|
||||
@@ -67,7 +67,8 @@ public:
|
||||
|
||||
virtual void Draw(BRect update);
|
||||
|
||||
virtual void GetPreferredSize(float* _width, float* _height);
|
||||
virtual void GetPreferredSize(float* _width,
|
||||
float* _height);
|
||||
|
||||
private:
|
||||
void _Init();
|
||||
@@ -150,7 +151,7 @@ layout_item_for(BView* view)
|
||||
|
||||
|
||||
InstallerWindow::InstallerWindow()
|
||||
: BWindow(BRect(-2000, -2000, -1800, -1800), TR("Installer"),
|
||||
: BWindow(BRect(-2000, -2000, -1800, -1800), B_TRANSLATE("Installer"),
|
||||
B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS),
|
||||
fEncouragedToSetupPartitions(false),
|
||||
fDriveSetupLaunched(false),
|
||||
@@ -161,29 +162,33 @@ InstallerWindow::InstallerWindow()
|
||||
{
|
||||
LogoView* logoView = new LogoView();
|
||||
|
||||
fStatusView = new BTextView("statusView", be_plain_font, NULL, B_WILL_DRAW);
|
||||
fStatusView = new BTextView("statusView", be_plain_font, NULL,
|
||||
B_WILL_DRAW);
|
||||
fStatusView->SetInsets(10, 10, 10, 10);
|
||||
fStatusView->MakeEditable(false);
|
||||
fStatusView->MakeSelectable(false);
|
||||
|
||||
BSize logoSize = logoView->MinSize();
|
||||
logoView->SetExplicitMaxSize(logoSize);
|
||||
fStatusView->SetExplicitMinSize(BSize(logoSize.width * 0.66, B_SIZE_UNSET));
|
||||
fStatusView->SetExplicitMinSize(BSize(logoSize.width * 0.66,
|
||||
B_SIZE_UNSET));
|
||||
|
||||
fDestMenu = new BPopUpMenu(TR("scanning" B_UTF8_ELLIPSIS), true, false);
|
||||
fSrcMenu = new BPopUpMenu(TR("scanning" B_UTF8_ELLIPSIS), true, false);
|
||||
fDestMenu = new BPopUpMenu(B_TRANSLATE("scanning" B_UTF8_ELLIPSIS),
|
||||
true, false);
|
||||
fSrcMenu = new BPopUpMenu(B_TRANSLATE("scanning" B_UTF8_ELLIPSIS),
|
||||
true, false);
|
||||
|
||||
fSrcMenuField = new BMenuField("srcMenuField", TR("Install from:"),
|
||||
fSrcMenu, NULL);
|
||||
fSrcMenuField = new BMenuField("srcMenuField",
|
||||
B_TRANSLATE("Install from:"), fSrcMenu, NULL);
|
||||
fSrcMenuField->SetAlignment(B_ALIGN_RIGHT);
|
||||
|
||||
fDestMenuField = new BMenuField("destMenuField", TR("Onto:"), fDestMenu,
|
||||
NULL);
|
||||
fDestMenuField = new BMenuField("destMenuField", B_TRANSLATE("Onto:"),
|
||||
fDestMenu, NULL);
|
||||
fDestMenuField->SetAlignment(B_ALIGN_RIGHT);
|
||||
|
||||
fPackagesSwitch = new PaneSwitch("options_button");
|
||||
fPackagesSwitch->SetLabels(TR("Hide optional packages"),
|
||||
TR("Show optional packages"));
|
||||
fPackagesSwitch->SetLabels(B_TRANSLATE("Hide optional packages"),
|
||||
B_TRANSLATE("Show optional packages"));
|
||||
fPackagesSwitch->SetMessage(new BMessage(SHOW_BOTTOM_MESSAGE));
|
||||
fPackagesSwitch->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED,
|
||||
B_SIZE_UNSET));
|
||||
@@ -195,34 +200,35 @@ InstallerWindow::InstallerWindow()
|
||||
fPackagesView, B_WILL_DRAW, false, true);
|
||||
|
||||
const char* requiredDiskSpaceString
|
||||
= TR("Additional disk space required: 0.0 KiB");
|
||||
= B_TRANSLATE("Additional disk space required: 0.0 KiB");
|
||||
fSizeView = new BStringView("size_view", requiredDiskSpaceString);
|
||||
fSizeView->SetAlignment(B_ALIGN_RIGHT);
|
||||
fSizeView->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNLIMITED));
|
||||
fSizeView->SetExplicitAlignment(
|
||||
BAlignment(B_ALIGN_RIGHT, B_ALIGN_MIDDLE));
|
||||
|
||||
fProgressBar = new BStatusBar("progress", TR("Install progress: "));
|
||||
fProgressBar = new BStatusBar("progress",
|
||||
B_TRANSLATE("Install progress: "));
|
||||
fProgressBar->SetMaxValue(100.0);
|
||||
|
||||
fBeginButton = new BButton("begin_button", TR("Begin"),
|
||||
fBeginButton = new BButton("begin_button", B_TRANSLATE("Begin"),
|
||||
new BMessage(BEGIN_MESSAGE));
|
||||
fBeginButton->MakeDefault(true);
|
||||
fBeginButton->SetEnabled(false);
|
||||
|
||||
fLaunchDriveSetupButton = new BButton("setup_button",
|
||||
TR("Set up partitions" B_UTF8_ELLIPSIS),
|
||||
B_TRANSLATE("Set up partitions" B_UTF8_ELLIPSIS),
|
||||
new BMessage(LAUNCH_DRIVE_SETUP));
|
||||
|
||||
fLaunchBootmanItem = new BMenuItem(TR("Set up boot menu"),
|
||||
fLaunchBootmanItem = new BMenuItem(B_TRANSLATE("Set up boot menu"),
|
||||
new BMessage(LAUNCH_BOOTMAN));
|
||||
fLaunchBootmanItem->SetEnabled(false);
|
||||
|
||||
fMakeBootableItem = new BMenuItem(TR("Write boot sector"),
|
||||
fMakeBootableItem = new BMenuItem(B_TRANSLATE("Write boot sector"),
|
||||
new BMessage(MSG_WRITE_BOOT_SECTOR));
|
||||
fMakeBootableItem->SetEnabled(false);
|
||||
BMenuBar* mainMenu = new BMenuBar("main menu");
|
||||
BMenu* toolsMenu = new BMenu(TR("Tools"));
|
||||
BMenu* toolsMenu = new BMenu(B_TRANSLATE("Tools"));
|
||||
toolsMenu->AddItem(fLaunchBootmanItem);
|
||||
toolsMenu->AddItem(fMakeBootableItem);
|
||||
mainMenu->AddItem(toolsMenu);
|
||||
@@ -273,18 +279,18 @@ InstallerWindow::InstallerWindow()
|
||||
|
||||
// Setup tool tips for the non-obvious features
|
||||
fLaunchDriveSetupButton->SetToolTip(
|
||||
TR("Launch the DriveSetup utility to partition\n"
|
||||
B_TRANSLATE("Launch the DriveSetup utility to partition\n"
|
||||
"available hard drives and other media.\n"
|
||||
"Partitions can be initialized with the\n"
|
||||
"Be File System needed for a Haiku boot\n"
|
||||
"partition."));
|
||||
// fLaunchBootmanItem->SetToolTip(
|
||||
// TR("Install or uninstall the Haiku boot menu, which allows to "
|
||||
// "choose an operating system to boot when the computer starts.\n"
|
||||
// B_TRANSLATE("Install or uninstall the Haiku boot menu, which allows "
|
||||
// "to choose an operating system to boot when the computer starts.\n"
|
||||
// "If this computer already has a boot manager such as GRUB installed, "
|
||||
// "it is better to add Haiku to that menu than to overwrite it."));
|
||||
// fMakeBootableItem->SetToolTip(
|
||||
// TR("Writes the Haiku boot code to the partition start\n"
|
||||
// B_TRANSLATE("Writes the Haiku boot code to the partition start\n"
|
||||
// "sector. This step is automatically performed by\n"
|
||||
// "the installation, but you can manually make a\n"
|
||||
// "partition bootable in case you do not need to\n"
|
||||
@@ -302,7 +308,7 @@ InstallerWindow::InstallerWindow()
|
||||
// ... and check the two we are interested in.
|
||||
fDriveSetupLaunched = be_roster->IsRunning(DRIVESETUP_SIG);
|
||||
fBootmanLaunched = be_roster->IsRunning(BOOTMAN_SIG);
|
||||
|
||||
|
||||
if (Lock()) {
|
||||
fLaunchDriveSetupButton->SetEnabled(!fDriveSetupLaunched);
|
||||
fLaunchBootmanItem->SetEnabled(!fBootmanLaunched);
|
||||
@@ -331,10 +337,11 @@ InstallerWindow::MessageReceived(BMessage *msg)
|
||||
status_t error;
|
||||
if (msg->FindInt32("error", &error) == B_OK) {
|
||||
char errorMessage[2048];
|
||||
snprintf(errorMessage, sizeof(errorMessage), TR("An error was "
|
||||
"encountered and the installation was not completed:\n\n"
|
||||
snprintf(errorMessage, sizeof(errorMessage),
|
||||
B_TRANSLATE("An error was encountered and the "
|
||||
"installation was not completed:\n\n"
|
||||
"Error: %s"), strerror(error));
|
||||
(new BAlert("error", errorMessage, TR("OK")))->Go();
|
||||
(new BAlert("error", errorMessage, B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
|
||||
_DisableInterface(false);
|
||||
@@ -363,7 +370,7 @@ InstallerWindow::MessageReceived(BMessage *msg)
|
||||
fWorkerThread->SetSpaceRequired(size);
|
||||
fInstallStatus = kInstalling;
|
||||
fWorkerThread->StartInstall();
|
||||
fBeginButton->SetLabel(TR("Stop"));
|
||||
fBeginButton->SetLabel(B_TRANSLATE("Stop"));
|
||||
_DisableInterface(true);
|
||||
|
||||
fProgressBar->SetTo(0.0, NULL, NULL);
|
||||
@@ -408,16 +415,16 @@ InstallerWindow::MessageReceived(BMessage *msg)
|
||||
fPackagesView->GetTotalSizeAsString(buffer, sizeof(buffer));
|
||||
char string[256];
|
||||
snprintf(string, sizeof(string),
|
||||
TR("Additional disk space required: %s"), buffer);
|
||||
B_TRANSLATE("Additional disk space required: %s"), buffer);
|
||||
fSizeView->SetText(string);
|
||||
break;
|
||||
}
|
||||
case ENCOURAGE_DRIVESETUP:
|
||||
{
|
||||
(new BAlert("use drive setup", TR("No partitions have been found "
|
||||
"that are suitable for installation. Please set up partitions "
|
||||
"and initialize at least one partition with the Be File "
|
||||
"System."), TR("OK")))->Go();
|
||||
(new BAlert("use drive setup", B_TRANSLATE("No partitions have "
|
||||
"been found that are suitable for installation. Please set "
|
||||
"up partitions and initialize at least one partition with the "
|
||||
"Be File System."), B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
case MSG_STATUS_MESSAGE:
|
||||
{
|
||||
@@ -429,7 +436,7 @@ InstallerWindow::MessageReceived(BMessage *msg)
|
||||
if (msg->FindFloat("progress", &progress) == B_OK) {
|
||||
const char* currentItem;
|
||||
if (msg->FindString("item", ¤tItem) != B_OK) {
|
||||
currentItem = TR_CMT("???",
|
||||
currentItem = B_TRANSLATE_COMMENT("???",
|
||||
"Unknown currently copied item");
|
||||
}
|
||||
BString trailingLabel;
|
||||
@@ -438,11 +445,14 @@ InstallerWindow::MessageReceived(BMessage *msg)
|
||||
if (msg->FindInt32("current", ¤tCount) == B_OK
|
||||
&& msg->FindInt32("maximum", &maximumCount) == B_OK) {
|
||||
char buffer[64];
|
||||
snprintf(buffer, sizeof(buffer), TR_CMT("%1ld of %2ld",
|
||||
"number of files copied"), currentCount, maximumCount);
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
B_TRANSLATE_COMMENT("%1ld of %2ld",
|
||||
"number of files copied"),
|
||||
currentCount, maximumCount);
|
||||
trailingLabel << buffer;
|
||||
} else {
|
||||
trailingLabel << TR_CMT("?? of ??", "Unknown progress");
|
||||
trailingLabel <<
|
||||
B_TRANSLATE_COMMENT("?? of ??", "Unknown progress");
|
||||
}
|
||||
fProgressBar->SetTo(progress, currentItem,
|
||||
trailingLabel.String());
|
||||
@@ -458,28 +468,28 @@ InstallerWindow::MessageReceived(BMessage *msg)
|
||||
}
|
||||
case MSG_INSTALL_FINISHED:
|
||||
{
|
||||
|
||||
|
||||
_SetCopyEngineCancelSemaphore(-1);
|
||||
|
||||
fBeginButton->SetLabel(TR("Quit"));
|
||||
fBeginButton->SetLabel(B_TRANSLATE("Quit"));
|
||||
|
||||
PartitionMenuItem* dstItem
|
||||
= (PartitionMenuItem*)fDestMenu->FindMarked();
|
||||
|
||||
char status[1024];
|
||||
if (be_roster->IsRunning(kDeskbarSignature)) {
|
||||
snprintf(status, sizeof(status), TR("Installation completed. "
|
||||
"Boot sector has been written to '%s'. Press Quit to "
|
||||
"leave the Installer or choose a new target volume to "
|
||||
"perform another installation."),
|
||||
dstItem ? dstItem->Name() : TR_CMT("???",
|
||||
snprintf(status, sizeof(status), B_TRANSLATE("Installation "
|
||||
"completed. Boot sector has been written to '%s'. Press "
|
||||
"Quit to leave the Installer or choose a new target "
|
||||
"volume to perform another installation."),
|
||||
dstItem ? dstItem->Name() : B_TRANSLATE_COMMENT("???",
|
||||
"Unknown partition name"));
|
||||
} else {
|
||||
snprintf(status, sizeof(status), TR("Installation completed. "
|
||||
"Boot sector has been written to '%s'. Press Quit to "
|
||||
"restart the computer or choose a new target volume "
|
||||
"to perform another installation."),
|
||||
dstItem ? dstItem->Name() : TR_CMT("???",
|
||||
snprintf(status, sizeof(status), B_TRANSLATE("Installation "
|
||||
"completed. Boot sector has been written to '%s'. Press "
|
||||
"Quit to restart the computer or choose a new target "
|
||||
"volume to perform another installation."),
|
||||
dstItem ? dstItem->Name() : B_TRANSLATE_COMMENT("???",
|
||||
"Unknown partition name"));
|
||||
}
|
||||
|
||||
@@ -502,7 +512,7 @@ InstallerWindow::MessageReceived(BMessage *msg)
|
||||
if (isDriveSetup || isBootman) {
|
||||
bool scanPartitions = false;
|
||||
if (isDriveSetup) {
|
||||
bool launched = msg->what == B_SOME_APP_LAUNCHED;
|
||||
bool launched = msg->what == B_SOME_APP_LAUNCHED;
|
||||
// We need to scan partitions if DriveSetup has quit.
|
||||
scanPartitions = fDriveSetupLaunched && !launched;
|
||||
fDriveSetupLaunched = launched;
|
||||
@@ -514,16 +524,18 @@ InstallerWindow::MessageReceived(BMessage *msg)
|
||||
!fDriveSetupLaunched && !fBootmanLaunched);
|
||||
_DisableInterface(fDriveSetupLaunched || fBootmanLaunched);
|
||||
if (fDriveSetupLaunched && fBootmanLaunched) {
|
||||
_SetStatusMessage(TR("Running Boot Manager and "
|
||||
_SetStatusMessage(B_TRANSLATE("Running Boot Manager and "
|
||||
"DriveSetup" B_UTF8_ELLIPSIS
|
||||
"\n\nClose both applications to continue with the "
|
||||
"installation."));
|
||||
} else if (fDriveSetupLaunched) {
|
||||
_SetStatusMessage(TR("Running DriveSetup" B_UTF8_ELLIPSIS
|
||||
_SetStatusMessage(B_TRANSLATE("Running DriveSetup"
|
||||
B_UTF8_ELLIPSIS
|
||||
"\n\nClose DriveSetup to continue with the "
|
||||
"installation."));
|
||||
} else if (fBootmanLaunched) {
|
||||
_SetStatusMessage(TR("Running Boot Manager" B_UTF8_ELLIPSIS
|
||||
_SetStatusMessage(B_TRANSLATE("Running Boot Manager"
|
||||
B_UTF8_ELLIPSIS
|
||||
"\n\nClose Boot Manager to continue with the "
|
||||
"installation."));
|
||||
} else {
|
||||
@@ -553,19 +565,19 @@ bool
|
||||
InstallerWindow::QuitRequested()
|
||||
{
|
||||
if (fDriveSetupLaunched && fBootmanLaunched) {
|
||||
(new BAlert(TR("Quit Boot Manager and DriveSetup"),
|
||||
TR("Please close the Boot Manager and DriveSetup windows before "
|
||||
"closing the Installer window."), TR("OK")))->Go();
|
||||
(new BAlert(B_TRANSLATE("Quit Boot Manager and DriveSetup"),
|
||||
B_TRANSLATE("Please close the Boot Manager and DriveSetup windows "
|
||||
"before closing the Installer window."), B_TRANSLATE("OK")))->Go();
|
||||
return false;
|
||||
} else if (fDriveSetupLaunched) {
|
||||
(new BAlert(TR("Quit DriveSetup"),
|
||||
TR("Please close the DriveSetup window before closing the "
|
||||
"Installer window."), TR("OK")))->Go();
|
||||
(new BAlert(B_TRANSLATE("Quit DriveSetup"),
|
||||
B_TRANSLATE("Please close the DriveSetup window before closing "
|
||||
"the Installer window."), B_TRANSLATE("OK")))->Go();
|
||||
return false;
|
||||
} else if (fBootmanLaunched) {
|
||||
(new BAlert(TR("Quit Boot Manager"),
|
||||
TR("Please close the Boot Manager window before closing the "
|
||||
"Installer window."), TR("OK")))->Go();
|
||||
(new BAlert(B_TRANSLATE("Quit Boot Manager"),
|
||||
B_TRANSLATE("Please close the Boot Manager window before closing "
|
||||
"the Installer window."), B_TRANSLATE("OK")))->Go();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -573,9 +585,10 @@ InstallerWindow::QuitRequested()
|
||||
// This means Deskbar is not running, i.e. Installer is the only
|
||||
// thing on the screen and we will reboot the machine once it quits.
|
||||
if ((new BAlert("reallyQuit",
|
||||
TR("Are you sure you want to abort the installation and restart "
|
||||
"the system?"),
|
||||
TR("Cancel"), TR("Restart system")))->Go() == 0) {
|
||||
B_TRANSLATE("Are you sure you want to abort the installation and "
|
||||
"restart the system?"),
|
||||
B_TRANSLATE("Cancel"),
|
||||
B_TRANSLATE("Restart system")))->Go() == 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -615,9 +628,9 @@ InstallerWindow::_LaunchDriveSetup()
|
||||
BEntry entry(path.Path());
|
||||
entry_ref ref;
|
||||
if (entry.GetRef(&ref) != B_OK || be_roster->Launch(&ref) != B_OK) {
|
||||
BAlert* alert = new BAlert("error", TR("DriveSetup, the "
|
||||
BAlert* alert = new BAlert("error", B_TRANSLATE("DriveSetup, the "
|
||||
"application to configure disk partitions, could not be "
|
||||
"launched."), TR("OK"));
|
||||
"launched."), B_TRANSLATE("OK"));
|
||||
alert->Go();
|
||||
}
|
||||
}
|
||||
@@ -642,9 +655,9 @@ InstallerWindow::_LaunchBootman()
|
||||
BEntry entry(path.Path());
|
||||
entry_ref ref;
|
||||
if (entry.GetRef(&ref) != B_OK || be_roster->Launch(&ref) != B_OK) {
|
||||
BAlert* alert = new BAlert("error", TR("Bootman, the "
|
||||
BAlert* alert = new BAlert("error", B_TRANSLATE("Bootman, the "
|
||||
"application to configure the Haiku boot menu, could not be "
|
||||
"launched."), TR("OK"));
|
||||
"launched."), B_TRANSLATE("OK"));
|
||||
alert->Go();
|
||||
}
|
||||
}
|
||||
@@ -665,7 +678,7 @@ InstallerWindow::_DisableInterface(bool disable)
|
||||
void
|
||||
InstallerWindow::_ScanPartitions()
|
||||
{
|
||||
_SetStatusMessage(TR("Scanning for disks" B_UTF8_ELLIPSIS));
|
||||
_SetStatusMessage(B_TRANSLATE("Scanning for disks" B_UTF8_ELLIPSIS));
|
||||
|
||||
BMenuItem *item;
|
||||
while ((item = fSrcMenu->RemoveItem((int32)0)))
|
||||
@@ -691,7 +704,7 @@ InstallerWindow::_UpdateControls()
|
||||
label = srcItem->MenuLabel();
|
||||
} else {
|
||||
if (fSrcMenu->CountItems() == 0)
|
||||
label = TR_CMT("<none>", "No partition available");
|
||||
label = B_TRANSLATE_COMMENT("<none>", "No partition available");
|
||||
else
|
||||
label = ((PartitionMenuItem*)fSrcMenu->ItemAt(0))->MenuLabel();
|
||||
}
|
||||
@@ -720,40 +733,40 @@ InstallerWindow::_UpdateControls()
|
||||
label = dstItem->MenuLabel();
|
||||
} else {
|
||||
if (fDestMenu->CountItems() == 0)
|
||||
label = TR_CMT("<none>", "No partition available");
|
||||
label = B_TRANSLATE_COMMENT("<none>", "No partition available");
|
||||
else
|
||||
label = TR("Please choose target");
|
||||
label = B_TRANSLATE("Please choose target");
|
||||
}
|
||||
fDestMenuField->MenuItem()->SetLabel(label.String());
|
||||
|
||||
if (srcItem != NULL && dstItem != NULL) {
|
||||
char message[255];
|
||||
sprintf(message, TR("Press the Begin button to install from '%1s' "
|
||||
"onto '%2s'."), srcItem->Name(), dstItem->Name());
|
||||
sprintf(message, B_TRANSLATE("Press the Begin button to install from "
|
||||
"'%1s' onto '%2s'."), srcItem->Name(), dstItem->Name());
|
||||
_SetStatusMessage(message);
|
||||
} else if (srcItem != NULL) {
|
||||
_SetStatusMessage(TR("Choose the disk you want to install onto from "
|
||||
"the pop-up menu. Then click \"Begin\"."));
|
||||
_SetStatusMessage(B_TRANSLATE("Choose the disk you want to install "
|
||||
"onto from the pop-up menu. Then click \"Begin\"."));
|
||||
} else if (dstItem != NULL) {
|
||||
_SetStatusMessage(TR("Choose the source disk from the "
|
||||
_SetStatusMessage(B_TRANSLATE("Choose the source disk from the "
|
||||
"pop-up menu. Then click \"Begin\"."));
|
||||
} else {
|
||||
_SetStatusMessage(TR("Choose the source and destination disk from the "
|
||||
"pop-up menus. Then click \"Begin\"."));
|
||||
_SetStatusMessage(B_TRANSLATE("Choose the source and destination disk "
|
||||
"from the pop-up menus. Then click \"Begin\"."));
|
||||
}
|
||||
|
||||
fInstallStatus = kReadyForInstall;
|
||||
fBeginButton->SetLabel(TR("Begin"));
|
||||
fBeginButton->SetLabel(B_TRANSLATE("Begin"));
|
||||
fBeginButton->SetEnabled(srcItem && dstItem);
|
||||
|
||||
// adjust "Write Boot Sector" and "Set up boot menu" buttons
|
||||
if (dstItem != NULL) {
|
||||
char buffer[256];
|
||||
snprintf(buffer, sizeof(buffer), TR("Write boot sector to '%s'"),
|
||||
snprintf(buffer, sizeof(buffer), B_TRANSLATE("Write boot sector to '%s'"),
|
||||
dstItem->Name());
|
||||
label = buffer;
|
||||
} else
|
||||
label = TR("Write boot sector");
|
||||
label = B_TRANSLATE("Write boot sector");
|
||||
fMakeBootableItem->SetEnabled(dstItem != NULL);
|
||||
fMakeBootableItem->SetLabel(label.String());
|
||||
// TODO: Once bootman support writing to specific disks, enable this, since
|
||||
@@ -836,13 +849,13 @@ InstallerWindow::_QuitCopyEngine(bool askUser)
|
||||
// First of all block the copy engine, so that it doesn't continue
|
||||
// while the alert is showing, which would be irritating.
|
||||
acquire_sem(fCopyEngineCancelSemaphore);
|
||||
|
||||
|
||||
bool quit = true;
|
||||
if (askUser) {
|
||||
quit = (new BAlert("cancel",
|
||||
TR("Are you sure you want to to stop the installation?"),
|
||||
TR_CMT("Continue", "In alert after pressing Stop"),
|
||||
TR_CMT("Stop", "In alert after pressing Stop"), 0,
|
||||
B_TRANSLATE("Are you sure you want to to stop the installation?"),
|
||||
B_TRANSLATE_COMMENT("Continue", "In alert after pressing Stop"),
|
||||
B_TRANSLATE_COMMENT("Stop", "In alert after pressing Stop"), 0,
|
||||
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -320,7 +320,8 @@ PackagesView::Draw(BRect updateRect)
|
||||
if (CountChildren() > 0)
|
||||
return;
|
||||
|
||||
be_control_look->DrawLabel(this, TR("No optional packages available."),
|
||||
be_control_look->DrawLabel(this,
|
||||
B_TRANSLATE("No optional packages available."),
|
||||
Bounds(), updateRect, ViewColor(), BControlLook::B_DISABLED,
|
||||
BAlignment(B_ALIGN_CENTER, B_ALIGN_MIDDLE));
|
||||
}
|
||||
|
||||
@@ -48,7 +48,8 @@ ProgressReporter::Reset()
|
||||
|
||||
if (fMessage) {
|
||||
BMessage message(*fMessage);
|
||||
message.AddString("status", TR("Collecting copy information."));
|
||||
message.AddString("status",
|
||||
B_TRANSLATE("Collecting copy information."));
|
||||
fMessenger.SendMessage(&message);
|
||||
}
|
||||
}
|
||||
@@ -72,7 +73,7 @@ ProgressReporter::StartTimer()
|
||||
|
||||
if (fMessage) {
|
||||
BMessage message(*fMessage);
|
||||
message.AddString("status", TR("Performing installation."));
|
||||
message.AddString("status", B_TRANSLATE("Performing installation."));
|
||||
fMessenger.SendMessage(&message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,8 +103,8 @@ WorkerThread::MessageReceived(BMessage* message)
|
||||
{
|
||||
int32 id;
|
||||
if (message->FindInt32("id", &id) != B_OK) {
|
||||
_SetStatusMessage(TR("Boot sector not written because of an "
|
||||
" internal error."));
|
||||
_SetStatusMessage(B_TRANSLATE("Boot sector not written "
|
||||
"because of an internal error."));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -116,34 +116,35 @@ WorkerThread::MessageReceived(BMessage* message)
|
||||
if (fDDRoster.GetPartitionWithID(id, &device, &partition) == B_OK) {
|
||||
if (!partition->IsMounted()) {
|
||||
if (partition->Mount() < B_OK) {
|
||||
_SetStatusMessage(TR("The partition can't be mounted. "
|
||||
"Please choose a different partition."));
|
||||
_SetStatusMessage(B_TRANSLATE("The partition can't be "
|
||||
"mounted. Please choose a different partition."));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (partition->GetMountPoint(&targetDirectory) != B_OK) {
|
||||
_SetStatusMessage(TR("The mount point could not be "
|
||||
"retrieved."));
|
||||
_SetStatusMessage(B_TRANSLATE("The mount point could not "
|
||||
"be retrieved."));
|
||||
break;
|
||||
}
|
||||
} else if (fDDRoster.GetDeviceWithID(id, &device) == B_OK) {
|
||||
if (!device.IsMounted()) {
|
||||
if (device.Mount() < B_OK) {
|
||||
_SetStatusMessage(TR("The disk can't be mounted. "
|
||||
"Please choose a different disk."));
|
||||
_SetStatusMessage(B_TRANSLATE("The disk can't be "
|
||||
"mounted. Please choose a different disk."));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (device.GetMountPoint(&targetDirectory) != B_OK) {
|
||||
_SetStatusMessage(TR("The mount point could not be "
|
||||
"retrieved."));
|
||||
_SetStatusMessage(B_TRANSLATE("The mount point could not "
|
||||
"be retrieved."));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_LaunchFinishScript(targetDirectory);
|
||||
// TODO: Get error from executing script!
|
||||
_SetStatusMessage(TR("Boot sector successfully written."));
|
||||
_SetStatusMessage(
|
||||
B_TRANSLATE("Boot sector successfully written."));
|
||||
}
|
||||
default:
|
||||
BLooper::MessageReceived(message);
|
||||
@@ -221,7 +222,7 @@ WorkerThread::_LaunchInitScript(BPath &path)
|
||||
command += "\"";
|
||||
command += path.Path();
|
||||
command += "\"";
|
||||
_SetStatusMessage(TR("Starting Installation."));
|
||||
_SetStatusMessage(B_TRANSLATE("Starting Installation."));
|
||||
system(command.String());
|
||||
}
|
||||
|
||||
@@ -237,7 +238,7 @@ WorkerThread::_LaunchFinishScript(BPath &path)
|
||||
command += "\"";
|
||||
command += path.Path();
|
||||
command += "\"";
|
||||
_SetStatusMessage(TR("Finishing Installation."));
|
||||
_SetStatusMessage(B_TRANSLATE("Finishing Installation."));
|
||||
system(command.String());
|
||||
}
|
||||
|
||||
@@ -255,8 +256,8 @@ WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu)
|
||||
status_t err = B_OK;
|
||||
int32 entries = 0;
|
||||
entry_ref testRef;
|
||||
const char* mountError = TR("The disk can't be mounted. Please choose "
|
||||
"a different disk.");
|
||||
const char* mountError = B_TRANSLATE("The disk can't be mounted. Please "
|
||||
"choose a different disk.");
|
||||
|
||||
BMessenger messenger(fWindow);
|
||||
ProgressReporter reporter(messenger, new BMessage(MSG_STATUS_MESSAGE));
|
||||
@@ -310,9 +311,10 @@ WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu)
|
||||
|
||||
// check if target has enough space
|
||||
if ((fSpaceRequired > 0 && targetVolume.FreeBytes() < fSpaceRequired)
|
||||
&& ((new BAlert("", TR("The destination disk may not have enough "
|
||||
"space. Try choosing a different disk or choose to not install "
|
||||
"optional items."), TR("Try installing anyway"), TR("Cancel"), 0,
|
||||
&& ((new BAlert("", B_TRANSLATE("The destination disk may not have "
|
||||
"enough space. Try choosing a different disk or choose to not "
|
||||
"install optional items."), B_TRANSLATE("Try installing anyway"),
|
||||
B_TRANSLATE("Cancel"), 0,
|
||||
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) {
|
||||
goto error;
|
||||
}
|
||||
@@ -332,16 +334,17 @@ WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu)
|
||||
|
||||
// check not installing on itself
|
||||
if (strcmp(srcDirectory.Path(), targetDirectory.Path()) == 0) {
|
||||
_SetStatusMessage(TR("You can't install the contents of a disk onto "
|
||||
"itself. Please choose a different disk."));
|
||||
_SetStatusMessage(B_TRANSLATE("You can't install the contents of a "
|
||||
"disk onto itself. Please choose a different disk."));
|
||||
goto error;
|
||||
}
|
||||
|
||||
// check not installing on boot volume
|
||||
if ((strncmp(BOOT_PATH, targetDirectory.Path(), strlen(BOOT_PATH)) == 0)
|
||||
&& ((new BAlert("", TR("Are you sure you want to install onto the "
|
||||
"current boot disk? The Installer will have to reboot your "
|
||||
"machine if you proceed."), TR("OK"), TR("Cancel"), 0,
|
||||
&& ((new BAlert("", B_TRANSLATE("Are you sure you want to install "
|
||||
"onto the current boot disk? The Installer will have to reboot "
|
||||
"your machine if you proceed."), B_TRANSLATE("OK"),
|
||||
B_TRANSLATE("Cancel"), 0,
|
||||
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) {
|
||||
_SetStatusMessage("Installation stopped.");
|
||||
goto error;
|
||||
@@ -350,7 +353,7 @@ WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu)
|
||||
// check if target volume's trash dir has anything in it
|
||||
// (target volume w/ only an empty trash dir is considered
|
||||
// an empty volume)
|
||||
if (find_directory(B_TRASH_DIRECTORY, &trashPath, false,
|
||||
if (find_directory(B_TRASH_DIRECTORY, &trashPath, false,
|
||||
&targetVolume) == B_OK && targetDir.SetTo(trashPath.Path()) == B_OK) {
|
||||
while (targetDir.GetNextRef(&testRef) == B_OK) {
|
||||
// Something in the Trash
|
||||
@@ -366,15 +369,15 @@ WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu)
|
||||
if (testPath.SetTo(&testRef) == B_OK && testPath != trashPath)
|
||||
entries++;
|
||||
}
|
||||
|
||||
|
||||
if (entries != 0
|
||||
&& ((new BAlert("", TR("The target volume is not empty. Are you sure you "
|
||||
"want to install anyway?\n\nNote: The 'system' folder will be a "
|
||||
"clean copy from the source volume, all other folders will be "
|
||||
"merged, whereas files and links that exist on both the source "
|
||||
"and target volume will be overwritten with the source volume "
|
||||
"version."),
|
||||
TR("Install anyway"), TR("Cancel"), 0,
|
||||
&& ((new BAlert("", B_TRANSLATE("The target volume is not empty. Are "
|
||||
"you sure you want to install anyway?\n\nNote: The 'system' folder "
|
||||
"will be a clean copy from the source volume, all other folders "
|
||||
"will be merged, whereas files and links that exist on both the "
|
||||
"source and target volume will be overwritten with the source "
|
||||
"volume version."),
|
||||
B_TRANSLATE("Install anyway"), B_TRANSLATE("Cancel"), 0,
|
||||
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) {
|
||||
// TODO: Would be cool to offer the option here to clean additional
|
||||
// folders at the user's choice (like /boot/common and /boot/develop).
|
||||
@@ -453,7 +456,7 @@ WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu)
|
||||
error:
|
||||
BMessage statusMessage(MSG_RESET);
|
||||
if (err == B_CANCELED)
|
||||
_SetStatusMessage(TR("Installation canceled."));
|
||||
_SetStatusMessage(B_TRANSLATE("Installation canceled."));
|
||||
else
|
||||
statusMessage.AddInt32("error", err);
|
||||
ERR("_PerformInstall failed");
|
||||
@@ -525,7 +528,7 @@ make_partition_label(BPartition* partition, char* label, char* menuLabel,
|
||||
if (showContentType) {
|
||||
const char* type = partition->ContentType();
|
||||
if (type == NULL)
|
||||
type = TR_CMT("Unknown Type", "Partition content type");
|
||||
type = B_TRANSLATE_COMMENT("Unknown Type", "Partition content type");
|
||||
|
||||
sprintf(label, "%s - %s [%s] (%s)", partition->ContentName(), size,
|
||||
path.Path(), type);
|
||||
|
||||
Reference in New Issue
Block a user