# HG changeset patch # User cmlenz # Date 1202122673 0 # Node ID eb7894f3323f58fff16493b65227387561a82edf # Parent 863b81f042592d48847d8016b1323f95fe8775a1 Ported [353:354] to 0.9.x stable branch. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ Version 0.9.2 http://svn.edgewall.org/repos/babel/tags/0.9.2/ -(?, from branches/stable/0.9.x) +(Feb 4 2007, from branches/stable/0.9.x) * Fixed catalogs' charset values not being recognized (ticket #66). * Numerous improvements to the default plural forms. @@ -22,7 +22,7 @@ `ngettext`, or vice versa. * Fixed time formatting for 12 am and 12 pm. * Fixed output encoding of the `pybabel --list-locales` command. - * PO files are now written in binary mode on windows (ticket #61). + * MO files are now written in binary mode on windows (ticket #61). Version 0.9 diff --git a/doc/cmdline.txt b/doc/cmdline.txt --- a/doc/cmdline.txt +++ b/doc/cmdline.txt @@ -16,18 +16,21 @@ When properly installed, Babel provides a script called ``pybabel``:: - $ pybabel --help - usage: pybabel subcommand [options] [args] + $ pybabel --help + usage: pybabel command [options] [args] options: - --version show program's version number and exit - -h, --help show this help message and exit + --version show program's version number and exit + -h, --help show this help message and exit + --list-locales print all known locales and exit + -v, --verbose print as much as possible + -q, --quiet print as little as possible - subcommands: - compile compile message catalogs to MO files - extract extract messages from source files and generate a POT file - init create new message catalogs from a POT file - update update existing message catalogs from a POT file + commands: + compile compile message catalogs to MO files + extract extract messages from source files and generate a POT file + init create new message catalogs from a POT file + update update existing message catalogs from a POT file The ``pybabel`` script provides a number of sub-commands that do the actual work. Those sub-commands are described below. @@ -41,9 +44,9 @@ $ pybabel compile --help usage: pybabel compile [options] - + compile message catalogs to MO files - + options: -h, --help show this help message and exit -D DOMAIN, --domain=DOMAIN @@ -58,6 +61,7 @@ name of the output file (default '//LC_MESSAGES/.mo') -f, --use-fuzzy also include fuzzy translations (default False) + --statistics print statistics about translations If ``directory`` is specified, but ``output-file`` is not, the default filename of the output file will be:: @@ -69,7 +73,6 @@ and compiles each of them to MO files in the same directory. - extract ======= @@ -78,12 +81,12 @@ $ pybabel extract --help usage: pybabel extract [options] dir1 ... - + extract messages from source files and generate a POT file - + options: -h, --help show this help message and exit - --charset=CHARSET charset to use in the output + --charset=CHARSET charset to use in the output (default "utf-8") -k KEYWORDS, --keyword=KEYWORDS keywords to look for in addition to the defaults. You can specify multiple -k flags on the command line. @@ -120,30 +123,22 @@ $ pybabel init --help usage: pybabel init [options] - + create new message catalogs from a POT file - + options: - -h, --help show this help message and exit - -D DOMAIN, --domain=DOMAIN - domain of PO file (defaults to lower-cased project - name) - -i INPUT_FILE, --input-file=INPUT_FILE - name of the input file - -d OUTPUT_DIR, --output-dir=OUTPUT_DIR - path to output directory - -o OUTPUT_FILE, --output-file=OUTPUT_FILE - name of the output file (default - '//.po') - -l LOCALE, --locale=LOCALE - locale for the new localized catalog - --first-author=FIRST_AUTHOR_NAME - name of first author - --first-author-email=FIRST_AUTHOR_EMAIL - email of first author - --project-name=NAME the project name - --project-version=VERSION - the project version + -h, --help show this help message and exit + -D DOMAIN, --domain=DOMAIN + domain of PO file (default 'messages') + -i FILE, --input-file=FILE + name of the input file + -d DIR, --output-dir=DIR + path to output directory + -o FILE, --output-file=FILE + name of the output file (default + '//LC_MESSAGES/.po') + -l LOCALE, --locale=LOCALE + locale for the new localized catalog update @@ -154,9 +149,9 @@ $ pybabel update --help usage: pybabel update [options] - + update existing message catalogs from a POT file - + options: -h, --help show this help message and exit -D DOMAIN, --domain=DOMAIN @@ -172,6 +167,10 @@ locale of the translations catalog --ignore-obsolete do not include obsolete messages in the output (default False) + -N, --no-fuzzy-matching + do not use fuzzy matching (default False) + --previous keep previous msgids of translated messages (default + False) If ``output_dir`` is specified, but ``output-file`` is not, the default filename of the output file will be:: diff --git a/doc/setup.txt b/doc/setup.txt --- a/doc/setup.txt +++ b/doc/setup.txt @@ -62,22 +62,24 @@ The ``compile_catalog`` command accepts the following options: - +-----------------------------+----------------------------------------------+ - | Option | Description | - +=============================+==============================================+ - | ``--domain`` | domain of the PO file (defaults to | - | | lower-cased project name) | - +-----------------------------+----------------------------------------------+ - | ``--directory`` (``-d``) | name of the base directory | - +-----------------------------+----------------------------------------------+ - | ``--input-file`` (``-i``) | name of the input file | - +-----------------------------+----------------------------------------------+ - | ``--output-file`` (``-o``) | name of the output file | - +-----------------------------+----------------------------------------------+ - | ``--locale`` | locale for the new localized string | - +-----------------------------+----------------------------------------------+ - | ``--use-fuzzy`` | also include "fuzzy" translations | - +-----------------------------+----------------------------------------------+ + +-----------------------------+---------------------------------------------+ + | Option | Description | + +=============================+=============================================+ + | ``--domain`` | domain of the PO file (defaults to | + | | lower-cased project name) | + +-----------------------------+---------------------------------------------+ + | ``--directory`` (``-d``) | name of the base directory | + +-----------------------------+---------------------------------------------+ + | ``--input-file`` (``-i``) | name of the input file | + +-----------------------------+---------------------------------------------+ + | ``--output-file`` (``-o``) | name of the output file | + +-----------------------------+---------------------------------------------+ + | ``--locale`` (``-l``) | locale for the new localized string | + +-----------------------------+---------------------------------------------+ + | ``--use-fuzzy`` (``-f``) | also include "fuzzy" translations | + +-----------------------------+---------------------------------------------+ + | ``--statistics`` | print statistics about translations | + +-----------------------------+---------------------------------------------+ If ``directory`` is specified, but ``output-file`` is not, the default filename of the output file will be:: @@ -247,26 +249,20 @@ The ``init_catalog`` command accepts the following options: - +-----------------------------+----------------------------------------------+ - | Option | Description | - +=============================+==============================================+ - | ``--domain`` | domain of the PO file (defaults to | - | | lower-cased project name) | - +-----------------------------+----------------------------------------------+ - | ``--input-file`` (``-i``) | name of the input file | - +-----------------------------+----------------------------------------------+ - | ``--output-dir`` (``-d``) | name of the output directory | - +-----------------------------+----------------------------------------------+ - | ``--output-file`` (``-o``) | name of the output file | - +-----------------------------+----------------------------------------------+ - | ``--locale`` | locale for the new localized string | - +-----------------------------+----------------------------------------------+ - | ``--omit-header`` | do not include msgid "" entry in header | - +-----------------------------+----------------------------------------------+ - | ``--first-author`` | name of the first author | - +-----------------------------+----------------------------------------------+ - | ``--first-author-email`` | email address of the first author | - +-----------------------------+----------------------------------------------+ + +-----------------------------+---------------------------------------------+ + | Option | Description | + +=============================+=============================================+ + | ``--domain`` | domain of the PO file (defaults to | + | | lower-cased project name) | + +-----------------------------+---------------------------------------------+ + | ``--input-file`` (``-i``) | name of the input file | + +-----------------------------+---------------------------------------------+ + | ``--output-dir`` (``-d``) | name of the output directory | + +-----------------------------+---------------------------------------------+ + | ``--output-file`` (``-o``) | name of the output file | + +-----------------------------+---------------------------------------------+ + | ``--locale`` | locale for the new localized string | + +-----------------------------+---------------------------------------------+ If ``output-dir`` is specified, but ``output-file`` is not, the default filename of the output file will be:: @@ -310,23 +306,28 @@ The ``update_catalog`` command accepts the following options: - +-----------------------------+----------------------------------------------+ - | Option | Description | - +=============================+==============================================+ - | ``--domain`` | domain of the PO file (defaults to | - | | lower-cased project name) | - +-----------------------------+----------------------------------------------+ - | ``--input-file`` (``-i``) | name of the input file | - +-----------------------------+----------------------------------------------+ - | ``--output-dir`` (``-d``) | name of the output directory | - +-----------------------------+----------------------------------------------+ - | ``--output-file`` (``-o``) | name of the output file | - +-----------------------------+----------------------------------------------+ - | ``--locale`` | locale for the new localized string | - +-----------------------------+----------------------------------------------+ - | ``--ignore-obsolete`` | do not include obsolete messages in the | - | | output | - +-----------------------------+----------------------------------------------+ + +-------------------------------------+-------------------------------------+ + | Option | Description | + +=====================================+=====================================+ + | ``--domain`` | domain of the PO file (defaults to | + | | lower-cased project name) | + +-------------------------------------+-------------------------------------+ + | ``--input-file`` (``-i``) | name of the input file | + +-------------------------------------+-------------------------------------+ + | ``--output-dir`` (``-d``) | name of the output directory | + +-------------------------------------+-------------------------------------+ + | ``--output-file`` (``-o``) | name of the output file | + +-------------------------------------+-------------------------------------+ + | ``--locale`` | locale for the new localized string | + +-------------------------------------+-------------------------------------+ + | ``--ignore-obsolete`` | do not include obsolete messages in | + | | the output | + +-------------------------------------+-------------------------------------+ + | ``--no-fuzzy-matching`` (``-N``) | do not use fuzzy matching | + +-------------------------------------+-------------------------------------+ + | ``--previous`` | keep previous msgids of translated | + | | messages | + +-------------------------------------+-------------------------------------+ If ``output-dir`` is specified, but ``output-file`` is not, the default filename of the output file will be::