bugGNU gettext - Bugs: bug #64311, Issue with wbindtextdomain

 
 

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

bug #64311: Issue with wbindtextdomain

Submitter:  Luca Bacci <lb90>
Submitted:  Fri 16 Jun 2023 12:34:27 PM UTC
   
 
Category:  End-user / runtime Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Sat 17 Jun 2023 02:04:56 PM UTC, comment #4: 

Awesome, many thanks!

Luca

Luca Bacci <lb90>
Sat 17 Jun 2023 01:53:26 PM UTC, comment #3: 

The fix is contained in gettext 0.22. I delayed the release by one day, in order to be able to include the fix.

Bruno Haible <haible>
Group administrator
Sat 17 Jun 2023 11:19:40 AM UTC, comment #2: 

Thanks for the report. Fixed through
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=40df836f7474dec73a1cd89e80977692d7f42dcb

Your patch is correct, but I took a different one for maintainability. It took me an hour to understand what effects the change has:
1. When comparing an element with filename != NULL with an abs_wfilename != NULL, or vice versa when comparing an element with wfilename != NULL with an abs_filename != NULL, compare was being set to 0. The correction is not continue the loop.
2. The list was not being kept sorted. This had only a small performance impact.

Bruno Haible <haible>
Group administrator
Sat 17 Jun 2023 08:56:12 AM UTC, comment #1: 

Thanks for the report. I can reproduce it with a program that
1) calls bindtextdomain with an absolute(!) directory name,
2) calls wbindtextdomain,
3) fetches translations for each of the two.

Bruno Haible <haible>
Group administrator
Fri 16 Jun 2023 12:34:27 PM UTC, original submission:  

Hello!

In GIMP3 we've recently switched to using wbindtextdomain() on Windows. However, with that change libtintl is not returning translated strings - the UI is always in english: https://gitlab.gnome.org/GNOME/gimp/-/issues/9271

After debugging a bit I came up with a simple patch that solves the issue.

Thanks you very much!
Luca

Luca Bacci <lb90>

 

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

Attached Files
file #54844:  wbindtextdomain-fix.diff added by lb90 (732B - application/octet-stream)

 

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 lb90 (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-06-17 haible StatusFixed Fix Released
    2023-06-17 haible Open/ClosedOpen Closed
    2023-06-17 haible StatusConfirmed Fixed
    2023-06-17 haible StatusNone Confirmed
        Assigned toNone haible
    2023-06-16 lb90 Attached File- Added wbindtextdomain-fix.diff, #54844

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code