On Fri, Oct 02, 2015 at 04:48:31PM -0400, Shaun McCance wrote: > On Fri, 2015-10-02 at 19:55 +0200, Sébastien Wilmet wrote: > > So a solution is to add the generated *.pot files to Git. > > > > Is there another solution? > > This is what yelp and yelp-xsl do. They have XML files of translated > strings for use in XSLT. It's a home-brewed XSLT gettext system. Here's > the Makefile.am that manages the POT file: > > https://git.gnome.org/browse/yelp-xsl/tree/xslt/common/domains/Makefile > .am > > Here's the POT file in git: > > https://git.gnome.org/browse/yelp-xsl/tree/xslt/common/domains/yelp-xsl > .pot > > Here's the POTFILES.in: > > https://git.gnome.org/browse/yelp-xsl/tree/po/POTFILES.in
Thanks for your quick answer. I'll do the same in GtkSourceView then. Maybe the Autotools/gettext/VCS integration should be documented on: http://itstool.org/documentation/ > Yes, putting generated files in git is dirty. But it does work, and I > haven't gotten any complaints about it. If somebody has a suggestion on > how to do this differently, I'm all ears. >From what I understand, I think it's because gettext doesn't support files in POTFILES.in that need to be generated (generated in builddir of course). > Daiki has been working on adding ITS support to gettext, so you will be > able to do arbitrary XML with ITS without external tools. Here's his > work-in-progress: > > http://git.savannah.gnu.org/cgit/gettext.git/commit/?h=wip/ueno/its2&id > =7a17583f Oh, great! > I don't think gettext's XML support will grow to the point where it can > handle complex documentation, but this is probably the way forward for > simple XML data files. To mark XML attributes as translatable, a common thing to do is to prefix them with an underscore. Intltool supports that, but not gettext AFAIK. If the ITS branch supports that, it would cover lots of simple cases. Cheers, Sébastien _______________________________________________ desktop-devel-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/desktop-devel-list
