2019-11-30 15:16:34 +01:00
|
|
|
# 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:
|
|
|
|
|
2025-03-11 06:50:50 +02:00
|
|
|
`xgettext {{[-o|--output]}} {{path/to/output_file}} {{path/to/input_file}}`
|
2019-11-30 15:16:34 +01:00
|
|
|
|
|
|
|
- Append new strings to an existing file:
|
|
|
|
|
2025-03-11 06:50:50 +02:00
|
|
|
`xgettext {{[-j|--join-existing]}} {{[-o|--output]}} {{path/to/output_file}} {{path/to/input_file}}`
|
2019-11-30 15:16:34 +01:00
|
|
|
|
|
|
|
- Don't add a header containing metadata to the output file:
|
|
|
|
|
|
|
|
`xgettext --omit-header {{path/to/input_file}}`
|
2025-03-26 00:36:41 +02:00
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
|
|
|
`xgettext {{[-h|--help]}}`
|