1@c This file is part of the GNU gettext manual. 2@c Copyright (C) 1995-2019 Free Software Foundation, Inc. 3@c See the file gettext.texi for copying conditions. 4 5@pindex msgen 6@cindex @code{msgen} program, usage 7@example 8msgen [@var{option}] @var{inputfile} 9@end example 10 11@cindex generate translation catalog in English 12The @code{msgen} program creates an English translation catalog. The 13input file is the last created English PO file, or a PO Template file 14(generally created by xgettext). Untranslated entries are assigned a 15translation that is identical to the msgid. 16 17Note: @samp{msginit --no-translator --locale=en} performs a very similar 18task. The main difference is that @code{msginit} cares specially about 19the header entry, whereas @code{msgen} doesn't. 20 21@subsection Input file location 22 23@table @samp 24@item @var{inputfile} 25Input PO or POT file. 26 27@item -D @var{directory} 28@itemx --directory=@var{directory} 29@opindex -D@r{, @code{msgen} option} 30@opindex --directory@r{, @code{msgen} option} 31Add @var{directory} to the list of directories. Source files are 32searched relative to this list of directories. The resulting @file{.po} 33file will be written relative to the current directory, though. 34 35@end table 36 37If @var{inputfile} is @samp{-}, standard input is read. 38 39@subsection Output file location 40 41@table @samp 42@item -o @var{file} 43@itemx --output-file=@var{file} 44@opindex -o@r{, @code{msgen} option} 45@opindex --output-file@r{, @code{msgen} option} 46Write output to specified file. 47 48@end table 49 50The results are written to standard output if no output file is specified 51or if it is @samp{-}. 52 53@subsection Input file syntax 54 55@table @samp 56@item -P 57@itemx --properties-input 58@opindex -P@r{, @code{msgen} option} 59@opindex --properties-input@r{, @code{msgen} option} 60Assume the input file is a Java ResourceBundle in Java @code{.properties} 61syntax, not in PO file syntax. 62 63@item --stringtable-input 64@opindex --stringtable-input@r{, @code{msgen} option} 65Assume the input file is a NeXTstep/GNUstep localized resource file in 66@code{.strings} syntax, not in PO file syntax. 67 68@end table 69 70@subsection Output details 71 72@c --no-escape and --escape omitted on purpose. They are not useful. 73 74@table @samp 75@item --lang=@var{catalogname} 76@opindex --lang@r{, @code{msgen} option} 77Specify the @samp{Language} field to be used in the header entry. See 78@ref{Header Entry} for the meaning of this field. Note: The 79@samp{Language-Team} and @samp{Plural-Forms} fields are not set by this 80option. 81 82@item --color 83@itemx --color=@var{when} 84@opindex --color@r{, @code{msgen} option} 85Specify whether or when to use colors and other text attributes. 86See @ref{The --color option} for details. 87 88@item --style=@var{style_file} 89@opindex --style@r{, @code{msgen} option} 90Specify the CSS style rule file to use for @code{--color}. 91See @ref{The --style option} for details. 92 93@item --force-po 94@opindex --force-po@r{, @code{msgen} option} 95Always write an output file even if it contains no message. 96 97@item -i 98@itemx --indent 99@opindex -i@r{, @code{msgen} option} 100@opindex --indent@r{, @code{msgen} option} 101Write the .po file using indented style. 102 103@item --no-location 104@opindex --no-location@r{, @code{msgen} option} 105Do not write @samp{#: @var{filename}:@var{line}} lines. 106 107@item -n 108@itemx --add-location=@var{type} 109@opindex --add-location@r{, @code{msgen} option} 110Generate @samp{#: @var{filename}:@var{line}} lines (default). 111 112The optional @var{type} can be either @samp{full}, @samp{file}, or 113@samp{never}. If it is not given or @samp{full}, it generates the 114lines with both file name and line number. If it is @samp{file}, the 115line number part is omitted. If it is @samp{never}, it completely 116suppresses the lines (same as @code{--no-location}). 117 118@item --strict 119@opindex --strict@r{, @code{msgen} option} 120Write out a strict Uniforum conforming PO file. Note that this 121Uniforum format should be avoided because it doesn't support the 122GNU extensions. 123 124@item -p 125@itemx --properties-output 126@opindex -p@r{, @code{msgen} option} 127@opindex --properties-output@r{, @code{msgen} option} 128Write out a Java ResourceBundle in Java @code{.properties} syntax. Note 129that this file format doesn't support plural forms and silently drops 130obsolete messages. 131 132@item --stringtable-output 133@opindex --stringtable-output@r{, @code{msgen} option} 134Write out a NeXTstep/GNUstep localized resource file in @code{.strings} syntax. 135Note that this file format doesn't support plural forms. 136 137@item -w @var{number} 138@itemx --width=@var{number} 139@opindex -w@r{, @code{msgen} option} 140@opindex --width@r{, @code{msgen} option} 141Set the output page width. Long strings in the output files will be 142split across multiple lines in order to ensure that each line's width 143(= number of screen columns) is less or equal to the given @var{number}. 144 145@item --no-wrap 146@opindex --no-wrap@r{, @code{msgen} option} 147Do not break long message lines. Message lines whose width exceeds the 148output page width will not be split into several lines. Only file reference 149lines which are wider than the output page width will be split. 150 151@item -s 152@itemx --sort-output 153@opindex -s@r{, @code{msgen} option} 154@opindex --sort-output@r{, @code{msgen} option} 155Generate sorted output. Note that using this option makes it much harder 156for the translator to understand each message's context. 157 158@item -F 159@itemx --sort-by-file 160@opindex -F@r{, @code{msgen} option} 161@opindex --sort-by-file@r{, @code{msgen} option} 162Sort output by file location. 163 164@end table 165 166@subsection Informative output 167 168@table @samp 169@item -h 170@itemx --help 171@opindex -h@r{, @code{msgen} option} 172@opindex --help@r{, @code{msgen} option} 173Display this help and exit. 174 175@item -V 176@itemx --version 177@opindex -V@r{, @code{msgen} option} 178@opindex --version@r{, @code{msgen} option} 179Output version information and exit. 180 181@end table 182