1*946379e7Schristos@pindex msgmerge 2*946379e7Schristos@cindex @code{msgmerge} program, usage 3*946379e7Schristos@example 4*946379e7Schristosmsgmerge [@var{option}] @var{def}.po @var{ref}.pot 5*946379e7Schristos@end example 6*946379e7Schristos 7*946379e7SchristosThe @code{msgmerge} program merges two Uniforum style .po files together. 8*946379e7SchristosThe @var{def}.po file is an existing PO file with translations which will 9*946379e7Schristosbe taken over to the newly created file as long as they still match; 10*946379e7Schristoscomments will be preserved, but extracted comments and file positions will 11*946379e7Schristosbe discarded. The @var{ref}.pot file is the last created PO file with 12*946379e7Schristosup-to-date source references but old translations, or a PO Template file 13*946379e7Schristos(generally created by @code{xgettext}); any translations or comments 14*946379e7Schristosin the file will be discarded, however dot comments and file positions 15*946379e7Schristoswill be preserved. Where an exact match cannot be found, fuzzy matching 16*946379e7Schristosis used to produce better results. 17*946379e7Schristos 18*946379e7Schristos@subsection Input file location 19*946379e7Schristos 20*946379e7Schristos@table @samp 21*946379e7Schristos@item @var{def}.po 22*946379e7SchristosTranslations referring to old sources. 23*946379e7Schristos 24*946379e7Schristos@item @var{ref}.pot 25*946379e7SchristosReferences to the new sources. 26*946379e7Schristos 27*946379e7Schristos@item -D @var{directory} 28*946379e7Schristos@itemx --directory=@var{directory} 29*946379e7Schristos@opindex -D@r{, @code{msgmerge} option} 30*946379e7Schristos@opindex --directory@r{, @code{msgmerge} option} 31*946379e7SchristosAdd @var{directory} to the list of directories. Source files are 32*946379e7Schristossearched relative to this list of directories. The resulting @file{.po} 33*946379e7Schristosfile will be written relative to the current directory, though. 34*946379e7Schristos 35*946379e7Schristos@item -C @var{file} 36*946379e7Schristos@itemx --compendium=@var{file} 37*946379e7Schristos@opindex -C@r{, @code{msgmerge} option} 38*946379e7Schristos@opindex --compendium@r{, @code{msgmerge} option} 39*946379e7SchristosSpecify an additional library of message translations. @xref{Compendium}. 40*946379e7SchristosThis option may be specified more than once. 41*946379e7Schristos 42*946379e7Schristos@end table 43*946379e7Schristos 44*946379e7Schristos@subsection Operation mode 45*946379e7Schristos 46*946379e7Schristos@table @samp 47*946379e7Schristos@item -U 48*946379e7Schristos@itemx --update 49*946379e7Schristos@opindex -U@r{, @code{msgmerge} option} 50*946379e7Schristos@opindex --update@r{, @code{msgmerge} option} 51*946379e7SchristosUpdate @var{def}.po. Do nothing if @var{def}.po is already up to date. 52*946379e7Schristos 53*946379e7Schristos@end table 54*946379e7Schristos 55*946379e7Schristos@subsection Output file location 56*946379e7Schristos 57*946379e7Schristos@table @samp 58*946379e7Schristos@item -o @var{file} 59*946379e7Schristos@itemx --output-file=@var{file} 60*946379e7Schristos@opindex -o@r{, @code{msgmerge} option} 61*946379e7Schristos@opindex --output-file@r{, @code{msgmerge} option} 62*946379e7SchristosWrite output to specified file. 63*946379e7Schristos 64*946379e7Schristos@end table 65*946379e7Schristos 66*946379e7Schristos@cindex standard output, and @code{msgmerge} program 67*946379e7SchristosThe results are written to standard output if no output file is specified 68*946379e7Schristosor if it is @samp{-}. 69*946379e7Schristos 70*946379e7Schristos@subsection Output file location in update mode 71*946379e7Schristos 72*946379e7SchristosThe result is written back to @var{def}.po. 73*946379e7Schristos 74*946379e7Schristos@table @samp 75*946379e7Schristos@item --backup=@var{control} 76*946379e7Schristos@opindex --backup@r{, @code{msgmerge} option} 77*946379e7Schristos@cindex backup old file, and @code{msgmerge} program 78*946379e7SchristosMake a backup of @var{def}.po 79*946379e7Schristos 80*946379e7Schristos@item --suffix=@var{suffix} 81*946379e7Schristos@opindex --suffix@r{, @code{msgmerge} option} 82*946379e7SchristosOverride the usual backup suffix. 83*946379e7Schristos 84*946379e7Schristos@end table 85*946379e7Schristos 86*946379e7Schristos@cindex version control for backup files, @code{msgmerge} 87*946379e7SchristosThe version control method may be selected via the @code{--backup} option 88*946379e7Schristosor through the @code{VERSION_CONTROL} environment variable. Here are the 89*946379e7Schristosvalues: 90*946379e7Schristos 91*946379e7Schristos@table @samp 92*946379e7Schristos@item none 93*946379e7Schristos@itemx off 94*946379e7SchristosNever make backups (even if @code{--backup} is given). 95*946379e7Schristos 96*946379e7Schristos@item numbered 97*946379e7Schristos@itemx t 98*946379e7SchristosMake numbered backups. 99*946379e7Schristos 100*946379e7Schristos@item existing 101*946379e7Schristos@itemx nil 102*946379e7SchristosMake numbered backups if numbered backups for this file already exist, 103*946379e7Schristosotherwise make simple backups. 104*946379e7Schristos 105*946379e7Schristos@item simple 106*946379e7Schristos@itemx never 107*946379e7SchristosAlways make simple backups. 108*946379e7Schristos 109*946379e7Schristos@end table 110*946379e7Schristos 111*946379e7SchristosThe backup suffix is @samp{~}, unless set with @code{--suffix} or the 112*946379e7Schristos@code{SIMPLE_BACKUP_SUFFIX} environment variable. 113*946379e7Schristos 114*946379e7Schristos@subsection Operation modifiers 115*946379e7Schristos 116*946379e7Schristos@table @samp 117*946379e7Schristos@item -m 118*946379e7Schristos@itemx --multi-domain 119*946379e7Schristos@opindex -m@r{, @code{msgmerge} option} 120*946379e7Schristos@opindex --multi-domain@r{, @code{msgmerge} option} 121*946379e7SchristosApply @var{ref}.pot to each of the domains in @var{def}.po. 122*946379e7Schristos 123*946379e7Schristos@item -N 124*946379e7Schristos@itemx --no-fuzzy-matching 125*946379e7Schristos@opindex -N@r{, @code{msgmerge} option} 126*946379e7Schristos@opindex --no-fuzzy-matching@r{, @code{msgmerge} option} 127*946379e7SchristosDo not use fuzzy matching when an exact match is not found. This may speed 128*946379e7Schristosup the operation considerably. 129*946379e7Schristos 130*946379e7Schristos@item --previous 131*946379e7Schristos@opindex --previous@r{, @code{msgmerge} option} 132*946379e7SchristosKeep the previous msgids of translated messages, marked with @samp{#|}, when 133*946379e7Schristosadding the fuzzy marker to such messages. 134*946379e7Schristos@end table 135*946379e7Schristos 136*946379e7Schristos@subsection Input file syntax 137*946379e7Schristos 138*946379e7Schristos@table @samp 139*946379e7Schristos@item -P 140*946379e7Schristos@itemx --properties-input 141*946379e7Schristos@opindex -P@r{, @code{msgmerge} option} 142*946379e7Schristos@opindex --properties-input@r{, @code{msgmerge} option} 143*946379e7SchristosAssume the input files are Java ResourceBundles in Java @code{.properties} 144*946379e7Schristossyntax, not in PO file syntax. 145*946379e7Schristos 146*946379e7Schristos@item --stringtable-input 147*946379e7Schristos@opindex --stringtable-input@r{, @code{msgmerge} option} 148*946379e7SchristosAssume the input files are NeXTstep/GNUstep localized resource files in 149*946379e7Schristos@code{.strings} syntax, not in PO file syntax. 150*946379e7Schristos 151*946379e7Schristos@end table 152*946379e7Schristos 153*946379e7Schristos@subsection Output details 154*946379e7Schristos 155*946379e7Schristos@c --no-escape and --escape omitted on purpose. They are not useful. 156*946379e7Schristos 157*946379e7Schristos@table @samp 158*946379e7Schristos@item --force-po 159*946379e7Schristos@opindex --force-po@r{, @code{msgmerge} option} 160*946379e7SchristosAlways write an output file even if it contains no message. 161*946379e7Schristos 162*946379e7Schristos@item -i 163*946379e7Schristos@itemx --indent 164*946379e7Schristos@opindex -i@r{, @code{msgmerge} option} 165*946379e7Schristos@opindex --indent@r{, @code{msgmerge} option} 166*946379e7SchristosWrite the .po file using indented style. 167*946379e7Schristos 168*946379e7Schristos@item --no-location 169*946379e7Schristos@opindex --no-location@r{, @code{msgmerge} option} 170*946379e7SchristosDo not write @samp{#: @var{filename}:@var{line}} lines. 171*946379e7Schristos 172*946379e7Schristos@item --add-location 173*946379e7Schristos@opindex --add-location@r{, @code{msgmerge} option} 174*946379e7SchristosGenerate @samp{#: @var{filename}:@var{line}} lines (default). 175*946379e7Schristos 176*946379e7Schristos@item --strict 177*946379e7Schristos@opindex --strict@r{, @code{msgmerge} option} 178*946379e7SchristosWrite out a strict Uniforum conforming PO file. Note that this 179*946379e7SchristosUniforum format should be avoided because it doesn't support the 180*946379e7SchristosGNU extensions. 181*946379e7Schristos 182*946379e7Schristos@item -p 183*946379e7Schristos@itemx --properties-output 184*946379e7Schristos@opindex -p@r{, @code{msgmerge} option} 185*946379e7Schristos@opindex --properties-output@r{, @code{msgmerge} option} 186*946379e7SchristosWrite out a Java ResourceBundle in Java @code{.properties} syntax. Note 187*946379e7Schristosthat this file format doesn't support plural forms and silently drops 188*946379e7Schristosobsolete messages. 189*946379e7Schristos 190*946379e7Schristos@item --stringtable-output 191*946379e7Schristos@opindex --stringtable-output@r{, @code{msgmerge} option} 192*946379e7SchristosWrite out a NeXTstep/GNUstep localized resource file in @code{.strings} syntax. 193*946379e7SchristosNote that this file format doesn't support plural forms. 194*946379e7Schristos 195*946379e7Schristos@item -w @var{number} 196*946379e7Schristos@itemx --width=@var{number} 197*946379e7Schristos@opindex -w@r{, @code{msgmerge} option} 198*946379e7Schristos@opindex --width@r{, @code{msgmerge} option} 199*946379e7SchristosSet the output page width. Long strings in the output files will be 200*946379e7Schristossplit across multiple lines in order to ensure that each line's width 201*946379e7Schristos(= number of screen columns) is less or equal to the given @var{number}. 202*946379e7Schristos 203*946379e7Schristos@item --no-wrap 204*946379e7Schristos@opindex --no-wrap@r{, @code{msgmerge} option} 205*946379e7SchristosDo not break long message lines. Message lines whose width exceeds the 206*946379e7Schristosoutput page width will not be split into several lines. Only file reference 207*946379e7Schristoslines which are wider than the output page width will be split. 208*946379e7Schristos 209*946379e7Schristos@item -s 210*946379e7Schristos@itemx --sort-output 211*946379e7Schristos@opindex -s@r{, @code{msgmerge} option} 212*946379e7Schristos@opindex --sort-output@r{, @code{msgmerge} option} 213*946379e7Schristos@cindex sorting @code{msgmerge} output 214*946379e7SchristosGenerate sorted output. Note that using this option makes it much harder 215*946379e7Schristosfor the translator to understand each message's context. 216*946379e7Schristos 217*946379e7Schristos@item -F 218*946379e7Schristos@itemx --sort-by-file 219*946379e7Schristos@opindex -F@r{, @code{msgmerge} option} 220*946379e7Schristos@opindex --sort-by-file@r{, @code{msgmerge} option} 221*946379e7SchristosSort output by file location. 222*946379e7Schristos 223*946379e7Schristos@end table 224*946379e7Schristos 225*946379e7Schristos@subsection Informative output 226*946379e7Schristos 227*946379e7Schristos@table @samp 228*946379e7Schristos@item -h 229*946379e7Schristos@itemx --help 230*946379e7Schristos@opindex -h@r{, @code{msgmerge} option} 231*946379e7Schristos@opindex --help@r{, @code{msgmerge} option} 232*946379e7SchristosDisplay this help and exit. 233*946379e7Schristos 234*946379e7Schristos@item -V 235*946379e7Schristos@itemx --version 236*946379e7Schristos@opindex -V@r{, @code{msgmerge} option} 237*946379e7Schristos@opindex --version@r{, @code{msgmerge} option} 238*946379e7SchristosOutput version information and exit. 239*946379e7Schristos 240*946379e7Schristos@item -v 241*946379e7Schristos@itemx --verbose 242*946379e7Schristos@opindex -v@r{, @code{msgmerge} option} 243*946379e7Schristos@opindex --verbose@r{, @code{msgmerge} option} 244*946379e7SchristosIncrease verbosity level. 245*946379e7Schristos 246*946379e7Schristos@item -q 247*946379e7Schristos@itemx --quiet 248*946379e7Schristos@itemx --silent 249*946379e7Schristos@opindex -q@r{, @code{msgmerge} option} 250*946379e7Schristos@opindex --quiet@r{, @code{msgmerge} option} 251*946379e7Schristos@opindex --silent@r{, @code{msgmerge} option} 252*946379e7SchristosSuppress progress indicators. 253*946379e7Schristos 254*946379e7Schristos@end table 255