Apps & Prefs: Use B_TRANSLATE_SYSTEM_NAME() where appropriate
The application name should never appear in a translatable string. Otherwise it will always show translated in the app, even if the user configured the Locale prefs to not "Translate app and folder names". Always concatenate the B_TRANSLATE_SYSTEM_NAME'ed string. Use a regular BAboutWindow in the Sounds prefs. Change-Id: I85f02a3aa6c76b22266d495cf7514cc499bc31e8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10234 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
439cbbfff1
commit
c273dc9f64
@@ -301,21 +301,22 @@ BootManagerController::_CreateErrorEntryPage()
|
|||||||
description << B_TRANSLATE_COMMENT("Partition table not compatible",
|
description << B_TRANSLATE_COMMENT("Partition table not compatible",
|
||||||
"Title") << "\n\n"
|
"Title") << "\n\n"
|
||||||
<< B_TRANSLATE("The partition table of the first hard disk is not "
|
<< B_TRANSLATE("The partition table of the first hard disk is not "
|
||||||
"compatible with Boot Manager.\n"
|
"compatible.\n"
|
||||||
"Boot Manager only works with IBM PC MBR partitions.");
|
"%appname% only works with IBM PC MBR partitions.");
|
||||||
} else if (fCollectPartitionsStatus == B_PARTITION_TOO_SMALL) {
|
} else if (fCollectPartitionsStatus == B_PARTITION_TOO_SMALL) {
|
||||||
description << B_TRANSLATE_COMMENT("First partition starts too early",
|
description << B_TRANSLATE_COMMENT("First partition starts too early",
|
||||||
"Title") << "\n\n"
|
"Title") << "\n\n"
|
||||||
<< B_TRANSLATE("The first partition on the disk starts too early "
|
<< B_TRANSLATE("The first partition on the disk starts too early "
|
||||||
"and does not leave enough space free for a boot menu.\n"
|
"and does not leave enough space free for a boot menu.\n"
|
||||||
"Boot Manager needs 2 KiB available space before the first "
|
"%appname% needs 2 KiB available space before the first "
|
||||||
"partition.");
|
"partition.");
|
||||||
} else {
|
} else {
|
||||||
description << B_TRANSLATE_COMMENT("Error reading partition table",
|
description << B_TRANSLATE_COMMENT("Error reading partition table",
|
||||||
"Title") << "\n\n"
|
"Title") << "\n\n"
|
||||||
<< B_TRANSLATE("Boot Manager is unable to read the partition "
|
<< B_TRANSLATE("%appname% is unable to read the partition "
|
||||||
"table!");
|
"table!");
|
||||||
}
|
}
|
||||||
|
description.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("BootManager"));
|
||||||
|
|
||||||
return new DescriptionPage("errorEntry", description.String(), true);
|
return new DescriptionPage("errorEntry", description.String(), true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,8 +233,10 @@ CodyCam::_SetUpNodes()
|
|||||||
INFO("CodyCam acquiring VideoInput node\n");
|
INFO("CodyCam acquiring VideoInput node\n");
|
||||||
status = fMediaRoster->GetVideoInput(&fProducerNode);
|
status = fMediaRoster->GetVideoInput(&fProducerNode);
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
fWindow->ErrorAlert(B_TRANSLATE("Cannot find a video source.\n"
|
BString text(B_TRANSLATE("Cannot find a video source.\n"
|
||||||
"You need a webcam to use CodyCam."), status);
|
"You need a webcam to use %appname%."));
|
||||||
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("CodyCam"));
|
||||||
|
fWindow->ErrorAlert(text, status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -285,8 +285,9 @@ B_TRANSLATE_MARK_VOID("About this system")
|
|||||||
AddItem(mountMenu);
|
AddItem(mountMenu);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
item = new BMenuItem(B_TRANSLATE("Deskbar preferences" B_UTF8_ELLIPSIS),
|
BString menuLabel(B_TRANSLATE("%appname% preferences" B_UTF8_ELLIPSIS));
|
||||||
new BMessage(kConfigShow));
|
menuLabel.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Deskbar"));
|
||||||
|
item = new BMenuItem(menuLabel, new BMessage(kConfigShow));
|
||||||
item->SetTarget(be_app);
|
item->SetTarget(be_app);
|
||||||
AddItem(item);
|
AddItem(item);
|
||||||
|
|
||||||
|
|||||||
@@ -46,9 +46,13 @@ static const char* kSettingsFileName = "prefs_window_settings";
|
|||||||
|
|
||||||
PreferencesWindow::PreferencesWindow(BRect frame)
|
PreferencesWindow::PreferencesWindow(BRect frame)
|
||||||
:
|
:
|
||||||
BWindow(frame, B_TRANSLATE("Deskbar preferences"), B_TITLED_WINDOW,
|
BWindow(frame, "", B_TITLED_WINDOW,
|
||||||
B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE)
|
B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE)
|
||||||
{
|
{
|
||||||
|
BString title(B_TRANSLATE("%appname% preferences"));
|
||||||
|
title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Deskbar"));
|
||||||
|
SetTitle(title);
|
||||||
|
|
||||||
// Initial settings (used by revert button)
|
// Initial settings (used by revert button)
|
||||||
fSettings = *static_cast<TBarApp*>(be_app)->Settings();
|
fSettings = *static_cast<TBarApp*>(be_app)->Settings();
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,10 @@ DirectoryFilePanel::Show()
|
|||||||
fCurrentButton->SetTarget(Messenger());
|
fCurrentButton->SetTarget(Messenger());
|
||||||
|
|
||||||
SetButtonLabel(B_DEFAULT_BUTTON, B_TRANSLATE("Select"));
|
SetButtonLabel(B_DEFAULT_BUTTON, B_TRANSLATE("Select"));
|
||||||
Window()->SetTitle(B_TRANSLATE("Expander: Choose destination"));
|
|
||||||
|
BString title(B_TRANSLATE("%appname%: Choose destination"));
|
||||||
|
title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Expander"));
|
||||||
|
Window()->SetTitle(title);
|
||||||
|
|
||||||
Window()->Unlock();
|
Window()->Unlock();
|
||||||
|
|
||||||
|
|||||||
@@ -43,13 +43,17 @@ static const uint32 MSG_DESTSELECT = 'mDes';
|
|||||||
|
|
||||||
ExpanderPreferences::ExpanderPreferences(BMessage* settings)
|
ExpanderPreferences::ExpanderPreferences(BMessage* settings)
|
||||||
:
|
:
|
||||||
BWindow(BRect(0, 0, 325, 305), B_TRANSLATE("Expander settings"),
|
BWindow(BRect(0, 0, 325, 305), "",
|
||||||
B_FLOATING_WINDOW_LOOK, B_FLOATING_APP_WINDOW_FEEL,
|
B_FLOATING_WINDOW_LOOK, B_FLOATING_APP_WINDOW_FEEL,
|
||||||
B_NOT_RESIZABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE
|
B_NOT_RESIZABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE
|
||||||
| B_AUTO_UPDATE_SIZE_LIMITS),
|
| B_AUTO_UPDATE_SIZE_LIMITS),
|
||||||
fSettings(settings),
|
fSettings(settings),
|
||||||
fUsePanel(NULL)
|
fUsePanel(NULL)
|
||||||
{
|
{
|
||||||
|
BString title(B_TRANSLATE("%appname% settings"));
|
||||||
|
title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Expander"));
|
||||||
|
SetTitle(title);
|
||||||
|
|
||||||
const float kSpacing = be_control_look->DefaultItemSpacing();
|
const float kSpacing = be_control_look->DefaultItemSpacing();
|
||||||
|
|
||||||
BStringView* expansionLabel = new BStringView("stringViewExpansion",
|
BStringView* expansionLabel = new BStringView("stringViewExpansion",
|
||||||
|
|||||||
@@ -256,8 +256,9 @@ ExpanderWindow::MessageReceived(BMessage* message)
|
|||||||
BMessenger messenger(this);
|
BMessenger messenger(this);
|
||||||
fSourcePanel = new BFilePanel(B_OPEN_PANEL, &messenger, &srcRef,
|
fSourcePanel = new BFilePanel(B_OPEN_PANEL, &messenger, &srcRef,
|
||||||
B_FILE_NODE, false, NULL, new RuleRefFilter(fRules), true);
|
B_FILE_NODE, false, NULL, new RuleRefFilter(fRules), true);
|
||||||
(fSourcePanel->Window())->SetTitle(
|
BString title(B_TRANSLATE("%appname%: Open"));
|
||||||
B_TRANSLATE("Expander: Open"));
|
title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Expander"));
|
||||||
|
(fSourcePanel->Window())->SetTitle(title);
|
||||||
} else
|
} else
|
||||||
fSourcePanel->SetPanelDirectory(&srcRef);
|
fSourcePanel->SetPanelDirectory(&srcRef);
|
||||||
fSourcePanel->Show();
|
fSourcePanel->Show();
|
||||||
|
|||||||
@@ -456,11 +456,12 @@ void
|
|||||||
App::_CheckPackageDaemonRuns()
|
App::_CheckPackageDaemonRuns()
|
||||||
{
|
{
|
||||||
while (!be_roster->IsRunning(kPackageDaemonSignature)) {
|
while (!be_roster->IsRunning(kPackageDaemonSignature)) {
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("Start package daemon"),
|
BString text(B_TRANSLATE("%appname% needs the package daemon to function, "
|
||||||
B_TRANSLATE("HaikuDepot needs the package daemon to function, "
|
|
||||||
"and it appears to be not running.\n"
|
"and it appears to be not running.\n"
|
||||||
"Would you like to start it now?"),
|
"Would you like to start it now?"));
|
||||||
B_TRANSLATE("No, quit HaikuDepot"), B_TRANSLATE("Start package daemon"), NULL,
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("HaikuDepot"));
|
||||||
|
BAlert* alert = new BAlert(B_TRANSLATE("Start package daemon"), text,
|
||||||
|
B_TRANSLATE("No, quit"), B_TRANSLATE("Start package daemon"), NULL,
|
||||||
B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
alert->SetShortcut(0, B_ESCAPE);
|
alert->SetShortcut(0, B_ESCAPE);
|
||||||
|
|
||||||
@@ -482,7 +483,7 @@ App::_LaunchPackageDaemon()
|
|||||||
errorMessage.ReplaceAll("%Error%", strerror(ret));
|
errorMessage.ReplaceAll("%Error%", strerror(ret));
|
||||||
|
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("Package daemon problem"), errorMessage,
|
BAlert* alert = new BAlert(B_TRANSLATE("Package daemon problem"), errorMessage,
|
||||||
B_TRANSLATE("Quit HaikuDepot"), B_TRANSLATE("Try again"), NULL, B_WIDTH_AS_USUAL,
|
B_TRANSLATE("Quit"), B_TRANSLATE("Try again"), NULL, B_WIDTH_AS_USUAL,
|
||||||
B_WARNING_ALERT);
|
B_WARNING_ALERT);
|
||||||
alert->SetShortcut(0, B_ESCAPE);
|
alert->SetShortcut(0, B_ESCAPE);
|
||||||
|
|
||||||
|
|||||||
@@ -2004,9 +2004,10 @@ MainWindow::_WindowTitleForPackage(const PackageInfoRef& pkg)
|
|||||||
if (version.IsSet())
|
if (version.IsSet())
|
||||||
versionString = version->ToString();
|
versionString = version->ToString();
|
||||||
|
|
||||||
BString title = B_TRANSLATE("HaikuDepot - %PackageName% %PackageVersion%");
|
BString title("%AppName% - %PackageName% %PackageVersion%");
|
||||||
title.ReplaceAll("%PackageName%", pkg->Name());
|
title.ReplaceFirst("%AppName%", B_TRANSLATE_SYSTEM_NAME("HaikuDepot"));
|
||||||
title.ReplaceAll("%PackageVersion%", versionString);
|
title.ReplaceFirst("%PackageName%", pkg->Name());
|
||||||
|
title.ReplaceFirst("%PackageVersion%", versionString);
|
||||||
|
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,8 +28,10 @@ ShuttingDownWindow::ShuttingDownWindow(BWindow* parent)
|
|||||||
textView->AdoptSystemColors();
|
textView->AdoptSystemColors();
|
||||||
textView->MakeEditable(false);
|
textView->MakeEditable(false);
|
||||||
textView->MakeSelectable(false);
|
textView->MakeSelectable(false);
|
||||||
textView->SetText(B_TRANSLATE("HaikuDepot is stopping or completing "
|
BString text(B_TRANSLATE("%appname% is stopping or completing "
|
||||||
"running operations before quitting."));
|
"running operations before quitting."));
|
||||||
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("HaikuDepot"));
|
||||||
|
textView->SetText(text);
|
||||||
|
|
||||||
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
||||||
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
|
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
|
||||||
|
|||||||
@@ -33,12 +33,12 @@
|
|||||||
#define PLACEHOLDER_TEXT "..."
|
#define PLACEHOLDER_TEXT "..."
|
||||||
|
|
||||||
#define INTRODUCTION_TEXT_LATEST \
|
#define INTRODUCTION_TEXT_LATEST \
|
||||||
"HaikuDepot communicates with a " \
|
"%Appname% communicates with a " \
|
||||||
"server component called HaikuDepotServer. These are the latest " \
|
"server component called HaikuDepotServer. These are the latest " \
|
||||||
"usage conditions for use of the HaikuDepotServer service."
|
"usage conditions for use of the HaikuDepotServer service."
|
||||||
|
|
||||||
#define INTRODUCTION_TEXT_USER \
|
#define INTRODUCTION_TEXT_USER \
|
||||||
"HaikuDepot communicates with a " \
|
"%Appname% communicates with a " \
|
||||||
"server component called HaikuDepotServer. These are the usage " \
|
"server component called HaikuDepotServer. These are the usage " \
|
||||||
"conditions that the user '%Nickname%' agreed to at %AgreedToTimestamp% "\
|
"conditions that the user '%Nickname%' agreed to at %AgreedToTimestamp% "\
|
||||||
"in relation to the use of the HaikuDepotServer service."
|
"in relation to the use of the HaikuDepotServer service."
|
||||||
@@ -436,7 +436,11 @@ UserUsageConditionsWindow::_IntroductionTextForMode(UserUsageConditionsSelection
|
|||||||
{
|
{
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case LATEST:
|
case LATEST:
|
||||||
return B_TRANSLATE(INTRODUCTION_TEXT_LATEST);
|
{
|
||||||
|
BString text(B_TRANSLATE(INTRODUCTION_TEXT_LATEST));
|
||||||
|
text.ReplaceFirst("%Appname%", B_TRANSLATE_SYSTEM_NAME("HaikuDepot"));
|
||||||
|
return text;
|
||||||
|
}
|
||||||
case USER:
|
case USER:
|
||||||
{
|
{
|
||||||
BString nicknamePresentation = PLACEHOLDER_TEXT;
|
BString nicknamePresentation = PLACEHOLDER_TEXT;
|
||||||
@@ -453,6 +457,7 @@ UserUsageConditionsWindow::_IntroductionTextForMode(UserUsageConditionsSelection
|
|||||||
}
|
}
|
||||||
|
|
||||||
BString text = B_TRANSLATE(INTRODUCTION_TEXT_USER);
|
BString text = B_TRANSLATE(INTRODUCTION_TEXT_USER);
|
||||||
|
text.ReplaceFirst("%Appname%", B_TRANSLATE_SYSTEM_NAME("HaikuDepot"));
|
||||||
text.ReplaceAll("%Nickname%", nicknamePresentation);
|
text.ReplaceAll("%Nickname%", nicknamePresentation);
|
||||||
text.ReplaceAll("%AgreedToTimestamp%", agreedToTimestampPresentation);
|
text.ReplaceAll("%AgreedToTimestamp%", agreedToTimestampPresentation);
|
||||||
return text;
|
return text;
|
||||||
|
|||||||
@@ -144,13 +144,14 @@ SVGExporter::SetOriginalEntry(const entry_ref* ref)
|
|||||||
bool
|
bool
|
||||||
SVGExporter::_DisplayWarning() const
|
SVGExporter::_DisplayWarning() const
|
||||||
{
|
{
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("warning"),
|
BString text(B_TRANSLATE("%appname% might not have "
|
||||||
B_TRANSLATE("Icon-O-Matic might not have "
|
|
||||||
"interpreted all data from the SVG "
|
"interpreted all data from the SVG "
|
||||||
"when it was loaded. "
|
"when it was loaded. "
|
||||||
"By overwriting the original "
|
"By overwriting the original "
|
||||||
"file, this information would now "
|
"file, this information would now "
|
||||||
"be lost."),
|
"be lost."));
|
||||||
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Icon-O-Matic"));
|
||||||
|
BAlert* alert = new BAlert(B_TRANSLATE("warning"), text,
|
||||||
B_TRANSLATE("Cancel"),
|
B_TRANSLATE("Cancel"),
|
||||||
B_TRANSLATE("Overwrite"));
|
B_TRANSLATE("Overwrite"));
|
||||||
alert->SetShortcut(0, B_ESCAPE);
|
alert->SetShortcut(0, B_ESCAPE);
|
||||||
|
|||||||
@@ -509,11 +509,13 @@ InstallerWindow::MessageReceived(BMessage *msg)
|
|||||||
BString status;
|
BString status;
|
||||||
if (be_roster->IsRunning(kDeskbarSignature)) {
|
if (be_roster->IsRunning(kDeskbarSignature)) {
|
||||||
fBeginButton->SetLabel(B_TRANSLATE("Quit"));
|
fBeginButton->SetLabel(B_TRANSLATE("Quit"));
|
||||||
status.SetToFormat(B_TRANSLATE("Installation "
|
|
||||||
|
BString text(B_TRANSLATE("Installation "
|
||||||
"completed. Boot sector has been written to '%s'. Press "
|
"completed. Boot sector has been written to '%s'. Press "
|
||||||
"'Quit' to leave the Installer or choose a new target "
|
"'Quit' to leave the %appname% or choose a new target "
|
||||||
"volume to perform another installation."),
|
"volume to perform another installation."));
|
||||||
dstItem ? dstItem->Name() : B_TRANSLATE_COMMENT("???",
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Installer"));
|
||||||
|
status.SetToFormat(text, dstItem ? dstItem->Name() : B_TRANSLATE_COMMENT("???",
|
||||||
"Unknown partition name"));
|
"Unknown partition name"));
|
||||||
} else {
|
} else {
|
||||||
fBeginButton->SetLabel(B_TRANSLATE("Restart"));
|
fBeginButton->SetLabel(B_TRANSLATE("Restart"));
|
||||||
|
|||||||
@@ -527,9 +527,11 @@ WorkerThread::_PerformInstall(partition_id sourcePartitionID,
|
|||||||
|
|
||||||
// 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) {
|
||||||
BAlert* alert = new BAlert("", B_TRANSLATE("Are you sure you want to "
|
BString text(B_TRANSLATE("Are you sure you want to "
|
||||||
"install onto the current boot disk? The Installer will have to "
|
"install onto the current boot disk? The %appname% will have to "
|
||||||
"reboot your machine if you proceed."), B_TRANSLATE("OK"),
|
"reboot your machine if you proceed."));
|
||||||
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Installer"));
|
||||||
|
BAlert* alert = new BAlert("", text, B_TRANSLATE("OK"),
|
||||||
B_TRANSLATE("Cancel"), 0, B_WIDTH_AS_USUAL, B_STOP_ALERT);
|
B_TRANSLATE("Cancel"), 0, B_WIDTH_AS_USUAL, B_STOP_ALERT);
|
||||||
alert->SetShortcut(1, B_ESCAPE);
|
alert->SetShortcut(1, B_ESCAPE);
|
||||||
if (alert->Go() != 0) {
|
if (alert->Go() != 0) {
|
||||||
|
|||||||
@@ -53,11 +53,12 @@ LoginApp::ReadyToRun()
|
|||||||
BScreen screen;
|
BScreen screen;
|
||||||
|
|
||||||
if (fEditShelfMode) {
|
if (fEditShelfMode) {
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("Info"), B_TRANSLATE("You can "
|
BString text(B_TRANSLATE("You can "
|
||||||
"customize the desktop shown behind the Login application by "
|
"customize the desktop shown behind the %appname% application by "
|
||||||
"dropping replicants onto it.\n\n"
|
"dropping replicants onto it.\n\n"
|
||||||
"When you are finished just quit the application (Cmd-Q)."),
|
"When you are finished just quit the application (Cmd-Q)."));
|
||||||
B_TRANSLATE("OK"));
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Login"));
|
||||||
|
BAlert* alert = new BAlert(B_TRANSLATE("Info"), text, B_TRANSLATE("OK"));
|
||||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||||
alert->Go(NULL);
|
alert->Go(NULL);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1702,8 +1702,9 @@ TMailWindow::MessageReceived(BMessage* msg)
|
|||||||
snooze (1500000);
|
snooze (1500000);
|
||||||
if (!gDictCount) {
|
if (!gDictCount) {
|
||||||
beep();
|
beep();
|
||||||
BAlert* alert = new BAlert("",
|
BString text(B_TRANSLATE("%appname% couldn't find its dictionary."));
|
||||||
B_TRANSLATE("Mail couldn't find its dictionary."),
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Mail"));
|
||||||
|
BAlert* alert = new BAlert("", text,
|
||||||
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
|
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
|
||||||
B_OFFSET_SPACING, B_STOP_ALERT);
|
B_OFFSET_SPACING, B_STOP_ALERT);
|
||||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ TPrefsWindow::TPrefsWindow(BPoint leftTop, BFont* font, int32* level,
|
|||||||
bool* warnUnencodable, bool* spellCheckStartOn, bool* autoMarkRead,
|
bool* warnUnencodable, bool* spellCheckStartOn, bool* autoMarkRead,
|
||||||
uint8* buttonBar)
|
uint8* buttonBar)
|
||||||
:
|
:
|
||||||
BWindow(BRect(leftTop.x, leftTop.y, leftTop.x + 100, leftTop.y + 100),
|
BWindow(BRect(leftTop.x, leftTop.y, leftTop.x + 100, leftTop.y + 100), "",
|
||||||
B_TRANSLATE("Mail settings"),
|
|
||||||
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
|
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
|
||||||
| B_AUTO_UPDATE_SIZE_LIMITS),
|
| B_AUTO_UPDATE_SIZE_LIMITS),
|
||||||
|
|
||||||
@@ -136,6 +135,10 @@ TPrefsWindow::TPrefsWindow(BPoint leftTop, BFont* font, int32* level,
|
|||||||
fNewAutoMarkRead(autoMarkRead),
|
fNewAutoMarkRead(autoMarkRead),
|
||||||
fAutoMarkRead(*autoMarkRead)
|
fAutoMarkRead(*autoMarkRead)
|
||||||
{
|
{
|
||||||
|
BString title(B_TRANSLATE("%appname% settings"));
|
||||||
|
title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Mail"));
|
||||||
|
SetTitle(title);
|
||||||
|
|
||||||
strcpy(fSignature, *fNewSignature);
|
strcpy(fSignature, *fNewSignature);
|
||||||
|
|
||||||
BMenuField* menu;
|
BMenuField* menu;
|
||||||
|
|||||||
@@ -701,7 +701,7 @@ MandelbrotWindow::MessageReceived(BMessage* msg)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case B_ABOUT_REQUESTED: {
|
case B_ABOUT_REQUESTED: {
|
||||||
BAboutWindow* wind = new BAboutWindow("Mandelbrot",
|
BAboutWindow* wind = new BAboutWindow(B_TRANSLATE_SYSTEM_NAME("Mandelbrot"),
|
||||||
"application/x-vnd.Haiku-Mandelbrot");
|
"application/x-vnd.Haiku-Mandelbrot");
|
||||||
|
|
||||||
const char* authors[] = {
|
const char* authors[] = {
|
||||||
|
|||||||
@@ -419,8 +419,9 @@ MainApp::_ShowFilePanel(BFilePanel* panel, uint32 command,
|
|||||||
if (message->FindString("title", &panelTitle) != B_OK)
|
if (message->FindString("title", &panelTitle) != B_OK)
|
||||||
panelTitle = defaultTitle;
|
panelTitle = defaultTitle;
|
||||||
{
|
{
|
||||||
BString finalPanelTitle = "MediaPlayer: ";
|
BString finalPanelTitle(B_TRANSLATE("%appname%: %title%"));
|
||||||
finalPanelTitle << panelTitle;
|
finalPanelTitle.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("MediaPlayer"));
|
||||||
|
finalPanelTitle.ReplaceFirst("%title%", panelTitle);
|
||||||
BAutolock lock(panel->Window());
|
BAutolock lock(panel->Window());
|
||||||
panel->Window()->SetTitle(finalPanelTitle.String());
|
panel->Window()->SetTitle(finalPanelTitle.String());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,11 +42,14 @@ enum {
|
|||||||
|
|
||||||
SettingsWindow::SettingsWindow(BRect frame)
|
SettingsWindow::SettingsWindow(BRect frame)
|
||||||
:
|
:
|
||||||
BWindow(frame, B_TRANSLATE("MediaPlayer settings"), B_FLOATING_WINDOW_LOOK,
|
BWindow(frame, "", B_FLOATING_WINDOW_LOOK, B_FLOATING_ALL_WINDOW_FEEL,
|
||||||
B_FLOATING_ALL_WINDOW_FEEL,
|
|
||||||
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE
|
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE
|
||||||
| B_AUTO_UPDATE_SIZE_LIMITS)
|
| B_AUTO_UPDATE_SIZE_LIMITS)
|
||||||
{
|
{
|
||||||
|
BString title(B_TRANSLATE("%appname% settings"));
|
||||||
|
title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("MediaPlayer"));
|
||||||
|
SetTitle(title);
|
||||||
|
|
||||||
const float kSpacing = be_control_look->DefaultItemSpacing();
|
const float kSpacing = be_control_look->DefaultItemSpacing();
|
||||||
|
|
||||||
BBox* settingsBox = new BBox(B_PLAIN_BORDER, NULL);
|
BBox* settingsBox = new BBox(B_PLAIN_BORDER, NULL);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ MidiPlayerApp::ReadyToRun()
|
|||||||
void
|
void
|
||||||
MidiPlayerApp::AboutRequested()
|
MidiPlayerApp::AboutRequested()
|
||||||
{
|
{
|
||||||
BAboutWindow* window = new BAboutWindow("MidiPlayer",
|
BAboutWindow* window = new BAboutWindow(B_TRANSLATE_SYSTEM_NAME("MidiPlayer"),
|
||||||
MIDI_PLAYER_SIGNATURE);
|
MIDI_PLAYER_SIGNATURE);
|
||||||
|
|
||||||
const char* extraCopyrights[] = {
|
const char* extraCopyrights[] = {
|
||||||
|
|||||||
@@ -87,10 +87,11 @@ NetworkStatus::ArgvReceived(int32 argc, char** argv)
|
|||||||
|
|
||||||
if (strcmp(argv[1], "--help") == 0
|
if (strcmp(argv[1], "--help") == 0
|
||||||
|| strcmp(argv[1], "-h") == 0) {
|
|| strcmp(argv[1], "-h") == 0) {
|
||||||
const char* str = B_TRANSLATE("NetworkStatus options:\n"
|
BString str = B_TRANSLATE("%appname% options:\n"
|
||||||
"\t--deskbar\tautomatically add replicant to Deskbar\n"
|
"\t--deskbar\tautomatically add replicant to Deskbar\n"
|
||||||
"\t--help\t\tprint this info and exit");
|
"\t--help\t\tprint this info and exit");
|
||||||
puts(str);
|
str.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("NetworkStatus"));
|
||||||
|
puts(str.String());
|
||||||
fQuitImmediately = true;
|
fQuitImmediately = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,10 +145,10 @@ Pairs::_GetVectorIcons()
|
|||||||
if (fIconMap.size() < kMinIconCount) {
|
if (fIconMap.size() < kMinIconCount) {
|
||||||
char buffer[512];
|
char buffer[512];
|
||||||
snprintf(buffer, sizeof(buffer),
|
snprintf(buffer, sizeof(buffer),
|
||||||
B_TRANSLATE_COMMENT("Pairs did not find enough vector icons "
|
B_TRANSLATE_COMMENT("%s did not find enough vector icons "
|
||||||
"to start; it needs at least %zu, found %zu.\n",
|
"to start; it needs at least %zu, found %zu.\n",
|
||||||
"Don't translate \"%zu\", but make sure to keep them."),
|
"Don't translate \"%s\" and \"%zu\", but make sure to keep them."),
|
||||||
kMinIconCount, fIconMap.size());
|
B_TRANSLATE_SYSTEM_NAME("Pairs"), kMinIconCount, fIconMap.size());
|
||||||
BString messageString(buffer);
|
BString messageString(buffer);
|
||||||
BAlert* alert = new BAlert("Fatal", messageString.String(),
|
BAlert* alert = new BAlert("Fatal", messageString.String(),
|
||||||
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST,
|
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST,
|
||||||
|
|||||||
@@ -24,12 +24,16 @@
|
|||||||
#define B_TRANSLATION_CONTEXT "PoorMan"
|
#define B_TRANSLATION_CONTEXT "PoorMan"
|
||||||
|
|
||||||
|
|
||||||
PoorManPreferencesWindow::PoorManPreferencesWindow(BRect frame, char * name)
|
PoorManPreferencesWindow::PoorManPreferencesWindow(BRect frame)
|
||||||
: BWindow(frame, name, B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE
|
: BWindow(frame, "", B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE
|
||||||
| B_CLOSE_ON_ESCAPE | B_AUTO_UPDATE_SIZE_LIMITS),
|
| B_CLOSE_ON_ESCAPE | B_AUTO_UPDATE_SIZE_LIMITS),
|
||||||
fWebDirFilePanel(NULL),
|
fWebDirFilePanel(NULL),
|
||||||
fLogFilePanel(NULL)
|
fLogFilePanel(NULL)
|
||||||
{
|
{
|
||||||
|
BString title(B_TRANSLATE("%appname% settings"));
|
||||||
|
title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("PoorMan"));
|
||||||
|
SetTitle(title);
|
||||||
|
|
||||||
fCancelButton = new BButton("Cancel Button", B_TRANSLATE("Cancel"),
|
fCancelButton = new BButton("Cancel Button", B_TRANSLATE("Cancel"),
|
||||||
new BMessage(MSG_PREF_BTN_CANCEL));
|
new BMessage(MSG_PREF_BTN_CANCEL));
|
||||||
fDoneButton = new BButton("Done Button", B_TRANSLATE("Done"),
|
fDoneButton = new BButton("Done Button", B_TRANSLATE("Done"),
|
||||||
@@ -75,8 +79,9 @@ PoorManPreferencesWindow::PoorManPreferencesWindow(BRect frame, char * name)
|
|||||||
B_FILE_NODE, false, &message);
|
B_FILE_NODE, false, &message);
|
||||||
fLogFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, B_TRANSLATE("Create"));
|
fLogFilePanel->SetButtonLabel(B_DEFAULT_BUTTON, B_TRANSLATE("Create"));
|
||||||
change_title = fLogFilePanel->Window();
|
change_title = fLogFilePanel->Window();
|
||||||
change_title->SetTitle(STR_FILEPANEL_CREATE_LOG_FILE);
|
title = B_TRANSLATE("Create %appname% log");
|
||||||
|
title.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("PoorMan"));
|
||||||
|
change_title->SetTitle(title);
|
||||||
|
|
||||||
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
||||||
.SetInsets(0, B_USE_DEFAULT_SPACING, 0, B_USE_WINDOW_SPACING)
|
.SetInsets(0, B_USE_DEFAULT_SPACING, 0, B_USE_WINDOW_SPACING)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
class PoorManPreferencesWindow: public BWindow {
|
class PoorManPreferencesWindow: public BWindow {
|
||||||
public:
|
public:
|
||||||
PoorManPreferencesWindow(BRect frame, char* name);
|
PoorManPreferencesWindow(BRect frame);
|
||||||
~PoorManPreferencesWindow();
|
~PoorManPreferencesWindow();
|
||||||
|
|
||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
|
|||||||
@@ -186,8 +186,7 @@ PoorManWindow::MessageReceived(BMessage* message)
|
|||||||
fPrefWindow->MessageReceived(message);
|
fPrefWindow->MessageReceived(message);
|
||||||
break;
|
break;
|
||||||
case MSG_MENU_EDIT_PREF:
|
case MSG_MENU_EDIT_PREF:
|
||||||
fPrefWindow = new PoorManPreferencesWindow(fSetwindowFrame,
|
fPrefWindow = new PoorManPreferencesWindow(fSetwindowFrame);
|
||||||
STR_WIN_NAME_PREF);
|
|
||||||
fPrefWindow->Show();
|
fPrefWindow->Show();
|
||||||
break;
|
break;
|
||||||
case MSG_MENU_CTRL_RUN:
|
case MSG_MENU_CTRL_RUN:
|
||||||
@@ -535,11 +534,18 @@ PoorManWindow::SaveConsole(BMessage* message, bool selection)
|
|||||||
void
|
void
|
||||||
PoorManWindow::DefaultSettings()
|
PoorManWindow::DefaultSettings()
|
||||||
{
|
{
|
||||||
BAlert* serverAlert = new BAlert(B_TRANSLATE("Error Server"),
|
BAlert* serverAlert = new BAlert(B_TRANSLATE("Error server"),
|
||||||
STR_ERR_CANT_START, B_TRANSLATE("OK"));
|
STR_ERR_CANT_START, B_TRANSLATE("OK"));
|
||||||
serverAlert->SetFlags(serverAlert->Flags() | B_CLOSE_ON_ESCAPE);
|
serverAlert->SetFlags(serverAlert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||||
BAlert* dirAlert = new BAlert(B_TRANSLATE("Error Dir"),
|
|
||||||
STR_ERR_WEB_DIR, B_TRANSLATE("Cancel"), B_TRANSLATE("Select"),
|
BString text(B_TRANSLATE(
|
||||||
|
"Please choose the folder to publish on the web.\n\n"
|
||||||
|
"You can have %appname% create a default \"public_html\" "
|
||||||
|
"in your home folder.\n"
|
||||||
|
"Or you select one of your own folders instead."));
|
||||||
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("PoorMan"));
|
||||||
|
BAlert* dirAlert = new BAlert(B_TRANSLATE("Error folder"),
|
||||||
|
text, B_TRANSLATE("Cancel"), B_TRANSLATE("Select"),
|
||||||
B_TRANSLATE("Create public_html"), B_WIDTH_AS_USUAL, B_OFFSET_SPACING);
|
B_TRANSLATE("Create public_html"), B_WIDTH_AS_USUAL, B_OFFSET_SPACING);
|
||||||
dirAlert->SetShortcut(0, B_ESCAPE);
|
dirAlert->SetShortcut(0, B_ESCAPE);
|
||||||
int32 buttonIndex = dirAlert->Go();
|
int32 buttonIndex = dirAlert->Go();
|
||||||
@@ -552,9 +558,7 @@ PoorManWindow::DefaultSettings()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
fPrefWindow = new PoorManPreferencesWindow(
|
fPrefWindow = new PoorManPreferencesWindow(fSetwindowFrame);
|
||||||
fSetwindowFrame,
|
|
||||||
STR_WIN_NAME_PREF);
|
|
||||||
fPrefWindow->ShowWebDirFilePanel();
|
fPrefWindow->ShowWebDirFilePanel();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -15,12 +15,6 @@ const char* STR_APP_SIG
|
|||||||
= "application/x-vnd.Haiku-PoorMan";
|
= "application/x-vnd.Haiku-PoorMan";
|
||||||
const char* STR_APP_NAME
|
const char* STR_APP_NAME
|
||||||
= B_TRANSLATE_SYSTEM_NAME("PoorMan");
|
= B_TRANSLATE_SYSTEM_NAME("PoorMan");
|
||||||
const char* STR_ERR_WEB_DIR
|
|
||||||
= B_TRANSLATE(
|
|
||||||
"Please choose the folder to publish on the web.\n\n"
|
|
||||||
"You can have PoorMan create a default \"public_html\" "
|
|
||||||
"in your home folder.\n"
|
|
||||||
"Or you select one of your own folders instead.");
|
|
||||||
const char* STR_ERR_CANT_START
|
const char* STR_ERR_CANT_START
|
||||||
= B_TRANSLATE(
|
= B_TRANSLATE(
|
||||||
"Cannot start the server");
|
"Cannot start the server");
|
||||||
@@ -66,9 +60,6 @@ const char* STR_TXT_VIEW
|
|||||||
|
|
||||||
// ------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
// Preferences Window
|
// Preferences Window
|
||||||
char* STR_WIN_NAME_PREF
|
|
||||||
= (char*)B_TRANSLATE("PoorMan settings");
|
|
||||||
|
|
||||||
const char* STR_SETTINGS_FILE_NAME
|
const char* STR_SETTINGS_FILE_NAME
|
||||||
= "PoorMan settings";
|
= "PoorMan settings";
|
||||||
const char* STR_DEFAULT_WEB_DIRECTORY
|
const char* STR_DEFAULT_WEB_DIRECTORY
|
||||||
@@ -106,8 +97,6 @@ const char* STR_TXT_LOG_FILE_NAME
|
|||||||
= B_TRANSLATE("Log file name:");
|
= B_TRANSLATE("Log file name:");
|
||||||
const char* STR_BTN_CREATE_LOG_FILE
|
const char* STR_BTN_CREATE_LOG_FILE
|
||||||
= B_TRANSLATE("Create log file");
|
= B_TRANSLATE("Create log file");
|
||||||
const char* STR_FILEPANEL_CREATE_LOG_FILE
|
|
||||||
= B_TRANSLATE("Create PoorMan log");
|
|
||||||
|
|
||||||
const char* STR_TAB_ADVANCED
|
const char* STR_TAB_ADVANCED
|
||||||
= B_TRANSLATE("Advanced");
|
= B_TRANSLATE("Advanced");
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ const int32 MSG_LOG = 'logg';
|
|||||||
// PoorMan Window
|
// PoorMan Window
|
||||||
extern const char* STR_APP_SIG;
|
extern const char* STR_APP_SIG;
|
||||||
extern const char* STR_APP_NAME;
|
extern const char* STR_APP_NAME;
|
||||||
extern const char* STR_ERR_WEB_DIR; // Alert Box
|
extern const char* STR_ERR_CANT_START; // Alert Box
|
||||||
extern const char* STR_ERR_CANT_START;
|
|
||||||
extern const char* STR_DIR_CREATED;
|
extern const char* STR_DIR_CREATED;
|
||||||
|
|
||||||
extern const char* STR_MNU_FILE;
|
extern const char* STR_MNU_FILE;
|
||||||
@@ -68,7 +67,6 @@ extern const char* STR_TXT_VIEW;
|
|||||||
|
|
||||||
// ------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
// Preferences Window
|
// Preferences Window
|
||||||
extern char* STR_WIN_NAME_PREF;
|
|
||||||
extern const char* STR_SETTINGS_FILE_NAME;
|
extern const char* STR_SETTINGS_FILE_NAME;
|
||||||
extern const char* STR_DEFAULT_WEB_DIRECTORY;
|
extern const char* STR_DEFAULT_WEB_DIRECTORY;
|
||||||
|
|
||||||
@@ -89,7 +87,6 @@ extern const char* STR_BBX_FILE_LOGGING;
|
|||||||
extern const char* STR_CBX_LOG_FILE;
|
extern const char* STR_CBX_LOG_FILE;
|
||||||
extern const char* STR_TXT_LOG_FILE_NAME;
|
extern const char* STR_TXT_LOG_FILE_NAME;
|
||||||
extern const char* STR_BTN_CREATE_LOG_FILE;
|
extern const char* STR_BTN_CREATE_LOG_FILE;
|
||||||
extern const char* STR_FILEPANEL_CREATE_LOG_FILE;
|
|
||||||
|
|
||||||
extern const char* STR_TAB_ADVANCED;
|
extern const char* STR_TAB_ADVANCED;
|
||||||
extern const char* STR_BBX_CONNECTION;
|
extern const char* STR_BBX_CONNECTION;
|
||||||
|
|||||||
@@ -106,9 +106,10 @@ PowerStatus::ReadyToRun()
|
|||||||
|
|
||||||
if (ACPIDriverInterface().Connect() != B_OK) {
|
if (ACPIDriverInterface().Connect() != B_OK) {
|
||||||
if (APMDriverInterface().Connect() != B_OK) {
|
if (APMDriverInterface().Connect() != B_OK) {
|
||||||
BAlert* alert = new BAlert("",
|
BString text(B_TRANSLATE("No supported battery detected. %appname% "
|
||||||
B_TRANSLATE("No supported battery detected. PowerStatus "
|
"cannot be used on your system."));
|
||||||
"cannot be used on your system."), B_TRANSLATE("Too bad!"),
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("PowerStatus"));
|
||||||
|
BAlert* alert = new BAlert("", text, B_TRANSLATE("Too bad!"),
|
||||||
NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
if (!fAutoInstallInDeskbar)
|
if (!fAutoInstallInDeskbar)
|
||||||
alert->Go();
|
alert->Go();
|
||||||
@@ -131,9 +132,10 @@ PowerStatus::ReadyToRun()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isDeskbarRunning && !isInstalled) {
|
if (isDeskbarRunning && !isInstalled) {
|
||||||
BAlert* alert = new BAlert("",
|
BString text(B_TRANSLATE("You can run %appname% in a window "
|
||||||
B_TRANSLATE("You can run PowerStatus in a window "
|
"or install it in the Deskbar."));
|
||||||
"or install it in the Deskbar."), B_TRANSLATE("Run in window"),
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("PowerStatus"));
|
||||||
|
BAlert* alert = new BAlert("", text, B_TRANSLATE("Run in window"),
|
||||||
B_TRANSLATE("Install in Deskbar"), NULL, B_WIDTH_AS_USUAL,
|
B_TRANSLATE("Install in Deskbar"), NULL, B_WIDTH_AS_USUAL,
|
||||||
B_WARNING_ALERT);
|
B_WARNING_ALERT);
|
||||||
|
|
||||||
|
|||||||
@@ -72,9 +72,10 @@ PCApplication::ReadyToRun()
|
|||||||
BDeskbar deskbar;
|
BDeskbar deskbar;
|
||||||
if (!deskbar.HasItem(kDeskbarItemName)) {
|
if (!deskbar.HasItem(kDeskbarItemName)) {
|
||||||
// We're not yet installed in the Deskbar, ask if we should
|
// We're not yet installed in the Deskbar, ask if we should
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("Info"),
|
BString text(B_TRANSLATE("You can run %appname% in a window"
|
||||||
B_TRANSLATE("You can run ProcessController in a window"
|
" or install it in the Deskbar."));
|
||||||
" or install it in the Deskbar."), B_TRANSLATE("Run in window"),
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("ProcessController"));
|
||||||
|
BAlert* alert = new BAlert(B_TRANSLATE("Info"), text, B_TRANSLATE("Run in window"),
|
||||||
B_TRANSLATE("Install in Deskbar"),
|
B_TRANSLATE("Install in Deskbar"),
|
||||||
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
|
|
||||||
@@ -86,8 +87,9 @@ PCApplication::ReadyToRun()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("Info"),
|
BString text(B_TRANSLATE("%appname% is already installed in Deskbar."));
|
||||||
B_TRANSLATE("ProcessController is already installed in Deskbar."),
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("ProcessController"));
|
||||||
|
BAlert* alert = new BAlert(B_TRANSLATE("Info"), text,
|
||||||
B_TRANSLATE("OK"), NULL,
|
B_TRANSLATE("OK"), NULL,
|
||||||
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||||
|
|||||||
@@ -915,10 +915,9 @@ thread_popup(void *arg)
|
|||||||
addtopbottom(new BSeparatorItem ());
|
addtopbottom(new BSeparatorItem ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BString text(B_TRANSLATE("About %appname%" B_UTF8_ELLIPSIS));
|
||||||
item = new IconMenuItem(gPCView->fProcessControllerIcon,
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("ProcessController"));
|
||||||
B_TRANSLATE("About ProcessController" B_UTF8_ELLIPSIS),
|
item = new IconMenuItem(gPCView->fProcessControllerIcon, text, new BMessage(B_ABOUT_REQUESTED));
|
||||||
new BMessage(B_ABOUT_REQUESTED));
|
|
||||||
item->SetTarget(gPCView);
|
item->SetTarget(gPCView);
|
||||||
addtopbottom(item);
|
addtopbottom(item);
|
||||||
|
|
||||||
|
|||||||
@@ -199,8 +199,9 @@ CPUButton::MouseDown(BPoint point)
|
|||||||
} else if ((B_SECONDARY_MOUSE_BUTTON & mouseButtons) != 0
|
} else if ((B_SECONDARY_MOUSE_BUTTON & mouseButtons) != 0
|
||||||
&& fReplicantInDeskbar) {
|
&& fReplicantInDeskbar) {
|
||||||
BPopUpMenu *menu = new BPopUpMenu(B_TRANSLATE("Deskbar menu"));
|
BPopUpMenu *menu = new BPopUpMenu(B_TRANSLATE("Deskbar menu"));
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("About Pulse" B_UTF8_ELLIPSIS),
|
BString menuLabel(B_TRANSLATE("About %appname%" B_UTF8_ELLIPSIS));
|
||||||
new BMessage(B_ABOUT_REQUESTED)));
|
menuLabel.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Pulse"));
|
||||||
|
menu->AddItem(new BMenuItem(menuLabel, new BMessage(B_ABOUT_REQUESTED)));
|
||||||
menu->AddSeparatorItem();
|
menu->AddSeparatorItem();
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Remove replicant"),
|
menu->AddItem(new BMenuItem(B_TRANSLATE("Remove replicant"),
|
||||||
new BMessage(kDeleteReplicant)));
|
new BMessage(kDeleteReplicant)));
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ NormalPulseView::NormalPulseView(BRect rect)
|
|||||||
CPUBUTTON_MTOP + ITEM_OFFSET * x + CPUBUTTON_HEIGHT + 7);
|
CPUBUTTON_MTOP + ITEM_OFFSET * x + CPUBUTTON_HEIGHT + 7);
|
||||||
char temp[4];
|
char temp[4];
|
||||||
snprintf(temp, sizeof(temp), "%hhd", int8(x + 1));
|
snprintf(temp, sizeof(temp), "%hhd", int8(x + 1));
|
||||||
fCpuButtons[x] = new CPUButton(r, B_TRANSLATE("Pulse"), temp, NULL);
|
fCpuButtons[x] = new CPUButton(r, B_TRANSLATE_SYSTEM_NAME("Pulse"), temp, NULL);
|
||||||
AddChild(fCpuButtons[x]);
|
AddChild(fCpuButtons[x]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -219,8 +219,7 @@ PulseApp::MessageReceived(BMessage* message)
|
|||||||
void
|
void
|
||||||
PulseApp::AboutRequested()
|
PulseApp::AboutRequested()
|
||||||
{
|
{
|
||||||
BString name = B_TRANSLATE("Pulse");
|
BString name = B_TRANSLATE_SYSTEM_NAME("Pulse");
|
||||||
|
|
||||||
BString message = B_TRANSLATE(
|
BString message = B_TRANSLATE(
|
||||||
"%s\n\nBy David Ramsey and Arve Hjønnevåg\n"
|
"%s\n\nBy David Ramsey and Arve Hjønnevåg\n"
|
||||||
"Revised by Daniel Switkin\n");
|
"Revised by Daniel Switkin\n");
|
||||||
|
|||||||
@@ -71,8 +71,9 @@ void PulseView::Init() {
|
|||||||
mode2 = new BMenuItem("", NULL, 0, 0);
|
mode2 = new BMenuItem("", NULL, 0, 0);
|
||||||
preferences = new BMenuItem(B_TRANSLATE("Settings" B_UTF8_ELLIPSIS),
|
preferences = new BMenuItem(B_TRANSLATE("Settings" B_UTF8_ELLIPSIS),
|
||||||
new BMessage(PV_PREFERENCES), 0, 0);
|
new BMessage(PV_PREFERENCES), 0, 0);
|
||||||
about = new BMenuItem(B_TRANSLATE("About Pulse" B_UTF8_ELLIPSIS),
|
BString menuLabel(B_TRANSLATE("About %appname%" B_UTF8_ELLIPSIS));
|
||||||
new BMessage(PV_ABOUT), 0, 0);
|
menuLabel.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Pulse"));
|
||||||
|
about = new BMenuItem(menuLabel, new BMessage(PV_ABOUT), 0, 0);
|
||||||
|
|
||||||
popupmenu->AddItem(mode1);
|
popupmenu->AddItem(mode1);
|
||||||
popupmenu->AddItem(mode2);
|
popupmenu->AddItem(mode2);
|
||||||
|
|||||||
@@ -129,8 +129,9 @@ CheckManager::HandleProblems()
|
|||||||
}
|
}
|
||||||
|
|
||||||
BString title(B_TRANSLATE("Available updates found"));
|
BString title(B_TRANSLATE("Available updates found"));
|
||||||
BString text(B_TRANSLATE("Click here to run SoftwareUpdater. Some updates "
|
BString text(B_TRANSLATE("Click here to run %appname%. Some updates "
|
||||||
"will require a problem solution to be selected."));
|
"will require a problem solution to be selected."));
|
||||||
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("SoftwareUpdater"));
|
||||||
_SendNotification(title, text);
|
_SendNotification(title, text);
|
||||||
|
|
||||||
throw BAbortedByUserException();
|
throw BAbortedByUserException();
|
||||||
|
|||||||
@@ -125,8 +125,9 @@ TermApp::ReadyToRun()
|
|||||||
|
|
||||||
// failed spawn, print stdout and open alert panel
|
// failed spawn, print stdout and open alert panel
|
||||||
if (status < B_OK) {
|
if (status < B_OK) {
|
||||||
BAlert* alert = new BAlert("alert",
|
BString text(B_TRANSLATE("%appname% couldn't start the shell. Sorry."));
|
||||||
B_TRANSLATE("Terminal couldn't start the shell. Sorry."),
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Terminal"));
|
||||||
|
BAlert* alert = new BAlert("alert", text,
|
||||||
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_LABEL,
|
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_LABEL,
|
||||||
B_INFO_ALERT);
|
B_INFO_ALERT);
|
||||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ TermWindow::_CanClose(int32 index)
|
|||||||
// the terminal will be closed.
|
// the terminal will be closed.
|
||||||
alertMessage = index == -1 || fSessions.CountItems() == 1
|
alertMessage = index == -1 || fSessions.CountItems() == 1
|
||||||
? B_TRANSLATE("The process \"%1\" is still running.\n"
|
? B_TRANSLATE("The process \"%1\" is still running.\n"
|
||||||
"If you close the Terminal, the process will be killed.")
|
"If you close %appname%, the process will be killed.")
|
||||||
: B_TRANSLATE("The process \"%1\" is still running.\n"
|
: B_TRANSLATE("The process \"%1\" is still running.\n"
|
||||||
"If you close the tab, the process will be killed.");
|
"If you close the tab, the process will be killed.");
|
||||||
} else {
|
} else {
|
||||||
@@ -385,9 +385,9 @@ TermWindow::_CanClose(int32 index)
|
|||||||
alertMessage = B_TRANSLATE(
|
alertMessage = B_TRANSLATE(
|
||||||
"The following processes are still running:\n\n"
|
"The following processes are still running:\n\n"
|
||||||
"\t%1\n\n"
|
"\t%1\n\n"
|
||||||
"If you close the Terminal, the processes will be killed.");
|
"If you close %appname%, the processes will be killed.");
|
||||||
}
|
}
|
||||||
|
alertMessage.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Terminal"));
|
||||||
alertMessage.ReplaceFirst("%1", busyProcessNames);
|
alertMessage.ReplaceFirst("%1", busyProcessNames);
|
||||||
|
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("Really close?"),
|
BAlert* alert = new BAlert(B_TRANSLATE("Really close?"),
|
||||||
@@ -498,13 +498,16 @@ TermWindow::_SetupMenu()
|
|||||||
if (fEncodingMenu != NULL)
|
if (fEncodingMenu != NULL)
|
||||||
MakeEncodingMenu(fEncodingMenu);
|
MakeEncodingMenu(fEncodingMenu);
|
||||||
|
|
||||||
|
BString newTerminal(B_TRANSLATE("New %appname%"));
|
||||||
|
newTerminal.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("Terminal"));
|
||||||
|
|
||||||
BLayoutBuilder::Menu<>(fMenuBar = new BMenuBar(Bounds(), "mbar"))
|
BLayoutBuilder::Menu<>(fMenuBar = new BMenuBar(Bounds(), "mbar"))
|
||||||
// Terminal
|
// Terminal
|
||||||
.AddMenu(B_TRANSLATE_COMMENT("Terminal", "The title for the main window"
|
.AddMenu(B_TRANSLATE_SYSTEM_NAME("Terminal"))
|
||||||
" menubar entry related to terminal sessions"))
|
.AddItem(B_TRANSLATE_COMMENT("Switch Terminals", "'Terminals' being this application's "
|
||||||
.AddItem(B_TRANSLATE("Switch Terminals"), MENU_SWITCH_TERM, B_TAB)
|
"name"), MENU_SWITCH_TERM, B_TAB)
|
||||||
.GetItem(fSwitchTerminalsMenuItem)
|
.GetItem(fSwitchTerminalsMenuItem)
|
||||||
.AddItem(B_TRANSLATE("New Terminal"), MENU_NEW_TERM, 'N')
|
.AddItem(newTerminal, MENU_NEW_TERM, 'N')
|
||||||
.AddItem(B_TRANSLATE("New tab"), kNewTab, 'T')
|
.AddItem(B_TRANSLATE("New tab"), kNewTab, 'T')
|
||||||
.AddSeparator()
|
.AddSeparator()
|
||||||
.AddItem(B_TRANSLATE("Page setup" B_UTF8_ELLIPSIS), MENU_PAGE_SETUP)
|
.AddItem(B_TRANSLATE("Page setup" B_UTF8_ELLIPSIS), MENU_PAGE_SETUP)
|
||||||
|
|||||||
@@ -88,10 +88,11 @@ BrowserApp::BrowserApp()
|
|||||||
get_cpuid(&info, 1, 0);
|
get_cpuid(&info, 1, 0);
|
||||||
|
|
||||||
if ((info.eax_1.features & (1 << 26)) == 0) {
|
if ((info.eax_1.features & (1 << 26)) == 0) {
|
||||||
BAlert alert(B_TRANSLATE("No SSE2 support"), B_TRANSLATE("Your CPU is "
|
BString text(B_TRANSLATE("Your CPU is "
|
||||||
"too old and does not support the SSE2 extensions, without which "
|
"too old and does not support the SSE2 extensions, without which "
|
||||||
"WebPositive cannot run. We recommend installing NetSurf instead."),
|
"%appname% cannot run. We recommend installing NetSurf instead."));
|
||||||
B_TRANSLATE("Darn!"));
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("WebPositive"));
|
||||||
|
BAlert alert(B_TRANSLATE("No SSE2 support"), text, B_TRANSLATE("Darn!"));
|
||||||
alert.Go();
|
alert.Go();
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
@@ -388,10 +389,11 @@ bool
|
|||||||
BrowserApp::QuitRequested()
|
BrowserApp::QuitRequested()
|
||||||
{
|
{
|
||||||
if (fDownloadWindow->DownloadsInProgress()) {
|
if (fDownloadWindow->DownloadsInProgress()) {
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("Downloads in progress"),
|
BString text(B_TRANSLATE("There are still downloads in progress, do you really "
|
||||||
B_TRANSLATE("There are still downloads in progress, do you really "
|
"want to quit %appname% now?"));
|
||||||
"want to quit WebPositive now?"), B_TRANSLATE("Quit"),
|
text.ReplaceFirst("%appname%", B_TRANSLATE_SYSTEM_NAME("WebPositive"));
|
||||||
B_TRANSLATE("Continue downloads"));
|
BAlert* alert = new BAlert(B_TRANSLATE("Downloads in progress"), text,
|
||||||
|
B_TRANSLATE("Quit"), B_TRANSLATE("Continue downloads"));
|
||||||
int32 choice = alert->Go();
|
int32 choice = alert->Go();
|
||||||
if (choice == 1) {
|
if (choice == 1) {
|
||||||
if (fWindowCount == 0) {
|
if (fWindowCount == 0) {
|
||||||
|
|||||||
@@ -631,7 +631,7 @@ DownloadProgressView::DownloadFinished()
|
|||||||
fStatusBar->SetBarColor(ui_color(B_SUCCESS_COLOR));
|
fStatusBar->SetBarColor(ui_color(B_SUCCESS_COLOR));
|
||||||
|
|
||||||
BNotification success(B_INFORMATION_NOTIFICATION);
|
BNotification success(B_INFORMATION_NOTIFICATION);
|
||||||
success.SetGroup(B_TRANSLATE("WebPositive"));
|
success.SetGroup(B_TRANSLATE_SYSTEM_NAME("WebPositive"));
|
||||||
success.SetTitle(B_TRANSLATE("Download finished"));
|
success.SetTitle(B_TRANSLATE("Download finished"));
|
||||||
success.SetContent(fPath.Leaf());
|
success.SetContent(fPath.Leaf());
|
||||||
BEntry entry(fPath.Path());
|
BEntry entry(fPath.Path());
|
||||||
@@ -654,7 +654,7 @@ DownloadProgressView::CancelDownload()
|
|||||||
// Also cancel the download
|
// Also cancel the download
|
||||||
fDownload->Cancel();
|
fDownload->Cancel();
|
||||||
BNotification success(B_ERROR_NOTIFICATION);
|
BNotification success(B_ERROR_NOTIFICATION);
|
||||||
success.SetGroup(B_TRANSLATE("WebPositive"));
|
success.SetGroup(B_TRANSLATE_SYSTEM_NAME("WebPositive"));
|
||||||
success.SetTitle(B_TRANSLATE("Download aborted"));
|
success.SetTitle(B_TRANSLATE("Download aborted"));
|
||||||
success.SetContent(fPath.Leaf());
|
success.SetContent(fPath.Leaf());
|
||||||
// Don't make a click on the notification open the file: it is not
|
// Don't make a click on the notification open the file: it is not
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ BluetoothApplication::MessageReceived(BMessage* message)
|
|||||||
void
|
void
|
||||||
BluetoothApplication::AboutRequested()
|
BluetoothApplication::AboutRequested()
|
||||||
{
|
{
|
||||||
BAboutWindow* about = new BAboutWindow("Bluetooth", BLUETOOTH_APP_SIGNATURE);
|
BAboutWindow* about = new BAboutWindow(B_TRANSLATE_SYSTEM_NAME("Bluetooth"),
|
||||||
|
BLUETOOTH_APP_SIGNATURE);
|
||||||
about->AddCopyright(2010, "Oliver Ruiz Dorantes");
|
about->AddCopyright(2010, "Oliver Ruiz Dorantes");
|
||||||
about->AddText(B_TRANSLATE(
|
about->AddText(B_TRANSLATE(
|
||||||
"With support of:\n"
|
"With support of:\n"
|
||||||
|
|||||||
@@ -393,7 +393,7 @@ FileTypes::MessageReceived(BMessage* message)
|
|||||||
if (message->FindMessenger("target", &target) != B_OK)
|
if (message->FindMessenger("target", &target) != B_OK)
|
||||||
target = be_app_messenger;
|
target = be_app_messenger;
|
||||||
|
|
||||||
BString title = B_TRANSLATE("FileTypes");
|
BString title = B_TRANSLATE_SYSTEM_NAME("FileTypes");
|
||||||
if (subTitle != NULL && subTitle[0]) {
|
if (subTitle != NULL && subTitle[0]) {
|
||||||
title.Append(": ");
|
title.Append(": ");
|
||||||
title.Append(subTitle);
|
title.Append(subTitle);
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define B_TRANSLATION_CONTEXT "Locale Preflet"
|
#define B_TRANSLATION_CONTEXT "Locale Preflet"
|
||||||
|
|
||||||
|
|
||||||
const char* kAppName = B_TRANSLATE("Locale");
|
const char* kAppName = B_TRANSLATE_SYSTEM_NAME("Locale");
|
||||||
const char* kSignature = "application/x-vnd.Haiku-Locale";
|
const char* kSignature = "application/x-vnd.Haiku-Locale";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ LocaleWindow::MessageReceived(BMessage* message)
|
|||||||
MutableLocaleRoster::Default()->SetFilesystemTranslationPreferred(
|
MutableLocaleRoster::Default()->SetFilesystemTranslationPreferred(
|
||||||
value == B_CONTROL_ON);
|
value == B_CONTROL_ON);
|
||||||
|
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("Locale"),
|
BAlert* alert = new BAlert(B_TRANSLATE_SYSTEM_NAME("Locale"),
|
||||||
B_TRANSLATE("Deskbar and Tracker need to be restarted for this "
|
B_TRANSLATE("Deskbar and Tracker need to be restarted for this "
|
||||||
"change to take effect. Would you like to restart them now?"),
|
"change to take effect. Would you like to restart them now?"),
|
||||||
B_TRANSLATE("Cancel"), B_TRANSLATE("Restart"), NULL,
|
B_TRANSLATE("Cancel"), B_TRANSLATE("Restart"), NULL,
|
||||||
|
|||||||
@@ -308,9 +308,10 @@ bool
|
|||||||
MediaWindow::QuitRequested()
|
MediaWindow::QuitRequested()
|
||||||
{
|
{
|
||||||
if (fRestartThread > 0) {
|
if (fRestartThread > 0) {
|
||||||
BString text(B_TRANSLATE("Quitting Media now will stop the "
|
BString text(B_TRANSLATE("Quitting %prefname% now will stop the "
|
||||||
"restarting of the media services. Flaky or unavailable media "
|
"restarting of the media services. Flaky or unavailable media "
|
||||||
"functionality is the likely result."));
|
"functionality is the likely result."));
|
||||||
|
text.ReplaceFirst("%prefname%", B_TRANSLATE_SYSTEM_NAME("Media"));
|
||||||
|
|
||||||
fRestartAlert = new BAlert(B_TRANSLATE("Warning!"), text,
|
fRestartAlert = new BAlert(B_TRANSLATE("Warning!"), text,
|
||||||
B_TRANSLATE("Quit anyway"), NULL, NULL,
|
B_TRANSLATE("Quit anyway"), NULL, NULL,
|
||||||
|
|||||||
@@ -253,10 +253,13 @@ PrefletWin::_DefaultsPossible()
|
|||||||
void
|
void
|
||||||
PrefletWin::_SendExampleNotification()
|
PrefletWin::_SendExampleNotification()
|
||||||
{
|
{
|
||||||
|
BString title(B_TRANSLATE("%prefname% preflet sample"));
|
||||||
|
title.ReplaceFirst("%prefname%", B_TRANSLATE_SYSTEM_NAME("Notifications"));
|
||||||
|
|
||||||
BNotification notification(B_INFORMATION_NOTIFICATION);
|
BNotification notification(B_INFORMATION_NOTIFICATION);
|
||||||
notification.SetMessageID(kSampleMessageID);
|
notification.SetMessageID(kSampleMessageID);
|
||||||
notification.SetGroup(B_TRANSLATE("Notifications"));
|
notification.SetGroup(B_TRANSLATE_SYSTEM_NAME("Notifications"));
|
||||||
notification.SetTitle(B_TRANSLATE("Notifications preflet sample"));
|
notification.SetTitle(title);
|
||||||
notification.SetContent(B_TRANSLATE("This is a test notification message"));
|
notification.SetContent(B_TRANSLATE("This is a test notification message"));
|
||||||
notification.Send();
|
notification.Send();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -592,9 +592,10 @@ RepositoriesView::_UpdateListFromRoster()
|
|||||||
BPackageKit::BPackageRoster pRoster;
|
BPackageKit::BPackageRoster pRoster;
|
||||||
status_t result = pRoster.GetRepositoryNames(repositoryNames);
|
status_t result = pRoster.GetRepositoryNames(repositoryNames);
|
||||||
if (result != B_OK) {
|
if (result != B_OK) {
|
||||||
(new BAlert("error",
|
BString text(B_TRANSLATE_COMMENT("%prefname% could not retrieve the names of "
|
||||||
B_TRANSLATE_COMMENT("Repositories could not retrieve the names of "
|
"the currently enabled repositories.", "Alert error message"));
|
||||||
"the currently enabled repositories.", "Alert error message"),
|
text.ReplaceFirst("%prefname%", B_TRANSLATE_SYSTEM_NAME("Repositories"));
|
||||||
|
(new BAlert("error", text,
|
||||||
kOKLabel, NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL);
|
kOKLabel, NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -284,10 +284,10 @@ ShortcutsWindow::QuitRequested()
|
|||||||
// up the file requester
|
// up the file requester
|
||||||
if (fLastSaved.InitCheck() == B_OK) {
|
if (fLastSaved.InitCheck() == B_OK) {
|
||||||
if (_SaveKeySet(fLastSaved) == false) {
|
if (_SaveKeySet(fLastSaved) == false) {
|
||||||
BAlert* alert = new BAlert(ERROR,
|
BString text(B_TRANSLATE("%prefname% was unable to save your "
|
||||||
B_TRANSLATE("Shortcuts was unable to save your "
|
"KeySet file!"));
|
||||||
"KeySet file!"),
|
text.ReplaceFirst("%prefname%", B_TRANSLATE_SYSTEM_NAME("Shortcuts"));
|
||||||
B_TRANSLATE("Oh no"));
|
BAlert* alert = new BAlert(ERROR, text,B_TRANSLATE("Oh no"));
|
||||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||||
alert->Go();
|
alert->Go();
|
||||||
result = true; // quit anyway
|
result = true; // quit anyway
|
||||||
@@ -569,9 +569,10 @@ ShortcutsWindow::MessageReceived(BMessage* message)
|
|||||||
_GetSettingsFile(&eref);
|
_GetSettingsFile(&eref);
|
||||||
if (ref == eref) fKeySetModified = false;
|
if (ref == eref) fKeySetModified = false;
|
||||||
} else {
|
} else {
|
||||||
BAlert* alert = new BAlert(ERROR,
|
BString text(B_TRANSLATE("%prefname% was unable to parse your "
|
||||||
B_TRANSLATE("Shortcuts was unable to parse your "
|
"KeySet file!"));
|
||||||
"KeySet file!"), B_TRANSLATE("OK"));
|
text.ReplaceFirst("%prefname%", B_TRANSLATE_SYSTEM_NAME("Shortcuts"));
|
||||||
|
BAlert* alert = new BAlert(ERROR, text, B_TRANSLATE("OK"));
|
||||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||||
alert->Go(NULL);
|
alert->Go(NULL);
|
||||||
break;
|
break;
|
||||||
@@ -623,9 +624,9 @@ ShortcutsWindow::MessageReceived(BMessage* message)
|
|||||||
// open the save requester...
|
// open the save requester...
|
||||||
|
|
||||||
if (showSaveError) {
|
if (showSaveError) {
|
||||||
BAlert* alert = new BAlert(ERROR,
|
BString text(B_TRANSLATE("%prefname% wasn't able to save your keyset."));
|
||||||
B_TRANSLATE("Shortcuts wasn't able to save your keyset."),
|
text.ReplaceFirst("%prefname%", B_TRANSLATE_SYSTEM_NAME("Shortcuts"));
|
||||||
B_TRANSLATE("OK"));
|
BAlert* alert = new BAlert(ERROR, text, B_TRANSLATE("OK"));
|
||||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||||
alert->Go(NULL);
|
alert->Go(NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "HApp.h"
|
#include "HApp.h"
|
||||||
#include "HWindow.h"
|
#include "HWindow.h"
|
||||||
|
|
||||||
|
#include <AboutWindow.h>
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <Locale.h>
|
#include <Locale.h>
|
||||||
@@ -39,16 +40,19 @@ HApp::~HApp()
|
|||||||
void
|
void
|
||||||
HApp::AboutRequested()
|
HApp::AboutRequested()
|
||||||
{
|
{
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("About Sounds"),
|
BAboutWindow* window = new BAboutWindow(B_TRANSLATE_SYSTEM_NAME("Sounds"),
|
||||||
B_TRANSLATE("Sounds\n"
|
"application/x-vnd.Haiku-Sounds");
|
||||||
" Brought to you by :\n"
|
|
||||||
"\tOliver Ruiz Dorantes\n"
|
const char* authors[] = {
|
||||||
"\tJérôme DUVAL.\n"
|
"Atsushi Takamatsu",
|
||||||
" Original work from Atsushi Takamatsu.\n"
|
"Oliver Ruiz Dorantes",
|
||||||
"Copyright ©2003-2006 Haiku"),
|
"Jérôme DUVAL",
|
||||||
B_TRANSLATE("OK"));
|
NULL
|
||||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
};
|
||||||
alert->Go();
|
|
||||||
|
window->AddCopyright(2003, "Haiku, Inc.");
|
||||||
|
window->AddAuthors(authors);
|
||||||
|
window->Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user