Commit Graph

37 Commits

Author SHA1 Message Date
Niels De Graef f663d26ab5 Migrate from intltool to gettext
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
2022-06-25 10:25:49 +02:00
Jehan b622f09e0b po-python: benchmark-foreground-extract.py was deleted. 2021-04-20 22:25:47 +02:00
Jehan 164907384c po-python: remove py-slice from POTFILES.in.
This should fix the CI build.
2020-12-15 03:10:41 +01:00
Jehan 59292c1432 po-*: move the Python goat exercise to the gimp30-std-plug-ins domain.
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.
2020-10-18 02:22:17 +02:00
Jehan ecbc38f9e9 plug-ins, extension: goat-exercises becomes a GIMP extension.
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.
2020-10-09 15:30:54 +02:00
Jehan 0ec5ee4394 plug-ins: get rid of pygimp!
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!
2020-09-21 18:17:18 +02:00
Jehan eafe90fa7c libgimp, po-python: fix missing header in distribution…
… 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.
2020-04-19 12:52:28 +02:00
Piotr Drąg 8e278130d9 Update POTFILES.in 2019-12-17 15:27:09 +01:00
Piotr Drąg f7798bcd9a Update POTFILES.in 2019-09-15 11:26:24 +02:00
Piotr Drąg ff1663b559 Update POTFILES.in 2019-09-02 18:58:10 +02:00
Piotr Drąg 49dedbf716 Revert "po-python: update POTFILES.in"
This reverts commit f8b8d99aca.

These files don’t exist.
2019-08-31 15:11:08 +02:00
Michael Natterer f8b8d99aca po-python: update POTFILES.in 2019-08-30 11:40:33 +02:00
Piotr Drąg d68ef36974 Update POTFILES.in 2019-08-28 18:26:01 +02:00
Michael Natterer 3a943f4853 po-python, po-script-fu: update for new python plug-ins 2019-08-06 23:24:32 +02:00
Jehan 1ab62fa220 po-plug-ins, po-python: skip/add new python plug-in files. 2019-07-31 16:02:01 +02:00
Jehan 404ab1da46 po-python: deactivate pot generation on VPATH builds.
Also remove temporarily the non-ported Python plug-ins from POTFILES to
fix distcheck.
2019-07-29 02:05:25 +02:00
Jehan 0f0cf4df87 po-python: install again localization for Python plug-ins.
This used to be deactivated. Let's install them again.
Also activate localization in the palette-to-gradient plug-in.
2019-07-28 21:06:36 +02:00
Elad Shahar f6e4145756 Add i18n support for python spyrogimp plugin 2019-02-01 07:41:19 -05:00
João S. O. Bueno 8a202e7618 Completes addition of histogram-export to text plug-in. Addresses #356760 2014-01-08 20:26:22 -02:00
Piotr Drąg 047ca612f5 Updated POTFILES.in 2012-05-07 17:57:07 +02:00
João S. O. Bueno d15cebe649 plug-ins: Fix procedure and file name, list file for translation 2011-05-13 10:50:25 -04:00
Martin Nordholts da1ddff7c4 po-python: Add text-brush.py to POTFILES.in 2009-07-15 00:38:09 +03:00
Sven Neumann d1e4d9ffa4 updated POTFILES.in and POTFILES.skip
svn path=/trunk/; revision=25413
2008-04-08 14:50:29 +00:00
Michael Natterer 65d7a72639 specify encoding (bug #389201).
2007-01-04  Michael Natterer  <mitch@gimp.org>

	* POTFILES.in: specify encoding (bug #389201).


svn path=/trunk/; revision=21640
2007-01-04 10:12:37 +00:00
Sven Neumann 78f8dde307 removed pdbbrowse.py.
2006-11-02  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: removed pdbbrowse.py.
2006-11-02 12:35:13 +00:00
Sven Neumann 54bc0c1c16 removed files that were removed from CVS.
2006-10-23  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: removed files that were removed from CVS.
2006-10-23 10:18:36 +00:00
Sven Neumann 9c8f65ee0a plug-ins/pygimp/plug-ins/py-slice.py prepared for translation.
2006-09-21  Sven Neumann  <sven@gimp.org>

	* plug-ins/pygimp/plug-ins/py-slice.py
	* plug-ins/pygimp/plug-ins/shadow_bevel.py: prepared for translation.
2006-09-21 14:24:12 +00:00
Sven Neumann 65d8363b61 added align-tool (bug #356260).
2006-09-21  Sven Neumann  <sven@gimp.org>

	* menus/image-menu.xml.in: added align-tool (bug #356260).

	* plug-ins/pygimp/plug-ins/palette-to-gradient.py
	* plug-ins/pygimp/plug-ins/pdbbrowse.py: prepared for translation.
2006-09-21 13:51:36 +00:00
Sven Neumann b17946e15e plug-ins/pygimp/plug-ins/palette-offset.py prepared for translation.
2006-09-21  Sven Neumann  <sven@gimp.org>

        * plug-ins/pygimp/plug-ins/palette-offset.py
        * plug-ins/pygimp/plug-ins/palette-sort.py: prepared for translation.
2006-09-21 12:01:54 +00:00
Sven Neumann bd9ec640a8 prepared for translation.
* plug-ins/pygimp/plug-ins/foggify.py: prepared for translation.
2006-09-21 11:38:47 +00:00
Sven Neumann 48e52e674a plug-ins/pygimp/gimpui.override (_wrap_gimp_dialog_new) allow String or
2006-09-21  Sven Neumann  <sven@gimp.org>

	* plug-ins/pygimp/gimpui.override (_wrap_gimp_dialog_new)
	* plug-ins/pygimp/pygimp-drawable.c (drw_set_name): allow String
	or Unicode objects.

	* plug-ins/pygimp/plug-ins/colorxhtml.py: prepared for translation.
2006-09-21 11:19:43 +00:00
Sven Neumann cf62a51605 use PyUnicode_Check() instead of PyString_Check().
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 11:52:19 +00:00
Sven Neumann 8ae9aa43fe plug-ins/pygimp/plug-ins/clothify.py need to call gettext.install here,
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-20 11:33:47 +00:00
Manish Singh f5044b9ce8 plug-ins/pygimp/gimpfu.py let the gettext module
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-17 18:33:42 +00:00
Sven Neumann 28d825905f plug-ins/pygimp/Makefile.am added header file for i18n support.
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-15 10:29:19 +00:00
Sven Neumann b7e2ab2d2b marged strings for translation.
2006-09-14  Sven Neumann  <sven@gimp.org>

	* plug-ins/pygimp/gimpfu.py: marged strings for translation.
2006-09-14 06:59:46 +00:00
Sven Neumann ac610f0cf3 Makefile.am configure.in added basic infrastructure for a gimp20-python
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).
2006-09-13 19:16:58 +00:00