annotate doc/cmdline.txt @ 444:865b13853345

Fix testcase name typo. Switch to use a locale that uses a different singular and plural form instead of just one form for both singular and plural.
author jruigrok
date Fri, 19 Feb 2010 13:16:08 +0000
parents ac79e52d2689
children
rev   line source
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
1 .. -*- mode: rst; encoding: utf-8 -*-
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
2
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
3 ======================
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
4 Command-Line Interface
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
5 ======================
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
6
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
7 Babel includes a command-line interface for working with message catalogs,
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
8 similar to the various GNU ``gettext`` tools commonly available on Linux/Unix
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
9 systems.
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
10
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
11
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
12 .. contents:: Contents
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
13 :depth: 2
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
14 .. sectnum::
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
15
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
16
191
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
17 When properly installed, Babel provides a script called ``pybabel``::
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
18
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
19 $ pybabel --help
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
20 usage: pybabel command [options] [args]
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
21
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
22 options:
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
23 --version show program's version number and exit
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
24 -h, --help show this help message and exit
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
25 --list-locales print all known locales and exit
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
26 -v, --verbose print as much as possible
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
27 -q, --quiet print as little as possible
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
28
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
29 commands:
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
30 compile compile message catalogs to MO files
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
31 extract extract messages from source files and generate a POT file
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
32 init create new message catalogs from a POT file
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
33 update update existing message catalogs from a POT file
75
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
34
191
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
35 The ``pybabel`` script provides a number of sub-commands that do the actual
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
36 work. Those sub-commands are described below.
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
37
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
38
179
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
39 compile
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
40 =======
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
41
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
42 The ``compile`` sub-command can be used to compile translation catalogs into
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
43 binary MO files::
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
44
191
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
45 $ pybabel compile --help
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
46 usage: pybabel compile [options]
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
47
179
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
48 compile message catalogs to MO files
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
49
179
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
50 options:
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
51 -h, --help show this help message and exit
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
52 -D DOMAIN, --domain=DOMAIN
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
53 domain of MO and PO files (default 'messages')
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
54 -d DIR, --directory=DIR
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
55 base directory of catalog files
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
56 -l LOCALE, --locale=LOCALE
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
57 locale of the catalog
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
58 -i FILE, --input-file=FILE
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
59 name of the input file
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
60 -o FILE, --output-file=FILE
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
61 name of the output file (default
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
62 '<output_dir>/<locale>/LC_MESSAGES/<domain>.mo')
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
63 -f, --use-fuzzy also include fuzzy translations (default False)
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
64 --statistics print statistics about translations
179
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
65
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
66 If ``directory`` is specified, but ``output-file`` is not, the default filename
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
67 of the output file will be::
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
68
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
69 <directory>/<locale>/LC_MESSAGES/<domain>.mo
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
70
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
71 If neither the ``input_file`` nor the ``locale`` option is set, this command
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
72 looks for all catalog files in the base directory that match the given domain,
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
73 and compiles each of them to MO files in the same directory.
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
74
6138ea7ef7a8 * Instead of an extra `compile-all` option on the `compile` (or `compile_catalog`) command, compilation of all catalogs is performed when neither an `input_file` nor a `locale` is specified.
cmlenz
parents: 82
diff changeset
75
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
76 extract
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
77 =======
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
78
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
79 The ``extract`` sub-command can be used to extract localizable messages from
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
80 a collection of source files::
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
81
191
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
82 $ pybabel extract --help
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
83 usage: pybabel extract [options] dir1 <dir2> ...
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
84
79
7cf16a49e8b2 Updated frontend screens for added sorting features.
cmlenz
parents: 75
diff changeset
85 extract messages from source files and generate a POT file
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
86
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
87 options:
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
88 -h, --help show this help message and exit
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
89 --charset=CHARSET charset to use in the output (default "utf-8")
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
90 -k KEYWORDS, --keyword=KEYWORDS
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
91 keywords to look for in addition to the defaults. You
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
92 can specify multiple -k flags on the command line.
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
93 --no-default-keywords
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
94 do not include the default keywords
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
95 -F MAPPING_FILE, --mapping=MAPPING_FILE
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
96 path to the extraction mapping file
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
97 --no-location do not include location comments with filename and
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
98 line number
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
99 --omit-header do not include msgid "" entry in header
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
100 -o OUTPUT, --output=OUTPUT
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
101 path to the output POT file
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
102 -w WIDTH, --width=WIDTH
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
103 set output line width (default 76)
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
104 --no-wrap do not break long message lines, longer than the
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
105 output line width, into several lines
79
7cf16a49e8b2 Updated frontend screens for added sorting features.
cmlenz
parents: 75
diff changeset
106 --sort-output generate sorted output (default False)
7cf16a49e8b2 Updated frontend screens for added sorting features.
cmlenz
parents: 75
diff changeset
107 --sort-by-file sort output by file location (default False)
80
8e2e9d549693 Fixed the plurals header on `Catalog` which should only be written if it's not a catalog template.
palgarvio
parents: 79
diff changeset
108 --msgid-bugs-address=EMAIL@ADDRESS
8e2e9d549693 Fixed the plurals header on `Catalog` which should only be written if it's not a catalog template.
palgarvio
parents: 79
diff changeset
109 set report address for msgid
81
51f73a110a84 Implemented item 4 from #12. Set the copyright holder in the output.
palgarvio
parents: 80
diff changeset
110 --copyright-holder=COPYRIGHT_HOLDER
51f73a110a84 Implemented item 4 from #12. Set the copyright holder in the output.
palgarvio
parents: 80
diff changeset
111 set copyright holder in output
82
f421e5576d26 Added support for translator comments at the API and frontends levels.(See #12, item 1). Updated docs and tests accordingly.
palgarvio
parents: 81
diff changeset
112 -c TAG, --add-comments=TAG
f421e5576d26 Added support for translator comments at the API and frontends levels.(See #12, item 1). Updated docs and tests accordingly.
palgarvio
parents: 81
diff changeset
113 place comment block with TAG (or those preceding
f421e5576d26 Added support for translator comments at the API and frontends levels.(See #12, item 1). Updated docs and tests accordingly.
palgarvio
parents: 81
diff changeset
114 keyword lines) in output file. One TAG per argument
f421e5576d26 Added support for translator comments at the API and frontends levels.(See #12, item 1). Updated docs and tests accordingly.
palgarvio
parents: 81
diff changeset
115 call
75
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
116
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
117
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
118 init
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
119 ====
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
120
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
121 The `init` sub-command creates a new translations catalog based on a PO
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
122 template file::
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
123
191
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
124 $ pybabel init --help
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
125 usage: pybabel init [options]
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
126
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
127 create new message catalogs from a POT file
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
128
75
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
129 options:
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
130 -h, --help show this help message and exit
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
131 -D DOMAIN, --domain=DOMAIN
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
132 domain of PO file (default 'messages')
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
133 -i FILE, --input-file=FILE
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
134 name of the input file
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
135 -d DIR, --output-dir=DIR
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
136 path to output directory
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
137 -o FILE, --output-file=FILE
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
138 name of the output file (default
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
139 '<output_dir>/<locale>/LC_MESSAGES/<domain>.po')
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
140 -l LOCALE, --locale=LOCALE
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
141 locale for the new localized catalog
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
142
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
143
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
144 update
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
145 ======
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
146
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
147 The `update` sub-command updates an existing new translations catalog based on
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
148 a PO template file::
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
149
191
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
150 $ pybabel update --help
a16401b8b989 Rename command-line script to avoid conflict with the OpenBabel project. Closes #34.
cmlenz
parents: 183
diff changeset
151 usage: pybabel update [options]
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
152
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
153 update existing message catalogs from a POT file
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
154
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
155 options:
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
156 -h, --help show this help message and exit
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
157 -D DOMAIN, --domain=DOMAIN
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
158 domain of PO file (default 'messages')
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
159 -i FILE, --input-file=FILE
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
160 name of the input file
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
161 -d DIR, --output-dir=DIR
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
162 path to output directory
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
163 -o FILE, --output-file=FILE
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
164 name of the output file (default
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
165 '<output_dir>/<locale>/LC_MESSAGES/<domain>.po')
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
166 -l LOCALE, --locale=LOCALE
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
167 locale of the translations catalog
193
b5e58a22ebd2 Add an option to the frontend commands for catalog updating that removes completely any obsolete messages, instead of putting them comments.
cmlenz
parents: 191
diff changeset
168 --ignore-obsolete do not include obsolete messages in the output
b5e58a22ebd2 Add an option to the frontend commands for catalog updating that removes completely any obsolete messages, instead of putting them comments.
cmlenz
parents: 191
diff changeset
169 (default False)
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
170 -N, --no-fuzzy-matching
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
171 do not use fuzzy matching (default False)
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
172 --previous keep previous msgids of translated messages (default
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 193
diff changeset
173 False)
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
174
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
175 If ``output_dir`` is specified, but ``output-file`` is not, the default
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
176 filename of the output file will be::
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
177
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
178 <directory>/<locale>/LC_MESSAGES/<domain>.mo
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
179
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
180 If neither the ``output_file`` nor the ``locale`` option is set, this command
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
181 looks for all catalog files in the base directory that match the given domain,
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
182 and updates each of them.
Copyright (C) 2012-2017 Edgewall Software