GNOME Bugzilla – Bug 789010
[Patch] Migrate from intltool to gettext
Last modified: 2018-04-15 03:31:04 UTC
Created attachment 361616 [details] [review] [Patch] Migrate from intltool to gettext Migrate from intltool to GNU gettext. For context: see https://wiki.gnome.org/MigratingFromIntltoolToGettext
Thanks, pushed to master.
Niels, since you seem to be into the issue, do you know or can you check if gettext now handles everything GIMP needs?
I wouldn't call myself an expert on this (I've been mostly figuring things out by looking at how others did it), but normally gettext should be able to replace intltool for all your needs (for example, you can specify your own ITS and LOC files together with a custom GETTEXTDATADIRS variable). I'll see if I can post a WIP patch some time soon.
Review of attachment 361616 [details] [review]: ::: po/Makevars @@ +2,3 @@ + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) We lost the -0.3 suffix in the installed *.mo files. Would be nice to restore it for parallel installability. It's not a catastrophe because gegl-0.2's files have the -0.2 suffix, so we can still parallel install gegl-0.2 and gegl-0.3, but it will become a problem in future.
Created attachment 363509 [details] [review] Restore the versioning of the installed *.mo files
make distcheck fails with the following with attach 36509 applied: config.status: creating operations/workshop/generated/Makefile config.status: error: cannot find input file: `po/Makevars.in' Makefile:842: recipe for target 'distcheck' failed make: *** [distcheck] Error 1
Created attachment 363575 [details] [review] Restore the versioning of the installed *.mo files EXTRA_DIST:ing the po/Makevars.in gets us a bit further along till: ERROR: files left in build directory after distclean Might be suppressable with distcleancheck_listfiles: https://www.gnu.org/software/automake/manual/html_node/Checking-the-Distribution.html#Checking-the-Distribution The other solution is to just hard code the version suffix. :)
Created attachment 363596 [details] [review] Restore the versioning of the installed *.mo files Use distcleancheck_listfiles to nuke the distcheck complaint. Can't say that I find this better than just hard coding the -0.3 suffix, but there is nothing like build system surgery on a nice autumn afternoon. :)
Review of attachment 363596 [details] [review]: commited
commit dc19cf4fd198eae137ce06ca08f6c1e847dc1678 Author: Debarshi Ray <debarshir@gnome.org> Date: Mon Nov 13 15:07:18 2017 +0100 Restore the versioning of the installed *.mo files It seems slightly more elegant to use the GETTEXT_PACKAGE output variable instead of hard coding the version suffix in po/Makevars. Unfortunately, I couldn't find a way to not distribute the generated po/Makevars, or a way to insert custom variables in Gettext's Makevars. Failing that, since the value of GETTEXT_PACKAGE isn't going to change as a result of configuring the build, we stop distcheck from complaining about po/Makevars not getting removed after distclean by using distcleancheck_listfiles. Fallout from 37262520be05d3903d142c6cfe655bc727596ded https://bugzilla.gnome.org/show_bug.cgi?id=789010
(In reply to Øyvind Kolås (pippin) from comment #10) > commit dc19cf4fd198eae137ce06ca08f6c1e847dc1678 > Author: Debarshi Ray <debarshir@gnome.org> > Date: Mon Nov 13 15:07:18 2017 +0100 > > Restore the versioning of the installed *.mo files Oops! This broke builddir != srcdir builds in GNOME Continuous: http://build.gnome.org/continuous/buildmaster/builds/2017/11/14/25/build/log-gegl.txt
Created attachment 363610 [details] [review] Restore the versioning of the installed *.mo files (v2)
commit 22d00b5d810f934e6b954894a66206c05fb7e46b Author: Debarshi Ray <debarshir@gnome.org> Date: Tue Nov 14 16:38:20 2017 +0100 Restore the versioning of the installed *.mo files (v2) Hard code the API suffix in po/Makevars instead of trying to use custom Automake variables. This is also what GTK+ does, and simplicity does have its virtues. https://bugzilla.gnome.org/show_bug.cgi?id=789010 commit 8b8d302c9981b5e984e720a3f7461340fb8971ba Author: Debarshi Ray <debarshir@gnome.org> Date: Tue Nov 14 16:32:27 2017 +0100 Revert "Restore the versioning of the installed *.mo files" This broke builddir != srcdir builds in GNOME Continuous: Making all in po make[2]: Entering directory '/ostbuild/source/gegl/_build/po' make[2]: *** No rule to make target '/config.status', needed by 'Makefile'. Stop. make[2]: Leaving directory '/ostbuild/source/gegl/_build/po' Makefile:643: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/ostbuild/source/gegl/_build' Makefile:550: recipe for target 'all' failed make: *** [all] Error 2 This reverts commit dc19cf4fd198eae137ce06ca08f6c1e847dc1678. https://bugzilla.gnome.org/show_bug.cgi?id=789010
The extraction of strings using intltool-update broke when the support for Scheme based scripts was changed in a way that meant it no longer recognized the strings marked as translatable in scripts used by Script-Fu. Some additional information relating to the change can be found at: Use xgettext's native support for scheme file string extraction https://bugs.launchpad.net/intltool/+bug/790574