bugGNU gettext - Bugs: bug #35027, msguniq overwrites msgid_plural...

 
 

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

bug #35027: msguniq overwrites msgid_plural when an identical msgid string is in the file

Submitter:  Claude Paroz <claudep>
Submitted:  Sat 10 Dec 2011 04:29:04 PM UTC
Votes: 15
 
Category:  Plural forms Severity:  3 - Normal
Item Group:  None Status:  Duplicate
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Jump to the original submission

Wed 22 Dec 2021 04:14:33 PM UTC, comment #6: 

Thanks a lot, Bruno!

Claude Paroz <claudep>
Wed 22 Dec 2021 03:34:24 PM UTC, comment #5: 

The aforementioned fix is contained in gettext-0.21.

Bruno Haible <haible>
Group administrator
Mon 30 Sep 2019 11:56:16 AM UTC, comment #4: 

When this situation occurs with xgettext, xgettext now gives a warning, and the warning mentions contexts as workaround.

Bruno Haible <haible>
Group administrator
Mon 30 Sep 2019 07:58:49 AM UTC, comment #3: 

Thanks Bruno for fixing this.
Ideally, I think the gettext documentation should mention this limitation and probably suggest the hint of using contexts.

Claude Paroz <claudep>
Sun 29 Sep 2019 07:15:47 PM UTC, comment #2: 
Bruno Haible <haible>
Group administrator
Mon 10 Jun 2019 04:45:50 PM UTC, comment #1: 

Essentially the same issue as bug #56456.

Bruno Haible <haible>
Group administrator
Sat 10 Dec 2011 04:29:04 PM UTC, original submission:  

Imagine you have a pot file with:
msgid "My string"

and:
msgid "My string"
msgid_plural "%d strings"

If you run msguniq on this file, you obtain:
#, fuzzy
msgid "My string"
msgstr ""
"#-#-#-#-#  msguniq_bug.pot (PACKAGE VERSION)  #-#-#-#-#\n"
"#-#-#-#-#  msguniq_bug.pot (PACKAGE VERSION)  #-#-#-#-#\n"

And the msgid_plural expression has disappeared. I know that "My string" might not be the best choice for a singular string, but I'm sure you can find better use cases where a single msgid can match with a msgid in a msgid/msgid_plural combination.
When the strings are in the same file, xgettext does correctly keep the msgid/msgid_plural expression.

Claude Paroz <claudep>

 

(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 (Updated the item)
  • -email is unavailable- added by froddd (Voted in favor of this item)
  • -email is unavailable- added by acdha (Voted in favor of this item)
  • -email is unavailable- added by claudep (Submitted the item)
  •  

    There are 15 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
    2019-06-10 haible StatusNone Duplicate
        Assigned toNone haible
        Open/ClosedOpen Closed
    2016-11-27 haible CategoryNone Plural forms
    2015-08-25 froddd Carbon-Copy- Added froddd
    2014-08-19 acdha Carbon-Copy- Added acdha

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code