Wouter:

I'm removing the gnome-docs-team and release-team from the cc:list since
we are now talking about how to better implement this feature, and this
isn't a concern for string breakage anymore.

> 2008-03-10 klockan 20:44 skrev Brian Cameron:
>> Thanks for explaining.  I updated the patch as you suggest, and removed
>> the gui/gdmcommon.c part of the previous patch.  The new patch which I
>> did apply is attached for reference.
> 
> See my comments below.
> 
>> Index: daemon/gdm.h
>> ===================================================================
>> --- daemon/gdm.h     (revision 5914)
>> +++ daemon/gdm.h     (working copy)
>> @@ -67,6 +67,8 @@
>>   */
>>  #define GDM_DEFAULT_WELCOME_MSG "Welcome"
>>  #define GDM_DEFAULT_REMOTE_WELCOME_MSG "Welcome to %n"
>> +#define GDM_DEFAULT_WELCOME_TRANSLATED_MSG N_("Welcome")
>> +#define GDM_DEFAULT_REMOTE_WELCOME_TRANSLATED_MSG N_("Welcome to %n")
> 
> Eh, GDM_DEFAULT_WELCOME_TRANSLATED_MSG and
> GDM_DEFAULT_REMOTE_WELCOME_TRANSLATED_MSG are *not* translated. They will
> hold the literal values "Welcome" and "Welcome to %n", just as the
> non-TRANSLATED variants.
> 
> I'd suggest:
> 
>   #define GDM_DEFAULT_WELCOME_MSG N_("Welcome")
>   #define GDM_DEFAULT_REMOTE_WELCOME_MSG N_("Welcome to %n")
> 
> ...leaving the TRANSLATED variants out. Whenever you use the string for
> display, just pass it through gettext().

I tried this and the code does not compile properly with this.  The
problem seems to be that we use the default message as a part of the
configuration key name.

#define GDM_KEY_WELCOME "greeter/Welcome=" GDM_DEFAULT_WELCOME_MSG
#define GDM_KEY_REMOTE_WELCOME "greeter/RemoteWelcome="
         GDM_DEFAULT_REMOTE_WELCOME_MSG

When I change the value to N_("Welcome") and N_("Welcome to %n"),
then I get these errors when trying to compile code that references
the GDM_KEY_WELCOME or GDM_KEY_REMOTE_WELCOME

"gdmcommon.c", line 630: function designator is not of function type
"gdmcommon.c", line 630: warning: argument #1 is incompatible with 
prototype:
         prototype: pointer to const char : "gdmconfig.h", line 31
         argument : pointer to array[23] of char

Note line 630 of gdmcommon is this:

    tempstr = gdm_config_get_translated_string (GDM_KEY_REMOTE_WELCOME);

So I think it is necessary to have the two sets of #defines.  Does
this make sense, or do you have a better suggestions?

Brian
_______________________________________________
gnome-i18n mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-i18n

Reply via email to