annotate doc/setup.txt @ 538:6069dbf79115

add changelog entry for #200
author fschwarz
date Fri, 11 Mar 2011 16:40:21 +0000
parents 06e48920b566
children 16dfb6d0a089
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 Distutils/Setuptools Integration
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 provides commands for integration into ``setup.py`` scripts, based on
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
8 either the ``distutils`` package that is part of the Python standard library,
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
9 or the third-party ``setuptools`` package.
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 These commands are available by default when Babel has been properly installed,
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
12 and ``setup.py`` is using ``setuptools``. For projects that use plain old
42
cf94e70a77f3 Syntax highlighting for the docs.
cmlenz
parents: 4
diff changeset
13 ``distutils``, the commands need to be registered explicitly, for example:
cf94e70a77f3 Syntax highlighting for the docs.
cmlenz
parents: 4
diff changeset
14
cf94e70a77f3 Syntax highlighting for the docs.
cmlenz
parents: 4
diff changeset
15 .. code-block:: python
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
16
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
17 from distutils.core import setup
56
27d55a07c897 Rename the `babel.catalog` package to `babel.messages` for consistency with the other package names.
cmlenz
parents: 53
diff changeset
18 from babel.messages import frontend as babel
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
19
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
20 setup(
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
21 ...
254
76fdd2ce5c51 Fix typo on distutils/setuptools doc page.
cmlenz
parents: 193
diff changeset
22 cmdclass = {'compile_catalog': babel.compile_catalog,
76fdd2ce5c51 Fix typo on distutils/setuptools doc page.
cmlenz
parents: 193
diff changeset
23 'extract_messages': babel.extract_messages,
76fdd2ce5c51 Fix typo on distutils/setuptools doc page.
cmlenz
parents: 193
diff changeset
24 'init_catalog': babel.init_catalog,
76fdd2ce5c51 Fix typo on distutils/setuptools doc page.
cmlenz
parents: 193
diff changeset
25 'update_catalog': babel.update_catalog}
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
26 )
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
27
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
28
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
29 .. contents:: Contents
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
30 :depth: 2
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
31 .. sectnum::
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
32
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
33
162
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
34 compile_catalog
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
35 ===============
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
36
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
37 The ``compile_catalog`` command is similar to the GNU ``msgfmt`` tool, in that
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
38 it takes a message catalog from a PO file and compiles it to a binary MO file.
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
39
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
40 If the command has been correctly installed or registered, a project's
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
41 ``setup.py`` script should allow you to use the command::
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
42
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
43 $ ./setup.py compile_catalog --help
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
44 Global options:
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
45 --verbose (-v) run verbosely (default)
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
46 --quiet (-q) run quietly (turns verbosity off)
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
47 --dry-run (-n) don't actually do anything
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
48 --help (-h) show detailed help message
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
49
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
50 Options for 'compile_catalog' command:
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
51 ...
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
52
497
06e48920b566 Fix documentation: double 'to' and stray reference to POT, which should be MO.
jruigrok
parents: 321
diff changeset
53 Running the command will produce a binary MO file::
162
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
54
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
55 $ ./setup.py compile_catalog --directory foobar/locale --locale pt_BR
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
56 running compile_catalog
497
06e48920b566 Fix documentation: double 'to' and stray reference to POT, which should be MO.
jruigrok
parents: 321
diff changeset
57 compiling catalog to foobar/locale/pt_BR/LC_MESSAGES/messages.mo
162
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
58
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
59
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
60 Options
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
61 -------
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
62
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
63 The ``compile_catalog`` command accepts the following options:
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
64
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
65 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
66 | Option | Description |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
67 +=============================+=============================================+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
68 | ``--domain`` | domain of the PO file (defaults to |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
69 | | lower-cased project name) |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
70 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
71 | ``--directory`` (``-d``) | name of the base directory |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
72 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
73 | ``--input-file`` (``-i``) | name of the input file |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
74 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
75 | ``--output-file`` (``-o``) | name of the output file |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
76 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
77 | ``--locale`` (``-l``) | locale for the new localized string |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
78 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
79 | ``--use-fuzzy`` (``-f``) | also include "fuzzy" translations |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
80 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
81 | ``--statistics`` | print statistics about translations |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
82 +-----------------------------+---------------------------------------------+
162
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
83
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
84 If ``directory`` is specified, but ``output-file`` is not, the default filename
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
85 of the output file will be::
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
86
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: 162
diff changeset
87 <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: 162
diff changeset
88
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: 162
diff changeset
89 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: 162
diff changeset
90 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: 162
diff changeset
91 and compiles each of them to MO files in the same directory.
162
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
92
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
93 These options can either be specified on the command-line, or in the
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
94 ``setup.cfg`` file.
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
95
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
96
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
97 extract_messages
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
98 ================
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
99
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
100 The ``extract_messages`` command is comparable to the GNU ``xgettext`` program:
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
101 it can extract localizable messages from a variety of difference source files,
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
102 and generate a PO (portable object) template file from the collected messages.
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
103
162
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
104 If the command has been correctly installed or registered, a project's
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
105 ``setup.py`` script should allow you to use the command::
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
106
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
107 $ ./setup.py extract_messages --help
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
108 Global options:
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
109 --verbose (-v) run verbosely (default)
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
110 --quiet (-q) run quietly (turns verbosity off)
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
111 --dry-run (-n) don't actually do anything
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
112 --help (-h) show detailed help message
79
7cf16a49e8b2 Updated frontend screens for added sorting features.
cmlenz
parents: 64
diff changeset
113
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
114 Options for 'extract_messages' command:
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
115 ...
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
116
53
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents: 51
diff changeset
117 Running the command will produce a PO template file::
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
118
51
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
119 $ ./setup.py extract_messages --output-file foobar/locale/messages.pot
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
120 running extract_messages
51
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
121 extracting messages from foobar/__init__.py
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
122 extracting messages from foobar/core.py
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
123 ...
53
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents: 51
diff changeset
124 writing PO template file to foobar/locale/messages.pot
51
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
125
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
126
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
127 Method Mapping
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
128 --------------
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
129
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
130 The mapping of file patterns to extraction methods (and options) can be
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
131 specified using a configuration file that is pointed to using the
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
132 ``--mapping-file`` option shown above. Alternatively, you can configure the
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
133 mapping directly in ``setup.py`` using a keyword argument to the ``setup()``
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
134 function:
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
135
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
136 .. code-block:: python
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
137
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
138 setup(...
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
139
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
140 message_extractors = {
64
7eb6fea17864 The order of extraction methods is now preserved (see #10).
cmlenz
parents: 56
diff changeset
141 'foobar': [
119
c84f629da9de Made new frontend tests more ''unit-y'', i.e. calling the APIs directly instead of launching the scripts.
cmlenz
parents: 92
diff changeset
142 ('**.py', 'python', None),
c84f629da9de Made new frontend tests more ''unit-y'', i.e. calling the APIs directly instead of launching the scripts.
cmlenz
parents: 92
diff changeset
143 ('**/templates/**.html', 'genshi', None),
c84f629da9de Made new frontend tests more ''unit-y'', i.e. calling the APIs directly instead of launching the scripts.
cmlenz
parents: 92
diff changeset
144 ('**/templates/**.txt', 'genshi', {
146
24b5de939850 Some doc fixes.
cmlenz
parents: 119
diff changeset
145 'template_class': 'genshi.template:TextTemplate'
64
7eb6fea17864 The order of extraction methods is now preserved (see #10).
cmlenz
parents: 56
diff changeset
146 })
7eb6fea17864 The order of extraction methods is now preserved (see #10).
cmlenz
parents: 56
diff changeset
147 ],
51
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
148 },
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
149
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
150 ...
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
151 )
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
152
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
153
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
154 Options
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
155 -------
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
156
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
157 The ``extract_messages`` command accepts the following options:
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
158
51
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
159 +-----------------------------+----------------------------------------------+
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
160 | Option | Description |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
161 +=============================+==============================================+
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
162 | ``--charset`` | charset to use in the output file |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
163 +-----------------------------+----------------------------------------------+
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
164 | ``--keywords`` (``-k``) | space-separated list of keywords to look for |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
165 | | in addition to the defaults |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
166 +-----------------------------+----------------------------------------------+
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
167 | ``--no-default-keywords`` | do not include the default keywords |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
168 +-----------------------------+----------------------------------------------+
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
169 | ``--mapping-file`` (``-F``) | path to the mapping configuration file |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
170 +-----------------------------+----------------------------------------------+
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
171 | ``--no-location`` | do not include location comments with |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
172 | | filename and line number |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
173 +-----------------------------+----------------------------------------------+
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
174 | ``--omit-header`` | do not include msgid "" entry in header |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
175 +-----------------------------+----------------------------------------------+
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
176 | ``--output-file`` (``-o``) | name of the output file |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
177 +-----------------------------+----------------------------------------------+
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
178 | ``--width`` (``-w``) | set output line width (default 76) |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
179 +-----------------------------+----------------------------------------------+
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
180 | ``--no-wrap`` | do not break long message lines, longer than |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
181 | | the output line width, into several lines |
3664c93860f1 Support a `message_extractors` keyword argument directly in `setup()`. Closes #4.
cmlenz
parents: 42
diff changeset
182 +-----------------------------+----------------------------------------------+
64
7eb6fea17864 The order of extraction methods is now preserved (see #10).
cmlenz
parents: 56
diff changeset
183 | ``--input-dirs`` | directories that should be scanned for |
7eb6fea17864 The order of extraction methods is now preserved (see #10).
cmlenz
parents: 56
diff changeset
184 | | messages |
7eb6fea17864 The order of extraction methods is now preserved (see #10).
cmlenz
parents: 56
diff changeset
185 +-----------------------------+----------------------------------------------+
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
186 | ``--sort-output`` | generate sorted output (default False) |
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
187 +-----------------------------+----------------------------------------------+
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
188 | ``--sort-by-file`` | sort output by file location (default False) |
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
189 +-----------------------------+----------------------------------------------+
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
190 | ``--msgid-bugs-address`` | set email address for message bug reports |
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
191 +-----------------------------+----------------------------------------------+
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
192 | ``--copyright-holder`` | set copyright holder in output |
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
193 +-----------------------------+----------------------------------------------+
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
194 | ``--add-comments (-c)`` | place comment block with TAG (or those |
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
195 | | preceding keyword lines) in output file. |
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
196 | | Separate multiple TAGs with commas(,) |
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
197 +-----------------------------+----------------------------------------------+
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
198
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
199 These options can either be specified on the command-line, or in the
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
200 ``setup.cfg`` file. In the latter case, the options above become entries of the
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
201 section ``[extract_messages]``, and the option names are changed to use
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
202 underscore characters instead of dashes, for example:
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
203
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
204 .. code-block:: ini
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
205
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
206 [extract_messages]
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
207 keywords = _, gettext, ngettext
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
208 mapping_file = babel.cfg
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
209 width = 80
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
210
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
211 This would be equivalent to invoking the command from the command-line as
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
212 follows::
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
213
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
214 $ setup.py extract_messages -k _ -k gettext -k ngettext -F mapping.cfg -w 80
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
215
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
216 Any path names are interpreted relative to the location of the ``setup.py``
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
217 file. For boolean options, use "true" or "false" values.
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
218
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
219
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
220 init_catalog
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
221 ============
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
222
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
223 The ``init_catalog`` command is basically equivalent to the GNU ``msginit``
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
224 program: it creates a new translation catalog based on a PO template file (POT).
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
225
162
661cb602781d Add MO file generation. Closes #21.
cmlenz
parents: 146
diff changeset
226 If the command has been correctly installed or registered, a project's
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
227 ``setup.py`` script should allow you to use the command::
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
228
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
229 $ ./setup.py init_catalog --help
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
230 Global options:
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
231 --verbose (-v) run verbosely (default)
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
232 --quiet (-q) run quietly (turns verbosity off)
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
233 --dry-run (-n) don't actually do anything
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
234 --help (-h) show detailed help message
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
235
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
236 Options for 'init_catalog' command:
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
237 ...
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
238
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
239 Running the command will produce a PO file::
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
240
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
241 $ ./setup.py init_catalog -l fr -i foobar/locales/messages.pot \
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
242 -o foobar/locales/fr/messages.po
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
243 running init_catalog
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
244 creating catalog 'foobar/locales/fr/messages.po' based on 'foobar/locales/messages.pot'
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
245
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
246
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
247 Options
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
248 -------
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
249
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
250 The ``init_catalog`` command accepts the following options:
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
251
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
252 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
253 | Option | Description |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
254 +=============================+=============================================+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
255 | ``--domain`` | domain of the PO file (defaults to |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
256 | | lower-cased project name) |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
257 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
258 | ``--input-file`` (``-i``) | name of the input file |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
259 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
260 | ``--output-dir`` (``-d``) | name of the output directory |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
261 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
262 | ``--output-file`` (``-o``) | name of the output file |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
263 +-----------------------------+---------------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
264 | ``--locale`` | locale for the new localized string |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
265 +-----------------------------+---------------------------------------------+
92
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
266
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
267 If ``output-dir`` is specified, but ``output-file`` is not, the default filename
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
268 of the output file will be::
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
269
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
270 <output_dir>/<locale>/LC_MESSAGES/<domain>.po
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
271
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
272 These options can either be specified on the command-line, or in the
6d1a7777003e Some doc improvements on distutils integration.
cmlenz
parents: 82
diff changeset
273 ``setup.cfg`` file.
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
274
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
275
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
276 update_catalog
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
277 ==============
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
278
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
279 The ``update_catalog`` command is basically equivalent to the GNU ``msgmerge``
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
280 program: it updates an existing translations catalog based on a PO template
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
281 file (POT).
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
282
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
283 If the command has been correctly installed or registered, a project's
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
284 ``setup.py`` script should allow you to use the command::
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
285
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
286 $ ./setup.py update_catalog --help
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
287 Global options:
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
288 --verbose (-v) run verbosely (default)
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
289 --quiet (-q) run quietly (turns verbosity off)
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
290 --dry-run (-n) don't actually do anything
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
291 --help (-h) show detailed help message
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
292
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
293 Options for 'update_catalog' command:
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
294 ...
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
295
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
296 Running the command will update a PO file::
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
297
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
298 $ ./setup.py update_catalog -l fr -i foobar/locales/messages.pot \
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
299 -o foobar/locales/fr/messages.po
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
300 running update_catalog
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
301 updating catalog 'foobar/locales/fr/messages.po' based on 'foobar/locales/messages.pot'
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
302
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
303
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
304 Options
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
305 -------
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
306
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
307 The ``update_catalog`` command accepts the following options:
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
308
321
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
309 +-------------------------------------+-------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
310 | Option | Description |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
311 +=====================================+=====================================+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
312 | ``--domain`` | domain of the PO file (defaults to |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
313 | | lower-cased project name) |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
314 +-------------------------------------+-------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
315 | ``--input-file`` (``-i``) | name of the input file |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
316 +-------------------------------------+-------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
317 | ``--output-dir`` (``-d``) | name of the output directory |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
318 +-------------------------------------+-------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
319 | ``--output-file`` (``-o``) | name of the output file |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
320 +-------------------------------------+-------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
321 | ``--locale`` | locale for the new localized string |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
322 +-------------------------------------+-------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
323 | ``--ignore-obsolete`` | do not include obsolete messages in |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
324 | | the output |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
325 +-------------------------------------+-------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
326 | ``--no-fuzzy-matching`` (``-N``) | do not use fuzzy matching |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
327 +-------------------------------------+-------------------------------------+
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
328 | ``--previous`` | keep previous msgids of translated |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
329 | | messages |
ac79e52d2689 Documentation fixes/updates, closes #70.
cmlenz
parents: 254
diff changeset
330 +-------------------------------------+-------------------------------------+
183
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
331
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
332 If ``output-dir`` is specified, but ``output-file`` is not, the default filename
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
333 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
334
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
335 <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
336
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
337 If neither the ``input_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
338 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
339 and updates each of them.
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
340
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
341 These options can either be specified on the command-line, or in the
e927dffc9ab4 The frontends now provide ways to update existing translations catalogs from a template. Closes #22.
cmlenz
parents: 179
diff changeset
342 ``setup.cfg`` file.
Copyright (C) 2012-2017 Edgewall Software