Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Revert "upgrade to babel 1.3 (bug 898528)"
Browse files Browse the repository at this point in the history
This reverts commit 3e9ea46.

Babel 1.0+ doesn't support locale names we use such as 'zh_CN'.
See python-babel/babel#37
  • Loading branch information
Allen Short committed Mar 17, 2015
1 parent a25d7fa commit 5446a99
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions mkt/prices/models.py
Expand Up @@ -42,6 +42,15 @@ def price_locale(price, currency):
lang = translation.get_language()
locale = get_locale_from_lang(lang)
pricestr = numbers.format_currency(price, currency, locale=locale)
if currency == 'EUR':
# See bug 865358. EU style guide
# (http://publications.europa.eu/code/en/en-370303.htm#position)
# disagrees with Unicode CLDR on placement of Euro symbol.
bare = pricestr.strip(u'\xa0\u20ac')
if lang.startswith(('en', 'ga', 'lv', 'mt')):
return u'\u20ac' + bare
else:
return bare + u'\xa0\u20ac'
return pricestr


Expand Down
2 changes: 1 addition & 1 deletion mkt/reviewers/tests/test_views.py
Expand Up @@ -4008,7 +4008,7 @@ def test_enddate_filter(self):

r = self.client.get(self.url, dict(end='2011-01-01'))
eq_(r.status_code, 200)
eq_(pq(r.content)('tbody td').eq(0).text(), 'Jan 1, 2011, 12:00:00 AM')
eq_(pq(r.content)('tbody td').eq(0).text(), 'Jan 1, 2011 12:00:00 AM')

def test_action_filter(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion requirements/prod.txt
Expand Up @@ -4,7 +4,7 @@ amqp==1.0.13
anyjson==0.3.3
# argparse is required by app-validator, translate-toolkit, curling, receipts
argparse==1.2.1
babel==1.3
babel==0.9.6
basket-client==0.3.7
billiard==2.7.3.34
bleach==1.4
Expand Down

0 comments on commit 5446a99

Please sign in to comment.