xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/doc/msgcmp.texi (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1*946379e7Schristos@pindex msgcmp
2*946379e7Schristos@cindex @code{msgcmp} program, usage
3*946379e7Schristos@example
4*946379e7Schristosmsgcmp [@var{option}] @var{def}.po @var{ref}.pot
5*946379e7Schristos@end example
6*946379e7Schristos
7*946379e7Schristos@cindex compare PO files
8*946379e7SchristosThe @code{msgcmp} program compares two Uniforum style .po files to check that
9*946379e7Schristosboth contain the same set of msgid strings.  The @var{def}.po file is an
10*946379e7Schristosexisting PO file with the translations.  The @var{ref}.pot file is the last
11*946379e7Schristoscreated PO file, or a PO Template file (generally created by @code{xgettext}).
12*946379e7SchristosThis is useful for checking that you have translated each and every message
13*946379e7Schristosin your program.  Where an exact match cannot be found, fuzzy matching is
14*946379e7Schristosused to produce better diagnostics.
15*946379e7Schristos
16*946379e7Schristos@subsection Input file location
17*946379e7Schristos
18*946379e7Schristos@table @samp
19*946379e7Schristos@item @var{def}.po
20*946379e7SchristosTranslations.
21*946379e7Schristos
22*946379e7Schristos@item @var{ref}.pot
23*946379e7SchristosReferences to the sources.
24*946379e7Schristos
25*946379e7Schristos@item -D @var{directory}
26*946379e7Schristos@itemx --directory=@var{directory}
27*946379e7Schristos@opindex -D@r{, @code{msgcmp} option}
28*946379e7Schristos@opindex --directory@r{, @code{msgcmp} option}
29*946379e7SchristosAdd @var{directory} to the list of directories.  Source files are
30*946379e7Schristossearched relative to this list of directories.
31*946379e7Schristos
32*946379e7Schristos@end table
33*946379e7Schristos
34*946379e7Schristos@subsection Operation modifiers
35*946379e7Schristos
36*946379e7Schristos@table @samp
37*946379e7Schristos@item -m
38*946379e7Schristos@itemx --multi-domain
39*946379e7Schristos@opindex -m@r{, @code{msgcmp} option}
40*946379e7Schristos@opindex --multi-domain@r{, @code{msgcmp} option}
41*946379e7SchristosApply @var{ref}.pot to each of the domains in @var{def}.po.
42*946379e7Schristos
43*946379e7Schristos@item --use-fuzzy
44*946379e7Schristos@opindex --use-fuzzy@r{, @code{msgcmp} option}
45*946379e7SchristosConsider fuzzy messages in the @var{def}.po file like translated messages.
46*946379e7SchristosNote that using this option is usually wrong, because fuzzy messages are
47*946379e7Schristosexactly those which have not been validated by a human translator.
48*946379e7Schristos
49*946379e7Schristos@item --use-untranslated
50*946379e7Schristos@opindex --use-untranslated@r{, @code{msgcmp} option}
51*946379e7SchristosConsider untranslated messages in the @var{def}.po file like translated
52*946379e7Schristosmessages.  Note that using this option is usually wrong.
53*946379e7Schristos
54*946379e7Schristos@end table
55*946379e7Schristos
56*946379e7Schristos@subsection Input file syntax
57*946379e7Schristos
58*946379e7Schristos@table @samp
59*946379e7Schristos@item -P
60*946379e7Schristos@itemx --properties-input
61*946379e7Schristos@opindex -P@r{, @code{msgcmp} option}
62*946379e7Schristos@opindex --properties-input@r{, @code{msgcmp} option}
63*946379e7SchristosAssume the input files are Java ResourceBundles in Java @code{.properties}
64*946379e7Schristossyntax, not in PO file syntax.
65*946379e7Schristos
66*946379e7Schristos@item --stringtable-input
67*946379e7Schristos@opindex --stringtable-input@r{, @code{msgcmp} option}
68*946379e7SchristosAssume the input files are NeXTstep/GNUstep localized resource files in
69*946379e7Schristos@code{.strings} syntax, not in PO file syntax.
70*946379e7Schristos
71*946379e7Schristos@end table
72*946379e7Schristos
73*946379e7Schristos@subsection Informative output
74*946379e7Schristos
75*946379e7Schristos@table @samp
76*946379e7Schristos@item -h
77*946379e7Schristos@itemx --help
78*946379e7Schristos@opindex -h@r{, @code{msgcmp} option}
79*946379e7Schristos@opindex --help@r{, @code{msgcmp} option}
80*946379e7SchristosDisplay this help and exit.
81*946379e7Schristos
82*946379e7Schristos@item -V
83*946379e7Schristos@itemx --version
84*946379e7Schristos@opindex -V@r{, @code{msgcmp} option}
85*946379e7Schristos@opindex --version@r{, @code{msgcmp} option}
86*946379e7SchristosOutput version information and exit.
87*946379e7Schristos
88*946379e7Schristos@end table
89