bugGNU gettext - Bugs: bug #64527, Vague error message about ITS files

 
 

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

bug #64527: Vague error message about ITS files

Submitter:  Phillip Susi <psusi>
Submitted:  Mon 07 Aug 2023 07:18:42 PM UTC
   
 
Category:  XML Severity:  3 - Normal
Item Group:  None Status:  Answer Provided
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Jump to the original submission

Thu 10 Aug 2023 07:14:42 PM UTC, comment #7: 

Could --verbose print the name of the file when it is found?  At least that way I could have built it on an older system that worked, found out the name of the file, then searched for that file in the new release.

Phillip Susi <psusi>
Thu 10 Aug 2023 02:57:06 PM UTC, comment #6: 


> You mean it is looking through all of the ITS files searching for one that has a node inside saying it is the right file, so until that file is found, msgfmt can't know what its name should be?


Yes.

This design allows third-party packages (like policykit!) to add their own .its and .loc files in the /usr/share/gettext/its directory.

Bruno Haible <haible>
Group administrator
Thu 10 Aug 2023 02:41:49 PM UTC, comment #5: 

comment #4:

> msgfmt is not searching for a particular file. It is searching for a particular rule (pattern="*.policy" and/or localName="policyconfig").


You mean it is looking through all of the ITS files searching for one that has a node inside saying it is the right file, so until that file is found, msgfmt can't know what its name should be?

What a pain.

Phillip Susi <psusi>
Tue 08 Aug 2023 05:21:10 PM UTC, comment #4: 


> policykit used to ship the files policy.its and policy.log in /usr/share/gettext/its to assist with translation of policykit config files


I don't see files policy.its and policy.log in Debian.

But I do see two files named polkit.its and polkit.loc, that were in package policykit-1 in Debian 11 but are now in package polkitd in Debian 12.
https://packages.debian.org/bullseye/policykit-1
https://packages.debian.org/bookworm/polkitd

> a request for msgfmt to specify the name of the file it is searching for


msgfmt is not searching for a particular file. It is searching for a particular rule (pattern="*.policy" and/or localName="policyconfig").

Bruno Haible <haible>
Group administrator
Tue 08 Aug 2023 04:11:43 PM UTC, comment #3: 

Ok, it sounds like this file is for gparted to configure policykit to run it as root, and policykit used to ship the files policy.its and policy.log in /usr/share/gettext/its to assist with translation of policykit config files such as this one in gparted.  For some reason, these files are no longer packaged in debian 12.  This may be a packaging error in some big policykit transition that is taking place.

Thanks for your help.  I'll try not to cloud this bug report more and just leave it as a request for msgfmt to specify the name of the file it is searching for either when it fails to find it, or when asked for verbose output, so that it is clear what files are depended on.

Phillip Susi <psusi>
Mon 07 Aug 2023 09:16:26 PM UTC, comment #2: 
Bruno Haible <haible>
Group administrator
Mon 07 Aug 2023 09:14:37 PM UTC, comment #1: 

The error "cannot locate ITS rules for org.gnome.gparted.policy.in" means that the file org.gnome.gparted.policy.in is an XML file, but an ITS file (which describes which parts of this XML file should be localized) was not found. Such a file is being searched for, taking into account
  - The suffix of the file, here ".policy",
  - The root element of the file, which I gather from https://gitlab.gnome.org/GNOME/gparted/-/blob/master/org.gnome.gparted.policy.in.in , is <policyconfig>.
You can look through all the *.loc files in https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=tree;f=gettext-tools/its;h=6a918317431b669b823923fa74ae531d710ac0d8;hb=HEAD : None of them applies to the filename suffix ".policy", and none to <policyconfig>.

1) Do you know where these policy files are standardized? I cannot find it while looking at https://specifications.freedesktop.org/ .

2) Do you know which attributes and elements should be localized (translated)?

3) Does someone in the GNOME project already have a .its file that applies to *.policy files?

Bruno Haible <haible>
Group administrator
Mon 07 Aug 2023 07:18:42 PM UTC, original submission:  

I'm trying to compile gparted 1.5 and get the error:

/usr/bin/msgfmt: cannot locate ITS rules for org.gnome.gparted.policy.in.

Googling for this error reveals many people with similar errors in other software projects.  Most of them apparently were able to resolve their problem by installing the appstream package, but that has not helped me.

If there is a file that msgfmt can not find, please specify in the error message what file it is looking for so people might be able to find it.

Phillip Susi <psusi>

 

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

No files currently attached

 

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 psusi (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-08-08 haible StatusNeed Info Answer Provided
        Open/ClosedOpen Closed
    2023-08-07 haible CategoryEnd-user / runtime XML
        StatusNone Need Info
        Assigned toNone haible

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code