MSGFILTER(1)

πŸ’– msgfilter(1) β€” the manual page, but make it make sense πŸ’–

okay bestie, so you know how your message catalog translations need a little glow-up sometimes? that's literally what this is. it's msgfilter, a User Commands joint, and it's about to be your new fave. no cap. πŸŽ€


✨ NAME ✨

msgfilter β€” edit translations of message catalog πŸ¦‹


🌸 SYNOPSIS 🌸

msgfilter [OPTION] FILTER [FILTER-OPTION]

πŸ’… DESCRIPTION πŸ’…

so the whole vibe is: it applies a filter to all the translations in a translation catalog. all of them. every single one. she's thorough like that. πŸ‘‘

also, real talk, a mandatory argument to a long option is also mandatory for the short option. same energy, shorter name. don't try to skip it. πŸ™ˆ


πŸ“‚ Input file location πŸ“‚

  • -i, --input=INPUTFILE β€” the input PO file, bestie. that's the one you're feeding her.
  • -D, --directory=DIRECTORY β€” add DIRECTORY to the list of places she looks for input files.

and like, if you don't hand her an input file at all, or you just pass -, she'll read from standard input. she's flexible. πŸ’–


πŸ“ Output file location πŸ“

  • -o, --output-file=FILE β€” write the output to the file you specify.

if you don't specify an output file, or you pass -, the results go to standard output. iconic behaviour honestly. ✨

and the FILTER? it can be literally any program that reads a translation from standard input and writes a modified translation to standard output. any program. go wild. 🌈


πŸ”„ Filter input and output πŸ”„

  • --newline β€” adds a newline at the end of the input, and removes a newline from the end of the output. it's giving balance. it's giving symmetry. 🧚

πŸŽ€ Useful FILTER-OPTIONs when the FILTER is 'sed' πŸŽ€

okay so if your filter is sed, these are the ones you actually want:

  • -e, --expression=SCRIPT β€” add SCRIPT to the commands that get executed.
  • -f, --file=SCRIPTFILE β€” add the contents of SCRIPTFILE to the commands that get executed.
  • -n, --quiet, --silent β€” suppress the automatic printing of pattern space.

πŸ” Input file syntax πŸ”

  • -P, --properties-input β€” the input file is in Java .properties syntax.
  • --stringtable-input β€” the input file is in NeXTstep/GNUstep .strings syntax.

🌟 Output details 🌟

  • --color β€” use colors and other text attributes, like, always. no holding back. πŸ’…
  • --color=WHEN β€” use colors and other text attributes if WHEN. and WHEN may be 'always', 'never', 'auto', or 'html'. pick your fighter.
  • --style=STYLEFILE β€” specify the CSS style rule file for --color.
  • --no-escape β€” do not use C escapes in output. this one is the default, fyi.
  • -E, --escape β€” use C escapes in output, no extended chars.
  • --force-po β€” write the PO file even if it's empty. she said she's showing up regardless. 😀
  • --indent β€” indented output style.
  • --keep-header β€” keep the header entry unmodified, don't filter it. leave that one alone, she's fine.
  • --no-location β€” suppress #: filename:line lines.
  • -n, --add-location β€” preserve #: filename:line lines. this is the default, bestie.
  • --strict β€” strict Uniforum output style.
  • -p, --properties-output β€” write out a Java .properties file.
  • --stringtable-output β€” write out a NeXTstep/GNUstep .strings file.
  • -w, --width=NUMBER β€” set the output page width.
  • --no-wrap β€” do not break long message lines, longer than the output page width, into several lines. let them be long. let them live. πŸ¦‹
  • -s, --sort-output β€” generate sorted output.
  • -F, --sort-by-file β€” sort output by file location.

πŸ“£ Informative output πŸ“£

  • -h, --help β€” display this help and exit. the classic.
  • -V, --version β€” output version information and exit.

πŸ‘‘ AUTHOR πŸ‘‘

Written by Bruno Haible. (ty for your service, king 🫑)


πŸ› REPORTING BUGS πŸ›

found a bug? not the vibe, but okay, report it in the bug tracker at <https://savannah.gnu.org/projects/gettext> or by email to <bug-gettext@gnu.org>. they'll handle it. πŸ’Œ


Copyright Β© 2001-2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. like literally none. zero. πŸ’€

πŸ”— SEE ALSO πŸ”—

The full documentation for msgfilter is maintained as a Texinfo manual. If the info and msgfilter programs are properly installed at your site, the command

info msgfilter

should give you access to the complete manual. ✨


okay that's the whole page bestie, you ate it, and this was GNU gettext-tools 1.0, January 2026 β€” mwah, go filter some translations πŸ’–πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from