Commit 0cf1daab authored by Jean-Paul Smets's avatar Jean-Paul Smets Committed by Xiaowu Zhang

Provide pretty printing of Euro

Also improved comments and docstring including TODO.
parent e6a320da
...@@ -50,7 +50,16 @@ ...@@ -50,7 +50,16 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>return \'%s %s\' %(context.getTotalPrice(), context.getPriceCurrencyTitle())\n <value> <string>"""\n
Return the price and currency, with some\n
ad-hoc pretty printing\n
\n
TODO:\n
- implement generic pretty printing of currencies\n
"""\n
price_currency_title = context.getPriceCurrencyTitle()\n
if price_currency_title == "Euro": price_currency_title = "€"\n
return \'%s %s\' %(context.getTotalPrice(), price_currency_title)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
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