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

 
 

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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Daiki Ueno <ueno>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

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.)

Attach File(s):
   
   
Comment:
   

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

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 26 Apr 2013 10:09:51 AM UTCuenoStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    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-cleanup