← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1178722] Re: Lazy translation not used in LB panel (and elsewhere)

 

** 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/1178722

Title:
  Lazy translation not used in LB panel (and elsewhere)

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  There are a number of places where we don't use lazily translated
  objects. It's particularly noticeable for the load balancer panel.

  horizon/exceptions.py:28:from django.utils.translation import ugettext as _
  horizon/templatetags/sizeformat.py:45:        return translation.ungettext("%(size)d byte",
  horizon/templatetags/sizeformat.py:49:        return translation.ungettext("%(size)d",
  horizon/templatetags/sizeformat.py:52:        return translation.ugettext("%s KB") % \
  horizon/templatetags/sizeformat.py:55:        return translation.ugettext("%s MB") % \
  horizon/templatetags/sizeformat.py:58:        return translation.ugettext("%s GB") % \
  horizon/templatetags/sizeformat.py:61:        return translation.ugettext("%s TB") % \
  horizon/templatetags/sizeformat.py:63:    return translation.ugettext("%s PB") % \
  horizon/templatetags/horizon.py:21:from django.utils.translation import ugettext as _
  horizon/templatetags/branding.py:27:from django.utils.translation import ugettext as _
  horizon/conf/default.py:2:from django.utils.translation import ugettext as _
  horizon/utils/fields.py:5:from django.utils.translation import ugettext as _
  horizon/base.py:39:from django.utils.translation import ugettext as _
  horizon/decorators.py:27:from django.utils.translation import ugettext as _
  horizon/workflows/base.py:27:from django.utils.translation import ugettext as _
  openstack_dashboard/usage/base.py:7:from django.utils.translation import ugettext as _
  openstack_dashboard/api/cinder.py:28:from django.utils.translation import ugettext as _
  openstack_dashboard/api/nova.py:28:from django.utils.translation import ugettext as _
  openstack_dashboard/dashboards/settings/user/forms.py:73:        messages.success(request, translation.ugettext("Settings saved."))
  openstack_dashboard/dashboards/project/instances/workflows/update_instance.py:22:from django.utils.translation import ugettext as _
  openstack_dashboard/dashboards/project/loadbalancers/tabs.py:19:from django.utils.translation import ugettext as _
  openstack_dashboard/dashboards/project/loadbalancers/views.py:21:from django.utils.translation import ugettext as _
  openstack_dashboard/dashboards/project/loadbalancers/workflows.py:20:from django.utils.translation import ugettext as _
  openstack_dashboard/dashboards/project/loadbalancers/tables.py:21:from django.utils.translation import ugettext as _
  openstack_dashboard/dashboards/project/access_and_security/api_access/tables.py:17:from django.utils.translation import ugettext as _
  openstack_dashboard/dashboards/admin/overview/views.py:22:from django.utils.translation import ugettext as _

  These should use the _lazy version.
  https://docs.djangoproject.com/en/1.4/ref/utils/#module-
  django.utils.translation

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