From: <sea...@us...> - 2006-11-21 21:16:18
|
Revision: 17804 http://svn.sourceforge.net/gaim/?rev=17804&view=rev Author: seanegan Date: 2006-11-21 13:05:44 -0800 (Tue, 21 Nov 2006) Log Message: ----------- Add a post-processing function to assist translators with the Unicode font symbol. If someone can figure out how to find out at runtime if a glyph exists, let me know Modified Paths: -------------- trunk/gtk/gtkaccount.c trunk/gtk/gtkutils.c trunk/gtk/gtkutils.h Modified: trunk/gtk/gtkaccount.c =================================================================== --- trunk/gtk/gtkaccount.c 2006-11-21 16:35:51 UTC (rev 17803) +++ trunk/gtk/gtkaccount.c 2006-11-21 21:05:44 UTC (rev 17804) @@ -2072,7 +2072,8 @@ /* Create a helpful first-time-use label */ label = gtk_label_new(NULL); - gtk_label_set_markup(GTK_LABEL(label), _( + /* Translators: Please maintain the use of -> or <- to represent the menu heirarchy */ + gtk_label_set_markup(GTK_LABEL(label), gaim_gtk_make_pretty_arrows(_( "<span size='larger' weight='bold'>Welcome to Gaim!</span>\n\n" "You have no IM accounts configured. To start connecting with Gaim " @@ -2081,8 +2082,8 @@ "press <b>Add</b> again to configure them all.\n\n" "You can come back to this window to add, edit, or remove " - "accounts from <b>Accounts \342\207\250 Add/Edit</b> in the Buddy " - "List window")); + "accounts from <b>Accounts->Add/Edit</b> in the Buddy " + "List window"))); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_widget_show(label); Modified: trunk/gtk/gtkutils.c =================================================================== --- trunk/gtk/gtkutils.c 2006-11-21 16:35:51 UTC (rev 17803) +++ trunk/gtk/gtkutils.c 2006-11-21 21:05:44 UTC (rev 17804) @@ -2837,4 +2837,17 @@ gaim_blist_update_buddy_icon(buddy); } +char *gaim_gtk_make_pretty_arrows(const char *str) +{ + char *ret; + char **split = g_strsplit(str, "->", -1); + ret = g_strjoinv("\342\207\250", split); + g_strfreev(split); + split = g_strsplit(ret, "<-", -1); + g_free(ret); + ret = g_strjoinv("\342\207\246", split); + g_strfreev(split); + + return ret; +} Modified: trunk/gtk/gtkutils.h =================================================================== --- trunk/gtk/gtkutils.h 2006-11-21 16:35:51 UTC (rev 17803) +++ trunk/gtk/gtkutils.h 2006-11-21 21:05:44 UTC (rev 17804) @@ -501,3 +501,12 @@ * previously set custom buddy icon for the user is removed. */ void gaim_gtk_set_custom_buddy_icon(GaimAccount *account, const char *who, const char *filename); + +/** + * Converts "->" and "<-" in strings to Unicode arrow characters, for use in referencing + * menu items. + * + * @param str The text to convert + * @return A newly allocated string with unicode arrow characters + */ +char *gaim_gtk_make_pretty_arrows(const char *str); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |