[Top][All Lists]

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

Re: [bug-gettext] xgettext shell extraction

From: Daiki Ueno
Subject: Re: [bug-gettext] xgettext shell extraction
Date: Sat, 22 Nov 2014 14:37:38 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)


David Adam <address@hidden> writes:

> This command:
>   xgettext -LShell -o - input.sh
> on this file input.sh:
>   oddpos gettext "string bar"
>   evenpos foo gettext "string foo"
> produces
>   #: input.sh:2
>   msgid "string foo"
>   msgstr ""
> (and nothing else).
> That is, keywords are only acted upon if in an even (one-indexed) 
> position. Is this a bug? Is keyword extraction even supposed to work on 
> anything except the first part of the command? The source for 
> gettext-0.19.3 suggests it is according to the comments on read_command() 
> in gettext-tools/src/x-sh.c, but I appreciate it is something of an edge 
> case.

Thanks for the report.  The current behavior seems inconsistent, yes.
However, as you questioned, I'm not even sure if it behaves right for
the second line.  As xgettext looks for command invocations, I think it
would be more natural to skip the whole line.

> The context for this comes from the fact that the a program I am 
> contributing to has a command that takes a string as an argument like this:
>   complete -c ls -s l --description "Long"

Isn't it feasible to write it as:

  complete -c ls -s l --description `gettext "Long"`


Daiki Ueno

reply via email to

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