Hello,

> Stack Overflow Discussion:
>> I am using xgettext with standard input because the input is not available 
>> in a file.

The GNU gettext documentation [1] explains that these references are useful
for a translator to understand the context of a certain message. (Admittedly
a translator who has an at least rough understanding of a programming language.)

You cannot give this service to a translator if the input is not available as a
file.

Therefore you should try to make the input available as a file, and make it 
clear
to the translator where to find this source file.

If you really can't do that, you can use the xgettext option '--no-location'.

> I need an option added to the xgettext utility that would allow me to 
> overwrite the filename used in the location line. Currently, when supplying 
> the source code via stdin, it just says “#: standard input:123”, and I want 
> to be able to control what it says instead of “standard input”.

There is no point in introducing such an option. If the translator cannot
get the file mentioned in the references, the references are useless.

Bruno

[1] https://www.gnu.org/software/gettext/manual/html_node/C-Sources-Context.html


Reply via email to