[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gettext] xgettext - add option to overwrite the file name in th
Re: [bug-gettext] xgettext - add option to overwrite the file name in the location comment
Fri, 9 Jun 2017 09:11:20 +0200
> Am 09.06.2017 um 01:44 schrieb Bruno Haible <address@hidden>:
>> Stack Overflow Discussion:
>>> I am using xgettext with standard input because the input is not available
>>> in a file.
> The GNU gettext documentation  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
> You cannot give this service to a translator if the input is not available as
The input comes from an actual file, but it's precompiled. The toolchain
operates completely in-memory until the final files are emitted. I could write
the memory contents to a file and then have xgettext load that file but it
would mean hundreds of little files written just to be deleted after.
> Therefore you should try to make the input available as a file, and make it
> 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.
My goal here is to provide the translator with the actual file and the filename
I would like to provide is the real filename.