annotate doc/cmdline.txt @ 311:3de6e67718cc trunk

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