Add other top bar subs

This commit is contained in:
Keith Mitchell
2013-03-22 10:07:59 -07:00
parent cbf80458d2
commit c35a551066

View File

@@ -329,13 +329,17 @@ class OffsiteButton(NavButton):
return [('path', self.path), ('title', self.title)]
class SubredditButton(NavButton):
from r2.models.subreddit import Frontpage, Mod
from r2.models.subreddit import Frontpage, Mod, All, Random, RandomSubscription
# Translation is deferred (N_); must be done per-request,
# not at import/class definition time.
# TRANSLATORS: This refers to /r/mod
name_overrides = {Mod: N_("mod"),
# TRANSLATORS: This refers to the user's front page
Frontpage: N_("front")}
Frontpage: N_("front"),
All: N_("all"),
Random: N_("random"),
# TRANSLATORS: Gold feature, "myrandom", a random subreddit from your subscriptions
RandomSubscription: N_("myrandom")}
def __init__(self, sr, **kw):
self.path = sr.path