Hi,

Peng Yu wrote:
> xxx is not defined in the enviroment. I'd like envsubst to show an
> error message. But there is not such an option available as of now.
> Can this feature be added?
> 
> ~$ cat template.txt
> The word is $foo
> The word is $xxxx
> ~$ word=foo envsubst < template.txt
> The word is foo
> The word is

Why do you need this? envsubst is an auxiliary program for eval_gettext.
For example

  eval_gettext 'The word is $foo'

produces a POT file that contains

  #, sh-format
  msgid "The word is $foo"
  msgstr ""

If the translator has provided the translation

  #, sh-format
  msgid "The word is $foo"
  msgstr "The word is $xxxx"

"msfgmt -c" will produce an error:

  a format specification for argument 'foo' doesn't exist in 'msgstr'

So, the string "The word is $xxxx" will not even end up in a .mo file.

Bruno


Reply via email to