Package translate :: Package tools :: Module pocount
[hide private]
[frames] | no frames]

Module pocount

source code

Create string and word counts for supported localization files including: XLIFF, TMX, Gettex PO and MO, Qt .ts and .qm, Wordfast TM, etc

See: http://translate.sourceforge.net/wiki/toolkit/pocount for examples and usage instructions

Classes [hide private]
  summarizer
Functions [hide private]
 
calcstats_old(filename)
This is the previous implementation of calcstats() and is left for comparison and debuging purposes.
source code
 
calcstats(filename) source code
Boolean
summarize(title, stats, style=style_full, indent=8, incomplete_only=False)
Print summary for a .po file in specified format.
source code
 
fuzzymessages(units) source code
 
translatedmessages(units) source code
 
untranslatedmessages(units) source code
 
main() source code
Variables [hide private]
  default_style = style_full

Imports: factory, statsdb, OptionParser, sys, os


Function Details [hide private]

summarize(title, stats, style=style_full, indent=8, incomplete_only=False)

source code 

Print summary for a .po file in specified format.

Parameters:
  • title - name of .po file
  • stats - array with translation statistics for the file specified
  • indent - indentation of the 2nd column (length of longest filename)
  • incomplete_only (Boolean) - omit fully translated files
Returns: Boolean
1 if counting incomplete files (incomplete_only=True) and the file is completely translated, 0 otherwise