Re: Add translation contexts



Hi,

On Wed, 2007-09-19 at 21:26 +0200, St�ane Raimbault wrote:

> I want to patch Balsa to add context informations but the strings are
> used in a initializer so the macro Q_ is not appropriated:

The solution is to add context and to use N_() in the initializer. Then,
in the code where gettext() is currently used to translate the struct
entry, this code needs to be changed to use g_strip_context(). Here's an
example from the GIMP source code for translating a GtkActionEntry
label:

 label = g_strip_context (entries[i].label, gettext (entries[i].label));

Sven




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