remove translations for emails where the recipient is different from the current user (bug 648644)

This commit is contained in:
Andy McKay 2011-04-12 14:15:03 -07:00
Родитель 17645a06ce
Коммит 76ae0732cc
16 изменённых файлов: 45 добавлений и 56 удалений

Просмотреть файл

@ -354,14 +354,11 @@ class ReviewBase:
data['tested'] = ''
os, app = data.get('operating_systems'), data.get('applications')
if os and app:
#L10n: {0} is operating system (eg OSX), {1} is app (eg: Firefox)
data['tested'] = _('Tested on {0} with {1}').format(os, app)
data['tested'] = 'Tested on %s with %s' % (os, app)
elif os and not app:
#L10n: {0} is operating system (eg OSX)
data['tested'] = _('Tested on {0}').format(os)
data['tested'] = 'Tested on %s' % os
elif not os and app:
#L10n: {0} is app (eg: Firefox)
data['tested'] = _('Tested with {0}').format(app)
data['tested'] = 'Tested with %s' % app
send_mail('editors/emails/%s.ltxt' % template,
subject % (self.addon.name, self.version.version),
emails, Context(data))
@ -381,14 +378,14 @@ class ReviewBase:
log.info(u'Sending request for information for %s to %s' %
(self.addon, emails))
send_mail('editors/emails/info.ltxt',
_lazy('Mozilla Add-ons: %s %s') %
'Mozilla Add-ons: %s %s' %
(self.addon.name, self.version.version),
emails, Context(self.get_context_data()))
def send_super_mail(self):
log.info(u'Super review requested for %s' % (self.addon))
send_mail('editors/emails/super_review.ltxt',
_lazy('Super review requested: %s') % (self.addon.name),
'Super review requested: %s' % (self.addon.name),
[settings.SENIOR_EDITORS_EMAIL],
Context(self.get_context_data()))
@ -409,7 +406,7 @@ class ReviewAddon(ReviewBase):
self.log_approval(amo.LOG.APPROVE_VERSION)
self.notify_email('%s_to_public' % self.review_type,
_lazy('Mozilla Add-ons: %s %s Fully Reviewed'))
'Mozilla Add-ons: %s %s Fully Reviewed')
log.info(u'Making %s public' % (self.addon))
log.info(u'Sending email for %s' % (self.addon))
@ -422,8 +419,7 @@ class ReviewAddon(ReviewBase):
self.log_approval(amo.LOG.REJECT_VERSION)
self.notify_email('%s_to_sandbox' % self.review_type,
# L10n: addon name, version string
_lazy('Mozilla Add-ons: %s %s Reviewed'))
'Mozilla Add-ons: %s %s Reviewed')
log.info(u'Making %s disabled' % (self.addon))
log.info(u'Sending email for %s' % (self.addon))
@ -446,8 +442,7 @@ class ReviewAddon(ReviewBase):
self.log_approval(amo.LOG.PRELIMINARY_VERSION)
self.notify_email(template,
# L10n: addon name, version string
_lazy('Mozilla Add-ons: %s %s Preliminary Reviewed'))
'Mozilla Add-ons: %s %s Preliminary Reviewed')
log.info(u'Making %s preliminary' % (self.addon))
log.info(u'Sending email for %s' % (self.addon))
@ -470,7 +465,7 @@ class ReviewFiles(ReviewBase):
self.log_approval(amo.LOG.APPROVE_VERSION)
self.notify_email('%s_to_public' % self.review_type,
_lazy('Mozilla Add-ons: %s %s Fully Reviewed'))
'Mozilla Add-ons: %s %s Fully Reviewed')
log.info(u'Making %s files %s public' %
(self.addon,
@ -484,7 +479,7 @@ class ReviewFiles(ReviewBase):
self.log_approval(amo.LOG.REJECT_VERSION)
self.notify_email('%s_to_sandbox' % self.review_type,
_lazy('Mozilla Add-ons: %s %s Reviewed'))
'Mozilla Add-ons: %s %s Reviewed')
log.info(u'Making %s files %s disabled' %
(self.addon,
@ -498,7 +493,7 @@ class ReviewFiles(ReviewBase):
self.log_approval(amo.LOG.PRELIMINARY_VERSION)
self.notify_email('%s_to_preliminary' % self.review_type,
_lazy('Mozilla Add-ons: %s %s Preliminary Reviewed'))
'Mozilla Add-ons: %s %s Preliminary Reviewed')
log.info(u'Making %s files %s preliminary' %
(self.addon,

Просмотреть файл

@ -206,8 +206,8 @@ class EditorSubscription(amo.models.ModelBase):
'review': absolutify(reverse('editors.review', args=[version.pk])),
'SITE_URL': settings.SITE_URL,
})
# L10n: %s is the addon.name, this is the subject for an email
subject = _('Mozilla Add-ons: %s Updated') % self.addon.name
# Not being localised because we don't know the editors locale.
subject = 'Mozilla Add-ons: %s Updated' % self.addon.name
template = loader.get_template('editors/emails/notify_update.ltxt')
send_mail(subject, template.render(Context(context)),
recipient_list=[self.user.email],

Просмотреть файл

@ -1,7 +1,5 @@
{% load i18n %}{% block content %}{% endblock %}
{% blocktrans %}
{% block content %}{% endblock %}
If you have any questions or comments on this review, please reply to this email or join #addons on irc.mozilla.org
--
Mozilla Add-ons
{{ SITE_URL }}
{% endblocktrans %}

Просмотреть файл

@ -1,3 +1,3 @@
{% load i18n %}{% if files %}{% blocktrans %}
Files approved:{% endblocktrans %}
{% if files %}
Files approved:
{% for file in files %}{{ file.filename }}{% endfor %}{% endif %}

Просмотреть файл

@ -1,7 +1,7 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
A Mozilla Add-ons Editor requested further information from you regarding version {{ number }} of your add-on {{ name }}.
{{ reviewer }} wrote:
"{{ comments }}"
{% endblocktrans %}{% endblock %}
{% endblock %}

Просмотреть файл

@ -1,6 +1,6 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
Your add-on, {{ name }} {{ number }}, has been reviewed by an editor and did not meet the criteria for full review. However, your add-on has been granted preliminary review and is now available for download in our gallery at {{ addon_url }}
{% endblocktrans %}{% include "editors/emails/files.ltxt" %}{% blocktrans %}
{% include "editors/emails/files.ltxt" %}
Reviewer:
{{ reviewer }}
@ -8,4 +8,4 @@ Comments:
{{ comments }}
To learn more about the review process, please visit https://addons.mozilla.org/developers/docs/policies/reviews#selection
{% endblocktrans %}{% endblock %}
{% endblock %}

Просмотреть файл

@ -1,6 +1,6 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
Your add-on, {{ name }} {{ number }}, has been reviewed by an editor and did not meet the criteria for full review. However, your add-on has been granted preliminary review and is now available for download in our gallery at {{ addon_url }}
{% endblocktrans %}{% include "editors/emails/files.ltxt" %}{% blocktrans %}
{% include "editors/emails/files.ltxt" %}
Reviewer:
{{ reviewer }}
@ -9,4 +9,4 @@ Comments:
{{ comments }}
Your add-on will now appear in search results and categories with some limitations. You may re-request full review by addressing the editor's comments and uploading a new version. To learn more about the review process, please visit https://addons.mozilla.org/developers/docs/policies/reviews#selection
{% endblocktrans %}{% endblock %}
{% endblock %}

Просмотреть файл

@ -1,6 +1,6 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
Your add-on, {{ name }} {{ number }}, has been fully reviewed by an editor and is now available for download in our gallery at {{ addon_url}}
{% endblocktrans %}{% include "editors/emails/files.ltxt" %}{% blocktrans %}
{% include "editors/emails/files.ltxt" %}
Reviewer:
{{ reviewer }}
@ -9,4 +9,4 @@ Comments:
Your add-on will no longer display warnings and can make full use of features such as contributions and beta channels. To learn more about the review process, please visit https://addons.mozilla.org/developers/docs/policies/reviews#selection
{% endblocktrans %}{% endblock %}
{% endblock %}

Просмотреть файл

@ -1,4 +1,4 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
Your add-on, {{ name }} {{ number }}, has been reviewed by an editor and did not meet the criteria for being hosted in our gallery.
Reviewer:
@ -8,4 +8,4 @@ Comments:
{{ comments }}
Your add-on's listing has been disabled. You may re-request review by addressing the editor's comments and uploading a new version. To learn more about the review process, please visit https://addons.mozilla.org/developers/docs/policies/reviews#selection
{% endblocktrans %}{% endblock %}
{% endblock %}

Просмотреть файл

@ -1,5 +1,3 @@
{% load i18n %}
{% blocktrans %}
Dear editor,
An add-on you previously reviewed was just updated.
@ -17,4 +15,3 @@ Mozilla Add-ons
{{ SITE_URL }}
This is a one-time notification sent to you because you requested a follow up email regarding queue activity for {{ name }}. There is no need to unsubscribe if you don't wish to receive further mail.
{% endblocktrans %}

Просмотреть файл

@ -1,6 +1,6 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
Your add-on, {{ name }} {{ number }}, has been preliminarily reviewed by an editor and is now available for download in our gallery at {{ addon_url }}
{% endblocktrans %}{% include "editors/emails/files.ltxt" %}{% blocktrans %}
{% include "editors/emails/files.ltxt" %}
Reviewer:
{{ reviewer }}
@ -10,4 +10,4 @@ Comments:
{{ tested }}
To learn more about the review process, please visit https://addons.mozilla.org/developers/docs/policies/reviews#selection
{% endblocktrans %}{% endblock %}
{% endblock %}

Просмотреть файл

@ -1,6 +1,6 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
Your add-on, {{ name }} {{ number }}, has been fully reviewed by an editor and is now available for download in our gallery at {{ addon_url }}
{% endblocktrans %}{% include "editors/emails/files.ltxt" %}{% blocktrans %}
{% include "editors/emails/files.ltxt" %}
Reviewer:
{{ reviewer }}
@ -10,4 +10,4 @@ Comments:
{{ tested }}
To learn more about the review process, please visit https://addons.mozilla.org/developers/docs/policies/reviews#selection
{% endblocktrans %}{% endblock %}
{% endblock %}

Просмотреть файл

@ -1,7 +1,6 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
Your add-on, {{ name }} {{ number }}, has been reviewed by an editor and did not meet the criteria for being hosted in our gallery.
{% endblocktrans %}{% include "editors/emails/files.ltxt" %}{% blocktrans %}
{% include "editors/emails/files.ltxt" %}
Reviewer:
{{ reviewer }}
@ -11,4 +10,4 @@ Comments:
{{ tested }}
Your add-on's listing has been disabled. You may re-request review by addressing the editor's comments and uploading a new version. To learn more about the review process, please visit https://addons.mozilla.org/developers/docs/policies/reviews#selection
{% endblocktrans %}{% endblock %}
{% endblock %}

Просмотреть файл

@ -1,6 +1,6 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
Your add-on, {{ name }}, {{ number }}, has been preliminarily reviewed by an editor and is now available for download in our gallery at {{ addon_url }}
{% endblocktrans %}{% include "editors/emails/files.ltxt" %}{% blocktrans %}
{% include "editors/emails/files.ltxt" %}
Reviewer:
{{ reviewer }}
@ -8,4 +8,4 @@ Comments:
{{ comments }}
Your add-on will now appear in search results and categories with some limitations. After 10 days you may request full review to remove these limitations and enable additional features. To learn more about the review process, please visit https://addons.mozilla.org/developers/docs/policies/reviews#selection
{% endblocktrans %}{% endblock %}
{% endblock %}

Просмотреть файл

@ -1,4 +1,4 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
Your add-on, {{ name }} {{ number }}, has been reviewed by an editor and did not meet the criteria for being hosted in our gallery.
Reviewer:
@ -8,4 +8,4 @@ Comments:
{{ comments }}
Your add-on's listing has been disabled. You may re-request review by addressing the editor's comments and uploading a new version. To learn more about the review process, please visit https://addons.mozilla.org/developers/docs/policies/reviews#selection
{% endblocktrans %}{% endblock %}
{% endblock %}

Просмотреть файл

@ -1,4 +1,4 @@
{% extends "editors/emails/base.ltxt" %}{% load i18n %}{% block content %}{% blocktrans %}
{% extends "editors/emails/base.ltxt" %}{% block content %}
Dear Superheroes,
An editor has requested super-review of the following add-on due to security, copyright, or other administrative concerns.
@ -15,4 +15,4 @@ Comments:
Love,
{% endblocktrans %}{% endblock %}
{% endblock %}