Parameterize g.domain in DomainSR title.

The domain is not "reddit.com" on other sites. This also fixes the issue
of doing concatenation of internationalized strings which is a bad idea.
Fixes reddit/reddit#968.
This commit is contained in:
Keith Mitchell
2014-02-12 18:07:11 -08:00
committed by Neil Williams
parent bfe526d13c
commit fc33bd301b

View File

@@ -1605,7 +1605,8 @@ class DomainSR(FakeSubreddit):
FakeSubreddit.__init__(self)
self.domain = domain
self.name = domain
self.title = domain + ' ' + _('on reddit.com')
self.title = _("%(domain)s on %(reddit.com)s") % {
"domain": domain, "reddit.com": g.domain}
idn = domain.decode('idna')
if idn != domain:
self.idn = idn