]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Don't expose plural names for currencies on the locale object
authorArmin Ronacher <armin.ronacher@active-4.com>
Fri, 5 Jul 2013 18:55:38 +0000 (20:55 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Fri, 5 Jul 2013 18:55:38 +0000 (20:55 +0200)
babel/core.py
babel/numbers.py

index f20197be109168dcd8589ba254b500b1802823ec..a72684dd941e59e2b8d34f0307d84b6b9b94a98e 100644 (file)
@@ -412,20 +412,6 @@ class Locale(object):
         :type: `dict`"""
         return self._data['currency_names']
 
-    @property
-    def currencies_with_pluralization(self):
-        """Mapping of currency codes to translated currency names.  The
-        value for each currency is a dictionary with the pluralization
-        strings.
-
-        >>> Locale('de', 'DE').currencies_with_pluralization['COP']['one']
-        u'Kolumbianischer Peso'
-        >>> Locale('de', 'DE').currencies_with_pluralization['COP']['other']
-        u'Kolumbianische Pesos'
-
-        :type: `dict`"""
-        return self._data['currency_names_plural']
-
     @property
     def currency_symbols(self):
         """Mapping of currency codes to symbols.
index f3e76a4ca45d7d43bd96c1f63cc22766a3c61265..cecba34780a7850f29b2a6c228bd4e34f3e7d8eb 100644 (file)
@@ -53,7 +53,7 @@ def get_currency_name(currency, count=None, locale=LC_NUMERIC):
     loc = Locale.parse(locale)
     if count is not None:
         plural_form = loc.plural_form(count)
-        plural_names = loc.currencies_with_pluralization
+        plural_names = loc._data['currency_names_plural']
         if currency in plural_names:
             return plural_names[currency][plural_form]
     return loc.currencies.get(currency, currency)