1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-30 02:53:41 +02:00
tldr/pages/common/xgettext.md
Managor e364b551d6
gettext, msginit, msgmerge: add page; msgfmt, xgettext: edit page (#15912)
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
2025-03-11 06:50:50 +02:00

20 lines
611 B
Markdown

# xgettext
> Extract gettext strings from code files.
> More information: <https://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html>.
- Scan file and output strings to `messages.po`:
`xgettext {{path/to/input_file}}`
- Use a different output filename:
`xgettext {{[-o|--output]}} {{path/to/output_file}} {{path/to/input_file}}`
- Append new strings to an existing file:
`xgettext {{[-j|--join-existing]}} {{[-o|--output]}} {{path/to/output_file}} {{path/to/input_file}}`
- Don't add a header containing metadata to the output file:
`xgettext --omit-header {{path/to/input_file}}`