On Tuesday 17 February 2009, Vladimir Nadvornik wrote:
> -void wmessage(const char *msg, ...);
> +void wmessage(const char *msg, ...)
> __attribute__((__format__(printf,1,2)));

Is this stuff portable to non-linuxes? What does it even mean? I read it 
an have no clue what is supposed to do. And what is wrong with the 
original form?

> -        wwarning(_("Color Panel: Could not find file"), "%s",
> panel->configurationPath); 
> +        wwarning(_("Color Panel: Could not find file: %s"),
> panel->configurationPath);

I think it's a bad idea to include string substitutions (like %s) in 
transaltable strings for 3 reasons:

1. It's easy to corrupt them by error and make the code segfault
2. It's easy co modify them intentionally to exploit the code
3. They can be confusing for a non-programmer who is transalting the file

Since the original form is also wrong, the prefered way to write that 
would be:

wwarning("%s: %s", _("Color Panel: Could not find file"), 
panel->configurationPath);

-- 
Dan


-- 
To unsubscribe, send mail to [email protected].

Reply via email to