Package Pootle :: Package storage :: Module ddtp
[show private | hide private]
[frames | no frames]

Module Pootle.storage.ddtp

DDTP support.

Use cases:
  1) import DDTP strings to Pootle
  2) import new templates from Packages
  3) export strings from Pootle to DDTP files

TODO:
- Differentiate merging templates and merging translations.
- Merge new templates with old translations.

Classes
DDTPModule A wrapper for a folder that stores DDTP translations.
DDTPPackage  
DDTPStore A DDTP translation store wrapper.

Function Summary
  do_export(pootle_db_dir, translations_dir)
Export DDTP translations from Pootle.
  do_import(template_path, translations_dir, pootle_db_dir)
Import DDTP templates and translations into Pootle.
  gather_translation_files(translations_dir)
  main(argv)

Variable Summary
str usage = 'Usage:\n\nddtp.py import <path/to/Packages> <pa...

Function Details

do_export(pootle_db_dir, translations_dir)

Export DDTP translations from Pootle.

`pootle_db_dir` is the path to the Pootle .po store. Currently the project 'ddtp' is picked from there. `translations_dir` is the path to the directory where to put Translation-?? files.

do_import(template_path, translations_dir, pootle_db_dir)

Import DDTP templates and translations into Pootle.

`template_path` is a path to the Packages index. `translations_dir` is the path of the directory where Translation-?? files reside. `pootle_db_dir` is the path to the Pootle .po store.

XXX: perform merging!

Variable Details

usage

Type:
str
Value:
'''Usage:

ddtp.py import <path/to/Packages> <path/to/translations> <pootle_db_di\
r>
ddtp.py export <pootle_db_dir> <path/to/translations>
'''                                                                    

Generated by Epydoc 2.1 on Tue Aug 22 04:29:46 2006 http://epydoc.sf.net