Changeset 5717

Show
Ignore:
Timestamp:
11/18/08 15:43:18 (2 months ago)
Author:
faide
Message:

First step in refactoring the i18n functions... isolating the pygettext files in their own separate module. All the tests continue to pass and my manual toolbox collection with Genshi still works... excellent. Now to the real work...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/turbogears/command/i18n.py

    r5367 r5717  
    2222import turbogears.i18n 
    2323from turbogears import config 
    24 from turbogears.toolbox.admi18n import pygettext, msgfmt, catalog 
    25 from turbogears.toolbox.admi18n.catalog import normalize 
     24from turbogears.i18n.pygettext import pygettext, msgfmt, catalog 
    2625from turbogears.command.base import silent_os_remove 
    2726from turbogears.util import load_project_config, get_package_name 
     
    385384        fd = open(potfile, 'at+') 
    386385        for tag, fname, text in messages: 
    387             text = normalize(text.encode('utf-8')) 
     386            text = catalog.normalize(text.encode('utf-8')) 
    388387            print >> fd, '#: %s:%s' % (fname, tag) 
    389388            print >> fd, 'msgid %s' % text 
     
    416415        fd = open(potfile, 'at+') 
    417416        for linenumber, fname, text in messages: 
    418             text = normalize(text.encode('utf-8')) 
     417            text = catalog.normalize(text.encode('utf-8')) 
    419418            print >> fd, '#: %s:%i' % (fname, linenumber) 
    420419            print >> fd, 'msgid %s' % text 
  • branches/1.1/turbogears/toolbox/admi18n/__init__.py

    r5706 r5717  
    77import codecs 
    88 
    9 import pygettext 
    10 import msgfmt 
    11 import catalog 
     9import turbogears 
     10from turbogears import controllers, expose, i18n 
     11from turbogears.i18n.pygettext import pygettext 
     12from turbogears.i18n.pygettext import msgfmt 
     13from turbogears.i18n.pygettext import catalog 
    1214 
    1315import cherrypy 
    1416from cherrypy.lib.cptools import serveFile 
    15  
    16 import turbogears 
    17 from turbogears import controllers, expose, i18n 
    1817 
    1918# this is a list of supported file extensions.