From fc33bd301bfb6e8c9be69a499f54cca6ffe7cb9f Mon Sep 17 00:00:00 2001 From: Keith Mitchell Date: Wed, 12 Feb 2014 18:07:11 -0800 Subject: [PATCH] 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. --- r2/r2/models/subreddit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r2/r2/models/subreddit.py b/r2/r2/models/subreddit.py index d2d6325cf..661b46dd7 100644 --- a/r2/r2/models/subreddit.py +++ b/r2/r2/models/subreddit.py @@ -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