Package turbogears :: Package command :: Module i18n :: Class InternationalizationTool

Class InternationalizationTool

source code

object --+
         |
        InternationalizationTool

Manages i18n data via command-line interface.

Contributed to TurboGears by Max Ischenko (http://maxischenko.in.ua).

Instance Methods
 
__init__(self, version)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
load_project_config(self)
Choose the config file.
source code
 
parse_args(self) source code
 
run(self) source code
 
create_js_messages(self) source code
 
clean_generated_files(self) source code
 
merge_message_catalogs(self) source code
 
compile_message_catalogs(self) source code
 
add_languages(self, codes) source code
 
scan_source_files(self) source code
 
scan_genshi_files(self, potfile, files)
Extract strings from Genhsi templates and write to pot file.
source code
 
scan_kid_files(self, potfile, files)
Extract strings from Genhsi templates and write to pot file.
source code
 
get_strings_in_js(self, fname) source code
 
scan_js_files(self, potfile, files) source code
 
get_potfile_path(self) source code
 
get_locale_catalog(self, code) source code
 
list_message_catalogs(self) source code
 
fix_tzinfo(self, potfile)
Fix tzinfo.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  desc = 'Manage i18n data'
  need_project = True
  config = None
hash(x)
  load_config = True
  locale_dir = 'locales'
  domain = 'messages'
  ignore_dirs = ('cvs', 'sqlobject-history')
  name = None
hash(x)
  package = None
hash(x)
Properties

Inherited from object: __class__

Method Details

__init__(self, version)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

load_project_config(self)

source code 

Choose the config file.

Try to guess whether this is a development or installed project.

scan_genshi_files(self, potfile, files)

source code 
Extract strings from Genhsi templates and write to pot file.

Configuration settings:

`genshi.i18n.ignore_tags` -- `['script', 'style']`
    List of element names. Content inside elements named in this list
    is not extracted as translatable text. Can be a space-separated
    string or a list of string.
`genshi.i18n.include_attrs` -- `['abbr', 'alt', 'label', 'prompt',
        'standby', 'summary', 'title']`
    List of attribute names. Only values of the attributes named in
    this list are extracted as translatable text. Can be a
    space-separated string or a list os strings.

See http://genshi.edgewall.org/wiki/Documentation/0.5.x/i18n.html for
more information.

fix_tzinfo(self, potfile)

source code 

Fix tzinfo.

In certain enviroments, tzinfo as formatted by strftime() is not utf-8, e.g. Windows XP with Russian MUL.

This leads to later error when a program trying to read catalog.