Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Convert a few more templates to use _wsf()
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanMilne committed Aug 26, 2015
1 parent e527934 commit 85baaf5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions r2/r2/templates/base.htmllite
Expand Up @@ -24,7 +24,7 @@

<%!
from pylons.i18n import _
from r2.lib.template_helpers import get_domain, style_line, format_html, _ws
from r2.lib.template_helpers import get_domain, style_line, format_html, _wsf
from r2.models.subreddit import FakeSubreddit, DefaultSR
%>

Expand Down Expand Up @@ -86,5 +86,5 @@
</div>

<%def name="titlebar(site)">
${unsafe(_ws("links from %(site)s").replace(" ", "&#32;") % dict(site=site))}
${_wsf("links from %(site)s", site=site)}
</%def>
4 changes: 2 additions & 2 deletions r2/r2/templates/linkinfopage.htmllite
Expand Up @@ -21,13 +21,13 @@
###############################################################################

<%!
from r2.lib.template_helpers import _ws
from r2.lib.template_helpers import _wsf
%>
<%inherit file="base.htmllite"/>

${thing._content}

<%def name="titlebar(site)">
${unsafe(_ws("comments from %(site)s").replace(" ", "&#32;") % dict(site=site))}
${_wsf("comments from %(site)s", site=site)}
</%def>

2 changes: 1 addition & 1 deletion r2/r2/templates/multiinfobar.html
Expand Up @@ -132,7 +132,7 @@ <h3>${_wsf('%(count)s subreddits in this multi:', count=sr_count)}</h3>

<div class="bottom">
%if thing.multi.owner:
${unsafe(_ws("created by %(user)s").replace(" ", "&#32;") % dict(user = unsafe(WrappedUser(thing.multi.owner).render())))}
${_wsf("created by %(user)s", user=WrappedUser(thing.multi.owner))}
%endif

<span class="age">
Expand Down
4 changes: 2 additions & 2 deletions r2/r2/templates/subredditinfobar.html
Expand Up @@ -25,7 +25,7 @@
from r2.lib.filters import websafe
from r2.lib.strings import strings, Score
from r2.lib.pages import WrappedUser, QuarantineOptoutButton, SubscribeButton
from r2.lib.template_helpers import _ws
from r2.lib.template_helpers import _ws, _wsf
from r2.models.listing import ModListing
%>

Expand Down Expand Up @@ -105,7 +105,7 @@ <h1 class="hover redditname">

<div class="bottom">
%if thing.sr.author:
${unsafe(_ws("created by %(user)s").replace(" ", "&#32;") % dict(user = unsafe(thing.creator_text)))}
${_wsf("created by %(user)s", user=unsafe(thing.creator_text))}
%endif

<span class="age">
Expand Down
4 changes: 2 additions & 2 deletions r2/r2/templates/wikiview.html
Expand Up @@ -25,7 +25,7 @@
<%!
from r2.lib.pages import WrappedUser
from r2.lib.filters import SC_OFF, SC_ON
from r2.lib.template_helpers import _ws
from r2.lib.template_helpers import _wsf
%>

%if thing.diff:
Expand All @@ -47,7 +47,7 @@
<em>
%if thing.edit_date:
%if thing.edit_by:
${unsafe(_ws("revision by %(user)s").replace(" ", "&#32;") % dict(user=WrappedUser(thing.edit_by).render()))}
${_wsf("revision by %(user)s", user=WrappedUser(thing.edit_by))}
&mdash;&nbsp;
%endif
${timestamp(thing.edit_date, include_tense=True)}
Expand Down

0 comments on commit 85baaf5

Please sign in to comment.