~openerp-community/openerp-tools/yolanda.robla-openerp-server

« back to all changes in this revision

Viewing changes to openerp/tools/amount_to_text_en.py

  • Committer: Vo Minh Thu
  • Date: 2011-02-08 15:01:49 UTC
  • mfrom: (3346.1.6 server-lib)
  • Revision ID: vmt@openerp.com-20110208150149-x4vu09aj42ezma5a
[MERGE] merge of the openerp python module branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#-------------------------------------------------------------
23
23
#ENGLISH
24
24
#-------------------------------------------------------------
25
 
from tools.translate import _
 
25
from translate import _
26
26
 
27
27
to_19 = ( 'Zero',  'One',   'Two',  'Three', 'Four',   'Five',   'Six',
28
28
          'Seven', 'Eight', 'Nine', 'Ten',   'Eleven', 'Twelve', 'Thirteen',
99
99
    Example:
100
100
        1654: thousands six cent cinquante-quatre.
101
101
    """
102
 
    import netsvc
 
102
    import openerp.loglevels as loglevels
103
103
#    if nbr > 10000000:
104
104
#        netsvc.Logger().notifyChannel('translate', netsvc.LOG_WARNING, _("Number too large '%d', can not translate it"))
105
105
#        return str(nbr)
106
106
    
107
107
    if not _translate_funcs.has_key(lang):
108
 
        netsvc.Logger().notifyChannel('translate', netsvc.LOG_WARNING, _("no translation function found for lang: '%s'" % (lang,)))
 
108
        loglevels.Logger().notifyChannel('translate', loglevels.LOG_WARNING, _("no translation function found for lang: '%s'" % (lang,)))
109
109
        #TODO: (default should be en) same as above
110
110
        lang = 'en'
111
111
    return _translate_funcs[lang](abs(nbr), currency)