msgcomm â find common messages in PO files
| Use Case | Command | Description |
|---|---|---|
| đ Find messages common to all input files | msgcomm file1.po file2.po |
Default: prints messages present in every file (more-than=1) |
| đ Require messages to appear in more than N files | msgcomm --more-than=N file*.po |
Only prints messages with at least N definitions |
| đ Find unique messages (appear in only one file) | msgcomm --unique file*.po |
Shorthand for --less-than=2 |
| đ Write output to a file | msgcomm -o output.po file*.po |
Otherwise writes to stdout |
| đ Read input file list from a file | msgcomm -f filelist.txt |
Useful when many files are involved |
msgcomm [OPTION] [INPUTFILE]...
The msgcomm program finds messages which are common to two or more of the specified PO files. By using the --more-than option, greater commonality may be requested before messages are printed. Conversely, the --less-than option may be used to specify less commonality before messages are printed (i.e. --less-than=2 will only print the unique messages). Translations, comments and extracted comments will be preserved, but only from the first PO file to define them. File positions from all PO files will be cumulated.
msgcomm ProgramINPUTFILE âĻ đ Input files.-f FILE / --files-from=FILE đ Read the names of the input files from FILE instead of getting them from the command line.-D DIRECTORY / --directory=DIRECTORY đ Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting .po file will be written relative to the current directory, though.If INPUTFILE is -, standard input is read.
-o FILE / --output-file=FILE đž Write output to specified file.The results are written to standard output if no output file is specified or if it is -.
-< NUMBER / --less-than=NUMBER đŊ Print messages with less than NUMBER definitions, defaults to infinite if not set.-> NUMBER / --more-than=NUMBER đŧ Print messages with more than NUMBER definitions, defaults to 1 if not set.-u / --unique đ Shorthand for --less-than=2. Requests that only unique messages be printed.-P / --properties-input â Assume the input files are Java ResourceBundles in Java .properties syntax, not in PO file syntax.--stringtable-input đ Assume the input files are NeXTstep/GNUstep localized resource files in .strings syntax, not in PO file syntax.--color / --color=WHEN đ¨ Specify whether or when to use colors and other text attributes. See The --color option for details.--style=STYLE_FILE đ¨ Specify the CSS style rule file to use for --color. See The --style option for details.--force-po đĒ Always write an output file even if it contains no message.-i / --indent đ Write the .po file using indented style.--no-location đĢ Do not write #: FILENAME:LINE lines.-n / --add-location=TYPE đ Generate #: FILENAME:LINE lines (default). The optional TYPE can be either full, file, or never. If it is not given or full, it generates the lines with both file name and line number. If it is file, the line number part is omitted. If it is never, it completely suppresses the lines (same as --no-location).--strict đ Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions.-p / --properties-output â Write out a Java ResourceBundle in Java .properties syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages.--stringtable-output đ Write out a NeXTstep/GNUstep localized resource file in .strings syntax. Note that this file format doesn't support plural forms.-w NUMBER / --width=NUMBER đ Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER.--no-wrap đĢ Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split.-s / --sort-output đ¤ Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context.-F / --sort-by-file đ Sort output by file location.--omit-header đĢ Don't write header with msgid "" entry.-h / --help â Display this help and exit.-V / --version âšī¸ Output version information and exit.Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-31 03:51 @216.73.217.152
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format