[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gettext manual lacks information about xgettext --keyword
From: |
Bruno Haible |
Subject: |
Re: Gettext manual lacks information about xgettext --keyword |
Date: |
Fri, 16 Jul 2004 17:39:09 +0200 |
User-agent: |
KMail/1.5 |
Yann Dirson wrote:
> In the section of the manual dedicated to xgettext, there is no
> precise information about what the --keyword argument may look like
> for various syntaxes, or even what the default keywords are.
You find examples for each language in the examples/ directory, and the
default keywords are in the source code.
> At least a link to the "Other Programming Languages" section would be
> useful.
Yes, maybe.
> My problem was to find a syntax to add to a configuration language
> (wesnoth markup language, see wesnoth.org), and I wanted to take
> advantage of the existing xgettext functionality, to avoid having to
> modify it.
>
> For this, a list of the syntax types would be useful - I mean C-like
> _("...") vs. shell/awk-like _"..." / $"...", as well as how (for the
> latter syntax) to change the key character.
Every programming language and scripting language has its own syntax and
its own quirks. Therefore a classification into "syntax types" is not
very useful.
> Basically _"..." is what I wanted to use, and I would gladly use
> -Lawk, but this one does not handle newlines inside strings.
Yes, these are the kinds of issues that you face when assuming that
two scripting languages behave the same way.
> And that's where it hurts: "-Lbash -k_" does not work
"-Lbash -k_" should work if you put a space between the underscore and the
string. In shell syntax you need a space to separate a command from its
arguments.
> Looking at the code I realize that '$' is not a keyword but is
> hardcoded, and that keywords are only recognized if they look like
> shell commands.
Yes, shell commands and functions are the way to program in shell language.
> In short, what do you recommend to get a _"..." syntax supporting
> multiline strings looking like:
>
> foo=_"this is a
> long
> multiline
> string"
Write a new xgettext backend, i.e. a x-<lang>.{h,c} file pair and
corresponding tests for the test suite.
Bruno
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Gettext manual lacks information about xgettext --keyword,
Bruno Haible <=