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

Re: [Libvir] many more translatable strings need to be marked

"Richard W.M. Jones" <rjones redhat com> wrote:
>> > -        remoteDispatchError (client, req, "network not found");
>> > +        remoteDispatchError (client, req, "%s", _("network not found"));
>>   Though this kind of errors make sense to translate. What doesn't make sense
>> is that the same string (and actually the same code) is repeated dozens of
>> time, better replace them with a single remoteDispatchNetworkError(client, req)
>> and generate a single translatable string.
> I thought xgettext (or whatever it is which generates the .pot file)
> would combine equal strings?

It does.
And gcc reuses them, too.

He's just saying it'd be good to avoid all this duplication in the .c file:
which is true, of course:

    $ git grep 'remoteDis.*domain.not.found'|sort|uniq -c
         29 qemud/remote.c:        remoteDispatchError (client, req, "%s", _("domain not found"));
    $ git grep 'remoteDis.*network.not.found'|wc -l
    $ git grep 'remoteDis.*storage_pool.not.found'|wc -l

But it's independent of whether to translate the strings.

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