SF.net SVN: geany-plugins:[285] trunk/geanydebug/src
eht16 at users.sourceforge.net
eht16 at xxxxx
Fri Nov 7 19:23:29 UTC 2008
Revision: 285
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=285&view=rev
Author: eht16
Date: 2008-11-07 19:23:29 +0000 (Fri, 07 Nov 2008)
Log Message:
-----------
Add internationalisation support.
Modified Paths:
--------------
trunk/geanydebug/src/Makefile.am
trunk/geanydebug/src/gdb-io-break.c
trunk/geanydebug/src/gdb-io-envir.c
trunk/geanydebug/src/gdb-io-frame.c
trunk/geanydebug/src/gdb-io-read.c
trunk/geanydebug/src/gdb-io-run.c
trunk/geanydebug/src/gdb-io-stack.c
trunk/geanydebug/src/gdb-ui-break.c
trunk/geanydebug/src/gdb-ui-envir.c
trunk/geanydebug/src/gdb-ui-frame.c
trunk/geanydebug/src/gdb-ui-locn.c
trunk/geanydebug/src/gdb-ui-main.c
trunk/geanydebug/src/geanydebug.c
Modified: trunk/geanydebug/src/Makefile.am
===================================================================
--- trunk/geanydebug/src/Makefile.am 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/Makefile.am 2008-11-07 19:23:29 UTC (rev 285)
@@ -22,7 +22,7 @@
geanydebug_la_LIBADD = @GEANY_LIBS@ $(INTLLIBS)
bin_PROGRAMS = geanydebug_ttyhelper
-ttyhelper_SOURCES = ttyhelper.c
+geanydebug_ttyhelper_SOURCES = ttyhelper.c
AM_CFLAGS = @GEANY_CFLAGS@ -DLOCALEDIR=\""$(localedir)"\" -DPREFIX=\""$(prefix)"\"
Modified: trunk/geanydebug/src/gdb-io-break.c
===================================================================
--- trunk/geanydebug/src/gdb-io-break.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-io-break.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -1,6 +1,6 @@
/*
- * gdb-io-break.c - Breakpoint management functions for GDB wrapper library.
+ * gdb-io-break.c - Breakpoint management functions for GDB wrapper library.
*
* See the file "gdb-io.h" for license information.
*
@@ -10,6 +10,7 @@
#include <string.h>
#include <glib.h>
#include "gdb-io-priv.h"
+#include "support.h"
static GdbListFunc gdbio_break_list_func = NULL;
@@ -138,12 +139,12 @@
HSTR(bkpt, number);
if (func)
{
- gdbio_info_func("Added breakpoint #%s in %s() at %s:%s\n", number,
+ gdbio_info_func(_("Added breakpoint #%s in %s() at %s:%s\n"), number,
func, file, line);
}
else
{
- gdbio_info_func("Added breakpoint #%s at %s:%s\n", number, file,
+ gdbio_info_func(_("Added breakpoint #%s at %s:%s\n"), number, file,
line);
}
@@ -155,7 +156,7 @@
{
HSTR(wpt, exp);
HSTR(wpt, number);
- gdbio_info_func("Added write watchpoint #%s for %s\n", number, exp);
+ gdbio_info_func(_("Added write watchpoint #%s for %s\n"), number, exp);
}
else
{
@@ -164,7 +165,7 @@
{
HSTR(hw_awpt, exp);
HSTR(hw_awpt, number);
- gdbio_info_func("Added read/write watchpoint #%s for %s\n",
+ gdbio_info_func(_("Added read/write watchpoint #%s for %s\n"),
number, exp);
}
else
@@ -175,7 +176,7 @@
HSTR(hw_rwpt, exp);
HSTR(hw_rwpt, number);
gdbio_info_func
- ("Added read watchpoint #%s for %s\n",
+ (_("Added read watchpoint #%s for %s\n"),
number, exp);
}
}
@@ -222,7 +223,7 @@
if (h)
{
g_hash_table_destroy(h);
- gdbio_info_func("Watch/breakpoint deleted.\n");
+ gdbio_info_func(_("Watch/breakpoint deleted.\n"));
}
if (gdbio_break_list_func)
{
@@ -246,7 +247,7 @@
if (msg)
{
gchar *tmp =
- g_strconcat("Failed to toggle breakpoint -\n", msg, NULL);
+ g_strconcat(_("Failed to toggle breakpoint -\n"), msg, NULL);
gdbio_error_func(tmp);
if (tmp)
{
@@ -264,7 +265,7 @@
}
else
{
- gdbio_info_func("Watch/breakpoint toggled.\n");
+ gdbio_info_func(_("Watch/breakpoint toggled.\n"));
}
}
@@ -278,7 +279,7 @@
if (h)
{
g_hash_table_destroy(h);
- gdbio_info_func("Watch/breakpoint modified.\n");
+ gdbio_info_func(_("Watch/breakpoint modified.\n"));
}
}
Modified: trunk/geanydebug/src/gdb-io-envir.c
===================================================================
--- trunk/geanydebug/src/gdb-io-envir.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-io-envir.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -1,6 +1,6 @@
/*
- * gdb-io-envir.c - Environment settings for GDB wrapper library.
+ * gdb-io-envir.c - Environment settings for GDB wrapper library.
*
* See the file "gdb-io.h" for license information.
*
@@ -10,6 +10,7 @@
#include <string.h>
#include <glib.h>
#include "gdb-io-priv.h"
+#include "support.h"
static GdbEnvironFunc gdbio_environ_func = NULL;
@@ -119,7 +120,7 @@
}
else
{
- gdbio_info_func("Failed to retrieve source search path setting from GDB.");
+ gdbio_info_func(_("Failed to retrieve source search path setting from GDB."));
// gdblx_dump_table(h);
}
if (h)
@@ -140,7 +141,7 @@
}
else
{
- gdbio_info_func("Failed to retrieve executable search path setting from GDB.");
+ gdbio_info_func(_("Failed to retrieve executable search path setting from GDB."));
// gdblx_dump_table(h);
}
if (h)
@@ -162,7 +163,7 @@
}
else
{
- gdbio_info_func("Failed to retrieve working directory setting from GDB.");
+ gdbio_info_func(_("Failed to retrieve working directory setting from GDB."));
// gdblx_dump_table(h);
}
if (h)
Modified: trunk/geanydebug/src/gdb-io-frame.c
===================================================================
--- trunk/geanydebug/src/gdb-io-frame.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-io-frame.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -1,6 +1,6 @@
/*
- * gdb-io-frame.c - Stack frame information functions for GDB wrapper library.
+ * gdb-io-frame.c - Stack frame information functions for GDB wrapper library.
*
* See the file "gdb-io.h" for license information.
*
@@ -11,6 +11,7 @@
#include <glib.h>
#include "gdb-io-priv.h"
+#include "support.h"
static GdbFrameFunc gdbio_locals_func = NULL;
@@ -484,7 +485,7 @@
var->value = g_strdup(" ");
var->numchild = g_strdup("0");
vlist = g_slist_append(vlist, var);
- gdbio_error_func("Field list too long, not all items can be displayed.\n");
+ gdbio_error_func(_("Field list too long, not all items can be displayed.\n"));
break;
}
}
Modified: trunk/geanydebug/src/gdb-io-read.c
===================================================================
--- trunk/geanydebug/src/gdb-io-read.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-io-read.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -1,6 +1,6 @@
/*
*
- * gdb-io-read.c - Output reading functions for GDB wrapper library.
+ * gdb-io-read.c - Output reading functions for GDB wrapper library.
*
* See the file "gdb-io.h" for license information.
*/
@@ -15,6 +15,7 @@
#include <glib.h>
#include "gdb-io-priv.h"
+#include "support.h"
@@ -228,7 +229,7 @@
{
if ((strncmp(resp, "^error", 6) == 0) && (!gdbio_get_target_pid()))
{
- gdbio_error_func("Error starting target process!\n");
+ gdbio_error_func(_("Error starting target process!\n"));
gdbio_do_status(GdbFinished);
}
else
@@ -273,7 +274,7 @@
else
{
gdbio_error_func
- ("This executable does not appear to contain the required debugging information.");
+ (_("This executable does not appear to contain the required debugging information."));
}
if (h)
g_hash_table_destroy(h);
@@ -535,7 +536,7 @@
else
{
gdbio_info_func
- ("Program received signal %s (%s) at %s in function %s() at %s:%s",
+ (_("Program received signal %s (%s) at %s in function %s() at %s:%s"),
signal_name, signal_meaning, addr, func, file,
line);
}
@@ -586,7 +587,7 @@
if (reason_is("watchpoint-scope"))
{
HSTR(h, wpnum);
- gdbio_info_func("Watchpoint #%s out of scope", wpnum ? wpnum : "?");
+ gdbio_info_func(_("Watchpoint #%s out of scope"), wpnum ? wpnum : "?");
gdbio_send_cmd("-exec-continue\n");
return do_step_func(h, reason);
}
@@ -595,9 +596,9 @@
{
HSTR(h, signal_name);
HSTR(h, signal_meaning);
- gdbio_info_func("Program exited on signal %s (%s).\n",
+ gdbio_info_func(_("Program exited on signal %s (%s).\n"),
signal_name ? signal_name : "UNKNOWN",
- signal_meaning ? signal_meaning : "Unknown signal");
+ signal_meaning ? signal_meaning : _("Unknown signal"));
gdbio_target_exited(signal_name);
return TRUE;
}
@@ -614,14 +615,14 @@
ec = -1;
}
}
- gdbio_info_func("Program exited with code %d [%s]\n", ec,
- exit_code ? exit_code : "(unknown)");
+ gdbio_info_func(_("Program exited with code %d [%s]\n"), ec,
+ exit_code ? exit_code : _("(unknown)"));
gdbio_target_exited(exit_code);
return TRUE;
}
if (g_str_equal(reason, "exited-normally"))
{
- gdbio_info_func("Program exited normally.\n");
+ gdbio_info_func(_("Program exited normally.\n"));
gdbio_target_exited("0");
return TRUE;
}
Modified: trunk/geanydebug/src/gdb-io-run.c
===================================================================
--- trunk/geanydebug/src/gdb-io-run.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-io-run.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -1,6 +1,6 @@
/*
- * gdb-io-run.c - Process execution and input functions for GDB wrapper library.
+ * gdb-io-run.c - Process execution and input functions for GDB wrapper library.
*
* See the file "gdb-io.h" for license information.
*
@@ -12,6 +12,7 @@
#include <string.h>
#include <glib.h>
#include "gdb-io-priv.h"
+#include "support.h"
extern gint g_unlink(const gchar * filename);
@@ -247,12 +248,12 @@
gchar *all;
if (!gdbio_setup.temp_dir)
{
- gdbio_error_func("tty temporary directory not specified!\n");
+ gdbio_error_func(_("tty temporary directory not specified!\n"));
return NULL;
}
if (!g_file_test(gdbio_setup.temp_dir, G_FILE_TEST_IS_DIR))
{
- gdbio_error_func("tty temporary directory not found!\n");
+ gdbio_error_func(_("tty temporary directory not found!\n"));
return NULL;
}
if (!xterm_tty_file)
@@ -271,14 +272,14 @@
}
if (!gdbio_setup.tty_helper)
{
- gdbio_error_func("tty helper program not specified!\n");
+ gdbio_error_func(_("tty helper program not specified!\n"));
return NULL;
}
if (!
(g_file_test(gdbio_setup.tty_helper, G_FILE_TEST_IS_EXECUTABLE) &&
g_file_test(gdbio_setup.tty_helper, G_FILE_TEST_IS_REGULAR)))
{
- gdbio_error_func("tty helper program not found!\n");
+ gdbio_error_func(_("tty helper program not found!\n"));
return NULL;
}
term_args[0] = term_cmd;
@@ -331,7 +332,7 @@
if (strlen(contents))
{
tty_name = g_strdup(contents);
- gdbio_info_func("Attaching to terminal %s\n",
+ gdbio_info_func(_("Attaching to terminal %s\n"),
tty_name);
}
break;
@@ -346,7 +347,7 @@
while (ms <= 10000);
if (ms > 10000)
{
- gdbio_error_func("Timeout waiting for TTY name.\n");
+ gdbio_error_func(_("Timeout waiting for TTY name.\n"));
kill_xterm();
}
}
@@ -395,7 +396,7 @@
on_gdb_exit(GPid pid, gint status, gpointer data)
{
gdbio_pid = 0;
- gdbio_info_func("GDB exited (pid=%d)\n", pid);
+ gdbio_info_func(_("GDB exited (pid=%d)\n"), pid);
g_spawn_close_pid(pid);
@@ -456,9 +457,9 @@
void
gdbio_target_exited(gchar * reason)
{
- gdbio_info_func("Target process exited. (pid=%d; %s%s)\n", target_pid,
+ gdbio_info_func(_("Target process exited. (pid=%d; %s%s)\n"), target_pid,
reason
- && g_ascii_isdigit(reason[0]) ? "code=" : "reason:",
+ && g_ascii_isdigit(reason[0]) ? _("code=") : _("reason:"),
reason ? reason : "unknown");
target_pid = 0;
kill_xterm();
@@ -524,19 +525,19 @@
snprintf(pidstr, sizeof(pidstr) - 1, "/proc/%d", target_pid);
if (!g_file_test(pidstr, G_FILE_TEST_IS_DIR))
{
- gdbio_info_func("Directory %s not found!\n", pidstr);
+ gdbio_info_func(_("Directory %s not found!\n"), pidstr);
pidstr[0] = '\0';
}
if (!force)
{
- gdbio_info_func("Shutting down target program.\n");
+ gdbio_info_func(_("Shutting down target program.\n"));
gdbio_send_seq_cmd(target_killed, "kill SIGKILL\n");
gdbio_wait(250);
do_loop();
}
else
{
- gdbio_info_func("Killing target program.\n");
+ gdbio_info_func(_("Killing target program.\n"));
kill(this_pid, SIGKILL);
}
while (1)
@@ -544,10 +545,10 @@
do_loop();
if (ms >= 2000)
{
- gdbio_info_func("Timeout waiting for target process.\n");
+ gdbio_info_func(_("Timeout waiting for target process.\n"));
if (!force)
{
- gdbio_info_func("Using a bigger hammer!\n");
+ gdbio_info_func(_("Using a bigger hammer!\n"));
gdbio_kill_target(TRUE);
}
break;
@@ -561,7 +562,7 @@
break;
}
if (!(ms % 1000))
- gdbio_info_func("Waiting for target process to exit.\n");
+ gdbio_info_func(_("Waiting for target process to exit.\n"));
ms += gdbio_wait(250);
}
}
@@ -589,7 +590,7 @@
{
if (!g_file_test(pidstr, G_FILE_TEST_IS_DIR))
{
- gdbio_info_func("Directory %s not found!\n", pidstr);
+ gdbio_info_func(_("Directory %s not found!\n"), pidstr);
pidstr[0] = '\0';
}
do
@@ -597,7 +598,7 @@
do_loop();
if (gdbio_pid == this_gdb)
{
- gdbio_info_func("Killing GDB (pid=%d)\n", this_gdb);
+ gdbio_info_func(_("Killing GDB (pid=%d)\n"), this_gdb);
}
else
{
@@ -611,7 +612,7 @@
}
if (ms > 2000)
{
- gdbio_error_func("Timeout trying to kill GDB.\n");
+ gdbio_error_func(_("Timeout trying to kill GDB.\n"));
break;
}
}
@@ -621,7 +622,7 @@
}
else
{
- gdbio_info_func("Shutting down GDB\n");
+ gdbio_info_func(_("Shutting down GDB\n"));
gdbio_send_cmd("-gdb-exit\n");
while (1)
{
@@ -634,7 +635,7 @@
if (gdbio_pid == this_gdb)
{
if (!(ms % 1000))
- gdbio_info_func("Waiting for GDB to exit.\n");
+ gdbio_info_func(_("Waiting for GDB to exit.\n"));
}
else
{
@@ -642,7 +643,7 @@
}
if (ms > 2000)
{
- gdbio_info_func("Timeout waiting for GDB to exit.\n");
+ gdbio_info_func(_("Timeout waiting for GDB to exit.\n"));
gdbio_set_running(TRUE);
gdbio_exit();
break;
@@ -705,7 +706,7 @@
GDB_SPAWN_FLAGS, NULL,
NULL, &gdbio_pid, &gdbio_in, &gdbio_out, NULL, &err))
{
- gdbio_info_func("Starting gdb (pid=%d)\n", gdbio_pid);
+ gdbio_info_func(_("Starting gdb (pid=%d)\n"), gdbio_pid);
g_child_watch_add(gdbio_pid, on_gdb_exit, NULL);
gdbio_src = g_child_watch_source_new(gdbio_pid);
@@ -765,7 +766,7 @@
void
gdbio_set_target_pid(GPid pid)
{
- gdbio_info_func("Started target process. (pid=%d)\n", pid);
+ gdbio_info_func(_("Started target process. (pid=%d)\n"), pid);
target_pid = pid;
}
Modified: trunk/geanydebug/src/gdb-io-stack.c
===================================================================
--- trunk/geanydebug/src/gdb-io-stack.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-io-stack.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -1,6 +1,6 @@
/*
- * gdb-io-stack.c - Stack information functions for GDB wrapper library.
+ * gdb-io-stack.c - Stack information functions for GDB wrapper library.
*
* See the file "gdb-io.h" for license information.
*
@@ -10,6 +10,7 @@
#include <glib.h>
#include "gdb-io-priv.h"
+#include "support.h"
static GdbListFunc gdbio_stack_list_func = NULL;
static GSList *frame_list = NULL;
@@ -173,8 +174,10 @@
if (len >= MAX_STACK_RETURN)
{
gdbio_error_func
- ("Stack too deep to display!\n(Showing only %d frames)",
- len);
+ (ngettext(
+ "Stack too deep to display!\n(Showing only %d frame)",
+ "Stack too deep to display!\n(Showing only %d frames)",
+ len), len);
}
gdbio_send_seq_cmd(parse_stack_args, "-stack-list-arguments 1 0 %d\n",
len - 1);
Modified: trunk/geanydebug/src/gdb-ui-break.c
===================================================================
--- trunk/geanydebug/src/gdb-ui-break.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-ui-break.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -12,6 +12,7 @@
#include <gdk/gdkkeysyms.h>
#include "gdb-io.h"
#include "gdb-ui.h"
+#include "support.h"
enum
{
@@ -99,7 +100,7 @@
delete_click(GtkWidget * w, gpointer p)
{
BkPtDlgData *bpd = p;
- if (confirm(is_watchlist ? "Delete selected watchpoint?" : "Delete selected breakhpoint?"))
+ if (confirm(is_watchlist ? _("Delete selected watchpoint?") : _("Delete selected breakpoint?")))
{
gdbui_enable(FALSE);
gdbio_delete_break(break_dlg, bpd->bpi->number);
@@ -127,7 +128,7 @@
gboolean changed = FALSE;
GtkWidget *dlg =
- gtk_dialog_new_with_buttons(is_watchlist ? "Edit watchpoint" : "Edit breakpoint",
+ gtk_dialog_new_with_buttons(is_watchlist ? _("Edit watchpoint") : _("Edit breakpoint"),
GTK_WINDOW(gdbui_setup.main_window),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_OK, GTK_RESPONSE_OK,
@@ -137,32 +138,32 @@
gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_OK);
- enabled_chk = gtk_check_button_new_with_label("Enabled");
+ enabled_chk = gtk_check_button_new_with_label(_("Enabled"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enabled_chk), bpd->bpi->enabled[0] == 'y');
gtk_box_pack_start(vbox, enabled_chk, FALSE, FALSE, 0);
hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(vbox, hbox, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(" Break after "), FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_(" Break after ")), FALSE, FALSE, 0);
after_entry = gtk_entry_new();
if (bpd->bpi->ignore)
{
gtk_entry_set_text(GTK_ENTRY(after_entry), bpd->bpi->ignore);
}
gtk_box_pack_start(GTK_BOX(hbox), after_entry, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(" times. "), FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_(" times. ")), FALSE, FALSE, 0);
hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(vbox, hbox, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(" Break when "), FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_(" Break when ")), FALSE, FALSE, 0);
condition_entry = gtk_entry_new();
if (bpd->bpi->cond)
{
gtk_entry_set_text(GTK_ENTRY(condition_entry), bpd->bpi->cond);
}
gtk_box_pack_start(GTK_BOX(hbox), condition_entry, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(" is true. "), FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_(" is true. ")), FALSE, FALSE, 0);
gtk_widget_show_all(dlg);
gtk_entry_set_activates_default(GTK_ENTRY(condition_entry), TRUE);
@@ -227,7 +228,7 @@
{
BkPtDlgData *bpd = p;
LocationInfo *abi =
- gdbui_location_dlg(is_watchlist ? "Add watchpoint" : "Add breakpoint",
+ gdbui_location_dlg(is_watchlist ? _("Add watchpoint") : _("Add breakpoint"),
is_watchlist);
if (abi)
{
@@ -328,7 +329,7 @@
{
continue;
}
- if ((bpi) && (strstr(bpi->type, is_watchlist ? "watchpoint" : "breakpoint")))
+ if ((bpi) && (strstr(bpi->type, is_watchlist ? _("watchpoint") : _("breakpoint"))))
{
return TRUE;
}
@@ -382,7 +383,7 @@
GdbBreakPointInfo *bpi = p->data;
if (bpi)
{
- gboolean iswatch = !g_str_equal("breakpoint", bpi->type);
+ gboolean iswatch = !g_str_equal(_("breakpoint"), bpi->type);
if (is_watchlist != iswatch)
{
continue;
@@ -478,7 +479,7 @@
gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE);
g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK(break_select_cb), &bpd);
- bpd.dlg = gdbui_new_dialog(is_watchlist ? "Watchpoints" : "Breakpoints");
+ bpd.dlg = gdbui_new_dialog(is_watchlist ? _("Watchpoints") : _("Breakpoints"));
scroll = gtk_scrolled_window_new(NULL, NULL);
gtk_widget_set_usize(scroll,
Modified: trunk/geanydebug/src/gdb-ui-envir.c
===================================================================
--- trunk/geanydebug/src/gdb-ui-envir.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-ui-envir.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -11,6 +11,7 @@
#include <gtk/gtk.h>
#include "gdb-io.h"
#include "gdb-ui.h"
+#include "support.h"
@@ -79,7 +80,7 @@
void
gdbui_env_dlg(const GdbEnvironInfo * env)
{
- GtkWidget *dlg = gtk_dialog_new_with_buttons("Environment settings",
+ GtkWidget *dlg = gtk_dialog_new_with_buttons(_("Environment settings"),
GTK_WINDOW(gdbui_setup.main_window),
GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -101,10 +102,10 @@
gtk_entry_set_text(GTK_ENTRY(args_box), env->args ? env->args : "");
gtk_entry_set_text(GTK_ENTRY(dirs_box), env->dirs ? env->dirs : "");
- label(args_box, "\n Command-line arguments passed to target program:");
- label(dirs_box, "\n Search path for source files:");
- label(cwd_box, "\n Working directory for target program:");
- label(path_box, "\n Search path for executables:");
+ label(args_box, _("\n Command-line arguments passed to target program:"));
+ label(dirs_box, _("\n Search path for source files:"));
+ label(cwd_box, _("\n Working directory for target program:"));
+ label(path_box, _("\n Search path for executables:"));
gtk_widget_show_all(dlg);
gtk_widget_set_usize(dlg, (gdk_screen_get_width(gdk_screen_get_default()) / 2) * 1, 0);
@@ -147,7 +148,7 @@
gchar *fn = NULL;
gint resp;
fn = (gchar *) gtk_entry_get_text(GTK_ENTRY(user_data));
- dlg = gtk_font_selection_dialog_new("Select Font");
+ dlg = gtk_font_selection_dialog_new(_("Select Font"));
if (fn && *fn)
{
gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(dlg), fn);
@@ -169,7 +170,7 @@
void
gdbui_opts_dlg()
{
- GtkWidget *dlg = gtk_dialog_new_with_buttons("Preferences",
+ GtkWidget *dlg = gtk_dialog_new_with_buttons(_("Preferences"),
GTK_WINDOW(gdbui_setup.main_window),
GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -185,15 +186,15 @@
GtkWidget *font_box = gtk_entry_new();
GtkWidget *term_box = gtk_entry_new();
#ifdef STANDALONE
- GtkWidget *top_chk = gtk_check_button_new_with_label("Keep debug window on top.");
+ GtkWidget *top_chk = gtk_check_button_new_with_label(_("Keep debug window on top."));
#endif
- GtkWidget *tip_chk = gtk_check_button_new_with_label("Show tooltips.");
- GtkWidget *ico_chk = gtk_check_button_new_with_label("Show icons.");
+ GtkWidget *tip_chk = gtk_check_button_new_with_label(_("Show tooltips."));
+ GtkWidget *ico_chk = gtk_check_button_new_with_label(_("Show icons."));
gtk_button_set_image(GTK_BUTTON(font_btn),
gtk_image_new_from_stock(GTK_STOCK_SELECT_FONT, GTK_ICON_SIZE_BUTTON));
- gtk_box_pack_start(vbox, newlabel("Font for source code listings:"), FALSE, FALSE, 2);
+ gtk_box_pack_start(vbox, newlabel(_("Font for source code listings:")), FALSE, FALSE, 2);
if (gdbui_setup.options.mono_font)
{
gtk_entry_set_text(GTK_ENTRY(font_box), gdbui_setup.options.mono_font);
@@ -205,7 +206,7 @@
gtk_box_pack_start(GTK_BOX(hbox), font_btn, FALSE, FALSE, 0);
gtk_box_pack_start(vbox, gtk_hseparator_new(), FALSE, FALSE, 8);
- gtk_box_pack_start(vbox, newlabel("Terminal program:"), FALSE, FALSE, 2);
+ gtk_box_pack_start(vbox, newlabel(_("Terminal program:")), FALSE, FALSE, 2);
gtk_box_pack_start(vbox, term_box, FALSE, FALSE, 0);
if (gdbui_setup.options.term_cmd)
{
Modified: trunk/geanydebug/src/gdb-ui-frame.c
===================================================================
--- trunk/geanydebug/src/gdb-ui-frame.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-ui-frame.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -11,6 +11,7 @@
#include "gdb-io.h"
#include "gdb-ui.h"
+#include "support.h"
static gpointer
@@ -123,7 +124,7 @@
new_info_btn()
{
GtkWidget *rv;
- rv = gtk_button_new_with_mnemonic("_Examine");
+ rv = gtk_button_new_with_mnemonic(_("_Examine"));
gtk_button_set_image(GTK_BUTTON(rv),
gtk_image_new_from_stock(MORE_INFO, GTK_ICON_SIZE_BUTTON));
#if GTK_CHECK_VERSION(2, 10, 0)
@@ -273,14 +274,14 @@
g_free(value);
gint resp;
memset(&vw, 0, sizeof(vw));
- vw.dlg = gdbui_new_dialog("Object info");
+ vw.dlg = gdbui_new_dialog(_("Object info"));
vbox = GTK_BOX(GTK_DIALOG(vw.dlg)->vbox);
header = gtk_label_new(NULL);
monospace(header, NULL, heading);
g_free(heading);
gtk_box_pack_start(vbox, header, FALSE, FALSE, 0);
- view = make_list(list, strchr(strval(obj->type), '[') ? "Elements" : "Fields", &vw);
+ view = make_list(list, strchr(strval(obj->type), '[') ? _("Elements") : _("Fields"), &vw);
gtk_box_pack_start(vbox, view, TRUE, TRUE, 0);
@@ -288,12 +289,12 @@
// btn=gtk_dialog_add_button(GTK_DIALOG(vw.dlg)," << _Back ",respGoBack);
btn = gtk_dialog_add_button(GTK_DIALOG(vw.dlg), GTK_STOCK_GO_BACK, respGoBack);
- gdbui_set_tip(btn, "Return to previous dialog.");
+ gdbui_set_tip(btn, _("Return to previous dialog."));
gtk_dialog_set_default_response(GTK_DIALOG(vw.dlg), respGoBack);
vw.info_btn = new_info_btn();
- gdbui_set_tip(vw.info_btn, "Display additional information about the selected item.");
+ gdbui_set_tip(vw.info_btn, _("Display additional information about the selected item."));
g_signal_connect(G_OBJECT(vw.info_btn), "clicked", G_CALLBACK(info_click), &vw);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(vw.dlg)->action_area), vw.info_btn, FALSE, FALSE, 0);
@@ -340,10 +341,10 @@
GtkWidget *btn;
memset(&vw, 0, sizeof(vw));
- vw.dlg = gdbui_new_dialog("Frame info");
+ vw.dlg = gdbui_new_dialog(_("Frame info"));
vbox = GTK_BOX(GTK_DIALOG(vw.dlg)->vbox);
- heading = g_strdup_printf("\nFrame #%s in %s() at %s:%s\n",
+ heading = g_strdup_printf(_("\nFrame #%s in %s() at %s:%s\n"),
strval(frame->level), strval(frame->func),
basename(strval(frame->filename)), strval(frame->line));
header = gtk_label_new(NULL);
@@ -353,21 +354,21 @@
gtk_box_pack_start(vbox, gtk_hseparator_new(), FALSE, FALSE, 0);
- view = make_list(frame->args, "Function arguments", &vw);
+ view = make_list(frame->args, _("Function arguments"), &vw);
gtk_box_pack_start(vbox, view, TRUE, TRUE, 0);
gtk_box_pack_start(vbox, gtk_hseparator_new(), FALSE, FALSE, 0);
- view = make_list(locals, "Local variables", &vw);
+ view = make_list(locals, _("Local variables"), &vw);
gtk_box_pack_start(vbox, view, TRUE, TRUE, 0);
// btn=gtk_dialog_add_button(GTK_DIALOG(vw.dlg)," << _Back ",respGoBack);
btn = gtk_dialog_add_button(GTK_DIALOG(vw.dlg), GTK_STOCK_GO_BACK, respGoBack);
- gdbui_set_tip(btn, "Return to stack list dialog.");
+ gdbui_set_tip(btn, _("Return to stack list dialog."));
gtk_dialog_set_default_response(GTK_DIALOG(vw.dlg), respGoBack);
vw.info_btn = new_info_btn();
- gdbui_set_tip(vw.info_btn, "Display additional information about the selected item.");
+ gdbui_set_tip(vw.info_btn, _("Display additional information about the selected item."));
g_signal_connect(G_OBJECT(vw.info_btn), "clicked", G_CALLBACK(info_click), &vw);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(vw.dlg)->action_area), vw.info_btn, FALSE, FALSE, 0);
@@ -573,7 +574,7 @@
gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE);
g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK(stack_select_cb), &sw);
- sw.dlg = gdbui_new_dialog("Stack trace");
+ sw.dlg = gdbui_new_dialog(_("Stack trace"));
scroll = gtk_scrolled_window_new(NULL, NULL);
gtk_widget_set_usize(scroll, (gdk_screen_get_width(gdk_screen_get_default()) / 3) * 2,
@@ -590,7 +591,7 @@
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(sw.dlg)->vbox), sw.code_label, FALSE, FALSE, 4);
locals_btn = new_info_btn();
- gdbui_set_tip(locals_btn, "Display additional information about the selected frame.");
+ gdbui_set_tip(locals_btn, _("Display additional information about the selected frame."));
g_signal_connect(G_OBJECT(locals_btn), "clicked", G_CALLBACK(show_frame_click), &sw);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(sw.dlg)->action_area), locals_btn, FALSE, FALSE, 0);
Modified: trunk/geanydebug/src/gdb-ui-locn.c
===================================================================
--- trunk/geanydebug/src/gdb-ui-locn.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-ui-locn.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -11,6 +11,7 @@
#include <gtk/gtk.h>
#include "gdb-io.h"
#include "gdb-ui.h"
+#include "support.h"
@@ -49,7 +50,7 @@
}
dlg = gdbui_new_dialog(title);
vbox = GTK_BOX(GTK_DIALOG(dlg)->vbox);
- btn = gtk_dialog_add_button(GTK_DIALOG(dlg), "Clea_r", GTK_RESPONSE_APPLY);
+ btn = gtk_dialog_add_button(GTK_DIALOG(dlg), _("Clea_r"), GTK_RESPONSE_APPLY);
img = gtk_image_new_from_stock(GTK_STOCK_CLEAR, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(btn), img);
@@ -64,7 +65,7 @@
{
hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(vbox, hbox, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new("Filename: "), FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("Filename: ")), FALSE, FALSE, 0);
file_entry = gtk_entry_new();
if (abi && abi->filename)
{
@@ -77,8 +78,8 @@
hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(vbox, hbox, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox),
- gtk_label_new(is_watch ? "Variable to watch:" :
- "Line number or function name: "), FALSE, FALSE, 0);
+ gtk_label_new(is_watch ? _("Variable to watch:") :
+ _("Line number or function name: ")), FALSE, FALSE, 0);
line_entry = gtk_entry_new();
if (abi)
{
@@ -119,7 +120,7 @@
if (is_watch)
{
gtk_box_pack_start(vbox, gtk_hseparator_new(), FALSE, FALSE, 0);
- hbox = gtk_label_new("Access trigger:");
+ hbox = gtk_label_new(_("Access trigger:"));
gtk_misc_set_alignment(GTK_MISC(hbox), 0.0f, 0.0f);
gtk_box_pack_start(vbox, hbox, FALSE, FALSE, 0);
hbox = gtk_hbox_new(FALSE, 0);
Modified: trunk/geanydebug/src/gdb-ui-main.c
===================================================================
--- trunk/geanydebug/src/gdb-ui-main.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/gdb-ui-main.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -14,8 +14,10 @@
#include "gdb-io.h"
#include "gdb-ui.h"
+#include "support.h"
+
GdbUiSetup gdbui_setup;
static GtkWidget *vbox;
@@ -118,7 +120,7 @@
we(pipe_chk);
we(term_chk);
wd(unload_btn);
- status("(no program)", black, white);
+ status(_("(no program)"), black, white);
break;
}
case GdbLoaded:
@@ -132,19 +134,19 @@
we(con_lab);
we(con_cmd);
we(env_btn);
- status("loaded", white, black);
+ status(_("loaded"), white, black);
break;
}
case GdbStartup:
{
- status("starting", yellow, red);
+ status(_("starting"), yellow, red);
break;
}
case GdbRunning:
{
we(pause_btn);
we(kill_btn);
- status("running", green, white);
+ status(_("running"), green, white);
break;
}
case GdbStopped:
@@ -163,7 +165,7 @@
we(con_cmd);
we(pipe_chk);
we(env_btn);
- status("stopped", red, yellow);
+ status(_("stopped"), red, yellow);
break;
}
case GdbFinished:
@@ -177,7 +179,7 @@
we(break_btn);
we(watch_btn);
we(env_btn);
- status("terminated", white, black);
+ status(_("terminated"), white, black);
break;
}
}
@@ -214,7 +216,7 @@
si->from ? si->from : "");
if (pause_clicked)
{
- status("paused", yellow, red);
+ status(_("paused"), yellow, red);
pause_clicked = FALSE;
}
else
@@ -223,7 +225,7 @@
GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
- "Program received signal:");
+ _("Program received signal:"));
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dlg), msg);
gtk_window_set_title(GTK_WINDOW(dlg), "debugger");
@@ -292,7 +294,7 @@
GtkWidget *dlg = NULL;
dlg = gtk_message_dialog_new(GTK_WINDOW(gdbui_setup.main_window),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Error:");
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Error:"));
gtk_window_set_keep_above(GTK_WINDOW(dlg), TRUE);
gtk_window_set_title(GTK_WINDOW(dlg), "debugger");
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dlg), msg);
@@ -444,7 +446,7 @@
load_click(GtkWidget * btn, gpointer user_data)
{
gchar *errmsg = NULL;
- GtkWidget *dlg = gtk_file_chooser_dialog_new("Select executable to debug",
+ GtkWidget *dlg = gtk_file_chooser_dialog_new(_("Select executable to debug"),
GTK_WINDOW(gdbui_setup.main_window),
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -467,7 +469,7 @@
{
case ELF_RELOC:
{
- errmsg = "Debugging of object files is not supported.";
+ errmsg = _("Debugging of object files is not supported.");
break;
}
case ELF_EXEC:
@@ -517,29 +519,29 @@
}
else
{
- errmsg = "You don't have permission to execute this file.";
+ errmsg = _("You don't have permission to execute this file.");
}
break;
}
case ELF_SHARED:
{
- errmsg = "Debugging of shared libraries is not supported.";
+ errmsg = _("Debugging of shared libraries is not supported.");
break;
}
case ELF_CORE:
{
- errmsg = "Debugging of core files id not supported.";
+ errmsg = _("Debugging of core files id not supported.");
break;
}
default:
{
- errmsg = "Target file must be ELF 32-bit x86 executable.";
+ errmsg = _("Target file must be ELF 32-bit x86 executable.");
}
}
}
else
{
- errmsg = "You don't have permission to read this file.";
+ errmsg = _("You don't have permission to read this file.");
}
g_free(fn);
}
@@ -656,7 +658,7 @@
static void
until_click(GtkWidget * btn, gpointer user_data)
{
- LocationInfo *li = gdbui_location_dlg("Run to location", FALSE);
+ LocationInfo *li = gdbui_location_dlg(_("Run to location"), FALSE);
if (li)
{
if (li->filename && *(li->filename))
@@ -766,7 +768,7 @@
gtk_container_add(GTK_CONTAINER(parent), vbox);
}
- split2 stat_lab = gtk_label_new("no program");
+ split2 stat_lab = gtk_label_new(_("no program"));
gtk_box_pack_start(GTK_BOX(vbox), stat_lab, FALSE, FALSE, 4);
gtk_widget_show(vbox);
@@ -774,52 +776,52 @@
gtk_box_pack_start(GTK_BOX(vbox), action_area, FALSE, FALSE, 0);
gtk_widget_show(action_area);
load_btn =
- make_btn("_Load", load_click, GTK_STOCK_OPEN, "Load target program into debugger.");
+ make_btn(_("_Load"), load_click, GTK_STOCK_OPEN, _("Load target program into debugger."));
unload_btn =
- make_btn("_Unload", unload_click, GTK_STOCK_QUIT,
- "Kill the target program AND the debugger.");
+ make_btn(_("_Unload"), unload_click, GTK_STOCK_QUIT,
+ _("Kill the target program AND the debugger."));
run_btn =
- make_btn("_Run", run_click, GTK_STOCK_EXECUTE,
- "Execute target program in debugger.");
+ make_btn(_("_Run"), run_click, GTK_STOCK_EXECUTE,
+ _("Execute target program in debugger."));
kill_btn =
- make_btn("_Kill", kill_click, GTK_STOCK_STOP,
- "Kill the target program with SIGKILL.");
+ make_btn(_("_Kill"), kill_click, GTK_STOCK_STOP,
+ _("Kill the target program with SIGKILL."));
pause_btn =
- make_btn("_Pause", pause_click, GTK_STOCK_MEDIA_PAUSE,
- "Pause the target program with SIGINT.");
+ make_btn(_("_Pause"), pause_click, GTK_STOCK_MEDIA_PAUSE,
+ _("Pause the target program with SIGINT."));
cont_btn =
- make_btn("_Continue", cont_click, GTK_STOCK_MEDIA_PLAY,
- "Continue executing target program.");
+ make_btn(_("_Continue"), cont_click, GTK_STOCK_MEDIA_PLAY,
+ _("Continue executing target program."));
step_btn =
- make_btn("_Step", step_click, GTK_STOCK_GO_FORWARD,
- "Step to the next line or function call.");
+ make_btn(_("_Step"), step_click, GTK_STOCK_GO_FORWARD,
+ _("Step to the next line or function call."));
stepi_btn =
- make_btn("Step _in", stepi_click, GTK_STOCK_GOTO_LAST,
- "Execute the next machine instruction or function call.");
- next_btn = make_btn("_Next", next_click, GTK_STOCK_MEDIA_FORWARD, "Step to the next line.");
+ make_btn(_("Step _in"), stepi_click, GTK_STOCK_GOTO_LAST,
+ _("Execute the next machine instruction or function call."));
+ next_btn = make_btn("_Next", next_click, GTK_STOCK_MEDIA_FORWARD, _("Step to the next line."));
nexti_btn =
- make_btn("Ne_xt in", nexti_click, GTK_STOCK_MEDIA_NEXT,
- "Execute the next machine instruction.");
+ make_btn(_("Ne_xt in"), nexti_click, GTK_STOCK_MEDIA_NEXT,
+ _("Execute the next machine instruction."));
until_btn =
- make_btn("Run _to", until_click, GTK_STOCK_JUMP_TO,
- "Run to specified source line.");
+ make_btn(_("Run _to"), until_click, GTK_STOCK_JUMP_TO,
+ _("Run to specified source line."));
stack_btn =
- make_btn("Stac_k", stack_click, GTK_STOCK_DND_MULTIPLE,
- "Display a backtrace of the current call stack.");
- break_btn = make_btn("_Breaks", break_click, GTK_STOCK_INDEX, "Add or remove breakpoints.");
- watch_btn = make_btn("_Watches", watch_click, GTK_STOCK_FIND, "Add or remove watchpoints.");
+ make_btn(_("Stac_k"), stack_click, GTK_STOCK_DND_MULTIPLE,
+ _("Display a backtrace of the current call stack."));
+ break_btn = make_btn("_Breaks", break_click, GTK_STOCK_INDEX, _("Add or remove breakpoints."));
+ watch_btn = make_btn("_Watches", watch_click, GTK_STOCK_FIND, _("Add or remove watchpoints."));
finish_btn =
- make_btn("_Finish", finish_click, GTK_STOCK_GOTO_BOTTOM,
- "Complete the currently executing function.");
+ make_btn(_("_Finish"), finish_click, GTK_STOCK_GOTO_BOTTOM,
+ _("Complete the currently executing function."));
return_btn =
- make_btn("_Return", return_click, GTK_STOCK_UNDO,
- "Return immediately from the current function.");
+ make_btn(_("_Return"), return_click, GTK_STOCK_UNDO,
+ _("Return immediately from the current function."));
env_btn =
- make_btn("En_viron", env_click, GTK_STOCK_PROPERTIES,
- "Set target environment and command line options.");
+ make_btn(_("En_viron"), env_click, GTK_STOCK_PROPERTIES,
+ _("Set target environment and command line options."));
prefs_btn =
- make_btn("_Options", prefs_click, GTK_STOCK_PREFERENCES,
- "Set user interface options.");
+ make_btn(_("_Options"), prefs_click, GTK_STOCK_PREFERENCES,
+ _("Set user interface options."));
split1;
new_row;
@@ -868,22 +870,22 @@
split1;
w = vbox;
- term_chk = gtk_check_button_new_with_label("Run in terminal");
+ term_chk = gtk_check_button_new_with_label(_("Run in terminal"));
gtk_box_pack_start(GTK_BOX(w), term_chk, FALSE, FALSE, 0);
- gdbui_set_tip(term_chk, "Execute target program inside a terminal window.");
+ gdbui_set_tip(term_chk, _("Execute target program inside a terminal window."));
- pipe_chk = gtk_check_button_new_with_label("Ignore SIGPIPE");
+ pipe_chk = gtk_check_button_new_with_label(_("Ignore SIGPIPE"));
gdbui_set_tip(pipe_chk,
- "Don't pause execution when target gets a SIGPIPE signal.\n"
- "(Useful for certain networking applications.)");
+ _("Don't pause execution when target gets a SIGPIPE signal.\n"
+ "(Useful for certain networking applications.)"));
gtk_box_pack_start(GTK_BOX(w), pipe_chk, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(pipe_chk), "clicked", G_CALLBACK(pipe_click), NULL);
split2;
- con_lab = gtk_label_new(" Console:");
- gdbui_set_tip(con_lab, "Send a GDB command directly to the debugger.");
+ con_lab = gtk_label_new(_("Console:"));
+ gdbui_set_tip(con_lab, _("Send a GDB command directly to the debugger."));
gtk_misc_set_alignment(GTK_MISC(con_lab), 0.0f, 0.0f);
gtk_box_pack_start(GTK_BOX(vbox), con_lab, FALSE, FALSE, 0);
@@ -939,7 +941,7 @@
g_signal_connect(G_OBJECT(gdbui_setup.main_window), "destroy", quit, NULL);
vbox = gdbui_create_widgets();
gtk_box_pack_start(GTK_BOX(vbox), gtk_hseparator_new(), TRUE, TRUE, 4);
- quit_btn = make_btn("_Quit", quit_click, "Exit everything ");
+ quit_btn = make_btn(_("_Quit"), quit_click, _("Exit everything"));
gtk_box_pack_start(GTK_BOX(vbox), quit_btn, TRUE, TRUE, 0);
gtk_container_add(GTK_CONTAINER(gdbui_setup.main_window), vbox);
gtk_widget_show_all(gdbui_setup.main_window);
Modified: trunk/geanydebug/src/geanydebug.c
===================================================================
--- trunk/geanydebug/src/geanydebug.c 2008-11-04 20:15:35 UTC (rev 284)
+++ trunk/geanydebug/src/geanydebug.c 2008-11-07 19:23:29 UTC (rev 285)
@@ -22,8 +22,12 @@
*/
+#include "geany.h"
-#include "geany.h"
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
#include "support.h"
#include "prefs.h"
#include "document.h"
@@ -49,16 +53,17 @@
PLUGIN_VERSION_CHECK(78)
PLUGIN_SET_INFO(_("Debugger"), _("Integrated debugging with GDB."), VERSION, _("Jeff Pohlmeyer"))
- static GeanyData *geany_data;
- GeanyFunctions *geany_functions;
- static GtkNotebook *msgbook;
- static GtkWidget *compwin;
- static GtkWidget *frame;
- static gchar *config_file;
+static GeanyData *geany_data;
+GeanyFunctions *geany_functions;
+static GtkNotebook *msgbook;
+static GtkWidget *compwin;
+static GtkWidget *frame;
+static gchar *config_file;
- static void show_compwin()
+
+static void show_compwin()
{
gint page = gtk_notebook_page_num(msgbook, compwin);
gtk_notebook_set_current_page(msgbook, page);
@@ -306,6 +311,32 @@
}
+static void locale_init(void)
+{
+#ifdef ENABLE_NLS
+ gchar *locale_dir = NULL;
+
+#ifdef HAVE_LOCALE_H
+ setlocale(LC_ALL, "");
+#endif
+
+#ifdef G_OS_WIN32
+ gchar *install_dir = g_win32_get_package_installation_directory("geany", NULL);
+ /* e.g. C:\Program Files\geany\lib\locale */
+ locale_dir = g_strconcat(install_dir, "\\share\\locale", NULL);
+ g_free(install_dir);
+#else
+ locale_dir = g_strdup(LOCALEDIR);
+#endif
+
+ bindtextdomain(GETTEXT_PACKAGE, locale_dir);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ textdomain(GETTEXT_PACKAGE);
+ g_free(locale_dir);
+#endif
+}
+
+
#define GET_KEY_BOOL(k) { \
gboolean tmp=g_key_file_get_boolean(kf,unix_name,#k"",&err); \
if (err) { CLEAR() } else { gdbui_setup.options.k=tmp; } \
@@ -317,6 +348,9 @@
GKeyFile *kf = g_key_file_new();
GError *err = NULL;
geany_data = data;
+
+ locale_init();
+
gdbui_setup.main_window = geany->main_widgets->window;
gdbio_setup.temp_dir = g_build_filename(geany->app->configdir, "plugins", unix_name, NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Plugins-Commits
mailing list