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