extensions, po-plug-ins: fix localization of extension metadata.

The metadata format being appdata, I simply use standard intltool
merging on the XML templates.
For Automake, I use a custom rule instead of INTLTOOL_XML_RULE because
the m4 macro hardcoded $(top_srcdir)/po as translation source directory
(yet we want to use po-plug-ins/ for these). Meson on the other side
already used a custom command.
This commit is contained in:
Jehan 2020-10-10 14:04:59 +02:00
parent e4dfd04ab7
commit b9ad5d46cc
3 changed files with 6 additions and 2 deletions

View File

@ -128,7 +128,10 @@ appstream_files = $(appstream_in_files:.xml.in=.xml)
appdatadir = $(goat_exercise_c_libexecdir)
appdata_DATA = $(appstream_files)
@INTLTOOL_XML_RULE@
org.gimp.extension.goat-exercises.metainfo.xml: org.gimp.extension.goat-exercises.metainfo.xml.in $(wildcard $(top_srcdir)/po-plug-ins/*.po)
$(INTLTOOL_MERGE) $(top_srcdir)/po-plug-ins $< $(@) -x -u -c $(top_builddir)/po-plug-ins/.intltool-merge-cache
.PHONY: org.gimp.extension.goat-exercises.metainfo.xml
EXTRA_DIST = \
goat-exercise-gjs.js \

View File

@ -110,7 +110,7 @@ appdatafile = custom_target(appdatafilename,
output: [ appdatafilename, ],
command: [
intltool_merge,
po_dir,
po_plug_ins_dir,
'@INPUT@',
'@OUTPUT@',
'--xml-style',

View File

@ -1 +1,2 @@
po_plug_ins_dir = meson.current_source_dir()
i18n.gettext(gettext_package + '-std-plug-ins', preset: 'glib')