Commit 14231113 authored by Aurel's avatar Aurel

use mapping to translate CashCurrency Title and do not hardcoded french


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5992 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eaab7301
...@@ -71,14 +71,13 @@ class CashCurrency(Resource): ...@@ -71,14 +71,13 @@ class CashCurrency(Resource):
The title will depend on the Portal Type and the value, for example : The title will depend on the Portal Type and the value, for example :
Piece de 500 Piece de 500
""" """
title = self.portal_types[self.getPortalType()].title title = self.getTranslatedPortalType()
price = self.getBasePrice() price = self.getBasePrice()
if price is None: if price is None:
price = 'Not Defined' price = 'Not Defined'
else: else:
price = '%i' % int(price) price = '%i' % int(price)
title = '%s de %s' % (title, price) return self.Base_translateString('${title} of ${value}', mapping = {'title' : str(title), 'value' : str(price)})
return title
security.declareProtected(Permissions.ModifyPortalContent, '_setVariationList') security.declareProtected(Permissions.ModifyPortalContent, '_setVariationList')
def _setVariationList(self,value): def _setVariationList(self,value):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment