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

Submitter:  David Planella <davidplanella>
Submitted:  Mon 23 Aug 2010 05:10:05 PM UTC
   
 
Category:  Python Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  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:
http://git.savannah.gnu.org/cgit/gettext.git/commit/?h=maint&id=6543f644bf11c00a19843971e1858edb3d870442

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

Daiki Ueno <ueno>
Group administrator
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.

Thanks!

Cheers,
David.

[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:
http://lists.gnu.org/archive/html/bug-gettext/2012-04/msg00007.html

Debian BTS:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668226

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.

Thanks!

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>

 

(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 ueno (Updated the item)
  • -email is unavailable- added by mestrelion (Posted a comment)
  • -email is unavailable- added by davidplanella (Submitted the item)
  • -email is unavailable- added by davidplanella
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2016-11-27 haible CategoryNone Python
    2013-04-26 ueno StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2012-12-25 ueno StatusNone In Progress
        Assigned toNone ueno
    2010-08-23 davidplanella Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code