blocktrans in django templates should use 'trimmed' option

Bug #1655249 reported by qiaomin032
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
trove-dashboard
Fix Released
Undecided
qiaomin032

Bug Description

Django templates support 'trimmed' option. it can 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 whitespace as blew:
msgid ""
"Allow the user to connect from this host\n"
" only. If not provided this user will be allowed to connect from "
"anywhere.\n"
" "
msgstr ""
"只允许这一用户从这一主机进行连接。\n"
"如果不提供这一信息,这一用户将被允许从任何位置进行连接。\n"
" "
There has redundant whitespace

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove-dashboard (master)

Fix proposed to branch: master
Review: https://review.openstack.org/418230

Changed in trove-dashboard:
assignee: nobody → qiaomin032 (chen-qiaomin)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove-dashboard (master)

Reviewed: https://review.openstack.org/418230
Committed: https://git.openstack.org/cgit/openstack/trove-dashboard/commit/?id=6657919d872d47dfa26e7b56142b676fb34dac96
Submitter: Jenkins
Branch: master

commit 6657919d872d47dfa26e7b56142b676fb34dac96
Author: qiaomin <chen.qiaomin@99cloud.net>
Date: Tue Jan 10 15:30:41 2017 +0800

    Use 'trimmed' for blocktrans in html page

    Add trimmed option to blocktrans, blocktrans trimmed
    option removes newlines from contents of blocktrans
    and replaces any whitespace at the beginning and end of a line into
    a single space. This makes translator life easier.
    More detail is described in the bug report.

    Change-Id: I835167eeec4f8596cec9c906548b3fa557ed1374
    Closes-Bug: #1655249

Changed in trove-dashboard:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/trove-dashboard 8.0.0.0b3

This issue was fixed in the openstack/trove-dashboard 8.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.