Added internationalization by Jordi Mallach. --baa
git-svn-id: http://svn.code.sf.net/p/xqf/code/trunk@49 d2ac09be-c843-0410-8b1f-f8a84130e0ec
This commit is contained in:
parent
78d51e8ed9
commit
97a5a7d6e8
@ -1,3 +1,16 @@
|
||||
June 8, 2001, Jordi Mallach <jordi@sindominio.net>
|
||||
- Big internationalization patch for XQF.
|
||||
Adds intl/ and po/ subdirs, and adds the gettext marks
|
||||
to every .c that needs it. Modified configure.in and
|
||||
the Makefile.am's to support gettext. From now on,
|
||||
every string in the code should be wrapped inside
|
||||
gettext() calls, and .c's should add a <libintl.h>
|
||||
if they don't have it already.
|
||||
Some issues with the current code remain (untranslatable
|
||||
strings), thats a work in progress.
|
||||
- Initial, incomplete Spanish translation (po/es.po).
|
||||
- changed configure.in so it barfs about qstat << 2.4c.
|
||||
|
||||
June 5, 2001: Alex Burger <alex@fragit.net>
|
||||
-Tribes 2 games can now be launched. Created a t2_exec
|
||||
function. If a name is specified in Player Profile, it
|
||||
|
@ -1,6 +1,6 @@
|
||||
SUBDIRS = src
|
||||
|
||||
EXTRA_DIST = \
|
||||
EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPYING ChangeLog CVS INSTALL \
|
||||
README TODO install-sh missing mkinstalldirs \
|
||||
src/xpm/ \
|
||||
src/xpm/q.xpm \
|
||||
src/xpm/q2.xpm \
|
||||
@ -72,4 +72,6 @@ src/utils.h \
|
||||
src/xqf-ui.h \
|
||||
src/xutils.h \
|
||||
src/zipped.h \
|
||||
src/gnuconfig.h \
|
||||
src/gnuconfig.h
|
||||
|
||||
SUBDIRS = intl po src
|
||||
|
@ -3,19 +3,28 @@
|
||||
# Initially written by Markus Fischer <mfischer@josefine.ben.tuwien.ac.at>
|
||||
#
|
||||
|
||||
AC_INIT( src/xqf.c)
|
||||
AC_INIT(src/xqf.c)
|
||||
|
||||
AM_INIT_AUTOMAKE( xqf, 0.9.6g)
|
||||
AM_INIT_AUTOMAKE(xqf, 0.9.6g)
|
||||
dnl AM_CONFIG_HEADER(src/gnuconfig.h:src/gnuconfig.h.in)
|
||||
AM_CONFIG_HEADER(src/gnuconfig.h)
|
||||
|
||||
ALL_LINGUAS="es"
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
AM_SANITY_CHECK
|
||||
|
||||
dnl Pick up the gettext, etc macros
|
||||
dnl AM_ACLOCAL_INCLUDE(macros)
|
||||
dnl AM_GNU_GETTEXT
|
||||
|
||||
dnl check for qstat
|
||||
|
||||
AC_ARG_WITH(qstat,[ --with-qstat=CMD use CMD to run qstat])
|
||||
|
||||
AC_MSG_CHECKING(qstat version)
|
||||
@ -36,7 +45,7 @@ if test "x$qstat_version" = "x" ; then
|
||||
AC_MSG_RESULT(qstat not found)
|
||||
echo
|
||||
echo "*** QStat is *required* to run XQF"
|
||||
echo "*** Get it from http://www.activesw.com/people/steve/qstat.html"
|
||||
echo "*** Get it from http://qstat.org/"
|
||||
echo "*** and put it in your path"
|
||||
echo
|
||||
exit 1
|
||||
@ -47,11 +56,11 @@ fi
|
||||
AC_SUBST(QSTATEXEC)
|
||||
|
||||
case "$qstat_version" in
|
||||
2.0*|2.1y|2.1z|2.3a|2.3b)
|
||||
2.0*|2.1*|2.3*|2.4a|2.4b)
|
||||
echo
|
||||
echo "*** You have obsolete QStat beta version installed"
|
||||
echo "*** QStat 2.3f is *required* to run XQF"
|
||||
echo "*** Get it from http://www.activesw.com/people/steve/qstat.html"
|
||||
echo "*** QStat 2.4c is *required* to run XQF"
|
||||
echo "*** Get it from http://qstat.org/"
|
||||
echo
|
||||
exit 1
|
||||
;;
|
||||
@ -79,7 +88,14 @@ AC_SUBST(DEBUG)
|
||||
|
||||
AM_PATH_GTK(1.2.0,,exit 1)
|
||||
|
||||
AC_SUBST( VERSION)
|
||||
AC_SUBST( QSTATEXEC)
|
||||
AC_SUBST(VERSION)
|
||||
AC_SUBST(QSTATEXEC)
|
||||
|
||||
AC_OUTPUT( Makefile src/gnuconfig.h src/Makefile)
|
||||
dnl Pick up the gettext, etc macros
|
||||
dnl AM_ACLOCAL_INCLUDE(macros)
|
||||
AM_GNU_GETTEXT
|
||||
|
||||
AC_DEFINE_UNQUOTED(XQF_VERSION, "$VERSION", XQF Version number)
|
||||
AC_DEFINE_UNQUOTED(QSTAT_EXEC, "$QSTATEXEC", QSTAT executable path)
|
||||
|
||||
AC_OUTPUT([Makefile intl/Makefile po/Makefile.in src/Makefile])
|
||||
|
8
xqf/po/ChangeLog
Normal file
8
xqf/po/ChangeLog
Normal file
@ -0,0 +1,8 @@
|
||||
2001-06-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* Initial es.po, very incomplete.
|
||||
|
||||
2001-06-02 gettextize <bug-gnu-utils@gnu.org>
|
||||
|
||||
* Initial gettextization.
|
||||
|
36
xqf/po/POTFILES.in
Normal file
36
xqf/po/POTFILES.in
Normal file
@ -0,0 +1,36 @@
|
||||
# List of source files containing translatable strings.
|
||||
|
||||
# Package source files
|
||||
src/addmaster.c
|
||||
src/addserver.c
|
||||
#src/config.c
|
||||
#src/debug.c
|
||||
src/dialogs.c
|
||||
#src/dns.c
|
||||
src/filter.c
|
||||
src/flt-player.c
|
||||
#src/game.c
|
||||
#src/history.c
|
||||
#src/host.c
|
||||
src/launch.c
|
||||
#src/menus.c
|
||||
#src/pixmaps.c
|
||||
src/pref.c
|
||||
src/psearch.c
|
||||
#src/rc.c
|
||||
src/rcon.c
|
||||
#src/server.c
|
||||
#src/skin.c
|
||||
#src/skin_pcx.c
|
||||
#src/sort.c
|
||||
src/source.c
|
||||
#src/srv-info.c
|
||||
#src/srv-list.c
|
||||
src/srv-prop.c
|
||||
src/stat.c
|
||||
src/statistics.c
|
||||
#src/utils.c
|
||||
#src/xqf-ui.c
|
||||
src/xqf.c
|
||||
#src/xutils.c
|
||||
#src/zipped.c
|
1096
xqf/po/es.po
Normal file
1096
xqf/po/es.po
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,10 @@
|
||||
INCLUDES = @GTK_CFLAGS@
|
||||
localedir = $(datadir)/locale
|
||||
INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@ @GTK_CFLAGS@
|
||||
CFLAGS = @CFLAGS@ @QSTAT23@ @DEBUG@ @COMPRESSION@
|
||||
|
||||
bin_PROGRAMS = xqf
|
||||
|
||||
xqf_LDADD = @GTK_LIBS@
|
||||
xqf_LDADD = @INTLLIBS@ @GTK_LIBS@
|
||||
|
||||
xqf_SOURCES = \
|
||||
addmaster.c \
|
||||
|
@ -29,6 +29,12 @@
|
||||
#include "source.h"
|
||||
#include "addmaster.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
static struct history *master_history_addr = NULL;
|
||||
static struct history *master_history_name = NULL;
|
||||
@ -134,7 +140,7 @@ char *add_master_dialog (enum server_type *type, char **desc) {
|
||||
*type = QW_SERVER;
|
||||
}
|
||||
|
||||
window = dialog_create_modal_transient_window ("Add Master",
|
||||
window = dialog_create_modal_transient_window (_("Add Master"),
|
||||
TRUE, FALSE, NULL);
|
||||
main_vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
@ -147,7 +153,7 @@ char *add_master_dialog (enum server_type *type, char **desc) {
|
||||
|
||||
/* Master Name (Description) */
|
||||
|
||||
label = gtk_label_new ("Master Name");
|
||||
label = gtk_label_new (_("Master Name"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
|
||||
GTK_FILL, GTK_FILL, 0, 0);
|
||||
@ -192,7 +198,7 @@ char *add_master_dialog (enum server_type *type, char **desc) {
|
||||
|
||||
/* Master Address */
|
||||
|
||||
label = gtk_label_new ("Master Address");
|
||||
label = gtk_label_new (_("Master Address"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
||||
GTK_FILL, GTK_FILL, 0, 0);
|
||||
@ -235,7 +241,7 @@ char *add_master_dialog (enum server_type *type, char **desc) {
|
||||
|
||||
/* Cancel Button */
|
||||
|
||||
button = gtk_button_new_with_label ("Cancel");
|
||||
button = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_set_usize (button, 80, -1);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
|
@ -25,6 +25,13 @@
|
||||
#include "config.h"
|
||||
#include "addserver.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
|
||||
static struct history *server_history = NULL;
|
||||
|
||||
@ -93,7 +100,7 @@ char *add_server_dialog (enum server_type *type) {
|
||||
*type = QW_SERVER;
|
||||
}
|
||||
|
||||
window = dialog_create_modal_transient_window ("Add Server",
|
||||
window = dialog_create_modal_transient_window (_("Add Server"),
|
||||
TRUE, FALSE, NULL);
|
||||
main_vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
@ -104,7 +111,7 @@ char *add_server_dialog (enum server_type *type) {
|
||||
|
||||
/* Server Entry */
|
||||
|
||||
label = gtk_label_new ("Server:");
|
||||
label = gtk_label_new (_("Server:"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
@ -155,7 +162,7 @@ char *add_server_dialog (enum server_type *type) {
|
||||
|
||||
/* Cancel Button */
|
||||
|
||||
button = gtk_button_new_with_label ("Cancel");
|
||||
button = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_set_usize (button, 80, -1);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
@ -191,7 +198,7 @@ char *add_server_dialog (enum server_type *type) {
|
||||
|
||||
|
||||
void add_server_init (void) {
|
||||
server_history = history_new ("Add Server");
|
||||
server_history = history_new (_("Add Server"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,6 +28,13 @@
|
||||
#include "xutils.h"
|
||||
#include "dialogs.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
|
||||
static int destroy_on_escape (GtkWidget *widget, GdkEventKey *event) {
|
||||
|
||||
@ -107,7 +114,8 @@ void dialog_ok (char *title, char *fmt, ...) {
|
||||
va_end (ap);
|
||||
|
||||
window = dialog_create_modal_transient_window (
|
||||
(title)? title : "XQF: Warning!", TRUE, FALSE, NULL);
|
||||
(title)? title : _("XQF: Warning!"),
|
||||
TRUE, FALSE, NULL);
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 8);
|
||||
@ -131,7 +139,7 @@ void dialog_ok (char *title, char *fmt, ...) {
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, TRUE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("OK");
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
gtk_widget_set_usize (button, 96, -1);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 0);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
@ -177,7 +185,8 @@ int dialog_yesno (char *title, int defbutton, char *yes, char *no,
|
||||
va_end (ap);
|
||||
|
||||
window = dialog_create_modal_transient_window (
|
||||
(title)? title : "XQF: Warning!", TRUE, FALSE, NULL);
|
||||
(title)? title : _("XQF: Warning!"),
|
||||
TRUE, FALSE, NULL);
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 8);
|
||||
@ -201,7 +210,7 @@ int dialog_yesno (char *title, int defbutton, char *yes, char *no,
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, TRUE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ((yes)? yes : "Yes");
|
||||
button = gtk_button_new_with_label ((yes)? yes : _("Yes"));
|
||||
gtk_widget_set_usize (button, 96, -1);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 0);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
@ -213,7 +222,7 @@ int dialog_yesno (char *title, int defbutton, char *yes, char *no,
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label ((no)? no : "No");
|
||||
button = gtk_button_new_with_label ((no)? no : _("No"));
|
||||
gtk_widget_set_usize (button, 96, -1);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, FALSE, 0);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
@ -295,7 +304,7 @@ static char *va_enter_string_dialog (int visible, char *optstr, int *optval,
|
||||
|
||||
/* OK Button */
|
||||
|
||||
button = gtk_button_new_with_label (" OK ");
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (enter_string_activate_callback),
|
||||
GTK_OBJECT (enter_string_entry));
|
||||
@ -306,7 +315,7 @@ static char *va_enter_string_dialog (int visible, char *optstr, int *optval,
|
||||
|
||||
/* Cancel Button */
|
||||
|
||||
button = gtk_button_new_with_label (" Cancel ");
|
||||
button = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window));
|
||||
|
@ -43,7 +43,6 @@ extern int h_errno; /* h_errno */
|
||||
#include "host.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
# define MAXHOSTNAMELEN 64
|
||||
#endif
|
||||
@ -505,7 +504,8 @@ static void dns_resolve (char *str) {
|
||||
|
||||
if (dns_workers_num >= DNS_MAX_CHILDREN || !dns_dispatch_to_worker (str)) {
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "DNS Master> \"%s\" is put to the waiting queue\n", str);
|
||||
fprintf (stderr, "DNS Master> \"%s\" is put to the waiting queue\n",
|
||||
str);
|
||||
#endif
|
||||
dns_queue_add (strdup (str));
|
||||
}
|
||||
@ -652,7 +652,8 @@ static void dns_master_mainloop (void) {
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "DNS Master> %d workers, queue is %s\n",
|
||||
dns_workers_num, (q_head)? "not empty" : "empty");
|
||||
dns_workers_num,
|
||||
(q_head)? "not empty" : "empty");
|
||||
#endif
|
||||
|
||||
FD_ZERO (&readfds);
|
||||
|
@ -28,6 +28,13 @@
|
||||
#include "filter.h"
|
||||
#include "flt-player.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
|
||||
static int server_pass_filter (struct server *s, struct server_filter_vars *vars);
|
||||
static void server_filter_init (void);
|
||||
@ -419,12 +426,12 @@ static void server_filter_page (GtkWidget *notebook) {
|
||||
page_hbox = gtk_hbox_new (TRUE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (page_hbox), 8);
|
||||
|
||||
label = gtk_label_new ("Server Filter");
|
||||
label = gtk_label_new (_("Server Filter"));
|
||||
gtk_widget_show (label);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_hbox, label);
|
||||
|
||||
frame = gtk_frame_new ("Server would pass filter if");
|
||||
frame = gtk_frame_new (_("Server would pass filter if"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_box_pack_start (GTK_BOX (page_hbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
@ -439,7 +446,7 @@ static void server_filter_page (GtkWidget *notebook) {
|
||||
|
||||
/* max ping */
|
||||
|
||||
label = gtk_label_new ("ping is less than");
|
||||
label = gtk_label_new (_("ping is less than"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL,
|
||||
0, 0);
|
||||
@ -456,7 +463,7 @@ static void server_filter_page (GtkWidget *notebook) {
|
||||
|
||||
/* max timeouts */
|
||||
|
||||
label = gtk_label_new ("the number of retires is fewer than");
|
||||
label = gtk_label_new (_("the number of retires is fewer than"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL,
|
||||
0, 0);
|
||||
@ -476,7 +483,7 @@ static void server_filter_page (GtkWidget *notebook) {
|
||||
row = 0;
|
||||
sprintf( label_buf, "Filter %d", current_server_filter + 1 );
|
||||
|
||||
label = gtk_label_new ("Filter Name (For Menu):");
|
||||
label = gtk_label_new (_("Filter Name (For Menu):"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 3, 4, row, row+1, GTK_FILL, GTK_FILL, 0, 0);
|
||||
gtk_widget_show (label);
|
||||
@ -494,7 +501,7 @@ static void server_filter_page (GtkWidget *notebook) {
|
||||
/* GAMETYPE Filter -- baa */
|
||||
/* http://developer.gnome.org/doc/API/gtk/gtktable.html */
|
||||
|
||||
label = gtk_label_new ("the game contains the string");
|
||||
label = gtk_label_new (_("the game contains the string"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 3, 4, row, row+1, GTK_FILL, GTK_FILL,
|
||||
0, 0);
|
||||
@ -512,7 +519,7 @@ static void server_filter_page (GtkWidget *notebook) {
|
||||
|
||||
/* Version Filter -- baa */
|
||||
|
||||
label = gtk_label_new ("the version contains the string");
|
||||
label = gtk_label_new (_("the version contains the string"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 3, 4, row, row+1, GTK_FILL, GTK_FILL,
|
||||
0, 0);
|
||||
@ -531,7 +538,7 @@ static void server_filter_page (GtkWidget *notebook) {
|
||||
/* not full */
|
||||
|
||||
filter_not_full_check_button =
|
||||
gtk_check_button_new_with_label ("it is not full");
|
||||
gtk_check_button_new_with_label (_("it is not full"));
|
||||
gtk_toggle_button_set_active (
|
||||
GTK_TOGGLE_BUTTON (filter_not_full_check_button), server_filters[current_server_filter].filter_not_full);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), filter_not_full_check_button,
|
||||
@ -541,7 +548,7 @@ static void server_filter_page (GtkWidget *notebook) {
|
||||
/* not empty */
|
||||
|
||||
filter_not_empty_check_button =
|
||||
gtk_check_button_new_with_label ("it is not empty");
|
||||
gtk_check_button_new_with_label (_("it is not empty"));
|
||||
gtk_toggle_button_set_active (
|
||||
GTK_TOGGLE_BUTTON (filter_not_empty_check_button), server_filters[current_server_filter].filter_not_empty);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), filter_not_empty_check_button,
|
||||
@ -551,7 +558,7 @@ static void server_filter_page (GtkWidget *notebook) {
|
||||
/* no cheats */
|
||||
|
||||
filter_no_cheats_check_button =
|
||||
gtk_check_button_new_with_label ("cheats are not allowed");
|
||||
gtk_check_button_new_with_label (_("cheats are not allowed"));
|
||||
gtk_toggle_button_set_active (
|
||||
GTK_TOGGLE_BUTTON (filter_no_cheats_check_button),
|
||||
server_filters[current_server_filter].filter_no_cheats);
|
||||
@ -562,7 +569,7 @@ static void server_filter_page (GtkWidget *notebook) {
|
||||
/* no password */
|
||||
|
||||
filter_no_password_check_button =
|
||||
gtk_check_button_new_with_label ("no password required");
|
||||
gtk_check_button_new_with_label (_("no password required"));
|
||||
gtk_toggle_button_set_active (
|
||||
GTK_TOGGLE_BUTTON (filter_no_password_check_button),
|
||||
server_filters[current_server_filter].filter_no_password);
|
||||
@ -590,7 +597,7 @@ int filters_cfg_dialog (int page_num) {
|
||||
const char *flt_status[3] = { "not changed", "changed", "data changed" };
|
||||
#endif
|
||||
|
||||
window = dialog_create_modal_transient_window ("XQF: Filters",
|
||||
window = dialog_create_modal_transient_window (_("XQF: Filters"),
|
||||
TRUE, TRUE, NULL);
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
@ -618,7 +625,7 @@ int filters_cfg_dialog (int page_num) {
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Cancel");
|
||||
button = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_widget_set_usize (button, 80, -1);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window));
|
||||
@ -626,7 +633,7 @@ int filters_cfg_dialog (int page_num) {
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label ("OK");
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
gtk_widget_set_usize (button, 80, -1);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (server_filter_new_defaults), NULL);
|
||||
|
@ -34,6 +34,13 @@
|
||||
#include "flt-player.h"
|
||||
#include "filter.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#define N_(string) (string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
#define REGCOMP_FLAGS (REG_EXTENDED | REG_NOSUB | REG_ICASE)
|
||||
|
||||
@ -63,15 +70,15 @@ enum {
|
||||
};
|
||||
|
||||
static char *mode_symbols[3] = {
|
||||
"string",
|
||||
"substr",
|
||||
"regexp"
|
||||
N_("string"),
|
||||
N_("substr"),
|
||||
N_("regexp")
|
||||
};
|
||||
|
||||
static const char *mode_names[3] = {
|
||||
"string",
|
||||
"substring",
|
||||
"regular expression"
|
||||
N_("string"),
|
||||
N_("substring"),
|
||||
N_("regular expression")
|
||||
};
|
||||
|
||||
|
||||
@ -442,7 +449,7 @@ static void show_pattern_error (int row) {
|
||||
pp = (struct player_pattern *) list->data;
|
||||
|
||||
if (pp->error) {
|
||||
dialog_ok ("XQF: Error", "Regular Expression Error!\n\n%s\n\n%s.",
|
||||
dialog_ok (_("XQF: Error"), _("Regular Expression Error!\n\n%s\n\n%s."),
|
||||
pp->pattern, pp->error);
|
||||
}
|
||||
}
|
||||
@ -645,7 +652,7 @@ static GtkWidget *player_filter_pattern_editor (void) {
|
||||
|
||||
/* Pattern Entry */
|
||||
|
||||
label = gtk_label_new ("Pattern");
|
||||
label = gtk_label_new (_("Pattern"));
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, 0, 0, 0, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
@ -680,7 +687,7 @@ static GtkWidget *player_filter_pattern_editor (void) {
|
||||
|
||||
/* Comment */
|
||||
|
||||
frame = gtk_frame_new ("Pattern Comment");
|
||||
frame = gtk_frame_new (_("Pattern Comment"));
|
||||
gtk_box_pack_end (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
@ -733,13 +740,13 @@ void player_filter_page (GtkWidget *notebook) {
|
||||
GtkWidget *pixmap;
|
||||
GtkWidget *button;
|
||||
GtkWidget *peditor;
|
||||
char *titles[5] = { "", "", "", "Mode", "Pattern" };
|
||||
char *titles[5] = { "", "", "", N_("Mode"), N_("Pattern") };
|
||||
int i;
|
||||
|
||||
page_hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (page_hbox), 8);
|
||||
|
||||
label = gtk_label_new ("Player Filter");
|
||||
label = gtk_label_new (_("Player Filter"));
|
||||
gtk_widget_show (label);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page_hbox, label);
|
||||
@ -796,13 +803,13 @@ void player_filter_page (GtkWidget *notebook) {
|
||||
vbox = gtk_vbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (page_hbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label (" New ");
|
||||
button = gtk_button_new_with_label (_("New"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (new_pattern_callback), NULL);
|
||||
gtk_widget_show (button);
|
||||
|
||||
delete_button = gtk_button_new_with_label (" Delete ");
|
||||
delete_button = gtk_button_new_with_label (_("Delete"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), delete_button, FALSE, FALSE, 0);
|
||||
gtk_signal_connect (GTK_OBJECT (delete_button), "clicked",
|
||||
GTK_SIGNAL_FUNC (delete_pattern_callback), NULL);
|
||||
@ -814,13 +821,13 @@ void player_filter_page (GtkWidget *notebook) {
|
||||
vbox2 = gtk_vbox_new (FALSE, 4);
|
||||
gtk_container_add (GTK_CONTAINER (alignment), vbox2);
|
||||
|
||||
up_button = gtk_button_new_with_label (" Up ");
|
||||
up_button = gtk_button_new_with_label (_("Up"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), up_button, FALSE, FALSE, 0);
|
||||
gtk_signal_connect (GTK_OBJECT (up_button), "clicked",
|
||||
GTK_SIGNAL_FUNC (move_up_down_pattern_callback), (void *) -1);
|
||||
gtk_widget_show (up_button);
|
||||
|
||||
down_button = gtk_button_new_with_label (" Down ");
|
||||
down_button = gtk_button_new_with_label (_("Down"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), down_button, FALSE, FALSE, 0);
|
||||
gtk_signal_connect (GTK_OBJECT (down_button), "clicked",
|
||||
GTK_SIGNAL_FUNC (move_up_down_pattern_callback), (void *) 1);
|
||||
|
@ -41,6 +41,12 @@
|
||||
# define WAIT_ANY -1
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
#define CLIENT_ERROR_BUFFER 256
|
||||
#define CLIENT_ERROR_MSG_HEAD "<XQF ERROR> "
|
||||
@ -63,7 +69,7 @@ static GSList *clients = NULL;
|
||||
|
||||
|
||||
static void dialog_failed (char *func, char *arg) {
|
||||
dialog_ok ("XQF: ERROR!", "ERROR!\n\n%s(%s) failed: %s",
|
||||
dialog_ok (_("XQF: ERROR!"), _("ERROR!\n\n%s(%s) failed: %s"),
|
||||
func, (arg)? arg : "", g_strerror (errno));
|
||||
}
|
||||
|
||||
@ -182,7 +188,7 @@ static void client_input_callback (struct running_client *cl, int fd,
|
||||
|
||||
if (!strncmp (cl->buffer,
|
||||
CLIENT_ERROR_MSG_HEAD, strlen (CLIENT_ERROR_MSG_HEAD))) {
|
||||
dialog_ok ("XQF: ERROR!", "ERROR!\n\n%s",
|
||||
dialog_ok (_("XQF: ERROR!"), _("ERROR!\n\n%s"),
|
||||
cl->buffer + strlen (CLIENT_ERROR_MSG_HEAD));
|
||||
|
||||
pid = cl->pid; /* save PID value */
|
||||
@ -324,8 +330,8 @@ static int already_running (enum server_type type) {
|
||||
|
||||
s = (struct server *) ((struct running_client *) clients->data) -> server;
|
||||
|
||||
res = dialog_yesno (NULL, 1, "Launch", "Cancel",
|
||||
"There is %s client running.\n\nLaunch %s client?",
|
||||
res = dialog_yesno (NULL, 1, _("Launch"), _("Cancel"),
|
||||
_("There is %s client running.\n\nLaunch %s client?"),
|
||||
(another)? games[type].name : games[s->type].name,
|
||||
(another)? "another" : games[type].name);
|
||||
|
||||
|
159
xqf/src/pref.c
159
xqf/src/pref.c
@ -36,6 +36,14 @@
|
||||
#include "config.h"
|
||||
#include "rc.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#define N_(string) (string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
|
||||
char *user_rcdir = NULL;
|
||||
|
||||
@ -756,7 +764,7 @@ static GtkWidget *q1_skin_box_create (void) {
|
||||
|
||||
/* Top (Shirt) Color */
|
||||
|
||||
label = gtk_label_new ("Top");
|
||||
label = gtk_label_new (_("Top"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1);
|
||||
gtk_widget_show (label);
|
||||
@ -772,7 +780,7 @@ static GtkWidget *q1_skin_box_create (void) {
|
||||
|
||||
/* Bottom (Pants) Color */
|
||||
|
||||
label = gtk_label_new ("Bottom");
|
||||
label = gtk_label_new (_("Bottom"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2);
|
||||
gtk_widget_show (label);
|
||||
@ -855,7 +863,7 @@ static GtkWidget *qw_skin_box_create (void) {
|
||||
|
||||
/* Top (Shirt) Color */
|
||||
|
||||
label = gtk_label_new ("Top");
|
||||
label = gtk_label_new (_("Top"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1);
|
||||
gtk_widget_show (label);
|
||||
@ -871,7 +879,7 @@ static GtkWidget *qw_skin_box_create (void) {
|
||||
|
||||
/* Bottom (Pants) Color */
|
||||
|
||||
label = gtk_label_new ("Bottom");
|
||||
label = gtk_label_new (_("Bottom"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2);
|
||||
gtk_widget_show (label);
|
||||
@ -1012,7 +1020,7 @@ static GtkWidget *player_profile_q1_page (void) {
|
||||
alignment = gtk_alignment_new (0.5, 0.5, 0, 0);
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), alignment, FALSE, FALSE, 0);
|
||||
|
||||
frame = gtk_frame_new ("Colors");
|
||||
frame = gtk_frame_new (_("Colors"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_container_add (GTK_CONTAINER (alignment), frame);
|
||||
|
||||
@ -1044,7 +1052,7 @@ static GtkWidget *player_profile_qw_page (void) {
|
||||
alignment = gtk_alignment_new (0.5, 0.5, 0, 0);
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), alignment, FALSE, FALSE, 0);
|
||||
|
||||
frame = gtk_frame_new ("Skin/Colors");
|
||||
frame = gtk_frame_new (_("Skin/Colors"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_container_add (GTK_CONTAINER (alignment), frame);
|
||||
|
||||
@ -1059,7 +1067,7 @@ static GtkWidget *player_profile_qw_page (void) {
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), hbox, FALSE, FALSE, 4);
|
||||
|
||||
label = gtk_label_new ("Team");
|
||||
label = gtk_label_new (_("Team"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
@ -1092,7 +1100,7 @@ static GtkWidget *player_profile_q2_page (void) {
|
||||
alignment = gtk_alignment_new (0.5, 0.5, 0, 0);
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), alignment, FALSE, FALSE, 0);
|
||||
|
||||
frame = gtk_frame_new ("Model/Skin");
|
||||
frame = gtk_frame_new (_("Model/Skin"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_container_add (GTK_CONTAINER (alignment), frame);
|
||||
|
||||
@ -1125,7 +1133,7 @@ static GtkWidget *player_profile_page (void) {
|
||||
|
||||
/* Player Name */
|
||||
|
||||
label = gtk_label_new ("Name");
|
||||
label = gtk_label_new (_("Name"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
@ -1178,15 +1186,15 @@ static GtkWidget *player_profile_page (void) {
|
||||
|
||||
|
||||
static char *wb_switch_labels[9] = {
|
||||
"--- Anything ---",
|
||||
"Axe",
|
||||
"Shotgun",
|
||||
"Super Shotgun",
|
||||
"Nailgun",
|
||||
"Super Nailgun",
|
||||
"Grenade Launcher",
|
||||
"Rocket Launcher",
|
||||
"ThunderBolt"
|
||||
N_("--- Anything ---"),
|
||||
N_("Axe"),
|
||||
N_("Shotgun"),
|
||||
N_("Super Shotgun"),
|
||||
N_("Nailgun"),
|
||||
N_("Super Nailgun"),
|
||||
N_("Grenade Launcher"),
|
||||
N_("Rocket Launcher"),
|
||||
N_("ThunderBolt")
|
||||
};
|
||||
|
||||
|
||||
@ -1208,7 +1216,7 @@ static GtkWidget *create_wb_switch_menu (void (*callback) (GtkWidget *, int)) {
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
for (i = 0; i < 9; i++) {
|
||||
menu_item = gtk_menu_item_new_with_label (wb_switch_labels[i]);
|
||||
menu_item = gtk_menu_item_new_with_label (_(wb_switch_labels[i]));
|
||||
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
|
||||
GTK_SIGNAL_FUNC (callback), (gpointer) i);
|
||||
gtk_menu_append (GTK_MENU (menu), menu_item);
|
||||
@ -1230,19 +1238,19 @@ static GtkWidget *create_noskins_menu (void) {
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label ("Use skins");
|
||||
menu_item = gtk_menu_item_new_with_label (_("Use skins"));
|
||||
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
|
||||
GTK_SIGNAL_FUNC (noskins_option_menu_callback), (gpointer) 0);
|
||||
gtk_menu_append (GTK_MENU (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label ("Don\'t use skins");
|
||||
menu_item = gtk_menu_item_new_with_label (_("Don\'t use skins"));
|
||||
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
|
||||
GTK_SIGNAL_FUNC (noskins_option_menu_callback), (gpointer) 1);
|
||||
gtk_menu_append (GTK_MENU (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label ("Don\'t download new skins");
|
||||
menu_item = gtk_menu_item_new_with_label (_("Don\'t download new skins"));
|
||||
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
|
||||
GTK_SIGNAL_FUNC (noskins_option_menu_callback), (gpointer) 2);
|
||||
gtk_menu_append (GTK_MENU (menu), menu_item);
|
||||
@ -1282,7 +1290,7 @@ static GtkWidget *generic_game_frame (enum server_type type) {
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("Command Line");
|
||||
label = gtk_label_new (_("Command Line"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
|
||||
GTK_FILL, GTK_FILL, 0, 0);
|
||||
@ -1297,7 +1305,7 @@ static GtkWidget *generic_game_frame (enum server_type type) {
|
||||
1, 2, 0, 1);
|
||||
gtk_widget_show (genprefs[type].cmd_entry);
|
||||
|
||||
label = gtk_label_new ("Working Directory");
|
||||
label = gtk_label_new (_("Working Directory"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
||||
GTK_FILL, GTK_FILL, 0, 0);
|
||||
@ -1326,7 +1334,7 @@ static GtkWidget *generic_game_frame (enum server_type type) {
|
||||
gtk_widget_show (genprefs[type].dir_entry);
|
||||
|
||||
if (games[type].custom_cfgs) {
|
||||
label = gtk_label_new ("Custom CFG");
|
||||
label = gtk_label_new (_("Custom CFG"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
|
||||
GTK_FILL, GTK_FILL, 0, 0);
|
||||
@ -1432,7 +1440,7 @@ static GtkWidget *games_config_page (int defgame) {
|
||||
|
||||
/* Common Options */
|
||||
|
||||
frame = gtk_frame_new ("Common Options");
|
||||
frame = gtk_frame_new (_("Common Options"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 20);
|
||||
|
||||
@ -1443,7 +1451,7 @@ static GtkWidget *games_config_page (int defgame) {
|
||||
/* Disable CD Audio */
|
||||
|
||||
nocdaudio_check_button =
|
||||
gtk_check_button_new_with_label ("Disable CD Audio");
|
||||
gtk_check_button_new_with_label (_("Disable CD Audio"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nocdaudio_check_button),
|
||||
default_nocdaudio);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), nocdaudio_check_button, TRUE, FALSE, 0);
|
||||
@ -1451,7 +1459,7 @@ static GtkWidget *games_config_page (int defgame) {
|
||||
|
||||
/* Disable Sound */
|
||||
|
||||
nosound_check_button = gtk_check_button_new_with_label ("Disable Sound");
|
||||
nosound_check_button = gtk_check_button_new_with_label (_("Disable Sound"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nosound_check_button),
|
||||
default_nosound);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), nosound_check_button, TRUE, FALSE, 0);
|
||||
@ -1473,9 +1481,9 @@ static void add_pushlatency_options (GtkWidget *vbox) {
|
||||
int i;
|
||||
|
||||
static const char *pushlatency_modes[] = {
|
||||
"Do not set (use game default)",
|
||||
"Automatically calculate from server ping time",
|
||||
"Fixed value"
|
||||
N_("Do not set (use game default)"),
|
||||
N_("Automatically calculate from server ping time"),
|
||||
N_("Fixed value")
|
||||
};
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
@ -1483,7 +1491,7 @@ static void add_pushlatency_options (GtkWidget *vbox) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
pushlatency_mode_radio_buttons[i] =
|
||||
gtk_radio_button_new_with_label (group, pushlatency_modes[i]);
|
||||
gtk_radio_button_new_with_label (group, _(pushlatency_modes[i]));
|
||||
group = gtk_radio_button_group (
|
||||
GTK_RADIO_BUTTON (pushlatency_mode_radio_buttons[i]));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), pushlatency_mode_radio_buttons[i],
|
||||
@ -1537,7 +1545,8 @@ static GtkWidget *qw_q2_options_page (void) {
|
||||
|
||||
/* 'w_switch' & 'b_switch' control */
|
||||
|
||||
frame2 = gtk_frame_new ("The highest weapon that Quake should switch to...");
|
||||
frame2 = gtk_frame_new (_("The highest weapon that Quake should "
|
||||
"switch to..."));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame2, FALSE, FALSE, 0);
|
||||
|
||||
vbox2 = gtk_vbox_new (FALSE, 0);
|
||||
@ -1549,7 +1558,7 @@ static GtkWidget *qw_q2_options_page (void) {
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("upon a weapon pickup");
|
||||
label = gtk_label_new (_("upon a weapon pickup"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
@ -1567,7 +1576,7 @@ static GtkWidget *qw_q2_options_page (void) {
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("upon a backpack pickup");
|
||||
label = gtk_label_new (_("upon a backpack pickup"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
@ -1584,7 +1593,7 @@ static GtkWidget *qw_q2_options_page (void) {
|
||||
|
||||
/* 'pushlatency' */
|
||||
|
||||
frame2 = gtk_frame_new ("pushlatency");
|
||||
frame2 = gtk_frame_new (_("pushlatency"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame2, FALSE, FALSE, 0);
|
||||
|
||||
vbox2 = gtk_vbox_new (FALSE, 2);
|
||||
@ -1601,7 +1610,8 @@ static GtkWidget *qw_q2_options_page (void) {
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
noaim_check_button = gtk_check_button_new_with_label ("Disable auto-aiming");
|
||||
noaim_check_button =
|
||||
gtk_check_button_new_with_label (_("Disable auto-aiming"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (noaim_check_button),
|
||||
default_noaim);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), noaim_check_button, FALSE, FALSE, 0);
|
||||
@ -1632,7 +1642,7 @@ static GtkWidget *qw_q2_options_page (void) {
|
||||
hbox2 = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("Skins");
|
||||
label = gtk_label_new (_("Skins"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
@ -1651,7 +1661,7 @@ static GtkWidget *qw_q2_options_page (void) {
|
||||
hbox2 = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("Rate");
|
||||
label = gtk_label_new (_("Rate"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
@ -1671,7 +1681,7 @@ static GtkWidget *qw_q2_options_page (void) {
|
||||
|
||||
/* Troubleshooting */
|
||||
|
||||
frame2 = gtk_frame_new ("Troubleshooting");
|
||||
frame2 = gtk_frame_new (_("Troubleshooting"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame2, FALSE, FALSE, 0);
|
||||
|
||||
vbox2 = gtk_vbox_new (FALSE, 0);
|
||||
@ -1684,7 +1694,7 @@ static GtkWidget *qw_q2_options_page (void) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
||||
|
||||
cl_nodelta_check_button = gtk_check_button_new_with_label (
|
||||
"Disable delta-compression (cl_nodelta)");
|
||||
_("Disable delta-compression (cl_nodelta)"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cl_nodelta_check_button),
|
||||
default_cl_nodelta);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), cl_nodelta_check_button, FALSE, FALSE, 0);
|
||||
@ -1698,7 +1708,7 @@ static GtkWidget *qw_q2_options_page (void) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
||||
|
||||
cl_predict_check_button = gtk_check_button_new_with_label (
|
||||
"Disable player/entity prediction (cl_predict_players)");
|
||||
_("Disable player/entity prediction (cl_predict_players)"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cl_predict_check_button),
|
||||
1 - default_cl_predict);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), cl_predict_check_button, FALSE, FALSE, 0);
|
||||
@ -1752,7 +1762,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GSList *group = NULL;
|
||||
static const char *toolbar_styles[] = { "Icons", "Text", "Both" };
|
||||
static const char *toolbar_styles[] = { N_("Icons"), N_("Text"), N_("Both") };
|
||||
int i;
|
||||
|
||||
page_vbox = gtk_vbox_new (FALSE, 4);
|
||||
@ -1771,7 +1781,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
show_hostnames_check_button =
|
||||
gtk_check_button_new_with_label ("Show host names");
|
||||
gtk_check_button_new_with_label (_("Show host names"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show_hostnames_check_button),
|
||||
show_hostnames);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), show_hostnames_check_button,
|
||||
@ -1786,7 +1796,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
show_defport_check_button =
|
||||
gtk_check_button_new_with_label ("Show default port");
|
||||
gtk_check_button_new_with_label (_("Show default port"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show_defport_check_button),
|
||||
show_default_port);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), show_defport_check_button,
|
||||
@ -1801,7 +1811,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
refresh_sorts_check_button = gtk_check_button_new_with_label (
|
||||
"Sort servers real-time during refresh");
|
||||
_("Sort servers real-time during refresh"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (refresh_sorts_check_button),
|
||||
default_refresh_sorts);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), refresh_sorts_check_button,
|
||||
@ -1816,7 +1826,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
refresh_on_update_check_button =
|
||||
gtk_check_button_new_with_label ("Refresh on update");
|
||||
gtk_check_button_new_with_label (_("Refresh on update"));
|
||||
gtk_toggle_button_set_active (
|
||||
GTK_TOGGLE_BUTTON (refresh_on_update_check_button),
|
||||
default_refresh_on_update);
|
||||
@ -1831,7 +1841,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
|
||||
/* On Startup */
|
||||
|
||||
frame = gtk_frame_new ("On Startup");
|
||||
frame = gtk_frame_new (_("On Startup"));
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
/* Refresh Favorites */
|
||||
@ -1841,7 +1851,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
gtk_container_add (GTK_CONTAINER (frame), hbox);
|
||||
|
||||
auto_favorites_check_button =
|
||||
gtk_check_button_new_with_label ("Refresh Favorites");
|
||||
gtk_check_button_new_with_label (_("Refresh Favorites"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (auto_favorites_check_button),
|
||||
default_auto_favorites);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), auto_favorites_check_button,
|
||||
@ -1854,7 +1864,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
|
||||
/* On Exit */
|
||||
|
||||
frame = gtk_frame_new ("On Exit");
|
||||
frame = gtk_frame_new (_("On Exit"));
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
@ -1867,7 +1877,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
save_lists_check_button =
|
||||
gtk_check_button_new_with_label ("Save server lists");
|
||||
gtk_check_button_new_with_label (_("Save server lists"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (save_lists_check_button),
|
||||
default_save_lists);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), save_lists_check_button,
|
||||
@ -1882,7 +1892,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
save_srvinfo_check_button =
|
||||
gtk_check_button_new_with_label ("Save server information");
|
||||
gtk_check_button_new_with_label (_("Save server information"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), save_srvinfo_check_button,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (save_srvinfo_check_button),
|
||||
@ -1899,7 +1909,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
save_plrinfo_check_button =
|
||||
gtk_check_button_new_with_label ("Save player information");
|
||||
gtk_check_button_new_with_label (_("Save player information"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), save_plrinfo_check_button,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (save_plrinfo_check_button),
|
||||
@ -1915,7 +1925,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
|
||||
/* On Quake Launch */
|
||||
|
||||
frame = gtk_frame_new ("When launching a game...");
|
||||
frame = gtk_frame_new (_("When launching a game..."));
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
@ -1927,7 +1937,8 @@ static GtkWidget *appearance_options_page (void) {
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
terminate_check_button = gtk_check_button_new_with_label ("Terminate XQF");
|
||||
terminate_check_button = gtk_check_button_new_with_label (
|
||||
_("Terminate XQF"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (terminate_check_button),
|
||||
default_terminate);
|
||||
gtk_signal_connect (GTK_OBJECT (terminate_check_button), "toggled",
|
||||
@ -1940,7 +1951,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
/* Iconify */
|
||||
|
||||
iconify_check_button =
|
||||
gtk_check_button_new_with_label ("Iconify XQF window");
|
||||
gtk_check_button_new_with_label (_("Iconify XQF window"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (iconify_check_button),
|
||||
default_iconify);
|
||||
if (default_terminate)
|
||||
@ -1955,7 +1966,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
launchinfo_check_button = gtk_check_button_new_with_label
|
||||
("Create LaunchInfo.txt");
|
||||
(_("Create LaunchInfo.txt"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (launchinfo_check_button),
|
||||
default_launchinfo);
|
||||
gtk_signal_connect (GTK_OBJECT (launchinfo_check_button), "toggled",
|
||||
@ -1969,7 +1980,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
/* Prelaunchinfo */
|
||||
|
||||
prelaunchexec_check_button = gtk_check_button_new_with_label
|
||||
("Execute prelaunch");
|
||||
(_("Execute prelaunch"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prelaunchexec_check_button),
|
||||
default_prelaunchexec);
|
||||
gtk_signal_connect (GTK_OBJECT (prelaunchexec_check_button), "toggled",
|
||||
@ -1984,7 +1995,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
|
||||
/* Toolbar */
|
||||
|
||||
frame = gtk_frame_new ("Toolbar");
|
||||
frame = gtk_frame_new (_("Toolbar"));
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
@ -1995,7 +2006,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
toolbar_style_radio_buttons[i] =
|
||||
gtk_radio_button_new_with_label (group, toolbar_styles[i]);
|
||||
gtk_radio_button_new_with_label (group, _(toolbar_styles[i]));
|
||||
group = gtk_radio_button_group (
|
||||
GTK_RADIO_BUTTON (toolbar_style_radio_buttons[i]));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), toolbar_style_radio_buttons[i],
|
||||
@ -2009,7 +2020,7 @@ static GtkWidget *appearance_options_page (void) {
|
||||
|
||||
/* Toolbar Tips */
|
||||
|
||||
toolbar_tips_check_button = gtk_check_button_new_with_label ("Tooltips");
|
||||
toolbar_tips_check_button = gtk_check_button_new_with_label (_("Tooltips"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toolbar_tips_check_button),
|
||||
default_toolbar_tips);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), toolbar_tips_check_button,
|
||||
@ -2037,7 +2048,7 @@ static GtkWidget *qstat_options_page (void) {
|
||||
|
||||
/* QStat preferences -- maxsimultaneous & maxretries */
|
||||
|
||||
frame = gtk_frame_new ("QStat Options");
|
||||
frame = gtk_frame_new (_("QStat Options"));
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
@ -2048,7 +2059,7 @@ static GtkWidget *qstat_options_page (void) {
|
||||
|
||||
/* maxsimultaneous */
|
||||
|
||||
label = gtk_label_new ("Number of simultaneous servers to query");
|
||||
label = gtk_label_new (_("Number of simultaneous servers to query"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1);
|
||||
gtk_widget_show (label);
|
||||
@ -2065,7 +2076,7 @@ static GtkWidget *qstat_options_page (void) {
|
||||
|
||||
/* maxretries */
|
||||
|
||||
label = gtk_label_new ("Number of retries");
|
||||
label = gtk_label_new (_("Number of retries"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2);
|
||||
gtk_widget_show (label);
|
||||
@ -2106,7 +2117,7 @@ void preferences_dialog (int page_num) {
|
||||
set_pref_defaults ();
|
||||
|
||||
window = dialog_create_modal_transient_window (
|
||||
"XQF: Preferences", TRUE, FALSE, NULL);
|
||||
_("XQF: Preferences"), TRUE, FALSE, NULL);
|
||||
if (!GTK_WIDGET_REALIZED (window))
|
||||
gtk_widget_realize (window);
|
||||
|
||||
@ -2126,27 +2137,27 @@ void preferences_dialog (int page_num) {
|
||||
gtk_box_pack_start (GTK_BOX (vbox), notebook, FALSE, FALSE, 0);
|
||||
|
||||
page = player_profile_page ();
|
||||
label = gtk_label_new ("Player Profile");
|
||||
label = gtk_label_new (_("Player Profile"));
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
|
||||
|
||||
page = games_config_page (game_num);
|
||||
label = gtk_label_new ("Games");
|
||||
label = gtk_label_new (_("Games"));
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
|
||||
|
||||
page = appearance_options_page ();
|
||||
label = gtk_label_new ("Appearance");
|
||||
label = gtk_label_new (_("Appearance"));
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
|
||||
|
||||
page = qstat_options_page ();
|
||||
label = gtk_label_new ("QStat");
|
||||
label = gtk_label_new (_("QStat"));
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
|
||||
|
||||
page = qw_q2_options_page ();
|
||||
label = gtk_label_new ("QW/Q2");
|
||||
label = gtk_label_new (_("QW/Q2"));
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
|
||||
|
||||
@ -2175,7 +2186,7 @@ void preferences_dialog (int page_num) {
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Cancel");
|
||||
button = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_widget_set_usize (button, 80, -1);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window));
|
||||
@ -2183,7 +2194,7 @@ void preferences_dialog (int page_num) {
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label ("OK");
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
gtk_widget_set_usize (button, 80, -1);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (get_new_defaults), NULL);
|
||||
@ -2248,7 +2259,7 @@ int fix_qw_player_color (int color) {
|
||||
|
||||
int init_user_info (void) {
|
||||
if (!g_get_user_name () || !g_get_home_dir () || !g_get_tmp_dir ()) {
|
||||
fprintf (stderr, "Unable to get user name/home/tmpdir\n");
|
||||
fprintf (stderr, _("Unable to get user name/home/tmpdir\n"));
|
||||
return FALSE;
|
||||
}
|
||||
user_rcdir = file_in_dir (g_get_home_dir (), RC_DIR);
|
||||
@ -2360,7 +2371,7 @@ int prefs_load (void) {
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "prefs_load(): program version %s\n",
|
||||
(newversion)? "changed" : "not changed" );
|
||||
(newversion)? "changed" : "not changed");
|
||||
#endif
|
||||
|
||||
/* Convert "dir" -> "real_dir" for all game types */
|
||||
|
@ -31,6 +31,13 @@
|
||||
#include "config.h"
|
||||
#include "psearch.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#define N_(string) (string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
#define REGCOMP_FLAGS (REG_EXTENDED | REG_NOSUB | REG_ICASE)
|
||||
|
||||
@ -45,9 +52,9 @@ static GtkWidget *mode_buttons[3];
|
||||
static int psearch_new_pattern;
|
||||
|
||||
static const char *mode_names[3] = {
|
||||
"Exact Match",
|
||||
"Substring",
|
||||
"Regular Expression"
|
||||
N_("Exact Match"),
|
||||
N_("Substring"),
|
||||
N_("Regular Expression")
|
||||
};
|
||||
|
||||
|
||||
@ -110,8 +117,9 @@ static int psearch_compile_pattern (void) {
|
||||
error = get_regerror (res, (regex_t *) psearch.data);
|
||||
psearch_free_pattern ();
|
||||
|
||||
dialog_ok ("XQF: Error", "Regular Expression Error!\n\n%s\n\n%s.",
|
||||
psearch.pattern, error);
|
||||
dialog_ok (_("XQF: Error"),
|
||||
_("Regular Expression Error!\n\n%s\n\n%s."),
|
||||
psearch.pattern, error);
|
||||
g_free (error);
|
||||
return FALSE;
|
||||
}
|
||||
@ -167,7 +175,7 @@ int find_player_dialog (void) {
|
||||
|
||||
psearch_new_pattern = FALSE;
|
||||
|
||||
window = dialog_create_modal_transient_window ("Find Player",
|
||||
window = dialog_create_modal_transient_window (_("Find Player"),
|
||||
TRUE, FALSE, NULL);
|
||||
main_vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 16);
|
||||
@ -178,7 +186,7 @@ int find_player_dialog (void) {
|
||||
|
||||
/* Pattern Entry */
|
||||
|
||||
label = gtk_label_new ("Find Player:");
|
||||
label = gtk_label_new (_("Find Player:"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
@ -206,7 +214,7 @@ int find_player_dialog (void) {
|
||||
|
||||
/* OK Button */
|
||||
|
||||
button = gtk_button_new_with_label (" OK ");
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (psearch_combo_activate_callback),
|
||||
GTK_OBJECT (psearch_combo));
|
||||
@ -217,7 +225,7 @@ int find_player_dialog (void) {
|
||||
|
||||
/* Cancel Button */
|
||||
|
||||
button = gtk_button_new_with_label (" Cancel ");
|
||||
button = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
@ -233,7 +241,8 @@ int find_player_dialog (void) {
|
||||
group = NULL;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
mode_buttons[i] = gtk_radio_button_new_with_label (group, mode_names[i]);
|
||||
mode_buttons[i] = gtk_radio_button_new_with_label (group,
|
||||
_(mode_names[i]));
|
||||
group = gtk_radio_button_group (GTK_RADIO_BUTTON (mode_buttons[i]));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), mode_buttons[i], FALSE, FALSE, 0);
|
||||
gtk_widget_show (mode_buttons[i]);
|
||||
@ -386,11 +395,11 @@ void find_player (int find_next) {
|
||||
}
|
||||
|
||||
if (!find_next || server_clist->selection == NULL) {
|
||||
dialog_ok (NULL, "Player not found.");
|
||||
dialog_ok (NULL, _("Player not found."));
|
||||
}
|
||||
else {
|
||||
if (dialog_yesno (NULL, 0, "OK", "Cancel",
|
||||
"End of server list reached. Continue from beginning?")) {
|
||||
if (dialog_yesno (NULL, 0, _("OK"), _("Cancel"),
|
||||
_("End of server list reached. Continue from beginning?"))) {
|
||||
find_player (FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ static struct keyword keywords[] = {
|
||||
static void unexpected_char_error (char c) {
|
||||
fprintf (stderr, "Unexpected character: ");
|
||||
fprintf (stderr, (isprint (c))? "\'%c\'" : "\\%03o", c);
|
||||
fprintf (stderr, " in file %s[line:%d,pos:%d]\n", rcfilename, line, pos);
|
||||
fprintf (stderr, " in file %s[line:%d,pos:%d]\n"), rcfilename, line, pos;
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,6 +38,12 @@
|
||||
#include "config.h"
|
||||
#include "rcon.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
#define PACKET_MAXSIZE (64 * 1024)
|
||||
|
||||
@ -342,7 +348,7 @@ void rcon_dialog (struct server *s, char *passwd) {
|
||||
|
||||
/* Message */
|
||||
|
||||
label = gtk_label_new ("Cmd:");
|
||||
label = gtk_label_new (_("Cmd:"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
@ -369,7 +375,7 @@ void rcon_dialog (struct server *s, char *passwd) {
|
||||
|
||||
/* Send Button */
|
||||
|
||||
button = gtk_button_new_with_label (" Send ");
|
||||
button = gtk_button_new_with_label (_("Send"));
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (rcon_combo_activate_callback), passwd);
|
||||
GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
|
||||
@ -378,7 +384,7 @@ void rcon_dialog (struct server *s, char *passwd) {
|
||||
|
||||
/* Status Button */
|
||||
|
||||
button = gtk_button_new_with_label (" Status ");
|
||||
button = gtk_button_new_with_label (_("Status"));
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (rcon_status_button_clicked_callback), passwd);
|
||||
GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
|
||||
@ -387,7 +393,7 @@ void rcon_dialog (struct server *s, char *passwd) {
|
||||
|
||||
/* Clear Button */
|
||||
|
||||
button = gtk_button_new_with_label (" Clear ");
|
||||
button = gtk_button_new_with_label (_("Clear"));
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (rcon_clear_button_clicked_callback), NULL);
|
||||
GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
|
||||
@ -409,7 +415,7 @@ void rcon_dialog (struct server *s, char *passwd) {
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Close");
|
||||
button = gtk_button_new_with_label (_("Close"));
|
||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_set_usize (button, 80, -1);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include "skin.h"
|
||||
#include "skin_pcx.h"
|
||||
|
||||
|
||||
#define NOSKIN_BCOLOR 0x80
|
||||
#define NOSKIN_WCOLOR 0xC0
|
||||
|
||||
|
@ -45,6 +45,13 @@ extern int errno;
|
||||
#include "zipped.h"
|
||||
#include "stat.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
|
||||
struct master *favorites = NULL;
|
||||
GSList *master_groups = NULL;
|
||||
@ -105,8 +112,8 @@ void save_favorites (void) {
|
||||
f = fopen (realname, "w");
|
||||
|
||||
if (!f) {
|
||||
if (dialog_yesno (NULL, 0, "Retry", "Skip",
|
||||
"Cannot write to file %s\nSystem Error: %s\n",
|
||||
if (dialog_yesno (NULL, 0, _("Retry"), _("Skip"),
|
||||
_("Cannot write to file %s\nSystem Error: %s\n"),
|
||||
realname, g_strerror (errno))) {
|
||||
continue;
|
||||
}
|
||||
|
@ -40,6 +40,13 @@
|
||||
#include "dialogs.h"
|
||||
#include "srv-prop.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
|
||||
static GtkWidget *password_entry;
|
||||
static GtkWidget *spectator_entry;
|
||||
@ -322,7 +329,7 @@ static GtkWidget *server_info_page (struct server *s) {
|
||||
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 1, 16);
|
||||
|
||||
label = gtk_label_new ("IP Address:");
|
||||
label = gtk_label_new (_("IP Address:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1);
|
||||
gtk_widget_show (label);
|
||||
@ -332,7 +339,7 @@ static GtkWidget *server_info_page (struct server *s) {
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 0, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new ("Port:");
|
||||
label = gtk_label_new (_("Port:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, 0, 1);
|
||||
gtk_widget_show (label);
|
||||
@ -344,7 +351,7 @@ static GtkWidget *server_info_page (struct server *s) {
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 3, 4, 0, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new ("Host Name:");
|
||||
label = gtk_label_new (_("Host Name:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2);
|
||||
gtk_widget_show (label);
|
||||
@ -356,7 +363,7 @@ static GtkWidget *server_info_page (struct server *s) {
|
||||
gtk_widget_show (label);
|
||||
}
|
||||
|
||||
label = gtk_label_new ("Refreshed:");
|
||||
label = gtk_label_new (_("Refreshed:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 2, 3);
|
||||
gtk_widget_show (label);
|
||||
@ -378,7 +385,7 @@ static GtkWidget *server_info_page (struct server *s) {
|
||||
|
||||
/* Sources */
|
||||
|
||||
frame = gtk_frame_new ("Sources");
|
||||
frame = gtk_frame_new (_("Sources"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
@ -430,7 +437,7 @@ static GtkWidget *server_info_page (struct server *s) {
|
||||
gtk_box_pack_end (GTK_BOX (hbox), customcfg_combo, FALSE, FALSE, 0);
|
||||
gtk_widget_show (customcfg_combo);
|
||||
|
||||
label = gtk_label_new ("Custom CFG:");
|
||||
label = gtk_label_new (_("Custom CFG:"));
|
||||
gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
@ -479,21 +486,21 @@ static GtkWidget *server_passwords_page (struct server *s) {
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 8);
|
||||
gtk_box_pack_start (GTK_BOX (page_vbox), table, FALSE, FALSE, 0);
|
||||
|
||||
password_entry = passwd_entry ("Server Password",
|
||||
password_entry = passwd_entry (_("Server Password"),
|
||||
(props)? props->server_password : NULL,
|
||||
table, 0);
|
||||
|
||||
if ((games[s->type].flags & GAME_PASSWORD) == 0)
|
||||
gtk_widget_set_sensitive (password_entry, FALSE);
|
||||
|
||||
spectator_entry = passwd_entry ("Spectator Password",
|
||||
spectator_entry = passwd_entry (_("Spectator Password"),
|
||||
(props)? props->spectator_password : NULL,
|
||||
table, 1);
|
||||
|
||||
if ((games[s->type].flags & GAME_SPECTATE) == 0)
|
||||
gtk_widget_set_sensitive (spectator_entry, FALSE);
|
||||
|
||||
rcon_entry = passwd_entry ("RCon Password",
|
||||
rcon_entry = passwd_entry (_("RCon Password"),
|
||||
(props)? props->rcon_password : NULL,
|
||||
table, 2);
|
||||
|
||||
@ -520,7 +527,7 @@ void properties_dialog (struct server *s) {
|
||||
GtkWidget *label;
|
||||
char buf[256];
|
||||
|
||||
window = dialog_create_modal_transient_window ("Properties",
|
||||
window = dialog_create_modal_transient_window (_("Properties"),
|
||||
TRUE, FALSE, NULL);
|
||||
main_vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 8);
|
||||
@ -565,12 +572,12 @@ void properties_dialog (struct server *s) {
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), notebook, FALSE, FALSE, 0);
|
||||
|
||||
page = server_info_page (s);
|
||||
label = gtk_label_new (" Info ");
|
||||
label = gtk_label_new (_("Info"));
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
|
||||
|
||||
page = server_passwords_page (s);
|
||||
label = gtk_label_new (" Passwords ");
|
||||
label = gtk_label_new (_("Passwords"));
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
|
||||
|
||||
@ -585,7 +592,7 @@ void properties_dialog (struct server *s) {
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Cancel");
|
||||
button = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_widget_set_usize (button, 80, -1);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
@ -593,7 +600,7 @@ void properties_dialog (struct server *s) {
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label ("OK");
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
gtk_widget_set_usize (button, 80, -1);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
|
@ -44,6 +44,14 @@
|
||||
#include "dns.h"
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
|
||||
static void stat_next (struct stat_job *job);
|
||||
|
||||
|
||||
@ -851,7 +859,7 @@ static struct stat_conn *stat_open_conn_qstat (struct stat_job *job) {
|
||||
|
||||
f = fopen (fn, "w");
|
||||
if (!f) {
|
||||
dialog_ok (NULL, "Failed to create a temporary file %s", fn);
|
||||
dialog_ok (NULL, _("Failed to create a temporary file %s"), fn);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -37,13 +37,21 @@
|
||||
#include "config.h"
|
||||
#include "statistics.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#define N_(string) (string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
|
||||
#define PERCENTS(A,B) ((B)? (A)/((B)/100.0) : 0)
|
||||
|
||||
|
||||
#define OS_NUM 5
|
||||
#define CPU_NUM 5
|
||||
|
||||
|
||||
enum OS { OS_WINDOWS = 0, OS_LINUX, OS_SOLARIS, OS_MACOS, OS_UNKNOWN };
|
||||
enum CPU { CPU_X86 = 0, CPU_SPARC, CPU_AXP, CPU_PPC, CPU_UNKNOWN };
|
||||
|
||||
@ -64,19 +72,19 @@ struct arch_stats {
|
||||
|
||||
|
||||
static const char *srv_headers[6] = {
|
||||
"Servers", "Up", "T/O", "Down", "Info n/a", "Players"
|
||||
N_("Servers"), N_("Up"), N_("T/O"), N_("Down"), N_("Info n/a"), N_("Players")
|
||||
};
|
||||
|
||||
static const char *os_names[OS_NUM] = {
|
||||
"Windows", "Linux", "Solaris", "MacOS", "unknown"
|
||||
"Windows", "Linux", "Solaris", "MacOS", N_("unknown")
|
||||
};
|
||||
|
||||
static const char *cpu_names[CPU_NUM] = {
|
||||
"Intel x86", "Sparc", "AXP", "PPC", "unknown"
|
||||
"Intel x86", "Sparc", "AXP", "PPC", N_("unknown")
|
||||
};
|
||||
|
||||
const char *srv_label = "Servers";
|
||||
const char *arch_label = "OS/CPU";
|
||||
const char *srv_label = N_("Servers");
|
||||
const char *arch_label = N_("OS/CPU");
|
||||
|
||||
|
||||
static struct server_stats *srv_stats;
|
||||
@ -329,7 +337,7 @@ static GtkWidget *server_stats_page (void) {
|
||||
gtk_table_set_row_spacing (GTK_TABLE (table), GAMES_TOTAL, 12);
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
put_label_to_table (table, srv_headers[i], 1.0, i + 1, 0);
|
||||
put_label_to_table (table, _(srv_headers[i]), 1.0, i + 1, 0);
|
||||
|
||||
for (i = 0; i < GAMES_TOTAL; i++) {
|
||||
game_label = game_pixmap_with_label (i);
|
||||
@ -349,7 +357,7 @@ static GtkWidget *server_stats_page (void) {
|
||||
}
|
||||
}
|
||||
|
||||
put_label_to_table (table, "Total", 0.0, 0, GAMES_TOTAL + 1);
|
||||
put_label_to_table (table, _("Total"), 0.0, 0, GAMES_TOTAL + 1);
|
||||
|
||||
put_server_stats (table, 0, GAMES_TOTAL + 1);
|
||||
|
||||
@ -392,17 +400,17 @@ static void arch_notebook_page (GtkWidget *notebook,
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), OS_NUM, 20);
|
||||
gtk_table_set_row_spacing (GTK_TABLE (table), CPU_NUM, 12);
|
||||
|
||||
put_label_to_table (table, "CPU \\ OS", 0.5, 0, 0);
|
||||
put_label_to_table (table, _("CPU \\ OS"), 0.5, 0, 0);
|
||||
|
||||
for (i = 0; i < OS_NUM; i++) {
|
||||
put_label_to_table (table, os_names[i], 1.0, i + 1, 0);
|
||||
put_label_to_table (table, _(os_names[i]), 1.0, i + 1, 0);
|
||||
}
|
||||
put_label_to_table (table, "Total", 1.0, OS_NUM + 1, 0);
|
||||
put_label_to_table (table, _("Total"), 1.0, OS_NUM + 1, 0);
|
||||
|
||||
for (i = 0; i < CPU_NUM; i++) {
|
||||
put_label_to_table (table, cpu_names[i], 0.0, 0, i + 1);
|
||||
put_label_to_table (table, _(cpu_names[i]), 0.0, 0, i + 1);
|
||||
}
|
||||
put_label_to_table (table, "Total", 0.0, 0, CPU_NUM + 1);
|
||||
put_label_to_table (table, _("Total"), 0.0, 0, CPU_NUM + 1);
|
||||
|
||||
for (j = 0; j < CPU_NUM; j++) {
|
||||
cpu_total = 0;
|
||||
@ -498,13 +506,13 @@ void statistics_dialog (void) {
|
||||
server_stats_create ();
|
||||
collect_statistics ();
|
||||
|
||||
window = dialog_create_modal_transient_window ("Statistics",
|
||||
window = dialog_create_modal_transient_window (_("Statistics"),
|
||||
TRUE, FALSE, NULL);
|
||||
main_vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
|
||||
label = gtk_label_new ("Statistics");
|
||||
label = gtk_label_new (_("Statistics"));
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), label, FALSE, FALSE, 8);
|
||||
gtk_widget_show (label);
|
||||
|
||||
@ -514,12 +522,12 @@ void statistics_dialog (void) {
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), stat_notebook, FALSE, FALSE, 0);
|
||||
|
||||
page = server_stats_page ();
|
||||
label = gtk_label_new (srv_label);
|
||||
label = gtk_label_new (_(srv_label));
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (stat_notebook), page, label);
|
||||
|
||||
page = archs_stats_page ();
|
||||
label = gtk_label_new (arch_label);
|
||||
label = gtk_label_new (_(arch_label));
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (stat_notebook), page, label);
|
||||
|
||||
@ -538,7 +546,7 @@ void statistics_dialog (void) {
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Close");
|
||||
button = gtk_button_new_with_label (_("Close"));
|
||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_set_usize (button, 80, -1);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
|
202
xqf/src/xqf.c
202
xqf/src/xqf.c
@ -56,6 +56,15 @@
|
||||
#include "menus.h"
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
#define _(string) gettext(string)
|
||||
#define N_(string) (string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
time_t xqf_start_time;
|
||||
@ -476,19 +485,19 @@ static void stat_lists_state_handler (struct stat_job *job,
|
||||
switch (state) {
|
||||
|
||||
case STAT_UPDATE_SOURCE:
|
||||
progress_bar_str = "Updating lists...";
|
||||
progress_bar_str = _("Updating lists...");
|
||||
break;
|
||||
|
||||
case STAT_RESOLVE_NAMES:
|
||||
progress_bar_str = "Resolving host names: %d/%d";
|
||||
progress_bar_str = _("Resolving host names: %d/%d");
|
||||
break;
|
||||
|
||||
case STAT_REFRESH_SERVERS:
|
||||
progress_bar_str = "Refreshing: %d/%d";
|
||||
progress_bar_str = _("Refreshing: %d/%d");
|
||||
break;
|
||||
|
||||
case STAT_RESOLVE_HOSTS:
|
||||
progress_bar_str = "Resolving host addresses: %d/%d";
|
||||
progress_bar_str = _("Resolving host addresses: %d/%d");
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -513,7 +522,7 @@ static void stat_lists_close_handler (struct stat_job *job, int killed) {
|
||||
server_clist_build_filtered (cur_server_list, TRUE);
|
||||
}
|
||||
|
||||
print_status (main_status_bar, "Done.");
|
||||
print_status (main_status_bar, _("Done."));
|
||||
|
||||
progress_bar_reset (main_progress_bar);
|
||||
|
||||
@ -606,8 +615,8 @@ static void launch_close_handler (struct stat_job *job, int killed) {
|
||||
props = properties (s);
|
||||
|
||||
if (s->ping >= MAX_PING) {
|
||||
launch = dialog_yesno (NULL, 1, "Launch", "Cancel",
|
||||
"Server %s:%d is %s.\n\nLaunch client anyway?",
|
||||
launch = dialog_yesno (NULL, 1, _("Launch"), _("Cancel"),
|
||||
_("Server %s:%d is %s.\n\nLaunch client anyway?"),
|
||||
(s->host->name)? s->host->name : inet_ntoa (s->host->ip),
|
||||
s->port,
|
||||
(s->ping == MAX_PING)? "unreachable" : "down");
|
||||
@ -618,8 +627,8 @@ static void launch_close_handler (struct stat_job *job, int killed) {
|
||||
}
|
||||
|
||||
if (!launch && s->curplayers >= s->maxplayers && !con->spectate) {
|
||||
launch = dialog_yesno (NULL, 1, "Launch", "Cancel",
|
||||
"Server %s:%d is full.\n\nLaunch client anyway?",
|
||||
launch = dialog_yesno (NULL, 1, _("Launch"), _("Cancel"),
|
||||
_("Server %s:%d is full.\n\nLaunch client anyway?"),
|
||||
(s->host->name)? s->host->name : inet_ntoa (s->host->ip),
|
||||
s->port);
|
||||
if (!launch) {
|
||||
@ -638,7 +647,7 @@ static void launch_close_handler (struct stat_job *job, int killed) {
|
||||
}
|
||||
else {
|
||||
con->spectator_password = enter_string_with_option_dialog (FALSE,
|
||||
"Save Password", &save, "Spectator Password:");
|
||||
_("Save Password"), &save, _("Spectator Password:"));
|
||||
if (!con->spectator_password) {
|
||||
condef_free (con);
|
||||
return;
|
||||
@ -658,7 +667,7 @@ static void launch_close_handler (struct stat_job *job, int killed) {
|
||||
}
|
||||
else if ((s->flags & SERVER_PASSWORD) != 0) {
|
||||
con->password = enter_string_with_option_dialog (FALSE,
|
||||
"Save Password", &save, "Server Password:");
|
||||
_("Save Password"), &save, _("Server Password:"));
|
||||
if (!con->password) {
|
||||
condef_free (con);
|
||||
return;
|
||||
@ -791,11 +800,11 @@ static void launch_callback (GtkWidget *widget, enum launch_mode mode) {
|
||||
return;
|
||||
|
||||
if ((games[cur_server->type].flags & GAME_SPECTATE) != 0) {
|
||||
demo = enter_string_with_option_dialog (TRUE, "Spectator", &spectate,
|
||||
"Demo name:");
|
||||
demo = enter_string_with_option_dialog (TRUE, _("Spectator"), &spectate,
|
||||
_("Demo name:"));
|
||||
}
|
||||
else {
|
||||
demo = enter_string_dialog (TRUE, "Demo name:");
|
||||
demo = enter_string_dialog (TRUE, _("Demo name:"));
|
||||
}
|
||||
|
||||
if (!demo)
|
||||
@ -995,7 +1004,7 @@ static void add_server_name_handler (struct stat_job *job, struct userver *us,
|
||||
}
|
||||
else {
|
||||
progress_bar_reset (main_progress_bar);
|
||||
dialog_ok (NULL, "Host %s not found", us->hostname);
|
||||
dialog_ok (NULL, _("Host %s not found"), us->hostname);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1019,7 +1028,7 @@ static void add_server_callback (GtkWidget *widget, gpointer data) {
|
||||
return;
|
||||
|
||||
if (!parse_address (str, &addr, &port)) {
|
||||
dialog_ok (NULL, "\"%s\" is not valid host[:port] combination.", str);
|
||||
dialog_ok (NULL, _("\"%s\" is not valid host[:port] combination."), str);
|
||||
g_free (str);
|
||||
return;
|
||||
}
|
||||
@ -1180,7 +1189,7 @@ static void add_master_callback (GtkWidget *widget, gpointer data) {
|
||||
source_ctree_select_source (m);
|
||||
}
|
||||
else {
|
||||
dialog_ok (NULL, "Master address \"%s\" is not valid.", str);
|
||||
dialog_ok (NULL, _("Master address \"%s\" is not valid."), str);
|
||||
}
|
||||
|
||||
g_free (str);
|
||||
@ -1223,8 +1232,9 @@ static void del_master_callback (GtkWidget *widget, gpointer data) {
|
||||
if (!masters)
|
||||
return;
|
||||
|
||||
delete = dialog_yesno (NULL, 1, "Delete", "Cancel",
|
||||
"Master%s to delete:\n\n%s", (g_slist_length (masters) > 1)? "s" : "",
|
||||
delete = dialog_yesno (NULL, 1, _("Delete"), _("Cancel"),
|
||||
_("Master%s to delete:\n\n%s"),
|
||||
(g_slist_length (masters) > 1)? "s" : "",
|
||||
master_names);
|
||||
|
||||
if (delete) {
|
||||
@ -1246,7 +1256,7 @@ static void find_player_callback (GtkWidget *widget, int find_next) {
|
||||
if (find_next || find_player_dialog ()) {
|
||||
if (!psearch_data_is_empty ()) {
|
||||
pattern = psearch_lookup_pattern ();
|
||||
print_status (main_status_bar, "Find Player: %s", pattern);
|
||||
print_status (main_status_bar, _("Find Player: %s"), pattern);
|
||||
g_free (pattern);
|
||||
|
||||
find_player (find_next);
|
||||
@ -1346,7 +1356,7 @@ static void rcon_callback (GtkWidget *widget, gpointer data) {
|
||||
|
||||
if (!sp || !sp->rcon_password) {
|
||||
passwd = enter_string_with_option_dialog (FALSE,
|
||||
"Save Password", &save, "Server Password:");
|
||||
_("Save Password"), &save, _("Server Password:"));
|
||||
|
||||
if (!passwd) /* canceled */
|
||||
return;
|
||||
@ -1469,7 +1479,7 @@ static void source_selection_changed (void) {
|
||||
server_clist_set_list (cur_server_list);
|
||||
|
||||
print_status (main_status_bar, (server_clist->rows == 1) ?
|
||||
"%d server" : "%d servers", server_clist->rows);
|
||||
_("%d server") : _("%d servers"), server_clist->rows);
|
||||
}
|
||||
|
||||
|
||||
@ -1612,14 +1622,14 @@ static void statistics_callback (GtkWidget *widget, gpointer data) {
|
||||
|
||||
|
||||
static void about_dialog (GtkWidget *widget, gpointer data) {
|
||||
dialog_ok ("About XQF",
|
||||
"X11 Quake/QuakeWorld/Quake2/Quake3 Front-End\n"
|
||||
"Version " XQF_VERSION "\n\n"
|
||||
"Copyright (C) 1998-2000 Roman Pozlevich <roma@botik.ru>\n\n"
|
||||
dialog_ok (_("About XQF"),
|
||||
_("X11 Quake/QuakeWorld/Quake2/Quake3 Front-End\n"
|
||||
"Version %s\n\n"
|
||||
"Copyright (C) 1998-2001 Roman Pozlevich <roma@botik.ru>\n\n"
|
||||
"Mod & server version filter: Bill Adams <webmaster@evil.inetarena.com>\n"
|
||||
"SoF & GameSpy master support: Alex Burger <alex@fragit.net>\n\n"
|
||||
|
||||
"http://www.linuxgames.com/xqf/");
|
||||
"SoF & GameSpy master support: Alex Burger <alex@fragit.net>\n"
|
||||
"Internationalization (i18n): Jordi Mallach <jordi@sindominio.net>\n\n"
|
||||
"http://www.linuxgames.com/xqf/"), XQF_VERSION);
|
||||
}
|
||||
|
||||
|
||||
@ -1637,17 +1647,17 @@ struct __menuitem {
|
||||
|
||||
static const struct menuitem srvopt_menu_items[] = {
|
||||
{
|
||||
MENU_ITEM, "Connect", 0, 0,
|
||||
MENU_ITEM, N_("Connect"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_NORMAL,
|
||||
&connect_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Observe", 0, 0,
|
||||
MENU_ITEM, N_("Observe"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_SPECTATE,
|
||||
&observe_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Record Demo", 0, 0,
|
||||
MENU_ITEM, N_("Record Demo"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_RECORD,
|
||||
&record_menu_item
|
||||
},
|
||||
@ -1655,27 +1665,27 @@ static const struct menuitem srvopt_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_ITEM, "Add to Favorites", 0, 0,
|
||||
MENU_ITEM, N_("Add to Favorites"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (add_to_favorites_callback), NULL,
|
||||
&favadd_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Add...", 0, 0,
|
||||
MENU_ITEM, N_("Add..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (add_server_callback), NULL,
|
||||
&add_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Delete", 0, 0,
|
||||
MENU_ITEM, N_("Delete"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (del_server_callback), NULL,
|
||||
&delete_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Copy", 0, 0,
|
||||
MENU_ITEM, N_("Copy"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (copy_server_callback), NULL,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Copy+", 0, 0,
|
||||
MENU_ITEM, N_("Copy+"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (copy_server_callback_plus), NULL,
|
||||
NULL
|
||||
},
|
||||
@ -1683,12 +1693,12 @@ static const struct menuitem srvopt_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_ITEM, "Refresh", 0, 0,
|
||||
MENU_ITEM, N_("Refresh"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (refresh_callback), NULL,
|
||||
&refresh_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Refresh Selected", 0, 0,
|
||||
MENU_ITEM, N_("Refresh Selected"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (refresh_selected_callback), NULL,
|
||||
&refrsel_menu_item
|
||||
},
|
||||
@ -1696,7 +1706,7 @@ static const struct menuitem srvopt_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_ITEM, "DNS Lookup", 0, 0,
|
||||
MENU_ITEM, N_("DNS Lookup"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (resolve_callback), NULL,
|
||||
&resolve_menu_item
|
||||
},
|
||||
@ -1704,12 +1714,12 @@ static const struct menuitem srvopt_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_ITEM, "RCon...", 0, 0,
|
||||
MENU_ITEM, N_("RCon..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (rcon_callback), NULL,
|
||||
&rcon_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Properties...", 0, 0,
|
||||
MENU_ITEM, N_("Properties..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (properties_callback), NULL,
|
||||
&properties_menu_item
|
||||
},
|
||||
@ -1719,7 +1729,7 @@ static const struct menuitem srvopt_menu_items[] = {
|
||||
|
||||
static const struct menuitem file_menu_items[] = {
|
||||
{
|
||||
MENU_ITEM, "_Statistics...", 0, 0,
|
||||
MENU_ITEM, N_("_Statistics..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (statistics_callback), NULL,
|
||||
&file_statistics_menu_item
|
||||
},
|
||||
@ -1727,7 +1737,7 @@ static const struct menuitem file_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_ITEM, "_Exit", 'Q', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("_Exit"), 'Q', GDK_CONTROL_MASK,
|
||||
NULL, NULL,
|
||||
&file_quit_menu_item
|
||||
},
|
||||
@ -1737,22 +1747,22 @@ static const struct menuitem file_menu_items[] = {
|
||||
|
||||
static const struct menuitem edit_menu_items[] = {
|
||||
{
|
||||
MENU_ITEM, "_Add Server...", 'N', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("_Add Server..."), 'N', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (add_server_callback), NULL,
|
||||
&edit_add_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_Delete", 'D', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("_Delete"), 'D', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (del_server_callback), NULL,
|
||||
&edit_delete_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_Copy", 'C', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("_Copy"), 'C', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (copy_server_callback), NULL,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_Copy+", 'O', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("_Copy+"), 'O', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (copy_server_callback_plus), NULL,
|
||||
NULL
|
||||
},
|
||||
@ -1760,12 +1770,12 @@ static const struct menuitem edit_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_ITEM, "Add _Master...", 'M', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("Add _Master..."), 'M', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (add_master_callback), NULL,
|
||||
&edit_add_master_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "D_elete Master", 0, 0,
|
||||
MENU_ITEM, N_("D_elete Master"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (del_master_callback), NULL,
|
||||
&edit_delete_master_menu_item
|
||||
},
|
||||
@ -1773,12 +1783,12 @@ static const struct menuitem edit_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_ITEM, "_Find Player...", 'F', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("_Find Player..."), 'F', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (find_player_callback), (gpointer) FALSE,
|
||||
&edit_find_player_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Find A_gain", 'G', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("Find A_gain"), 'G', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (find_player_callback), (gpointer) TRUE,
|
||||
&edit_find_again_menu_item
|
||||
},
|
||||
@ -1788,17 +1798,17 @@ static const struct menuitem edit_menu_items[] = {
|
||||
|
||||
static const struct menuitem view_menu_items[] = {
|
||||
{
|
||||
MENU_ITEM, "_Refresh", 'R', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("_Refresh"), 'R', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (refresh_callback), NULL,
|
||||
&view_refresh_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Refresh _Selected", 'S', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("Refresh _Selected"), 'S', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (refresh_selected_callback), NULL,
|
||||
&view_refrsel_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_Update From Master", 'U', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("_Update From Master"), 'U', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (update_source_callback), NULL,
|
||||
&view_update_menu_item
|
||||
},
|
||||
@ -1806,12 +1816,12 @@ static const struct menuitem view_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_CHECK_ITEM, "Show _Host Names", 'H', GDK_CONTROL_MASK,
|
||||
MENU_CHECK_ITEM, N_("Show _Host Names"), 'H', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (show_hostnames_callback), NULL,
|
||||
&view_hostnames_menu_item
|
||||
},
|
||||
{
|
||||
MENU_CHECK_ITEM, "Show Default _Port", 0, 0,
|
||||
MENU_CHECK_ITEM, N_("Show Default _Port"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (show_default_port_callback), NULL,
|
||||
&view_defport_menu_item
|
||||
},
|
||||
@ -1833,7 +1843,7 @@ struct menuitem *server_filter_menu_items;
|
||||
/* Bad Bill! The const has been removed from the next line. */
|
||||
static struct menuitem server_menu_items[] = {
|
||||
{
|
||||
MENU_BRANCH, "_Server Filters", 0, 0,
|
||||
MENU_BRANCH, N_("_Server Filters"), 0, 0,
|
||||
NULL,
|
||||
NULL, /* <-- This gets set to the addres
|
||||
of server_filter_menu_items after
|
||||
@ -1841,17 +1851,17 @@ static struct menuitem server_menu_items[] = {
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_Connect", 0, 0,
|
||||
MENU_ITEM, N_("_Connect"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_NORMAL,
|
||||
&server_connect_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_Observe", 0, 0,
|
||||
MENU_ITEM, N_("_Observe"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_SPECTATE,
|
||||
&server_observe_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Record _Demo", 0, 0,
|
||||
MENU_ITEM, N_("Record _Demo"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_RECORD,
|
||||
&server_record_menu_item
|
||||
},
|
||||
@ -1859,18 +1869,18 @@ static struct menuitem server_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_ITEM, "Add to _Favorites", 0, 0,
|
||||
MENU_ITEM, N_("Add to _Favorites"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (add_to_favorites_callback), NULL,
|
||||
&server_favadd_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Delete", 0, 0,
|
||||
MENU_ITEM, N_("Delete"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (del_server_callback), NULL,
|
||||
&delete_menu_item
|
||||
},
|
||||
|
||||
{
|
||||
MENU_ITEM, "DNS _Lookup", 'L', GDK_CONTROL_MASK,
|
||||
MENU_ITEM, N_("DNS _Lookup"), 'L', GDK_CONTROL_MASK,
|
||||
GTK_SIGNAL_FUNC (resolve_callback), NULL,
|
||||
&server_resolve_menu_item
|
||||
},
|
||||
@ -1878,12 +1888,12 @@ static struct menuitem server_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_ITEM, "_RCon...", 0, 0,
|
||||
MENU_ITEM, N_("_RCon..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (rcon_callback), NULL,
|
||||
&server_rcon_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_Properties...", 0, 0,
|
||||
MENU_ITEM, N_("_Properties..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (properties_callback), NULL,
|
||||
&server_properties_menu_item
|
||||
},
|
||||
@ -1893,31 +1903,31 @@ static struct menuitem server_menu_items[] = {
|
||||
|
||||
static const struct menuitem preferences_menu_items[] = {
|
||||
{
|
||||
MENU_ITEM, "_Player Profile...", 0, 0,
|
||||
MENU_ITEM, N_("_Player Profile..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (start_preferences_dialog),
|
||||
(gpointer) (PREF_PAGE_PLAYER + UNKNOWN_SERVER * 256),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_Games...", 0, 0,
|
||||
MENU_ITEM, N_("_Games..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (start_preferences_dialog),
|
||||
(gpointer) (PREF_PAGE_GAMES + UNKNOWN_SERVER * 256),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_Appearance...", 0, 0,
|
||||
MENU_ITEM, N_("_Appearance..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (start_preferences_dialog),
|
||||
(gpointer) (PREF_PAGE_APPEARANCE + UNKNOWN_SERVER * 256),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_QStat Options...", 0, 0,
|
||||
MENU_ITEM, N_("_QStat Options..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (start_preferences_dialog),
|
||||
(gpointer) (PREF_PAGE_QSTAT + UNKNOWN_SERVER * 256),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "_QW/Q2 Options...", 0, 0,
|
||||
MENU_ITEM, N_("_QW/Q2 Options..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (start_preferences_dialog),
|
||||
(gpointer) (PREF_PAGE_QWQ2 + UNKNOWN_SERVER * 256),
|
||||
NULL
|
||||
@ -1926,12 +1936,12 @@ static const struct menuitem preferences_menu_items[] = {
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
{
|
||||
MENU_ITEM, "_Server Filter...", 0, 0,
|
||||
MENU_ITEM, N_("_Server Filter..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (start_filters_cfg_dialog), (gpointer) FILTER_SERVER,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_ITEM, "Player _Filter...", 0, 0,
|
||||
MENU_ITEM, N_("Player _Filter..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (start_filters_cfg_dialog), (gpointer) FILTER_PLAYER,
|
||||
NULL
|
||||
},
|
||||
@ -1941,7 +1951,7 @@ static const struct menuitem preferences_menu_items[] = {
|
||||
|
||||
static const struct menuitem help_menu_items[] = {
|
||||
{
|
||||
MENU_ITEM, "_About...", 0, 0,
|
||||
MENU_ITEM, N_("_About..."), 0, 0,
|
||||
GTK_SIGNAL_FUNC (about_dialog), NULL,
|
||||
NULL
|
||||
},
|
||||
@ -1952,32 +1962,32 @@ static const struct menuitem help_menu_items[] = {
|
||||
|
||||
static const struct menuitem menubar_menu_items[] = {
|
||||
{
|
||||
MENU_BRANCH, "_File", 0, 0,
|
||||
MENU_BRANCH, N_("_File"), 0, 0,
|
||||
NULL, &file_menu_items,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_BRANCH, "_Edit", 0, 0,
|
||||
MENU_BRANCH, N_("_Edit"), 0, 0,
|
||||
NULL, &edit_menu_items,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_BRANCH, "_View", 0, 0,
|
||||
MENU_BRANCH, N_("_View"), 0, 0,
|
||||
NULL, &view_menu_items,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_BRANCH, "_Server", 0, 0,
|
||||
MENU_BRANCH, N_("_Server"), 0, 0,
|
||||
NULL, &server_menu_items,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_BRANCH, "_Preferences", 0, 0,
|
||||
MENU_BRANCH, N_("_Preferences"), 0, 0,
|
||||
NULL, &preferences_menu_items,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
MENU_LAST_BRANCH, "_Help", 0, 0,
|
||||
MENU_LAST_BRANCH, N_("_Help"), 0, 0,
|
||||
NULL, &help_menu_items,
|
||||
NULL
|
||||
},
|
||||
@ -2020,28 +2030,28 @@ static GtkWidget *create_player_menu (GtkAccelGroup *accel_group) {
|
||||
|
||||
marker_menu = gtk_menu_new ();
|
||||
|
||||
menu_item = create_player_menu_item ("Mark as Red", 0);
|
||||
menu_item = create_player_menu_item (_("Mark as Red"), 0);
|
||||
gtk_menu_append (GTK_MENU (marker_menu), menu_item);
|
||||
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
|
||||
GTK_SIGNAL_FUNC (add_to_player_filter_callback),
|
||||
(gpointer) PLAYER_GROUP_RED);
|
||||
gtk_widget_show (menu_item);
|
||||
|
||||
menu_item = create_player_menu_item ("Mark as Green", 1);
|
||||
menu_item = create_player_menu_item (_("Mark as Green"), 1);
|
||||
gtk_menu_append (GTK_MENU (marker_menu), menu_item);
|
||||
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
|
||||
GTK_SIGNAL_FUNC (add_to_player_filter_callback),
|
||||
(gpointer) PLAYER_GROUP_GREEN);
|
||||
gtk_widget_show (menu_item);
|
||||
|
||||
menu_item = create_player_menu_item ("Mark as Blue", 2);
|
||||
menu_item = create_player_menu_item (_("Mark as Blue"), 2);
|
||||
gtk_menu_append (GTK_MENU (marker_menu), menu_item);
|
||||
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
|
||||
GTK_SIGNAL_FUNC (add_to_player_filter_callback),
|
||||
(gpointer) PLAYER_GROUP_BLUE);
|
||||
gtk_widget_show (menu_item);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label ("Add to Player Filter");
|
||||
menu_item = gtk_menu_item_new_with_label (_("Add to Player Filter"));
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), marker_menu);
|
||||
gtk_menu_append (GTK_MENU (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
@ -2062,7 +2072,7 @@ static void populate_main_toolbar (void) {
|
||||
gtk_widget_show (pixmap);
|
||||
|
||||
update_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar),
|
||||
"Update", "Update from master", NULL,
|
||||
_("Update"), _("Update from master"), NULL,
|
||||
pixmap,
|
||||
GTK_SIGNAL_FUNC (update_source_callback), NULL);
|
||||
|
||||
@ -2070,7 +2080,7 @@ static void populate_main_toolbar (void) {
|
||||
gtk_widget_show (pixmap);
|
||||
|
||||
refresh_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar),
|
||||
"Refresh", "Refresh current list", NULL,
|
||||
_("Refresh"), _("Refresh current list"), NULL,
|
||||
pixmap,
|
||||
GTK_SIGNAL_FUNC (refresh_callback), NULL);
|
||||
|
||||
@ -2078,7 +2088,7 @@ static void populate_main_toolbar (void) {
|
||||
gtk_widget_show (pixmap);
|
||||
|
||||
refrsel_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar),
|
||||
"Ref.Sel.", "Refresh selected servers", NULL,
|
||||
_("Ref.Sel."), _("Refresh selected servers"), NULL,
|
||||
pixmap,
|
||||
GTK_SIGNAL_FUNC (refresh_selected_callback), NULL);
|
||||
|
||||
@ -2086,7 +2096,7 @@ static void populate_main_toolbar (void) {
|
||||
gtk_widget_show (pixmap);
|
||||
|
||||
stop_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar),
|
||||
"Stop", "Stop", NULL,
|
||||
_("Stop"), _("Stop"), NULL,
|
||||
pixmap,
|
||||
GTK_SIGNAL_FUNC (stop_callback), NULL);
|
||||
|
||||
@ -2096,7 +2106,7 @@ static void populate_main_toolbar (void) {
|
||||
gtk_widget_show (pixmap);
|
||||
|
||||
connect_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar),
|
||||
"Connect", "Connect", NULL,
|
||||
_("Connect"), _("Connect"), NULL,
|
||||
pixmap,
|
||||
GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_NORMAL);
|
||||
|
||||
@ -2104,7 +2114,7 @@ static void populate_main_toolbar (void) {
|
||||
gtk_widget_show (pixmap);
|
||||
|
||||
observe_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar),
|
||||
"Observe", "Observe", NULL,
|
||||
_("Observe"), _("Observe"), NULL,
|
||||
pixmap,
|
||||
GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_SPECTATE);
|
||||
|
||||
@ -2112,7 +2122,7 @@ static void populate_main_toolbar (void) {
|
||||
gtk_widget_show (pixmap);
|
||||
|
||||
record_button = gtk_toolbar_append_item (GTK_TOOLBAR (main_toolbar),
|
||||
"Record", "Record Demo", NULL,
|
||||
_("Record"), _("Record Demo"), NULL,
|
||||
pixmap,
|
||||
GTK_SIGNAL_FUNC (launch_callback), (gpointer) LAUNCH_RECORD);
|
||||
|
||||
@ -2207,7 +2217,7 @@ void create_main_window (void) {
|
||||
i = 0;
|
||||
j = 0;
|
||||
server_filter_menu_items[i].type = MENU_ITEM;
|
||||
server_filter_menu_items[i].label = "Filters";
|
||||
server_filter_menu_items[i].label = _("Filters");
|
||||
server_filter_menu_items[i].accel_key = 0;
|
||||
server_filter_menu_items[i].accel_mods = 0;
|
||||
server_filter_menu_items[i].callback = NULL;
|
||||
@ -2227,7 +2237,7 @@ void create_main_window (void) {
|
||||
/* Start of the filters */
|
||||
filter_start_index = i;
|
||||
server_filter_menu_items[i].type = MENU_ITEM;
|
||||
server_filter_menu_items[i].label = "None";
|
||||
server_filter_menu_items[i].label = _("None");
|
||||
server_filter_menu_items[i].accel_key = 0;
|
||||
server_filter_menu_items[i].accel_mods = 0;
|
||||
server_filter_menu_items[i].callback = GTK_SIGNAL_FUNC (server_filter_select_callback);
|
||||
@ -2462,6 +2472,12 @@ int main (int argc, char *argv[]) {
|
||||
|
||||
int i,j; /* For parsing the command line. */
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
#endif
|
||||
|
||||
set_debug_level (DEFAULT_DEBUG_LEVEL);
|
||||
debug (5, "main() -- Debug Level Default Set at %d", DEFAULT_DEBUG_LEVEL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user