summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac11
-rw-r--r--libsoup/Makefile.am1
-rw-r--r--libsoup/soup-request.c2
-rw-r--r--libsoup/soup-requester.c2
-rw-r--r--libsoup/soup-session.c15
-rw-r--r--po/LINGUAS0
-rw-r--r--po/POTFILES.in2
-rw-r--r--tests/test-utils.c2
10 files changed, 39 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 8d77197f..111bffdf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,11 +50,15 @@ libsoup/SoupGNOME-2.4.typelib
libtool
ltmain.sh
m4/gtk-doc.m4
+m4/intltool.m4
m4/libtool.m4
m4/lt*.m4
missing
-python/COPYING
-python/m4
+mkinstalldirs
+po/libsoup.pot
+po/Makefile.in.in
+po/POTFILES
+po/stamp-it
stamp-h1
tests/*-test
tests/date
diff --git a/Makefile.am b/Makefile.am
index 8b86fb7d..6b9c6a81 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-SUBDIRS = libsoup tests docs
+SUBDIRS = libsoup po tests docs
EXTRA_DIST = \
libsoup-2.4.pc.in \
diff --git a/configure.ac b/configure.ac
index 4ff639ef..84d3ec64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,6 +103,15 @@ esac
AC_MSG_RESULT([$os_win32])
AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
+dnl ************************
+dnl *** gettext/intltool ***
+dnl ************************
+IT_PROG_INTLTOOL([0.35.0])
+GETTEXT_PACKAGE=libsoup
+AC_SUBST([GETTEXT_PACKAGE])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gettext domain name])
+AM_GLIB_GNU_GETTEXT
+
dnl *******************
dnl *** Misc checks ***
dnl *******************
@@ -347,6 +356,8 @@ AC_CONFIG_FILES([
Makefile
libsoup-zip
libsoup/Makefile
+ po/Makefile.in
+ po/Makefile
tests/Makefile
tests/httpd.conf
docs/Makefile
diff --git a/libsoup/Makefile.am b/libsoup/Makefile.am
index aa13eec4..2b36a86f 100644
--- a/libsoup/Makefile.am
+++ b/libsoup/Makefile.am
@@ -8,6 +8,7 @@ endif
INCLUDES = \
-DG_LOG_DOMAIN=\"libsoup\" \
+ -DLOCALEDIR=\"$(localedir)\" \
-I$(top_srcdir) \
$(SOUP_DEBUG_FLAGS) \
$(SOUP_MAINTAINER_FLAGS) \
diff --git a/libsoup/soup-request.c b/libsoup/soup-request.c
index 06fe7ff1..5e978419 100644
--- a/libsoup/soup-request.c
+++ b/libsoup/soup-request.c
@@ -25,7 +25,7 @@
#include <config.h>
#endif
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#define LIBSOUP_USE_UNSTABLE_REQUEST_API
diff --git a/libsoup/soup-requester.c b/libsoup/soup-requester.c
index d71d447a..5897ed2e 100644
--- a/libsoup/soup-requester.c
+++ b/libsoup/soup-requester.c
@@ -22,7 +22,7 @@
#include "config.h"
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#define LIBSOUP_USE_UNSTABLE_REQUEST_API
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index 2cfcc277..fa95f7e7 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -13,6 +13,8 @@
#include <string.h>
#include <stdlib.h>
+#include <glib/gi18n-lib.h>
+
#include "soup-auth.h"
#include "soup-auth-basic.h"
#include "soup-auth-digest.h"
@@ -58,6 +60,15 @@
* #SoupSessionSync.
**/
+static void
+soup_init (void)
+{
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif
+}
+
typedef struct {
SoupURI *uri;
SoupAddress *addr;
@@ -132,7 +143,9 @@ static void auth_manager_authenticate (SoupAuthManager *manager,
#define SOUP_SESSION_USER_AGENT_BASE "libsoup/" PACKAGE_VERSION
-G_DEFINE_ABSTRACT_TYPE (SoupSession, soup_session, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (SoupSession, soup_session, G_TYPE_OBJECT,
+ soup_init ();
+ )
enum {
REQUEST_QUEUED,
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/po/LINGUAS
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 00000000..c43b9434
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,2 @@
+libsoup/soup-request.c
+libsoup/soup-requester.c
diff --git a/tests/test-utils.c b/tests/test-utils.c
index 47f1db01..fee671aa 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -5,6 +5,7 @@
#include "test-utils.h"
#include "libsoup/soup.h"
+#include <locale.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -81,6 +82,7 @@ test_init (int argc, char **argv, GOptionEntry *entries)
GError *error = NULL;
GTlsBackend *tls_backend;
+ setlocale (LC_ALL, "");
g_type_init ();
name = strrchr (argv[0], '/');