From 49916d38fd95ee7cd163f5221306f8a84019ca72 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 5 Dec 2008 14:10:29 +0100 Subject: [PATCH] [IMP] amount_to_text: add a function allowing to register a convertion function (patch from Activity Solutions) bzr revid: christophe@tinyerp.com-20081205131029-s05x7qtisskcekzw --- bin/tools/amount_to_text.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/tools/amount_to_text.py b/bin/tools/amount_to_text.py index 301efcbcccf..9e080bebfc7 100644 --- a/bin/tools/amount_to_text.py +++ b/bin/tools/amount_to_text.py @@ -171,6 +171,9 @@ def amount_to_text_nl(number, currency): #------------------------------------------------------------- _translate_funcs = {'fr' : amount_to_text_fr, 'nl' : amount_to_text_nl} + +def add_amount_to_text_function(lang, func): + _translate_funcs[lang] = func #TODO: we should use the country AND language (ex: septante VS soixante dix) #TODO: we should use en by default, but the translation func is yet to be implemented