start

# html2po and po2html

This tool converts HTML markup language to the PO format.

## Usage

    html2po [options] <html> <po>
    po2html [options] <po> <html>

Where:

<html> | is an HTML file or a directory of HTML files
<po> | is a PO file or directory of PO files

Options (html2po):

--version | show program’s version number and exit
-h, --help | show this help message and exit
--manpage | output a manpage based on the help
--progress=PROGRESS | show progress as: dots, none, bar, names, verbose
--errorlevel=ERRORLEVEL | show errorlevel as: none, message, exception, traceback
-iINPUT, --input=INPUT | read from INPUT in htm, html formats
-xEXCLUDE, --exclude=EXCLUDE | exclude names matching EXCLUDE from input paths
-oOUTPUT, --output=OUTPUT | write to OUTPUT in po, pot formats
--psyco=MODE | use psyco to speed up the operation, modes: none, full, profile
-P, --pot | output PO Templates (.pot) rather than PO files (.po)
-u, --untagged | include untagged sections

Options (po2html):

--version | show program’s version number and exit
-h, --help | show this help message and exit
--manpage | output a manpage based on the help
--progress=PROGRESS | show progress as: dots, none, bar, names, verbose
--errorlevel=ERRORLEVEL | show errorlevel as: none, message, exception, traceback
-iINPUT, --input=INPUT | read from INPUT in po, pot formats
-xEXCLUDE, --exclude=EXCLUDE | exclude names matching EXCLUDE from input paths
-oOUTPUT, --output=OUTPUT | write to OUTPUT in htm, html formats
-tTEMPLATE, --template=TEMPLATE | read from TEMPLATE in htm, html formats
--psyco=MODE | use psyco to speed up the operation, modes: none, full, profile
-wWRAP, --wrap=WRAP | set number of columns to wrap html at

## Examples

need to add some usage examples

## Bugs

Off the top of my head:

We don’t hide enough of some of the tags, eg <a> tags have too much exposed, we should expose only what need to be translated and allow the changing on position of the tag within the translation block.

I think we only extract based on the <p> tag so some of your HTML might have to be surrounded with <p> tags, it shouldn’t be like that though.