Mercurial > babel > old > babel-test
comparison doc/cmdline.txt @ 319:3aa01d0355f7
Documentation fixes/updates, closes #70.
author | cmlenz |
---|---|
date | Mon, 04 Feb 2008 09:51:38 +0000 |
parents | cf09490f22b3 |
children |
comparison
equal
deleted
inserted
replaced
317:1837758b02be | 319:3aa01d0355f7 |
---|---|
14 .. sectnum:: | 14 .. sectnum:: |
15 | 15 |
16 | 16 |
17 When properly installed, Babel provides a script called ``pybabel``:: | 17 When properly installed, Babel provides a script called ``pybabel``:: |
18 | 18 |
19 $ pybabel --help | 19 $ pybabel --help |
20 usage: pybabel subcommand [options] [args] | 20 usage: pybabel command [options] [args] |
21 | 21 |
22 options: | 22 options: |
23 --version show program's version number and exit | 23 --version show program's version number and exit |
24 -h, --help show this help message and exit | 24 -h, --help show this help message and exit |
25 --list-locales print all known locales and exit | |
26 -v, --verbose print as much as possible | |
27 -q, --quiet print as little as possible | |
25 | 28 |
26 subcommands: | 29 commands: |
27 compile compile message catalogs to MO files | 30 compile compile message catalogs to MO files |
28 extract extract messages from source files and generate a POT file | 31 extract extract messages from source files and generate a POT file |
29 init create new message catalogs from a POT file | 32 init create new message catalogs from a POT file |
30 update update existing message catalogs from a POT file | 33 update update existing message catalogs from a POT file |
31 | 34 |
32 The ``pybabel`` script provides a number of sub-commands that do the actual | 35 The ``pybabel`` script provides a number of sub-commands that do the actual |
33 work. Those sub-commands are described below. | 36 work. Those sub-commands are described below. |
34 | 37 |
35 | 38 |
39 The ``compile`` sub-command can be used to compile translation catalogs into | 42 The ``compile`` sub-command can be used to compile translation catalogs into |
40 binary MO files:: | 43 binary MO files:: |
41 | 44 |
42 $ pybabel compile --help | 45 $ pybabel compile --help |
43 usage: pybabel compile [options] | 46 usage: pybabel compile [options] |
44 | 47 |
45 compile message catalogs to MO files | 48 compile message catalogs to MO files |
46 | 49 |
47 options: | 50 options: |
48 -h, --help show this help message and exit | 51 -h, --help show this help message and exit |
49 -D DOMAIN, --domain=DOMAIN | 52 -D DOMAIN, --domain=DOMAIN |
50 domain of MO and PO files (default 'messages') | 53 domain of MO and PO files (default 'messages') |
51 -d DIR, --directory=DIR | 54 -d DIR, --directory=DIR |
56 name of the input file | 59 name of the input file |
57 -o FILE, --output-file=FILE | 60 -o FILE, --output-file=FILE |
58 name of the output file (default | 61 name of the output file (default |
59 '<output_dir>/<locale>/LC_MESSAGES/<domain>.mo') | 62 '<output_dir>/<locale>/LC_MESSAGES/<domain>.mo') |
60 -f, --use-fuzzy also include fuzzy translations (default False) | 63 -f, --use-fuzzy also include fuzzy translations (default False) |
64 --statistics print statistics about translations | |
61 | 65 |
62 If ``directory`` is specified, but ``output-file`` is not, the default filename | 66 If ``directory`` is specified, but ``output-file`` is not, the default filename |
63 of the output file will be:: | 67 of the output file will be:: |
64 | 68 |
65 <directory>/<locale>/LC_MESSAGES/<domain>.mo | 69 <directory>/<locale>/LC_MESSAGES/<domain>.mo |
67 If neither the ``input_file`` nor the ``locale`` option is set, this command | 71 If neither the ``input_file`` nor the ``locale`` option is set, this command |
68 looks for all catalog files in the base directory that match the given domain, | 72 looks for all catalog files in the base directory that match the given domain, |
69 and compiles each of them to MO files in the same directory. | 73 and compiles each of them to MO files in the same directory. |
70 | 74 |
71 | 75 |
72 | |
73 extract | 76 extract |
74 ======= | 77 ======= |
75 | 78 |
76 The ``extract`` sub-command can be used to extract localizable messages from | 79 The ``extract`` sub-command can be used to extract localizable messages from |
77 a collection of source files:: | 80 a collection of source files:: |
78 | 81 |
79 $ pybabel extract --help | 82 $ pybabel extract --help |
80 usage: pybabel extract [options] dir1 <dir2> ... | 83 usage: pybabel extract [options] dir1 <dir2> ... |
81 | 84 |
82 extract messages from source files and generate a POT file | 85 extract messages from source files and generate a POT file |
83 | 86 |
84 options: | 87 options: |
85 -h, --help show this help message and exit | 88 -h, --help show this help message and exit |
86 --charset=CHARSET charset to use in the output | 89 --charset=CHARSET charset to use in the output (default "utf-8") |
87 -k KEYWORDS, --keyword=KEYWORDS | 90 -k KEYWORDS, --keyword=KEYWORDS |
88 keywords to look for in addition to the defaults. You | 91 keywords to look for in addition to the defaults. You |
89 can specify multiple -k flags on the command line. | 92 can specify multiple -k flags on the command line. |
90 --no-default-keywords | 93 --no-default-keywords |
91 do not include the default keywords | 94 do not include the default keywords |
118 The `init` sub-command creates a new translations catalog based on a PO | 121 The `init` sub-command creates a new translations catalog based on a PO |
119 template file:: | 122 template file:: |
120 | 123 |
121 $ pybabel init --help | 124 $ pybabel init --help |
122 usage: pybabel init [options] | 125 usage: pybabel init [options] |
123 | 126 |
124 create new message catalogs from a POT file | 127 create new message catalogs from a POT file |
125 | 128 |
126 options: | 129 options: |
127 -h, --help show this help message and exit | 130 -h, --help show this help message and exit |
128 -D DOMAIN, --domain=DOMAIN | 131 -D DOMAIN, --domain=DOMAIN |
129 domain of PO file (defaults to lower-cased project | 132 domain of PO file (default 'messages') |
130 name) | 133 -i FILE, --input-file=FILE |
131 -i INPUT_FILE, --input-file=INPUT_FILE | 134 name of the input file |
132 name of the input file | 135 -d DIR, --output-dir=DIR |
133 -d OUTPUT_DIR, --output-dir=OUTPUT_DIR | 136 path to output directory |
134 path to output directory | 137 -o FILE, --output-file=FILE |
135 -o OUTPUT_FILE, --output-file=OUTPUT_FILE | 138 name of the output file (default |
136 name of the output file (default | 139 '<output_dir>/<locale>/LC_MESSAGES/<domain>.po') |
137 '<output_dir>/<locale>/<domain>.po') | 140 -l LOCALE, --locale=LOCALE |
138 -l LOCALE, --locale=LOCALE | 141 locale for the new localized catalog |
139 locale for the new localized catalog | |
140 --first-author=FIRST_AUTHOR_NAME | |
141 name of first author | |
142 --first-author-email=FIRST_AUTHOR_EMAIL | |
143 email of first author | |
144 --project-name=NAME the project name | |
145 --project-version=VERSION | |
146 the project version | |
147 | 142 |
148 | 143 |
149 update | 144 update |
150 ====== | 145 ====== |
151 | 146 |
152 The `update` sub-command updates an existing new translations catalog based on | 147 The `update` sub-command updates an existing new translations catalog based on |
153 a PO template file:: | 148 a PO template file:: |
154 | 149 |
155 $ pybabel update --help | 150 $ pybabel update --help |
156 usage: pybabel update [options] | 151 usage: pybabel update [options] |
157 | 152 |
158 update existing message catalogs from a POT file | 153 update existing message catalogs from a POT file |
159 | 154 |
160 options: | 155 options: |
161 -h, --help show this help message and exit | 156 -h, --help show this help message and exit |
162 -D DOMAIN, --domain=DOMAIN | 157 -D DOMAIN, --domain=DOMAIN |
163 domain of PO file (default 'messages') | 158 domain of PO file (default 'messages') |
164 -i FILE, --input-file=FILE | 159 -i FILE, --input-file=FILE |
170 '<output_dir>/<locale>/LC_MESSAGES/<domain>.po') | 165 '<output_dir>/<locale>/LC_MESSAGES/<domain>.po') |
171 -l LOCALE, --locale=LOCALE | 166 -l LOCALE, --locale=LOCALE |
172 locale of the translations catalog | 167 locale of the translations catalog |
173 --ignore-obsolete do not include obsolete messages in the output | 168 --ignore-obsolete do not include obsolete messages in the output |
174 (default False) | 169 (default False) |
170 -N, --no-fuzzy-matching | |
171 do not use fuzzy matching (default False) | |
172 --previous keep previous msgids of translated messages (default | |
173 False) | |
175 | 174 |
176 If ``output_dir`` is specified, but ``output-file`` is not, the default | 175 If ``output_dir`` is specified, but ``output-file`` is not, the default |
177 filename of the output file will be:: | 176 filename of the output file will be:: |
178 | 177 |
179 <directory>/<locale>/LC_MESSAGES/<domain>.mo | 178 <directory>/<locale>/LC_MESSAGES/<domain>.mo |