Re: [evolution-patches] Patch for bug#36247



I think what you actually want to do is something more like the
following:

str = g_strdup_printf ("<b>%s:</b>", _("Starts"));
write_label_piece (itip, &datetime, buffer, 1024, str, "<br>", FALSE);
g_free (str);

Using really long variable names is generally frowned upon because it
means a lot of typing (plus it's kinda ugly).

You also want to avoid using static sized buffers since you don't really
know how long the translated string will be. I'm sure 1024 is probably
enough, but it also wastes a lot of space :-)
Besides, if you were really going to use a static sized buffer with
sprintf, you'd at the very least want to use snprintf instead.

Jeff

On Sat, 2004-06-05 at 03:50 +0530, Vardhman Jain wrote:
> To improved the performance of the translation function _(str) for a 
> particular kind of frequently occurring string.
> 
> 
> Vardhman
> 
-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj ximian com  - www.novell.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature



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