yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #53580
[Bug 1592965] Re: i18n: babel_extract_angular should trim whitespaces in AngularJS templates
Reviewed: https://review.openstack.org/330183
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=f87b58fcabf84c9b73b07b587416cc0b6cc814b1
Submitter: Jenkins
Branch: master
commit f87b58fcabf84c9b73b07b587416cc0b6cc814b1
Author: Akihiro Motoki <amotoki@xxxxxxxxx>
Date: Thu Jun 16 05:06:32 2016 +0900
i18n: trim whitespaces in extracted messages from AngularJS templates
When extracting translation messages from AngularJS templates,
there is no need to keep whitespaces in the messages as there is
no meaning of repeated whitespaces in HTML.
This will make translation effort much simpler.
More detail is described in the bug report.
This commit trims such whitespaces. Django provides a convenient method
to do the same purpose for 'trimmed' option in Django templates.
This method is reused in this commit as well.
Closes-Bug: #1592965
Change-Id: I9b7ce54452f3db2350eecc3115db2e4173df5167
** Changed in: horizon
Status: In Progress => 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/1592965
Title:
i18n: babel_extract_angular should trim whitespaces in AngularJS
templates
Status in OpenStack Dashboard (Horizon):
Fix Released
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