From 8215661bb2811fb6166433a87fd09123e88ea2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 29 Oct 2011 21:00:07 +0000 Subject: [PATCH] Apply patch by 'mt' from ticket #7622 to localize the debug_server alert. Thanks! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42979 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/debug/DebugServer.cpp | 15 +++++++++++---- src/servers/debug/Jamfile | 8 ++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/servers/debug/DebugServer.cpp b/src/servers/debug/DebugServer.cpp index b01da568bc..1c76cf7aab 100644 --- a/src/servers/debug/DebugServer.cpp +++ b/src/servers/debug/DebugServer.cpp @@ -16,9 +16,11 @@ #include #include #include +#include #include #include #include +#include #include #include @@ -30,6 +32,9 @@ #define HANDOVER_USE_GDB 1 //#define HANDOVER_USE_DEBUGGER 1 +#undef B_TRANSLATE_CONTEXT +#define B_TRANSLATE_CONTEXT "DebugServer" + #define USE_GUI true // define to false if the debug server shouldn't use GUI (i.e. an alert) @@ -605,14 +610,16 @@ TeamDebugHandler::_HandleMessage(DebugMessage *message) _NotifyAppServer(fTeam); _NotifyRegistrar(fTeam, true, false); - char buffer[1024]; - snprintf(buffer, sizeof(buffer), "The application:\n\n %s\n\n" + BString buffer( + B_TRANSLATE("The application:\n\n %app\n\n" "has encountered an error which prevents it from continuing. Haiku " - "will terminate the application and clean up.", fTeamInfo.args); + "will terminate the application and clean up.")); + buffer.ReplaceFirst("%app", fTeamInfo.args); // TODO: It would be nice if the alert would go away automatically // if someone else kills our teams. - BAlert *alert = new BAlert(NULL, buffer, "Debug", "OK", NULL, + BAlert *alert = new BAlert(NULL, buffer.String(), + B_TRANSLATE("Debug"), B_TRANSLATE("OK"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); int32 result = alert->Go(); kill = (result == 1); diff --git a/src/servers/debug/Jamfile b/src/servers/debug/Jamfile index 2e5c4b45a7..d643d8c425 100644 --- a/src/servers/debug/Jamfile +++ b/src/servers/debug/Jamfile @@ -15,4 +15,12 @@ Server debug_server libbe.so # Haiku libbe libdebug.so $(TARGET_LIBSTDC++) + $(HAIKU_LOCALE_LIBS) ; + +DoCatalogs debug_server : + x-vnd.Haiku-debug_server + : + DebugServer.cpp +; +