intltool has long been dead upstream. Let's not poke the dead corpse,
please.
This commit is quite large, but that's mostly since trying to support a
hybrid of both gettext and intltool with both Meson and Autotools was
really hard, so I stopped trying.
Due to gettext relying on quite some things being at the exactly right
place in the autotools build (like `ABOUT-NLS` and `config.rpath`) we
really needed to cleanup the `autogen.sh` to only call `aclocal` and
`autoreconf`. No more strange magic; I tried to do it without changing
too much in the file, and things just broke. If people want to do
something more custom, they can just change the script directly. This
change also uncovered some problems in our `configure.ac`, like using
deprecated macros.
The following major changes happened:
* meson: Changed `custom_target()` to `i18n.merge_file()` for all
supported file types
* Added `.its` and `.loc` files for the GIMP-specific XML formats, so
that gettext understands them
* For the `.isl` (Window installer stuff) file, there's no easy way to
do this in gettext, so instead we start from an XML file (again with
its own ITS rules etc), translate that with gettext, and then use
`xsltproc` with a bit of magic to output the .isl file for each
language
* the `po*/Makefile.in.in` files are migrated to `Makevars` files,
which gettext natively understands.
Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/8028
Since commit ecbc38f9e9, the Python goat exercise was tracked by the
po-python/ Gettext files. This was an error as all its strings are
common to all other goat exercise plug-ins, so it makes no sense to
separate them (it only duplicates the work).
Actually separating the translation domains by plug-in language was a
bad idea from the start. Why do we care that a translatable string is
written in this or that language? All our plug-ins should just share a
common text domain. This way, we avoid useless duplication of common
strings.
This is an extension containing a few demo plug-ins. This is good to
demonstrate the extension format. It will also allow to disable these
plug-ins (if at some point, one doesn't want to show these demo
plug-ins anymore).
And finally it deals with the fact that our plug-in code is stupid, as
it just tries to find the first executable with the same name (minus
extension) as the plug-in folder. This doesn't go well on Windows, where
the permission system is non-existent. So our code just ends up trying
to run the first file with a similar name in a plug-in folder. As the C
goat-exercise contains both an exe and the C source (and the system
probably returns files in alphabetic order), GIMP under Windows tries to
run the C source instead of the executable (this obviously doesn't go
well).
We could try to do more complex logics, like not aborting if the first
file run fails and try the next one in the plug-in folder. Or maybe just
rename the C file to another name. But any of these is just in the end
the proof that our plug-in discovery right now is just bogus. The
extension system is explicit, not based on randomly trying out files.
Plug-ins entry points are explicitly listed in the metadata manifest.
It's done, all Python plug-ins have been either ported to the new API +
Python 3, or they have been discarded (and moved to gimp-data-extras for
whoever wants to salvage them).
Let's get rid of the outdated pygimp directory (whose code has not been
built in the master branch for years now anyway)! Woohoo!
… and additional source from python POTFILES.
These 2 fixes allow `make distcheck` to work fine.
You'll notice that I just commented the pygimp files out instead of just
deleting them. That's because there have been discussions and a patch
proposal lately about porting the pygimp API to Python 3/master. We are
not sure we want this yet for maintainability reason (and I was supposed
to be the one to wipe these files out!) but we'll see.
2006-09-20 Sven Neumann <sven@gimp.org>
* plug-ins/pygimp/pygimp-drawable.c (drw_set_name): use
PyUnicode_Check() instead of PyString_Check().
* plug-ins/pygimp/plug-ins/clothify.py: reverted localisation;
this plug-in isn't installed by default.
2006-09-20 Sven Neumann <sven@gimp.org>
* plug-ins/pygimp/plug-ins/clothify.py
* plug-ins/pygimp/plug-ins/gimpcons.py: need to call gettext.install
here, otherwise we can't use _() in the register() call.
* plug-ins/pygimp/gimpfu.py: don't call gettext.install() for the
plug-in. Translate the blurb used as a user hint.
2006-09-16 Manish Singh <yosh@gimp.org>
* plug-ins/pygimp/gimpfu.py
* plug-ins/pygimp/plug-ins/gtkcons.py: let the gettext module
* po-python/POTFILES.in
* plug-ins/pygimp/gimpui.py: Mark a couple strings for translation
here.
2006-09-15 Sven Neumann <sven@gimp.org>
* plug-ins/pygimp/Makefile.am
* plug-ins/pygimp/pygimp-intl.h: added header file for i18n support.
* plug-ins/pygimp/gimpmodule.c: bind to the gimp20-python
translation domain.
* plug-ins/pygimp/procbrowser.c: marked a string for translation.
2006-09-13 Sven Neumann <sven@gimp.org>
* Makefile.am
* configure.in
* po-python: added basic infrastructure for a gimp20-python
translation domain.
* plug-ins/pygimp/plug-ins/gimpcons.py
* plug-ins/pygimp/plug-ins/gtkcons.py: mark some strings for
translation, based on a patch from David Gowers (bug #351287).