On Wed, Oct 24, 2012 at 12:02:28AM +0300, Zeeshan Ali (Khattak) wrote: > @@ -23,6 +23,7 @@ > */ > > #include <config.h> > +#include <glib/gi18n-lib.h> > > #include <osinfo/osinfo.h> > > @@ -70,6 +71,11 @@ osinfo_loader_class_init (OsinfoLoaderClass *klass) > { > GObjectClass *g_klass = G_OBJECT_CLASS (klass); > > + bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); > +#ifdef HAVE_BIND_TEXTDOMAIN_CODESET > + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); > +#endif HAVE_BIND_TEXTDOMAIN_CODESET does not seem to be defined anywhere as the preprocessed C file does not contain this call even if bind_textdomain_codeset declaration is present. > diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c > index 65454d7..31bfeea 100644 > --- a/tools/osinfo-db-validate.c > +++ b/tools/osinfo-db-validate.c > @@ -26,6 +26,7 @@ > #include <glib.h> > #include <gio/gio.h> > #include <libxml/relaxng.h> > +#include <locale.h> > > #define SCHEMA PKGDATADIR "/schemas/libosinfo.rng" > > @@ -248,6 +249,7 @@ gint main(gint argc, gchar **argv) > GError *error = NULL; > gint ret = EXIT_FAILURE; > > + setlocale(LC_ALL, ""); As said in another email, I think it would be better to fully initialize i18n there even if it's not really useful as long as translated strings are only coming from libosinfo and not from the binary. Christophe
Attachment:
pgpn3AxabAjwa.pgp
Description: PGP signature