Commit 7d75b932 authored by David Woodhouse's avatar David Woodhouse

Add translation support

Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent d8a12f51
......@@ -7,3 +7,12 @@ version.c
openconnect
nm-openconnect-auth-dialog
Make.config
/po/Makefile
/po/Makefile.in
/po/Makefile.in.in
/po/*.gmo
/po/*.mo
/po/POTFILES
/po/.intltool-merge-cache
/po/stamp-it
/po/openconnect.pot
if USE_NLS
SUBDIRS = po
endif
lib_LTLIBRARIES = libopenconnect.la
bin_PROGRAMS = openconnect
......
#!/bin/sh
aclocal && \
libtoolize --automake --copy --force && \
automake --foreign --add-missing && \
autoconf
intltoolize --force --copy --automake && \
aclocal && \
libtoolize --automake --copy --force && \
automake --foreign --add-missing && \
autoconf
......@@ -5,6 +5,13 @@ AC_LANG_C
AM_INIT_AUTOMAKE([foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
IT_PROG_INTLTOOL
AC_SUBST(GETTEXT_PACKAGE, [openconnect])
AM_CONDITIONAL(USE_NLS, [test "$USE_NLS" = "yes"])
if (test "$USE_NLS" = "yes"); then
AC_DEFINE(ENABLE_NLS, 1)
fi
AS_COMPILER_FLAGS(CFLAGS,
"-Wall
-Wextra
......@@ -77,4 +84,4 @@ AC_CHECK_LIB(ssl, dtls1_stop_timer,
AC_DEFINE(HAVE_DTLS1_STOP_TIMER, [1], [OpenSSL has dtls1_stop_timer() function]),
,,${OPENSSL_LIBS})
AC_OUTPUT(Makefile openconnect.pc)
AC_OUTPUT(Makefile openconnect.pc po/Makefile.in)
......@@ -236,6 +236,11 @@ int main(int argc, char **argv)
char *pidfile = NULL;
FILE *fp = NULL;
#ifdef ENABLE_NLS
setlocale(LC_ALL, "");
textdomain("openconnect");
#endif
openconnect_init_openssl();
vpninfo = malloc(sizeof(*vpninfo));
......
......@@ -39,7 +39,12 @@
#ifdef LIBPROXY_HDR
#include LIBPROXY_HDR
#endif
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(s) gettext(s)
#else
#define _(s) s
#endif
/****************************************************************************/
......
......@@ -183,6 +183,7 @@ For full changelog entries including the latest development, see
<UL>
<LI><B>OpenConnect HEAD</B><BR>
<UL>
<LI>Add localisation support.</LI>
<LI>Fix build on Debian systems where <TT>dtls1_stop_timer()</TT> is not available.</LI>
<LI>Fix libproxy detection.</LI>
<LI>Enable a useful set of compiler warnings by default.</LI>
......@@ -508,6 +509,6 @@ An <TT>openconnect</TT> <A HREF="http://www.freebsd.org/cgi/cvsweb.cgi/ports/sec
<hr>
<address>David Woodhouse &lt;<A HREF="mailto:dwmw2@infradead.org">dwmw2@infradead.org</A>&gt;</address>
<!-- hhmts start -->
Last modified: Thu Sep 22 14:39:12 BST 2011
Last modified: Thu Sep 22 15:51:17 BST 2011
<!-- hhmts end -->
</body> </html>
# List of source files containing translatable strings.
# Please keep this list in alphabetic order.
[encoding: UTF-8]
auth.c
cstp.c
dtls.c
http.c
main.c
mainloop.c
ssl.c
tun.c
xml.c
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment