GNOME Bugzilla – Bug 389561
Support for files in POTFILES.in lying in $builddir
Last modified: 2012-03-16 12:39:27 UTC
Files in POTFILES.in should be looked up in both $srcdir and $builddir. intltool could even chdir to `dirname $file` and make `basename $file` in the case the file doesn't exist at first hand. This would allow one to write a custom extractor for uncommon formats more easily. Here is an use case: Here in gedit we have tool shell scripts that embed something similar to a desktop file, in a comment. But we'd like to support l10n of these files (bug #342042). So I wrote a custom extractor (that outputs a .h file, the way intltool does) and a custom merger, following intltool's example. Both work just fine, but `make update-po` just refuses to see the generated gettext-strings.h file, despite it has been added to POTFILES.in, because it is in $builddir.
I take it this isn't in SVN yet? Looking for an easy way to replicate this, so I can test changes to intltool-update.
You can replicate it by checkouting the revision 5388 of gedit and applying patch 78926 from bug 342042 (this patch corresponds to the process I described in the bug report). We applied an alternative, ugly method to make it work until this bug is solved...
There are many issues with making this work right. Currently we're using Makefile rule dependencies, to require that all the files in POTFILES exist, when we try to generate the .pot file, as we don't want to have strings left out. The fact that make doesn't jump over and build the dependency first, I think is a problem with make, not intltool. Of course, we will have to work around that, but I'm not sure what the best way is. There are other problems with that patch, that make it not work at all in the builddir != srcdir situation, regardless of any intltool issues. I've just committed a small change that checks for the files in $builddir when running intltool-update -m. This will let the check rule in po/ pass if the required files are all built. I would highly recommend having po listed in SUBDIRS at some point after any SUBDIRS that may be generating files that can affect the build in po/. Namely the gettext_strings.h file here. I will have to look into the rest of the issue more, though, before saying how I can fix this. I'll confirm the bug though.
intltool has switched from the GNOME to the launchpad.net infrastructure nearly three years ago: https://mail.gnome.org/archives/gnome-i18n/2009-April/msg00275.html The intltool product in bugzilla.gnome.org has been deprecated and closed for new bug entry since April 2009. I am now closing all remaining open reports about intltool as NOTGNOME as part of GNOME Bugzilla Housekeeping. Reporter: If the problem that you reported here is still valid in a recent version of intltool we kindly ask you to report it again to https://bugs.launchpad.net/intltool/ so the intltool developers get notified about it.