intltool was needed because gettext hasn't have enough functionalities:
It used to be that Gettext could only translate strings in source code, and some limited other formats. Since about version 0.18, Gettext has been adding support for a lot more file formats that are used in modern GNOME desktop applications. This has slowly been making Intltool obsolete, which was invented to bridge that gap between what Gettext supported and what applications needed.
We don't need to use intltool and glib-gettextize anymore.
This can simplify xdt-autogen script.
First, test the port of a panel plugin, like xfce4-sample-plugin
Update: po/POTFILES.in and remove all glade suffix, like [type: gettext/glade]
Create LINGUAS: for i in po/*.po; do test -e "$i" && basename -- "$i" .po ; done > po/LINGUAS
This is only needed the first time. The file will then be maitained by our transifex sync utility
For .desktop and appdata files:
In makefile.am.
Beware, Makefile needs <tab> characters!
Remove:
@INTLTOOL_DESKTOP_RULE@@INTLTOOL_XML_RULE@
For desktop:
Remove leading _ in all .desktop.in files
In Makefile.am, add the .desktop or .appdata generation, for example:
Tried this with xfce4-notifyd, and it didn't quite work: the AC_SUBST([GETTEXT_PACKAGE]) doesn't work because GETTEXT_PACKAGE isn't actually defined as a shell var (the AC_DEFINE_UNQUOTED doesn't do it for what AC_SUBST needs). I ended up doing:
GETTEXT_PACKAGE="$PACKAGE"AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain])AC_SUBST([GETTEXT_PACKAGE])
Another little thing to think about apparently: po must be visited after all directories containing .desktop files (not sure if it's still necessary though, it seems to work without it).
Good catch. I wonder if I should revert back to XDT_I18N usage to avoid adding too many check on every configure.ac ? I wanted to get rid of it for no strong reasons and remove "custom" things
If this is the only thing sometimes necessary that XDT_I18N brings (apart from GETTEXT_PACKAGE discussed above), I would rather be in favor of removing it. There are actually only 6 components above in Xfce, I can't find any in panel plugins, here is what I find for apps:
Libs should not use it I think, there are too many things in it, they should just bind. But maybe apps and plugins could use it if they already depend on libutil (Mousepad only depends on it optionally, and it does check for bind_textdomain_codeset).
In xfce, I think the only things missing are thunar* and xfwm4** (and your MR for xfce4-appfinder). Then there are all the apps except xfce4-notifyd, mousepad and ristretto, and all the plugins (panel, thunar).
Many thanks to you and @sgn for all the work done so far, there's really not much left now :)
I suppose catfish and xfce4-panel-profiles could be migrated too, but I don't know if there's anything more to do than replace the intltool command lines in this case. I'm not sure how it works in transifex. Maybe @skunnyk can tell us if he comes across it.
Well, if that's all that's left anyway, that's fine :)
I've re-written the setup.py for catfish, it's a big change.
But the code is straigh-forward, I think.
With that change, we no longer depends on unmaintainedpython3-distutils-extra, or intltool. We still need setuptools, though, but it's a dependency of python3-distutils-extra already, anyway.