← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1592965] Re: i18n: babel_extract_angular should trim whitespaces in AngularJS templates

 

Original patch reverted in https://review.openstack.org/#/c/349758/

Reopened bug and reset status.

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

** Changed in: horizon
    Milestone: newton-2 => newton-3

-- 
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/1592965

Title:
  i18n: babel_extract_angular should trim whitespaces in AngularJS
  templates

Status in OpenStack Dashboard (Horizon):
  Confirmed

Bug description:
  This is "AngularJS templates" version of bug 1583757.

  At now, translators will get source strings with meaningless newlines
  and whitespaces like below. Zanata (translation check site) checks the
  number of newlines, so translators need to insert newlines to silent
  Zanata validations. It is really annoying and meaningless.

  For Django templates, Django provides 'trimmed' option to trim
  whitespaces in extracted messages. It would be nice if we have the
  similar behavior to Django 'trimmed' option for AngularJS template
  message extraction. In HTML case, we don't need to care consecutive
  whitespaces, so we can simply trim whitespaces in AngularJS HTML
  templates.

  #: openstack_dashboard/dashboards/project/static/dashboard/project/containers/create-container-modal.html:40
  msgid ""
  "A container is a storage compartment for your data and provides a way\n"
  "          for you to organize your data. You can think of a container as "
  "a\n"
  "          folder in Windows® or a directory in UNIX®. The primary "
  "difference\n"
  "          between a container and these other file system concepts is "
  "that\n"
  "          containers cannot be nested. You can, however, create an "
  "unlimited\n"
  "          number of containers within your account. Data must be stored "
  "in a\n"
  "          container so you must have at least one container defined in "
  "your\n"
  "          account prior to uploading data."
  msgstr ""

  We would like to have a string like:

  #: openstack_dashboard/dashboards/project/static/dashboard/project/containers/create-container-modal.html:40
  msgid ""
  "A container is a storage compartment for your data and provides a way for"
  " you to organize your data. You can think of a container as a folder in "
  "Windows® or a directory in UNIX®. The primary difference between a "
  "container and these other file system concepts is that containers cannot "
  "be nested. You can, however, create an unlimited number of containers "
  "within your account. Data must be stored in a container so you must have "
  "at least one container defined in your account prior to uploading data."
  msgstr ""

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


References