[gtk-vnc] Added i18n initial support.
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Added i18n initial support.
- Date: Mon, 17 Aug 2009 19:10:15 +0000 (UTC)
commit b7e7f69a95d57c381d69000b26552fdab2ffdcdc
Author: Jonh Wendell <jwendell gnome org>
Date: Mon Aug 17 16:02:08 2009 -0300
Added i18n initial support.
Makefile.am | 2 +-
configure.ac | 16 +++++++++++++++-
po/POTFILES.in | 2 ++
src/Makefile.am | 1 +
src/vncdisplay.c | 7 +++++--
5 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 5c01329..efa895c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = gnulib/lib src examples plugin gnulib/tests
+SUBDIRS = gnulib/lib src examples plugin gnulib/tests po
ACLOCAL_AMFLAGS = -I gnulib/m4
pkgconfig_DATA = @PACKAGE -1 0 pc
diff --git a/configure.ac b/configure.ac
index 5d440d6..276b728 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,6 +3,20 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT([gtk-vnc], [0.3.9], [anthony codemonkey ws])
AC_CONFIG_SRCDIR([src/gvnc.c])
+#*******************************************************************************
+# Internationalization
+#*******************************************************************************
+GETTEXT_PACKAGE=gtk-vnc
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
+
+IT_PROG_INTLTOOL([0.35.0])
+AM_GLIB_GNU_GETTEXT
+
+#*******************************************************************************
+# Check required libraries
+#*******************************************************************************
+
GTK_REQUIRED=2.10.0
AC_SUBST(GTK_REQUIRED)
GNUTLS_REQUIRED=1.4.0
@@ -17,7 +31,6 @@ NSPR_REQUIRED=4.0.0
FIREFOX_PLUGIN_REQUIRED=2.0.0
MOZILLA_PLUGIN_REQUIRED=1.8
-
AC_CONFIG_HEADERS([config.h:config.hin])
AC_CANONICAL_TARGET
@@ -292,6 +305,7 @@ AC_CONFIG_FILES(
src/Makefile
examples/Makefile
plugin/Makefile
+ po/Makefile.in
gtk-vnc-1.0.pc
gtk-vnc.spec
mingw32-gtk-vnc.spec
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..88c014d
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,2 @@
+gnulib/lib/gai_strerror.c
+src/vncdisplay.c
diff --git a/src/Makefile.am b/src/Makefile.am
index feaa6c4..31c4600 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,6 +9,7 @@ libgtk_vnc_1_0_la_LIBADD = @GTK_LIBS@ @GNUTLS_LIBS@ \
libgtk_vnc_1_0_la_CFLAGS = @GTK_CFLAGS@ @GNUTLS_CFLAGS@ \
@GTHREAD_CFLAGS@ @SASL_CFLAGS@ @WARNING_CFLAGS@ \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
+ -DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" \
-DG_LOG_DOMAIN=\"gtk-vnc\" \
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib
libgtk_vnc_1_0_la_LDFLAGS = -Wl, @LD_VERSION_SCRIPT_SUPPORT@ \
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index e587dfb..1f080fe 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -19,6 +19,7 @@
*/
#include <config.h>
+#include <locale.h>
#include "vncdisplay.h"
#include "coroutine.h"
@@ -29,6 +30,7 @@
#include "x_keymap.h"
#include <gtk/gtk.h>
+#include <glib/gi18n.h>
#include <string.h>
#include <stdlib.h>
#include <gdk/gdkkeysyms.h>
@@ -164,7 +166,7 @@ gboolean debug_enabled = FALSE;
static const GOptionEntry gtk_vnc_args[] =
{
- { "gtk-vnc-debug", 0, 0, G_OPTION_ARG_NONE, &debug_enabled, "Enables debug output", 0 },
+ { "gtk-vnc-debug", 0, 0, G_OPTION_ARG_NONE, &debug_enabled, N_("Enables debug output"), 0 },
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, 0 }
};
@@ -2240,7 +2242,8 @@ vnc_display_get_option_group (void)
{
GOptionGroup *group;
- group = g_option_group_new ("gtk-vnc", "GTK-VNC Options", "Show GTK-VNC Options", NULL, NULL);
+ group = g_option_group_new ("gtk-vnc", N_("GTK-VNC Options:"), N_("Show GTK-VNC Options"), NULL, NULL);
+ g_option_group_set_translation_domain (group, GETTEXT_PACKAGE);
g_option_group_add_entries (group, gtk_vnc_args);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]