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

Submitted by:  Matthias Klumpp <matk>
Submitted on:  Mon 28 Aug 2017 08:17:25 PM UTC  
 
Category: AppDataSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Bruno Haible <haible>
Open/Closed: Closed

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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>

 

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
  • -unavailable- added by haible (Posted a comment)
  • -unavailable- added by matk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 28 Aug 2017 11:54:44 PM UTChaibleStatusNone=>Fixed
      Assigned toNone=>haible
      Open/ClosedOpen=>Closed
    Mon 28 Aug 2017 08:17:25 PM UTCmatkAttached File-=>Added 0001-Support-the-MetaInfo-superset-of-AppData.patch, #41690

    Back to the top


    Powered by Savane 3.1-cleanup1