← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1351478] Re: cleanup translation in a file - replacing with underscore

 

** Changed in: horizon
       Status: Fix Committed => Fix Released

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

Title:
  cleanup translation in a file - replacing with underscore

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  As suggested by:
  https://review.openstack.org/#/c/107755/1/horizon/templatetags/sizeformat.py

  This file
  https://github.com/openstack/horizon/blob/master/horizon/templatetags/sizeformat.py
  should cleanup some of the translation stuff.

  from django.utils import translation
  ...
  return translation.ungettext_lazy("%(size)d Byte",
                  "%(size)d Bytes", 0) % {'size': 0}

  should be replaced with:

  from django.utils.translation import ugettext_lazy as _
  ...
  return _("%(size)d Byte", "%(size)d Bytes", 0) % {'size': 0}

  replace instances with _.

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


References