launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05067
[Merge] lp:~mbp/launchpad/855150-no-potemplate-mail into lp:launchpad
Martin Pool has proposed merging lp:~mbp/launchpad/855150-no-potemplate-mail into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #855150 in Launchpad itself: "excessive translation import template mails (also poor phrasing)"
https://bugs.launchpad.net/launchpad/+bug/855150
For more details, see:
https://code.launchpad.net/~mbp/launchpad/855150-no-potemplate-mail/+merge/76878
This just stops sending "you uploaded a translation template for bzr in Bazaar trunk in Launchpad" mails when potemplates are imported. At the moment they are sent to a large group of people, most of whom likely see this as spam (in the case I looked at.)
I don't know if there are other people who do like getting these mails or count on getting them to know things are working properly. I doubt they are very useful because there's so little content. Possibly we want some in-web view of when templates were imported (if it's not already obvious) or some way for people to opt-in to get mail about it, but in the absence of that this still seems like a step forward.
danilos said he thought this was a reasonable step.
No tests fail in the subset I ran.
--
https://code.launchpad.net/~mbp/launchpad/855150-no-potemplate-mail/+merge/76878
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~mbp/launchpad/855150-no-potemplate-mail into lp:launchpad.
=== modified file 'lib/lp/translations/model/potemplate.py'
--- lib/lp/translations/model/potemplate.py 2011-09-15 11:35:28 +0000
+++ lib/lp/translations/model/potemplate.py 2011-09-25 02:36:24 +0000
@@ -932,7 +932,10 @@
rosetta_experts = getUtility(ILaunchpadCelebrities).rosetta_experts
subject = 'Translation template import - %s' % self.displayname
- template_mail = 'poimport-template-confirmation.txt'
+ # Can use template_mail = 'poimport-template-confirmation.txt' to send
+ # mail when everything is imported, but those mails aren't very useful
+ # to or much welcomed by the recipients. See bug 855150.
+ template_mail = None
errors, warnings = None, None
try:
errors, warnings = translation_importer.importFile(
@@ -1010,9 +1013,13 @@
logger.warn(
"Statistics update failed: %s" % unicode(error))
- template = helpers.get_email_template(template_mail, 'translations')
- message = template % replacements
- return (subject, message)
+ if template_mail is not None:
+ template = helpers.get_email_template(
+ template_mail, 'translations')
+ message = template % replacements
+ return (subject, message)
+ else:
+ return None, None
def getTranslationRows(self):
"""See `IPOTemplate`."""
Follow ups