[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Command line parsing of ls, tail and wc with genparse

From: Bruno Haible
Subject: Re: [PATCH] Command line parsing of ls, tail and wc with genparse
Date: Sat, 6 Oct 2007 14:43:54 +0200
User-agent: KMail/1.5.4

Hello Michael,

Regarding http://lists.gnu.org/archive/html/bug-coreutils/2007-09/msg00129.html 

How does the internationalization of the usage strings work?

Usually generated files are not subject to xgettext scanning [1], only the
source files are. (Otherwise when a translator wants to see some context,
the tools show him some people of generated C code, beurk.)

The source file looks like this:

+/* genparse file starts here
+#include <config.h>
+#include <sys/types.h>
+#include "system.h"
+c / bytes              flag    "print the byte counts"
+m / chars              flag    "print the character counts"
+l / lines              flag    "print the newline counts__NEW_PRINT__"
+NONE / files0-from=F   string  "read input from the files specified by"
+                               "  NUL-terminated names in file F"
+L / max-line-length    flag    "print the length of the longest line"
+w / words              flag    "print the word counts__NEW_PRINT__"
+#gp_include help_version.gp
+Usage: __PROGRAM_NAME__ [OPTION]... [FILE]...
+  or:  __PROGRAM_NAME__ [OPTION]... --files0-from=F__NEW_PRINT__
+Print newline, word, and byte counts for each FILE, and a total line if
+more than one FILE is specified.  With no FILE, or when FILE is -,
+read standard input.
+__COMMAND__(emit_bug_reporting_address ())
+genparse file ends here */

This is not the usual C syntax for strings. So, what I'm missing is:

- A patch to GNU xgettext so that it will support this syntax (extracting
  strings from both the options and the usage part).

- A description of the syntax and an example how to place translator
  comments, i.e. comments that the maintainer writes for the translators
  (e.g. [2]).
  Since /* ... */ is already taken, I assume you will need to introduce
  another kind of comment syntax for this?


[2] http://www.gnu.org/software/gettext/manual/html_node/Names.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]