gawk: String Extraction
1
1 13.4.1 Extracting Marked Strings
1 --------------------------------
1
1 Once your 'awk' program is working, and all the strings have been marked
1 and you've set (and perhaps bound) the text domain, it is time to
1 produce translations. First, use the '--gen-pot' command-line option to
1 create the initial '.pot' file:
1
1 gawk --gen-pot -f guide.awk > guide.pot
1
1 When run with '--gen-pot', 'gawk' does not execute your program.
1 Instead, it parses it as usual and prints all marked strings to standard
1 output in the format of a GNU 'gettext' Portable Object file. Also
1 included in the output are any constant strings that appear as the first
1 argument to 'dcgettext()' or as the first and second argument to
1 'dcngettext()'.(1) You should distribute the generated '.pot' file with
1 your 'awk' program; translators will eventually use it to provide you
1 translations that you can also then distribute. ⇒I18N Example
1 for the full list of steps to go through to create and test translations
1 for 'guide'.
1
1 ---------- Footnotes ----------
1
1 (1) The 'xgettext' utility that comes with GNU 'gettext' can handle
1 '.awk' files.
1