[Yahoo-eng-team] [Bug 1288049] Re: Lazy translation fails for complex formatting

2014-10-01 Thread Thierry Carrez
** Changed in: nova
   Status: Fix Committed = Fix Released

** Changed in: nova
Milestone: None = juno-rc1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1288049

Title:
  Lazy translation fails for complex formatting

Status in OpenStack Compute (Nova):
  Fix Released
Status in The Oslo library incubator:
  Fix Released

Bug description:
  When lazy translation is enabled _() returns a gettextutils.Message
  instance.   When formatting (%) is called on the instance rather than
  apply the replacement values, it gathers them so they can be applied
  when the message is lazily translated.   This support includes the use
  of keyword replacement as part of formatting (passing a dictionary).
  In order to limit the size of the dictionary, especially in the case
  where locales is passed, the dictionary of values is limited to only
  those keywords that are actually referenced in the format string.

  The code that extracts the replacement keys (and thus dictionary
  entries to keep) only handles simple formatting.  Currently it does
  not handle things like '%(key).02f', but instead omits them from the
  dictionary, which causes a KeyError when the message is translated and
  the replacements applied.

  Confirmed that regex that extracts the keywords does not handle this case: 
  
https://github.com/openstack/oslo-incubator/blob/master/openstack/common/gettextutils.py#L266

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1288049/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1288049] Re: Lazy translation fails for complex formatting

2014-04-04 Thread Thierry Carrez
** Changed in: oslo
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1288049

Title:
  Lazy translation fails for complex formatting

Status in OpenStack Compute (Nova):
  Confirmed
Status in Oslo - a Library of Common OpenStack Code:
  Fix Released

Bug description:
  When lazy translation is enabled _() returns a gettextutils.Message
  instance.   When formatting (%) is called on the instance rather than
  apply the replacement values, it gathers them so they can be applied
  when the message is lazily translated.   This support includes the use
  of keyword replacement as part of formatting (passing a dictionary).
  In order to limit the size of the dictionary, especially in the case
  where locales is passed, the dictionary of values is limited to only
  those keywords that are actually referenced in the format string.

  The code that extracts the replacement keys (and thus dictionary
  entries to keep) only handles simple formatting.  Currently it does
  not handle things like '%(key).02f', but instead omits them from the
  dictionary, which causes a KeyError when the message is translated and
  the replacements applied.

  Confirmed that regex that extracts the keywords does not handle this case: 
  
https://github.com/openstack/oslo-incubator/blob/master/openstack/common/gettextutils.py#L266

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1288049/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1288049] Re: Lazy translation fails for complex formatting

2014-03-04 Thread James Carey
** Also affects: nova
   Importance: Undecided
   Status: New

** Changed in: oslo
 Assignee: (unassigned) = James Carey (jecarey)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1288049

Title:
  Lazy translation fails for complex formatting

Status in OpenStack Compute (Nova):
  New
Status in Oslo - a Library of Common OpenStack Code:
  New

Bug description:
  When lazy translation is enabled _() returns a gettextutils.Message
  instance.   When formatting (%) is called on the instance rather than
  apply the replacement values, it gathers them so they can be applied
  when the message is lazily translated.   This support includes the use
  of keyword replacement as part of formatting (passing a dictionary).
  In order to limit the size of the dictionary, especially in the case
  where locales is passed, the dictionary of values is limited to only
  those keywords that are actually referenced in the format string.

  The code that extracts the replacement keys (and thus dictionary
  entries to keep) only handles simple formatting.  Currently it does
  not handle things like '%(key).02f', but instead omits them from the
  dictionary, which causes a KeyError when the message is translated and
  the replacements applied.

  Confirmed that regex that extracts the keywords does not handle this case: 
  
https://github.com/openstack/oslo-incubator/blob/master/openstack/common/gettextutils.py#L266

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1288049/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp