Skip to content
This repository
  • 2 commits
  • 2 files changed
  • 0 comments
  • 1 contributor

Showing 2 changed files with 20 additions and 20 deletions. Show diff stats Hide diff stats

  1. +19 19 r2/r2/lib/pages/pages.py
  2. +1 1  r2/r2/lib/strings.py
38 r2/r2/lib/pages/pages.py
@@ -309,6 +309,25 @@ def rightbox(self):
309 309 if c.user.pref_show_sponsorships or not c.user.gold:
310 310 ps.append(SponsorshipBox())
311 311
  312 + user_banned = c.user_is_loggedin and c.site.is_banned(c.user)
  313 + if self.submit_box and (c.user_is_loggedin or not g.read_only_mode) and not user_banned:
  314 + kwargs = {
  315 + "title": _("Submit a post"),
  316 + "css_class": "submit",
  317 + "show_cover": True
  318 + }
  319 + if not c.user_is_loggedin or c.site.can_submit(c.user) or isinstance(c.site, FakeSubreddit):
  320 + kwargs["link"] = "/submit"
  321 + kwargs["sr_path"] = isinstance(c.site, DefaultSR) or not isinstance(c.site, FakeSubreddit),
  322 + kwargs["subtitles"] = [strings.submit_box_text]
  323 + else:
  324 + kwargs["disabled"] = True
  325 + if c.site.type == "archived":
  326 + kwargs["subtitles"] = [strings.submit_box_archived_text]
  327 + else:
  328 + kwargs["subtitles"] = [strings.submit_box_restricted_text]
  329 + ps.append(SideBox(**kwargs))
  330 +
312 331 no_ads_yet = True
313 332 show_adbox = (c.user.pref_show_adbox or not c.user.gold) and not g.disable_ads
314 333 if isinstance(c.site, (MultiReddit, ModSR)) and c.user_is_loggedin:
@@ -342,25 +361,6 @@ def rightbox(self):
342 361 elif self.show_wiki_actions:
343 362 ps.append(self.wiki_actions_menu())
344 363
345   - user_banned = c.user_is_loggedin and c.site.is_banned(c.user)
346   - if self.submit_box and (c.user_is_loggedin or not g.read_only_mode) and not user_banned:
347   - kwargs = {
348   - "title": _("Submit a link"),
349   - "css_class": "submit",
350   - "show_cover": True
351   - }
352   - if not c.user_is_loggedin or c.site.can_submit(c.user) or isinstance(c.site, FakeSubreddit):
353   - kwargs["link"] = "/submit"
354   - kwargs["sr_path"] = isinstance(c.site, DefaultSR) or not isinstance(c.site, FakeSubreddit),
355   - kwargs["subtitles"] = [strings.submit_box_text]
356   - else:
357   - kwargs["disabled"] = True
358   - if c.site.type == "archived":
359   - kwargs["subtitles"] = [strings.submit_box_archived_text]
360   - else:
361   - kwargs["subtitles"] = [strings.submit_box_restricted_text]
362   - ps.append(SideBox(**kwargs))
363   -
364 364 if self.create_reddit_box and c.user_is_loggedin:
365 365 delta = datetime.datetime.now(g.tz) - c.user._date
366 366 if delta.days >= g.min_membership_create_community:
2  r2/r2/lib/strings.py
@@ -110,7 +110,7 @@
110 110 invalid_property_list = _('invalid CSS property list "%(proplist)s"'),
111 111 unknown_rule_type = _('unknown CSS rule type "%(ruletype)s"')
112 112 ),
113   - submit_box_text = _('to anything interesting: news article, blog entry, video, picture...'),
  113 + submit_box_text = _('for anything interesting: news, article, blog entry, video, picture, story, question...'),
114 114 submit_box_restricted_text = _('submission in this subreddit is restricted to approved submitters.'),
115 115 submit_box_archived_text = _('this subreddit is archived and no longer accepting submissions.'),
116 116 permalink_title = _("%(author)s comments on %(title)s"),

No commit comments for this range

Something went wrong with that request. Please try again.