1@pindex msgattrib 2@cindex @code{msgattrib} program, usage 3@example 4msgattrib [@var{option}] [@var{inputfile}] 5@end example 6 7@cindex filter messages according to attributes 8@cindex attribute manipulation 9The @code{msgattrib} program filters the messages of a translation catalog 10according to their attributes, and manipulates the attributes. 11 12@subsection Input file location 13 14@table @samp 15@item @var{inputfile} 16Input PO file. 17 18@item -D @var{directory} 19@itemx --directory=@var{directory} 20@opindex -D@r{, @code{msgattrib} option} 21@opindex --directory@r{, @code{msgattrib} option} 22Add @var{directory} to the list of directories. Source files are 23searched relative to this list of directories. The resulting @file{.po} 24file will be written relative to the current directory, though. 25 26@end table 27 28If no @var{inputfile} is given or if it is @samp{-}, standard input is read. 29 30@subsection Output file location 31 32@table @samp 33@item -o @var{file} 34@itemx --output-file=@var{file} 35@opindex -o@r{, @code{msgattrib} option} 36@opindex --output-file@r{, @code{msgattrib} option} 37Write output to specified file. 38 39@end table 40 41The results are written to standard output if no output file is specified 42or if it is @samp{-}. 43 44@subsection Message selection 45 46@table @samp 47@item --translated 48@opindex --translated@r{, @code{msgattrib} option} 49Keep translated messages, remove untranslated messages. 50 51@item --untranslated 52@opindex --untranslated@r{, @code{msgattrib} option} 53Keep untranslated messages, remove translated messages. 54 55@item --no-fuzzy 56@opindex --no-fuzzy@r{, @code{msgattrib} option} 57Remove 58@ifhtml 59���fuzzy��� 60@end ifhtml 61@ifnothtml 62`fuzzy' 63@end ifnothtml 64marked messages. 65 66@item --only-fuzzy 67@opindex --only-fuzzy@r{, @code{msgattrib} option} 68Keep 69@ifhtml 70���fuzzy��� 71@end ifhtml 72@ifnothtml 73`fuzzy' 74@end ifnothtml 75marked messages, remove all other messages. 76 77@item --no-obsolete 78@opindex --no-obsolete@r{, @code{msgattrib} option} 79Remove obsolete #~ messages. 80 81@item --only-obsolete 82@opindex --only-obsolete@r{, @code{msgattrib} option} 83Keep obsolete #~ messages, remove all other messages. 84 85@end table 86 87@subsection Attribute manipulation 88 89@cindex modify message attributes 90Attributes are modified after the message selection/removal has been 91performed. If the @samp{--only-file} or @samp{--ignore-file} option is 92specified, the attribute modification is applied only to those messages 93that are listed in the @var{only-file} and not listed in the 94@var{ignore-file}. 95 96@table @samp 97@item --set-fuzzy 98@opindex --set-fuzzy@r{, @code{msgattrib} option} 99Set all messages 100@ifhtml 101���fuzzy���. 102@end ifhtml 103@ifnothtml 104`fuzzy'. 105@end ifnothtml 106 107@item --clear-fuzzy 108@opindex --clear-fuzzy@r{, @code{msgattrib} option} 109Set all messages 110@ifhtml 111non-���fuzzy���. 112@end ifhtml 113@ifnothtml 114non-`fuzzy'. 115@end ifnothtml 116 117@item --set-obsolete 118@opindex --set-obsolete@r{, @code{msgattrib} option} 119Set all messages obsolete. 120 121@item --clear-obsolete 122@opindex --clear-obsolete@r{, @code{msgattrib} option} 123Set all messages non-obsolete. 124 125@item --clear-previous 126@opindex --clear-previous@r{, @code{msgattrib} option} 127Remove the ``previous msgid'' (@samp{#|}) comments from all messages. 128 129@item --only-file=@var{file} 130@opindex --only-file@r{, @code{msgattrib} option} 131Limit the attribute changes to entries that are listed in @var{file}. 132@var{file} should be a PO or POT file. 133 134@item --ignore-file=@var{file} 135@opindex --ignore-file@r{, @code{msgattrib} option} 136Limit the attribute changes to entries that are not listed in @var{file}. 137@var{file} should be a PO or POT file. 138 139@item --fuzzy 140@opindex --fuzzy@r{, @code{msgattrib} option} 141Synonym for @samp{--only-fuzzy --clear-fuzzy}: It keeps only the fuzzy 142messages and removes their 143@ifhtml 144���fuzzy��� 145@end ifhtml 146@ifnothtml 147`fuzzy' 148@end ifnothtml 149mark. 150 151@item --obsolete 152@opindex --obsolete@r{, @code{msgattrib} option} 153Synonym for @samp{--only-obsolete --clear-obsolete}: It keeps only the 154obsolete messages and makes them non-obsolete. 155 156@end table 157 158@subsection Input file syntax 159 160@table @samp 161@item -P 162@itemx --properties-input 163@opindex -P@r{, @code{msgattrib} option} 164@opindex --properties-input@r{, @code{msgattrib} option} 165Assume the input file is a Java ResourceBundle in Java @code{.properties} 166syntax, not in PO file syntax. 167 168@item --stringtable-input 169@opindex --stringtable-input@r{, @code{msgattrib} option} 170Assume the input file is a NeXTstep/GNUstep localized resource file in 171@code{.strings} syntax, not in PO file syntax. 172 173@end table 174 175@subsection Output details 176 177@c --no-escape and --escape omitted on purpose. They are not useful. 178 179@table @samp 180@item --force-po 181@opindex --force-po@r{, @code{msgattrib} option} 182Always write an output file even if it contains no message. 183 184@item -i 185@itemx --indent 186@opindex -i@r{, @code{msgattrib} option} 187@opindex --indent@r{, @code{msgattrib} option} 188Write the .po file using indented style. 189 190@item --no-location 191@opindex --no-location@r{, @code{msgattrib} option} 192Do not write @samp{#: @var{filename}:@var{line}} lines. 193 194@item -n 195@itemx --add-location 196@opindex -n@r{, @code{msgattrib} option} 197@opindex --add-location@r{, @code{msgattrib} option} 198Generate @samp{#: @var{filename}:@var{line}} lines (default). 199 200@item --strict 201@opindex --strict@r{, @code{msgattrib} option} 202Write out a strict Uniforum conforming PO file. Note that this 203Uniforum format should be avoided because it doesn't support the 204GNU extensions. 205 206@item -p 207@itemx --properties-output 208@opindex -p@r{, @code{msgattrib} option} 209@opindex --properties-output@r{, @code{msgattrib} option} 210Write out a Java ResourceBundle in Java @code{.properties} syntax. Note 211that this file format doesn't support plural forms and silently drops 212obsolete messages. 213 214@item --stringtable-output 215@opindex --stringtable-output@r{, @code{msgattrib} option} 216Write out a NeXTstep/GNUstep localized resource file in @code{.strings} syntax. 217Note that this file format doesn't support plural forms. 218 219@item -w @var{number} 220@itemx --width=@var{number} 221@opindex -w@r{, @code{msgattrib} option} 222@opindex --width@r{, @code{msgattrib} option} 223Set the output page width. Long strings in the output files will be 224split across multiple lines in order to ensure that each line's width 225(= number of screen columns) is less or equal to the given @var{number}. 226 227@item --no-wrap 228@opindex --no-wrap@r{, @code{msgattrib} option} 229Do not break long message lines. Message lines whose width exceeds the 230output page width will not be split into several lines. Only file reference 231lines which are wider than the output page width will be split. 232 233@item -s 234@itemx --sort-output 235@opindex -s@r{, @code{msgattrib} option} 236@opindex --sort-output@r{, @code{msgattrib} option} 237Generate sorted output. Note that using this option makes it much harder 238for the translator to understand each message's context. 239 240@item -F 241@itemx --sort-by-file 242@opindex -F@r{, @code{msgattrib} option} 243@opindex --sort-by-file@r{, @code{msgattrib} option} 244Sort output by file location. 245 246@end table 247 248@subsection Informative output 249 250@table @samp 251@item -h 252@itemx --help 253@opindex -h@r{, @code{msgattrib} option} 254@opindex --help@r{, @code{msgattrib} option} 255Display this help and exit. 256 257@item -V 258@itemx --version 259@opindex -V@r{, @code{msgattrib} option} 260@opindex --version@r{, @code{msgattrib} option} 261Output version information and exit. 262 263@end table 264