Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 892696: Point all locales to bedrock for /newsletter/.
Also fix some l10n issues with _lazy and error messages.
  • Loading branch information
pmac committed Jul 18, 2013
1 parent 498831a commit 1564f51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions bedrock/newsletter/views.py
Expand Up @@ -16,9 +16,9 @@
import commonware.log
import lib.l10n_utils as l10n_utils
import requests
from lib.l10n_utils.dotlang import _lazy
from commonware.decorators import xframe_allow
from funfactory.urlresolvers import reverse
from tower import ugettext_lazy as _lazy

from .forms import (
ManageSubscriptionsForm, NewsletterForm,
Expand All @@ -30,13 +30,13 @@

log = commonware.log.getLogger('b.newsletter')

general_error = _lazy(u'Something is amiss with our system, sorry! Please try '
'again later.')
LANG_FILES = ['mozorg/contribute']
general_error = _lazy(u'We are sorry, but there was a problem '
u'with our system. Please try again later!')
thank_you = _lazy(u'Thank you for updating your email preferences.')
bad_token = _lazy(u'The supplied link has expired. You will receive a new '
u'one in the next newsletter.')


UNSUB_UNSUBSCRIBED_ALL = 1
UNSUB_REASONS_SUBMITTED = 2

Expand Down Expand Up @@ -331,9 +331,7 @@ def one_newsletter_signup(request, template_name):
except basket.BasketException:
log.exception("Error subscribing %s to newsletter %s" %
(data['email'], data['newsletter']))
msg = _lazy("We are sorry, but there was a problem "
"with our system. Please try again later!")
form.errors['__all__'] = form.error_class([msg])
form.errors['__all__'] = form.error_class([general_error])
else:
success = True

Expand Down
2 changes: 1 addition & 1 deletion etc/httpd/global.conf
Expand Up @@ -406,7 +406,7 @@ RewriteRule ^/projects/security/known-vulnerabilities.html$ /security/known-vuln
RewriteRule ^/projects/security/older-vulnerabilities.html$ /security/known-vulnerabilities/older-vulnerabilities.html [L,R=301]

# bug 860460, 892696
RewriteRule ^/en-US/newsletter(/?)$ /b/en-US/newsletter$1 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?newsletter(/?)$ /b/$1newsletter$2 [PT]

# bug 892716
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox(/)?$ /b/$1firefox$2 [PT]

0 comments on commit 1564f51

Please sign in to comment.