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

Submitted by:  Claude Paroz <claudep>
Submitted on:  Sat 12 Jul 2008 09:57:34 AM UTC  
 
Category: PythonSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Bruno Haible <haible>
Open/Closed: Closed

(Jump to the original submission 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>

 

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
  • -unavailable- added by haible (Posted a comment)
  • -unavailable- added by claudep (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 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 26 Nov 2016 11:59:03 PM UTChaibleCategoryNone=>Python
    Sat 16 Aug 2008 10:20:49 AM UTChaibleStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Sun 13 Jul 2008 06:27:03 PM UTChaibleAttached File-=>Added foo.php, #16117
      StatusWorks For Me=>Need Info
      Open/ClosedClosed=>Open
    Sun 13 Jul 2008 12:07:36 AM UTChaibleStatusNone=>Works For Me
      Assigned toNone=>haible
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1