[virt-tools-list] [virt-viewer PATCH 01/14] po: provide custom make rules for po file management

Daniel P. Berrangé berrange at redhat.com
Tue Mar 5 10:27:07 UTC 2019


On Tue, Mar 05, 2019 at 11:23:34AM +0100, Christophe Fergeau wrote:
> On Wed, Feb 20, 2019 at 05:50:52PM +0000, Daniel P. Berrangé wrote:
> > Historically we have relied on intltool to install a standard
> > po/Makefile.in.in which has very limited scope for customization.
> > intltool is deprecated in favour of standard gettextize tools,
> > but these share the same disadvantages.
> > 
> > Writing make rules for po file management is no more difficult
> > than any other rules libvirt-glib has, so stop using intltool
> 
> s/libvirt-glib/virt-viewer
> 
> > and don't use gettextize ether.
> 
> > Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> 
> > diff --git a/data/Makefile.am b/data/Makefile.am
> > index 1f6c8bf..0e50f3d 100644
> > --- a/data/Makefile.am
> > +++ b/data/Makefile.am
> > @@ -68,17 +68,17 @@ else #!WIN32
> >  desktopdir       = $(datadir)/applications
> >  DESKTOPFILES     = remote-viewer.desktop.in
> >  desktop_DATA     = $(DESKTOPFILES:.desktop.in=.desktop)
> > - at INTLTOOL_DESKTOP_RULE@
> > +%.desktop: %.desktop.in
> > +	$(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
> >  
> > -MIMEFILES = virt-viewer-mime.xml.in
> >  mimedir = $(datadir)/mime/packages
> >  mime_DATA = virt-viewer-mime.xml
> > - at INTLTOOL_XML_RULE@
> 
> Why drop translations from the mime file?

I don't see any other existing mime files translated, and the gettext
tools don't recognise the file format AFAICT, so I didn't look like
this was really needed in the first place. 


> > diff --git a/data/remote-viewer.appdata.xml.in b/data/remote-viewer.appdata.xml.in
> > index 3f6017d..53945f4 100644
> > --- a/data/remote-viewer.appdata.xml.in
> > +++ b/data/remote-viewer.appdata.xml.in
> > @@ -1,19 +1,19 @@
> >  <?xml version="1.0" encoding="UTF-8"?>
> > -<application>
> > +<component type="desktop">
> 
> I assume this change is needed in order for gettext to recognize this
> xml file as translatable?

Yes, this is the modern schema for appdata.


> > diff --git a/po/Makefile.am b/po/Makefile.am
> > new file mode 100644
> > index 0000000..c5f7c36
> > --- /dev/null
> > +++ b/po/Makefile.am
> > @@ -0,0 +1,105 @@
> > +DOMAIN = $(PACKAGE_NAME)
> > +COPYRIGHT_HOLDER = The Libvirt authors
> > +MSGID_BUGS_ADDRESS = https://libvirt.org/bugs.html
> 
> This needs to be updated

Opps.


> > diff --git a/po/lt.po b/po/lt.po
> > index 9a18f31..90cdc7b 100644
> > --- a/po/lt.po
> > +++ b/po/lt.po
> > @@ -16,7 +16,7 @@ msgstr ""
> >  "Content-Type: text/plain; charset=UTF-8\n"
> >  "Content-Transfer-Encoding: 8bit\n"
> >  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
> > -"%100<10 or n%100>=20) ? 1 : 2)\n"
> > +"%100<10 || n%100>=20) ? 1 : 2)\n"
> >  "X-Generator: Zanata 3.8.4\n"
> >  
> >  #: ../data/remote-viewer.appdata.xml.in.h:1
> 
> Probably not needed here?

Yes, pre-existing bug I should fix separately.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the virt-tools-list mailing list