Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 672570 - sys-devel/gettext: Ship ITS files for metainfo.xml translation rules
Summary: sys-devel/gettext: Ship ITS files for metainfo.xml translation rules
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-05 15:43 UTC by Mart Raudsepp
Modified: 2019-02-13 21:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2018-12-05 15:43:27 UTC
Latest gettext already ships the following files:

/usr/share/gettext-0.19.8/its/appdata.loc
/usr/share/gettext-0.19.8/its/appdata.its

But these only describe how to handled translation of *.appdata.xml files, lacking rules for newer *.metainfo.xml files.

For handling metainfo files, we currently need to have a build dependency on appstream-glib, which in turn pulls in gtk+:3 and so on, just because we are missing a couple lines from the gettext appdata.loc file, and perhaps in some cases from appdata.its file.
To see what I mean, install appstream-glib and compare the following files with eachother:

diff -u --color=auto /usr/share/gettext-0.19.8/its/appdata.loc /usr/share/gettext/its/appdata.loc
diff -u --color=auto /usr/share/gettext-0.19.8/its/appdata.its /usr/share/gettext/its/appdata.its

If gettext version of them would be updated (I suspect their version control has it - they just haven't released for years...), we'd stop needing to add an explicit appstream-glib build dep on various packages just for the .loc data file and just depend on that newer gettext revision instead (we need to depend on some gettext version anyways) - especially with meson based builds.

As-is, we need to add appstream-glib build depend if it has any metainfo.xml files in translation (i18n.merge_file), but not appdata.xml (as gettext ships rules for it) UNLESS developer_name tag is used, which doesn't have a rule in current gettext appdata.its..

Having this handled in gettext would be much preferable to having to split out the two tiny data files from appstream-glib into some appstream-glib-data package, especially if some upcoming gettext release would update its own copies anyways.
Comment 2 Lars Wendler (Polynomial-C) gentoo-dev 2019-01-28 12:07:44 UTC
Here's the relevant upstream change, although as Mart pointed out in IRC, it seems to be incomplete:

http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=ac5c1120096808a94bdeeb5319129d0d139a6d3a
Comment 3 Mart Raudsepp gentoo-dev 2019-02-13 21:26:51 UTC
Some additional tags in the ITS file of newer appstream-glib:

/component/releases/release/description
/component/agreement/agreement_section/name
/component/agreement/agreement_section/description