yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #51275
[Bug 1583757] [NEW] multiline blocktrans in django templates should use 'trimmed' option
Public bug reported:
Django templates support 'trimmed' option [1]. remove newline characters
from the beginning and the end of the content of the {% blocktrans %}
tag, replace any whitespace at the beginning and end of a line and merge
all lines into one using a space character to separate them.
Without 'trimmed' option, 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.
#: openstack_dashboard/dashboards/admin/volumes/templates/volumes/snapshots/_update_status.html:10
msgid ""
"\n"
" The status of a volume snapshot is normally managed automatically. "
"In some circumstances\n"
" an administrator may need to explicitly update the status value. This"
" is equivalent to\n"
" the <tt>cinder snapshot-reset-state</tt> command.\n"
" "
msgstr ""
By using 'trimmed' option in Django templates, we can get rid of meaningless newlines in extracted message strings.
The recent released version of django-bebal supports 'trimmed' option [2] and now we can move the situation forward.
[1] https://docs.djangoproject.com/ja/1.9/topics/i18n/translation/#blocktrans-template-tag
[2] https://github.com/python-babel/django-babel/commit/88b389381c0e269605311ae07029555b65a86bc5
** Affects: horizon
Importance: Medium
Assignee: Akihiro Motoki (amotoki)
Status: New
** Tags: i18n
--
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/1583757
Title:
multiline blocktrans in django templates should use 'trimmed' option
Status in OpenStack Dashboard (Horizon):
New
Bug description:
Django templates support 'trimmed' option [1]. remove newline
characters from the beginning and the end of the content of the {%
blocktrans %} tag, replace any whitespace at the beginning and end of
a line and merge all lines into one using a space character to
separate them.
Without 'trimmed' option, 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.
#: openstack_dashboard/dashboards/admin/volumes/templates/volumes/snapshots/_update_status.html:10
msgid ""
"\n"
" The status of a volume snapshot is normally managed automatically. "
"In some circumstances\n"
" an administrator may need to explicitly update the status value. This"
" is equivalent to\n"
" the <tt>cinder snapshot-reset-state</tt> command.\n"
" "
msgstr ""
By using 'trimmed' option in Django templates, we can get rid of meaningless newlines in extracted message strings.
The recent released version of django-bebal supports 'trimmed' option [2] and now we can move the situation forward.
[1] https://docs.djangoproject.com/ja/1.9/topics/i18n/translation/#blocktrans-template-tag
[2] https://github.com/python-babel/django-babel/commit/88b389381c0e269605311ae07029555b65a86bc5
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1583757/+subscriptions
Follow ups