Re: Context in translations, Q_() and gettext



Mart Raudsepp wrote:

> Matthias Clasen wrote:
>
>> On 12/21/05, James Henstridge <james jamesh id au> wrote:
>> .
>>
>>> One issue with this change is that current xgettext releases probably
>>> won't extract strings for the Q2_() form.
>>>
>> Ah, you are right. We would have to do some extrs step, like extractig
>> the Q2 calls and convert them to Q  in an auxiliary file, and feed
>> that to xgettext.
>
>
> What about the --keyword=WORD switch in xgettext? Can't Q2_ simply be
> listed with that?
>
> -k, --keyword[=WORD]
>        additional  keyword  to be looked for (without WORD means not to
>        use default keywords)
>
>        (only languages C, C++, ObjectiveC, Shell, Python,  Lisp,  Emac-
>        sLisp,  librep,  Scheme,  Java,  C#,  awk,  Tcl, Perl, PHP, GCC-
>        source, Glade)
>
>
> I recall using this for some kind of a keyword a looong way back, too
> long to remember for sure.

The problem is that Q2_() would take two arguments (the context and the
message ID), both of which are required to obtain the correct
translation.  The current xgettext does not know that it needs both.

We could do "--keyword=Q2_:2" to tell xgettext to treat the second
argument as the message ID, but that would miss the context string.

James.



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