From: Bruno Haible Date: Fri, 18 Oct 2024 17:19:38 +0000 (+0200) Subject: doc: Add an example regarding xgettext. X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8f089a25a48a2855e2ca9c700984f4dc514cfcb6;p=thirdparty%2Fgettext.git doc: Add an example regarding xgettext. Reported by Andrea G. Monaco in . * gettext-tools/doc/xgettext.texi: Add an example. --- diff --git a/gettext-tools/doc/xgettext.texi b/gettext-tools/doc/xgettext.texi index 1aa983865..ce78736e0 100644 --- a/gettext-tools/doc/xgettext.texi +++ b/gettext-tools/doc/xgettext.texi @@ -706,3 +706,18 @@ Output version information and exit. Increase verbosity level. @end table + +@subsection Example + +A sample invocation of @code{xgettext}, in a project +that has a single source file @file{src/hello.c} +that uses @samp{_} as shorthand for the @code{gettext} function, +could be: + +@example +xgettext -o hello.pot \ + --add-comments=TRANSLATORS: \ + --keyword=_ --flag=_:1:pass-c-format \ + --directory=.. \ + src/hello.c +@end example