Yet another localization patch made by Jorma Karvonen.
Fixes #7238 Notes on patch: 1) Localization of internal Deskbar item name and kClassName rejected; Additional fixes by S.Zharski: 1) BLocker's internal name localization removed; 2) A bit more safe snprintf used instead of sprintf; 3) Localization of field names in 'PrTh' message removed; 4) Localization of calling "db" debugger removed. The thread debugging command "db %d" replaced with "gdb -pid=%d". git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40558 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
#define B_TRANSLATE_CONTEXT "ProcessController"
|
#define B_TRANSLATE_CONTEXT "ProcessController"
|
||||||
|
|
||||||
Preferences::Preferences(const char* name, const char* signature, bool doSave)
|
Preferences::Preferences(const char* name, const char* signature, bool doSave)
|
||||||
: BMessage('Pref'), BLocker(B_TRANSLATE("Preferences"), true),
|
: BMessage('Pref'), BLocker("Preferences", true),
|
||||||
fSavePreferences(doSave)
|
fSavePreferences(doSave)
|
||||||
{
|
{
|
||||||
fNewPreferences = false;
|
fNewPreferences = false;
|
||||||
@@ -65,7 +65,7 @@ Preferences::Preferences(const char* name, const char* signature, bool doSave)
|
|||||||
|
|
||||||
|
|
||||||
Preferences::Preferences(const entry_ref &ref, const char* signature, bool doSave)
|
Preferences::Preferences(const entry_ref &ref, const char* signature, bool doSave)
|
||||||
: BMessage('Pref'), BLocker(B_TRANSLATE("Preferences"), true),
|
: BMessage('Pref'), BLocker("Preferences", true),
|
||||||
fSavePreferences(doSave)
|
fSavePreferences(doSave)
|
||||||
{
|
{
|
||||||
fSettingsFile = new entry_ref(ref);
|
fSettingsFile = new entry_ref(ref);
|
||||||
@@ -108,13 +108,14 @@ Preferences::~Preferences()
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// implement saving somewhere else!
|
// implement saving somewhere else!
|
||||||
char error[1024];
|
BString error;
|
||||||
sprintf(error, B_TRANSLATE("Your setting file"
|
snprintf(error.LockBuffer(256), 256,
|
||||||
"could not be saved!\n(%s)"),
|
B_TRANSLATE("Your setting file could not be saved!\n(%s)"),
|
||||||
strerror(file.InitCheck()));
|
strerror(file.InitCheck()));
|
||||||
BAlert *alert = new BAlert(B_TRANSLATE("Error saving file"), error,
|
error.UnlockBuffer();
|
||||||
B_TRANSLATE("Damned!"), NULL, NULL, B_WIDTH_AS_USUAL,
|
BAlert *alert = new BAlert(B_TRANSLATE("Error saving file"),
|
||||||
B_STOP_ALERT);
|
error.String(), B_TRANSLATE("Damned!"), NULL, NULL,
|
||||||
|
B_WIDTH_AS_USUAL, B_STOP_ALERT);
|
||||||
alert->Go();
|
alert->Go();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ PriorityMenu::BuildMenu()
|
|||||||
index--;
|
index--;
|
||||||
}
|
}
|
||||||
message = new BMessage('PrTh');
|
message = new BMessage('PrTh');
|
||||||
message->AddInt32(B_TRANSLATE("thread"), fThreadID);
|
message->AddInt32("thread", fThreadID);
|
||||||
message->AddInt32(B_TRANSLATE("priority"), priority->priority);
|
message->AddInt32("priority", priority->priority);
|
||||||
sprintf(name, B_TRANSLATE("%s priority [%d]"), priority->name, (int)priority->priority);
|
sprintf(name, B_TRANSLATE("%s priority [%d]"), priority->name, (int)priority->priority);
|
||||||
item = new BMenuItem(name, message);
|
item = new BMenuItem(name, message);
|
||||||
item->SetTarget(gPCView);
|
item->SetTarget(gPCView);
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ ProcessController::MessageReceived(BMessage *message)
|
|||||||
void
|
void
|
||||||
ProcessController::AboutRequested()
|
ProcessController::AboutRequested()
|
||||||
{
|
{
|
||||||
BAlert *alert = new BAlert(B_TRANSLATE("about"),
|
BAlert *alert = new BAlert(B_TRANSLATE("About"),
|
||||||
B_TRANSLATE("ProcessController\n\n"
|
B_TRANSLATE("ProcessController\n\n"
|
||||||
"Copyright 1997-2001,\n"
|
"Copyright 1997-2001,\n"
|
||||||
"Georges-Edouard Berenger.\n\n"
|
"Georges-Edouard Berenger.\n\n"
|
||||||
@@ -412,7 +412,7 @@ ProcessController::AboutRequested()
|
|||||||
view->GetFont(&font);
|
view->GetFont(&font);
|
||||||
font.SetSize(font.Size() * 1.5);
|
font.SetSize(font.Size() * 1.5);
|
||||||
font.SetFace(B_BOLD_FACE);
|
font.SetFace(B_BOLD_FACE);
|
||||||
view->SetFontAndColor(0, 17, &font);
|
view->SetFontAndColor(0, strlen(B_TRANSLATE("ProcessController"))-1, &font);
|
||||||
|
|
||||||
alert->Go();
|
alert->Go();
|
||||||
}
|
}
|
||||||
@@ -803,7 +803,7 @@ thread_debug_thread(void *arg)
|
|||||||
thread_info thinfo;
|
thread_info thinfo;
|
||||||
get_thread_info(param->thread, &thinfo);
|
get_thread_info(param->thread, &thinfo);
|
||||||
char text[4096];
|
char text[4096];
|
||||||
sprintf(text, B_TRANSLATE("db %d"), int(param->thread));
|
sprintf(text, "gdb -pid=%d", int(param->thread));
|
||||||
system(text);
|
system(text);
|
||||||
if (param->sem >= 0 && thinfo.state == B_THREAD_WAITING && param->sem
|
if (param->sem >= 0 && thinfo.state == B_THREAD_WAITING && param->sem
|
||||||
== thinfo.sem) {
|
== thinfo.sem) {
|
||||||
|
|||||||
Reference in New Issue
Block a user