bug-gettext
[Top][All Lists]
Advanced

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

[bug-gettext] xgettext -L shell -k --keyword X : 'VAR=VAL X' not recogni


From: Jason Vas Dias
Subject: [bug-gettext] xgettext -L shell -k --keyword X : 'VAR=VAL X' not recognized - bug?
Date: Tue, 27 Aug 2019 04:54:24 +0000

Good day -

 I think this is a bug:

 Running, eg, on Linux x86_64, with gettext-0.20.1 (latest version) ,
 these commands to create a contrived example:

   $ echo '#!/bin/bash
   function say()
   { declare -n v="$1"; shift;
     v=${LOG_TAG}${LOG_TAG:+: }$(gettext -d $MY_TEXT_DOMAIN "$@");
     return $(( (${#v}>0)?0:1 ));
   }
   tr_msg=;
   LOG_TAG=X say tr_msg hello;
   echo "$tr_msg";
    ' > t.sh
   $ xgettext -L shell -k --keyword=say:2 -o - t.sh
   $
   # (no output!)

 If I remove the LOG_TAG=X setting on line 7, we get:

   $ xgettext -L shell -k --keyword=say:2 -o - t.sh
   ...
   #: t.sh:8
   msgid "hello"
   msgstr ""


 So xgettext -L shell does not recognize bash shell command-specific
 environment variable settings when prefixed to a keyword command.

 Why ? All major POSIX compatible shell versions I know of support
    'VAR=VAL $command;'
 statement syntax, which is very simple to recognize.

 Please could a future version of gettext recognize this legal
 shell syntax!

 Not being able to use it needlessly limits what keyword shell functions
 can do (you cannot use command specific variable settings with them).

 Is this a bug ? Will gettext be fixed / enhanced to support this syntax ?

 Please reply to : address@hidden .

Thank You & Best Regards,
Jason Vas Dias



reply via email to

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