bugGNU gettext - Bugs: bug #23824, xgettext should not extract Python...

 
 

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

bug #23824: xgettext should not extract Python dict keys

Submitter:  Claude Paroz <claudep>
Submitted:  Sat 12 Jul 2008 09:57:34 AM UTC
   
 
Category:  Python Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Jump to the original submission

Sat 16 Aug 2008 11:28:34 AM UTC, comment #7: 

Thanks Bruno. I also take advantage of this to thank you for the great work you've done for gettext and i18n. You rock!

Claude Paroz <claudep>
Sat 16 Aug 2008 10:20:49 AM UTC, comment #6: 

Confirmed. I was stupid to confuse Python with PHP.

Fixed in gettext CVS as of 2008-08-16. The fix will be contained in
gettext-0.18.

Thank you for your persistence despite my blunder.

Bruno Haible <haible>
Group administrator
Mon 11 Aug 2008 11:34:50 AM UTC, comment #5: 

Bruno, can you confirm the bug regarding to my last comment?

Claude Paroz <claudep>
Sun 13 Jul 2008 06:51:32 PM UTC, comment #4: 

Just rename your foo.php to foo.py, and you'll see the POT file will contain more msgid's. So this bug seems to depend on the language-specific parsing.

Claude Paroz <claudep>
Sun 13 Jul 2008 06:27:03 PM UTC, comment #3: 

I attached my input file.
Command line: xgettext -o - foo.php
Result: A POT file with only "foobar" as msgid.

Now it's your turn. Please attach your input file and show your
xgettext command line.


(file #16117)

Bruno Haible <haible>
Group administrator
Sun 13 Jul 2008 06:08:53 PM UTC, comment #2: 

We are using xgettext 0.17 in the GNOME Translation Project and the problem is still there.

Could you double-check that this behaviour has been really corrected?

Claude Paroz <claudep>
Sun 13 Jul 2008 12:07:36 AM UTC, comment #1: 

The problem you report exiets in xgettext version 0.16.1 or older.
It is fixed in version 0.17. (See the gettext-tools/src/ChangeLog
entry from 2007-03-17.)

Thank you for the report - it's just that someone else reported
it before you did, and thus it got fixed.

Bruno Haible <haible>
Group administrator
Sat 12 Jul 2008 09:57:34 AM UTC, original submission:  

In the following code (deskbar-applet), xgettext extracts the "name" and "default" dict keys in messages.po:
        try:
            self.__name = gettext.gettext(CATEGORIES[id]["name"])
            self.__id = id
        except:
            self.__name = gettext.gettext(CATEGORIES["default"]["name"])
            self.__id = "default"

I suppose it could checked that the first char of the gettext call parameter (after being trimmed) is a quote (simple or double) unless it should not try to extract a string.

Claude Paroz <claudep>

 

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

Attached Files
file #16117:  foo.php added by haible (270B - application/x-httpd-php)

 

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 claudep (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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2016-11-26 haible CategoryNone Python
    2008-08-16 haible StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2008-07-13 haible Attached File- Added foo.php, #16117
        StatusWorks For Me Need Info
        Open/ClosedClosed Open
    2008-07-13 haible StatusNone Works For Me
        Assigned toNone haible
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code