annotate doc/cmdline.txt @ 78:ee043bb666f0

Fixed the plurals header on `Catalog` which should only be written if it's not a catalog template. Added support to the frontends for `--msgid-bugs-address` that set's the `Report-Msgid-Bugs-To` header, which was also a missing header on `Catalog`, so, a bug found by chance :) (See #12, item 6)
author palgarvio
date Sun, 10 Jun 2007 08:42:21 +0000
parents 5c819411e4af
children 9a05230571f8
rev   line source
2
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
1 .. -*- mode: rst; encoding: utf-8 -*-
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
2
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
3 ======================
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
4 Command-Line Interface
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
5 ======================
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
6
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
7 Babel includes a command-line interface for working with message catalogs,
52
1e724c305460 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
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
9 systems.
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
10
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
11
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
12 .. contents:: Contents
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
13 :depth: 2
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
14 .. sectnum::
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
15
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
16
52
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
17 When properly installed, Babel provides a script called ``babel``::
2
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
18
52
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
19 $ babel --help
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
20 usage: babel subcommand [options] [args]
2
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
21
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
22 options:
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
23 --version show program's version number and exit
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
24 -h, --help show this help message and exit
52
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
25
73
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
26 subcommands:
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
27 extract extract messages from source files and generate a POT file
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
28 init create new message catalogs from a template
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
29
52
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
30 The ``babel`` script provides a number of sub-commands that do the actual work.
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
31 Those sub-commands are described below.
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
32
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
33
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
34 extract
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
35 =======
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
36
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
37 The ``extract`` sub-command can be used to extract localizable messages from
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
38 a collection of source files::
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
39
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
40 $ babel extract --help
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
41 usage: babel extract [options] dir1 <dir2> ...
77
5c819411e4af Updated frontend screens for added sorting features.
cmlenz
parents: 73
diff changeset
42
5c819411e4af Updated frontend screens for added sorting features.
cmlenz
parents: 73
diff changeset
43 extract messages from source files and generate a POT file
5c819411e4af Updated frontend screens for added sorting features.
cmlenz
parents: 73
diff changeset
44
52
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
45 options:
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
46 -h, --help show this help message and exit
2
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
47 --charset=CHARSET charset to use in the output
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
48 -k KEYWORDS, --keyword=KEYWORDS
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
49 keywords to look for in addition to the defaults. You
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
50 can specify multiple -k flags on the command line.
52
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
51 --no-default-keywords
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
52 do not include the default keywords
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
53 -F MAPPING_FILE, --mapping=MAPPING_FILE
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
54 path to the extraction mapping file
2
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
55 --no-location do not include location comments with filename and
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
56 line number
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
57 --omit-header do not include msgid "" entry in header
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
58 -o OUTPUT, --output=OUTPUT
b2492365f186 Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
59 path to the output POT file
52
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
60 -w WIDTH, --width=WIDTH
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
61 set output line width (default 76)
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
62 --no-wrap do not break long message lines, longer than the
1e724c305460 Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 2
diff changeset
63 output line width, into several lines
77
5c819411e4af Updated frontend screens for added sorting features.
cmlenz
parents: 73
diff changeset
64 --sort-output generate sorted output (default False)
5c819411e4af Updated frontend screens for added sorting features.
cmlenz
parents: 73
diff changeset
65 --sort-by-file sort output by file location (default False)
78
ee043bb666f0 Fixed the plurals header on `Catalog` which should only be written if it's not a catalog template.
palgarvio
parents: 77
diff changeset
66 --msgid-bugs-address=EMAIL@ADDRESS
ee043bb666f0 Fixed the plurals header on `Catalog` which should only be written if it's not a catalog template.
palgarvio
parents: 77
diff changeset
67 set report address for msgid
73
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
68
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
69
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
70 init
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
71 ====
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
72
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
73 The `init` sub-command creates a new translations catalog based on a PO
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
74 template file::
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
75
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
76 $ babel init --help
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
77 usage: babel init [options]
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
78
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
79 create new message catalogs from a template
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
80
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
81 options:
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
82 -h, --help show this help message and exit
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
83 -D DOMAIN, --domain=DOMAIN
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
84 domain of PO file (defaults to lower-cased project
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
85 name)
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
86 -i INPUT_FILE, --input-file=INPUT_FILE
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
87 name of the input file
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
88 -d OUTPUT_DIR, --output-dir=OUTPUT_DIR
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
89 path to output directory
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
90 -o OUTPUT_FILE, --output-file=OUTPUT_FILE
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
91 name of the output file (default
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
92 '<output_dir>/<locale>/<domain>.po')
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
93 -l LOCALE, --locale=LOCALE
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
94 locale for the new localized catalog
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
95 --first-author=FIRST_AUTHOR_NAME
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
96 name of first author
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
97 --first-author-email=FIRST_AUTHOR_EMAIL
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
98 email of first author
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
99 --project-name=NAME the project name
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
100 --project-version=VERSION
dd5c3ba59eae Extended the docs a bit.
cmlenz
parents: 52
diff changeset
101 the project version
Copyright (C) 2012-2017 Edgewall Software