bugGNU gettext - Bugs: bug #30854, Support for the new style Python...


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

bug #30854: Support for the new style Python format strings

Submitted by:  David Planella <davidplanella>
Submitted on:  Mon 23 Aug 2010 05:10:05 PM UTC  
Category: PythonSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Daiki Ueno <ueno>
Open/Closed: Closed

Fri 26 Apr 2013 05:19:59 PM UTC, comment #5:

That's amazing news! Thank you VERY much Daiki! Python's brace syntax is quite complex, so I'm sure implementing it in gettext was no easy task.

As for postponing the Template syntax, no problem I guess. It is less used than the .format (brace) syntax.

The brace was by far the most important one, since it's the default in Python 3 and encouraged in Python 2.

Rodrigo Silva <mestrelion>
Fri 26 Apr 2013 10:09:51 AM UTC, comment #4:

The PEP 3101 format strings are now supported:

However, I'd like to postpone PEP 0292 (Template class) style format strings.

Daiki Ueno <ueno>
Project AdministratorIn charge of this item.
Tue 10 Apr 2012 07:26:52 AM UTC, comment #3:

Hi Rodrigo,

> David, was this forwarded to the bug mailing list or any downstream distro? It's been 18 months now, so I think it's time to friendly ping them ;)

There is a downstream bug in Ubuntu for this issue [1], which is actually what prompted me filing this bug here in Savannah.

I haven't sent an e-mail to the bugs list, as I thought the bug tracker would be the place for bugs. But after nearly 2 years of the original report and not even a reply to acknowledge or triage the bug, it does not seem the case.

I currently don't have time to follow up on the bug, so if you are interested in contributing to a fix or to forward it to a bugs list or to other distros, please feel free to do so.



[1] https://bugs.launchpad.net/ubuntu/+source/computer-janitor/+bug/622720

David Planella <davidplanella>
Mon 09 Apr 2012 10:14:20 PM UTC, comment #2:

Totally agree with this request, as I also badly need xgettext to support the new formats. Specially since "{foo}".format() is now the standard in Python 3, and Python 2 users are encouraged to use this instead of the old % operand.

David, was this forwarded to the bug mailing list or any downstream distro? It's been 18 months now, so I think it's time to friendly ping them ;)

Mailing list bug-gettext@gnu.org:

Debian BTS:

Rodrigo Silva <mestrelion>
Mon 31 Jan 2011 10:48:50 AM UTC, comment #1:

It's been several months since this bug was opened.

Here is a friendly ping to see if someone would have the the time to look at it and add a comment.


David Planella <davidplanella>
Mon 23 Aug 2010 05:10:05 PM UTC, original submission:

Currently the gettext tools support only the old Python string format for substitutions, that is, %s or %(variable)s type strings.

Python standards PEP 0292 [1] and PEP [2] recommend the use of $foo and {foo} strings. More and more Python applications migrate to this new syntax, and it would make sense for the gettext tools to support it.

The ones I can think, off the top of my head:

  • xgettext to extract {foo} and $foo strings from Python files and mark them as python-format in the .pot templates
  • msgmerge -c to validate those

[1] http://www.python.org/dev/peps/pep-0292/
[2] http://www.python.org/dev/peps/pep-3101/

David Planella <davidplanella>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by haible (Updated the item)
  • -unavailable- added by ueno (Updated the item)
  • -unavailable- added by mestrelion (Posted a comment)
  • -unavailable- added by davidplanella (Submitted the item)
  • -unavailable- added by davidplanella

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

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 01:04:15 AM UTChaibleCategoryNone=>Python
    Fri 26 Apr 2013 10:09:51 AM UTCuenoStatusIn Progress=>Fixed
    Tue 25 Dec 2012 07:59:31 AM UTCuenoStatusNone=>In Progress
      Assigned toNone=>ueno
    Mon 23 Aug 2010 05:10:05 PM UTCdavidplanellaCarbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1