bugGNU gettext - Bugs: bug #51881, PATCH: Fully support the...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #51881: PATCH: Fully support the AppStream/metainfo spec

Submitter:  Matthias Klumpp <matk>
Submitted:  Mon 28 Aug 2017 08:17:25 PM UTC
   
 
Category:  AppData Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Thu 09 May 2019 07:29:32 PM UTC, comment #4: 

The feature is contained in the gettext-0.20 release.

Bruno Haible <haible>
Group administrator
Tue 29 Aug 2017 07:22:54 AM UTC, comment #3: 


> maybe trick Gettext into recognizing both names for the file


The committed patch recognizes both file name pattern foo.appdata.xml and foo.metainfo.xml (I verified this after disabling /usr/share/gettext/its on my system, that was interfering).

What I decided against is to support MetaInfo as a valid -L argument. The -L option is most often not needed - if the file name follows the said naming convention.

> Changing this would have a high risk of breaking translation in projects which explicitly define the name.


Of course we don't do backward-incompatible changes. We would have support both "-L AppData" and "-L metainfo". The benefit of two options with the same semantics, however, seemed small to me.

Bruno Haible <haible>
Group administrator
Tue 29 Aug 2017 02:03:33 AM UTC, comment #2: 

Awesome, thank you for merging this so incredibly quickly!

My (naive) intent with the additional locating rule was to maybe trick Gettext into recognizing both names for the file (apparently, it doesn't work that way ^^).
I think your changes are fine though - although the metainfo name is more consistent, since this was known as appdata before in Gettext and that term is still widely used, going the safe route and keeping it exclusively makes sense.
Changing this would have a high risk of breaking translation in projects which explicitly define the name.

Matthias Klumpp <matk>
Mon 28 Aug 2017 11:54:44 PM UTC, comment #1: 

Thanks for these. I've used your patch to fix https://savannah.gnu.org/bugs/?50408 and https://savannah.gnu.org/bugs/?50414 .

In the new metainfo.loc you added two locatingrules: one that overrides the previous rule for *.appdata.xml. This one is not necessary, therefore I omitted it. (If it was your intention that xgettext could be invoked as "xgettext -L MetaInfo ..." instead of "xgettext -L AppData ...", this change is not implemented: you would have had to modify x-appdata.h for this to work. I decided against it, because AppData is still the wider known name for this kind of files.)

Bruno Haible <haible>
Group administrator
Mon 28 Aug 2017 08:17:25 PM UTC, original submission:  

This implements support for metainfo files, which is the generic version
of an AppData file (the latter being only for desktop-applications).
The XML for metainfo files is specified in the AppStream
specification[1].

This also adds support for missing translatable tags in metainfo files.

I tried to keep the amount of changes as small as possible, and also added a field for the "AppData" name, in case someone has ever specified that explicitly (e.g. using itstool).
Since MetaInfo is the more generic name, it should generally be preferred here.

Adding this patch allows metadata for services, fonts, codecs, firmware, drivers, etc. to be translated as well.

This patch will also resolve this bug: https://savannah.gnu.org/bugs/?50408

[1]: https://www.freedesktop.org/software/appstream/docs/

Matthias Klumpp <matk>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #41690:  0001-Support-the-MetaInfo-superset-of-AppData.patch added by matk (4KiB - text/x-patch - Patch for this issue)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by matk (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2017-08-28 haible StatusNone Fixed
        Assigned toNone haible
        Open/ClosedOpen Closed
    2017-08-28 matk Attached File- Added 0001-Support-the-MetaInfo-superset-of-AppData.patch, #41690

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code