Re: [PATCH glib 2/2] Add framework for i18n of error message strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 10, 2013 at 10:57:08AM +0200, Christophe Fergeau wrote:
> Hey,
> 
> On Mon, Apr 08, 2013 at 01:54:21PM +0100, Daniel P. Berrange wrote:
> > From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> > 
> > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> > ---
> >  .gitignore                                   |  7 +++++
> >  Makefile.am                                  |  2 +-
> >  autogen.sh                                   | 28 ++++++------------
> >  configure.ac                                 |  7 +++++
> >  libvirt-gconfig/libvirt-gconfig-helpers.c    |  7 +++--
> >  libvirt-gconfig/libvirt-gconfig-object.c     | 11 +++----
> >  libvirt-gobject/libvirt-gobject-connection.c | 44 +++++++++++++++-------------
> >  libvirt-gobject/libvirt-gobject-stream.c     | 14 +++++----
> >  po/POTFILES.in                               |  4 +++
> >  9 files changed, 69 insertions(+), 55 deletions(-)
> >  create mode 100644 po/POTFILES.in
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 7b5a092..6314a7b 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -60,6 +60,12 @@ PKG_CHECK_MODULES(GOBJECT2, gobject-2.0 >= $GLIB2_REQUIRED)
> >  PKG_CHECK_MODULES(GIO2, gio-2.0 >= $GLIB2_REQUIRED)
> >  PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED)
> >  
> > +LIBVIRT_GLIB_GETTEXT
> > +dnl Should be in m4/virt-gettext.m4 but intltoolize is too
> 
> This macro/file are missing from this patch.

Opps, stupid .gitignore marked the whole of m4/ as ignored.
The file just sets GETTEXT_PACKAGE - same content as this
file in other libvirt modules.

> > diff --git a/libvirt-gconfig/libvirt-gconfig-helpers.c b/libvirt-gconfig/libvirt-gconfig-helpers.c
> > index 9726dd4..4dfd246 100644
> > --- a/libvirt-gconfig/libvirt-gconfig-helpers.c
> > +++ b/libvirt-gconfig/libvirt-gconfig-helpers.c
> > @@ -26,6 +26,7 @@
> >  #include <string.h>
> >  
> >  #include <libxml/xmlerror.h>
> > +#include <glib/gi18n.h>
> 
> In a library you should use glib/gi18n-lib.h along with a GETTEXT_PACKAGE
> preprocessor define so that the translated string are looked up in the
> library gettext domain, and not in the application gettext domain, see
> https://developer.gnome.org/glib/2.31/glib-I18N.html but it does not have a
> lot of details on that.

Ok, I'll add  -lib before pushing this.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]