From 582971755add76260d7a5153ab27d71d01c56895 Mon Sep 17 00:00:00 2001 From: louyihua Date: Tue, 1 Apr 2014 02:23:02 +0800 Subject: [PATCH] Translation fix in studio: For better translation As the sentence in unit.html is splitted into three parts due to the varible release_date may be None, it breaks the integrity of a sentence. Different language may have different word or event grammer order, so if a sentence is breaked into three parts, translators cannot adjust the word orders to create a good translation. So this fix tries to combine the sentence together. --- cms/templates/unit.html | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/cms/templates/unit.html b/cms/templates/unit.html index 3c8812510c..703c9bb4bf 100644 --- a/cms/templates/unit.html +++ b/cms/templates/unit.html @@ -165,15 +165,21 @@ require(["domReady!", "jquery", "js/models/module_info", "coffee/src/views/unit"

${_('This is a draft of the published unit. To update the live version, you must {link_start}replace it with this draft{link_end}.').format(link_start='', link_end='')}

-

${_("This unit is scheduled to be released to students")} - % if release_date is not None: - ${_(u"on {date}").format(date=u"{}".format(release_date))} - % endif - ${_("with the subsection {link_start}{name}{link_end}").format( - name=subsection.display_name_with_default, - link_start=u''.format(url=subsection_url), - link_end='', - )} +

+ % if release_date is not None: + ${_("This unit is scheduled to be released to students on {date} with the subsection {link_start}{name}{link_end}").format( + date=release_date, + name=subsection.display_name_with_default, + link_start=u''.format(url=subsection_url), + link_end=u'', + )} + % else: + ${_("This unit is scheduled to be released to students with the subsection {link_start}{name}{link_end}").format( + name=subsection.display_name_with_default, + link_start=u''.format(url=subsection_url), + link_end=u'', + )} + % endif