diff --git a/src/adhocracy/lib/helpers/__init__.py b/src/adhocracy/lib/helpers/__init__.py index aa0fdd50c..0e101c965 100644 --- a/src/adhocracy/lib/helpers/__init__.py +++ b/src/adhocracy/lib/helpers/__init__.py @@ -179,16 +179,19 @@ def add_rss(title, link): type='application/rss+xml') -def help_link(text, page, anchor=None): +def help_url(page, anchor=None): if adhocracy_service.instance_staticpages_api_address(): url = base_url('/static/%s.%s') else: url = base_url('/static/%s.%s', None) if anchor is not None: url += "#" + anchor - full_url = url % (page, 'html') - return (u"%s") % (page, full_url, text) + return url % (page, 'html') + + +def help_link(text, page, anchor=None): + url = help_url(page, anchor=anchor) + return (u"%s") % (page, url, text) def get_redirect_url(target=u'login', entity=None, **kwargs): diff --git a/src/adhocracy/templates/error/http.html b/src/adhocracy/templates/error/http.html index 3a96f37ed..f8084d5c7 100644 --- a/src/adhocracy/templates/error/http.html +++ b/src/adhocracy/templates/error/http.html @@ -17,6 +17,7 @@

${_("Error %s") % c.error_code}

%endif %if not c.hide_notify: -

${_("If this error continues to occur, please notify the developers with a description of what you were trying to do.")|n} ${_("An automated email message describing the situation has been sent to our developers.")}

+

${_("If this error continues to occur, please %snotify the developers%s with a description of what you were trying to do.") % tuple(h.help_link('&&', 'imprint').split('&&'))|n} +${_("An automated email message describing the situation has been sent to our developers.")}

%endif diff --git a/src/adhocracy/templates/navigation.html b/src/adhocracy/templates/navigation.html index 68446e167..695fbd272 100644 --- a/src/adhocracy/templates/navigation.html +++ b/src/adhocracy/templates/navigation.html @@ -54,14 +54,14 @@ ${h.staticpage.render_external_navigation(active) | n} %else: - ${nav_link(href=h.base_url('/static/about.html', None), + ${nav_link(href=h.help_url('about'), text=_('About'), a_class='staticlink_about', li_class=_class('about'), id_="nav_about")} - ${nav_link(href=h.base_url('/static/help.html', None), + ${nav_link(href=h.help_url('help'), text=_("Help"), a_class='staticlink_help', li_class=_class('help'), diff --git a/src/adhocracy/templates/user/register_form.html b/src/adhocracy/templates/user/register_form.html index b9932dc67..4344a5a19 100644 --- a/src/adhocracy/templates/user/register_form.html +++ b/src/adhocracy/templates/user/register_form.html @@ -44,7 +44,7 @@

%if c.agree_text is None: - ${_("By registering, you agree with the %s.") % ("%s" % _("Terms and Conditions")) |n} + ${_("By registering, you agree with the %s.") % h.help_link(_("Terms and Conditions"), 'terms') |n} ${_(u"We'll occasionally inform you about important events such as the start of a new participation process via email.")} %else: ${c.agree_text|n}