From b29f09ac038d915791359635c2d8a10de7a59c00 Mon Sep 17 00:00:00 2001 From: Keith Mitchell Date: Fri, 7 Sep 2012 11:17:51 -0700 Subject: [PATCH] Remove unused i18n email code --- r2/r2/controllers/api.py | 4 +--- r2/r2/lib/emailer.py | 5 ----- r2/r2/models/mail_queue.py | 2 -- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/r2/r2/controllers/api.py b/r2/r2/controllers/api.py index eb2f7c4fc..863b19610 100755 --- a/r2/r2/controllers/api.py +++ b/r2/r2/controllers/api.py @@ -145,7 +145,7 @@ class ApiController(RedditController, OAuth2ResourceController): @validatedForm(VCaptcha(), name=VRequired('name', errors.NO_NAME), email=ValidEmails('email', num = 1), - reason = VOneOf('reason', ('ad_inq', 'feedback', "i18n")), + reason = VOneOf('reason', ('ad_inq', 'feedback')), message=VRequired('text', errors.NO_TEXT), ) def POST_feedback(self, form, jquery, name, email, reason, message): @@ -156,8 +156,6 @@ class ApiController(RedditController, OAuth2ResourceController): if reason == 'ad_inq': emailer.ad_inq_email(email, message, name, reply_to = '') - elif reason == 'i18n': - emailer.i18n_email(email, message, name, reply_to = '') else: emailer.feedback_email(email, message, name, reply_to = '') form.set_html(".status", _("thanks for your message! " diff --git a/r2/r2/lib/emailer.py b/r2/r2/lib/emailer.py index 663427e25..6cb39c6ed 100644 --- a/r2/r2/lib/emailer.py +++ b/r2/r2/lib/emailer.py @@ -115,11 +115,6 @@ def ad_inq_email(email, body, name='', reply_to = ''): return _feedback_email(email, body, Email.Kind.ADVERTISE, name = name, reply_to = reply_to) -def i18n_email(email, body, name='', reply_to = ''): - """Queues a ad_inq email to the feedback account.""" - return _feedback_email(email, body, Email.Kind.HELP_TRANSLATE, name = name, - reply_to = reply_to) - def gold_email(body, to_address, from_name=g.domain): return _gold_email(body, to_address, from_name, Email.Kind.GOLDMAIL) diff --git a/r2/r2/models/mail_queue.py b/r2/r2/models/mail_queue.py index 91c3cc01f..a22b8284d 100644 --- a/r2/r2/models/mail_queue.py +++ b/r2/r2/models/mail_queue.py @@ -301,7 +301,6 @@ class Email(object): "LIVE_PROMO", "FINISHED_PROMO", "NEW_PROMO", - "HELP_TRANSLATE", "NERDMAIL", "GOLDMAIL", ) @@ -321,7 +320,6 @@ class Email(object): Kind.LIVE_PROMO : _("[reddit] your promotion is now live"), Kind.FINISHED_PROMO : _("[reddit] your promotion has finished"), Kind.NEW_PROMO : _("[reddit] your promotion has been created"), - Kind.HELP_TRANSLATE : _("[i18n] translation offer from '%(user)s'"), Kind.NERDMAIL : _("[reddit] hey, nerd!"), Kind.GOLDMAIL : _("[reddit] reddit gold activation link") }