changeset 15023:2d3c7f76cea0

[gaim-migrate @ 17804] 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 committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 21 Nov 2006 21:05:44 +0000
parents ab2847049049
children dd4160b36f80
files gtk/gtkaccount.c gtk/gtkutils.c gtk/gtkutils.h
diffstat 3 files changed, 27 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/gtkaccount.c	Tue Nov 21 16:35:51 2006 +0000
+++ b/gtk/gtkaccount.c	Tue Nov 21 21:05:44 2006 +0000
@@ -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);
 
--- a/gtk/gtkutils.c	Tue Nov 21 16:35:51 2006 +0000
+++ b/gtk/gtkutils.c	Tue Nov 21 21:05:44 2006 +0000
@@ -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;
+}
--- a/gtk/gtkutils.h	Tue Nov 21 16:35:51 2006 +0000
+++ b/gtk/gtkutils.h	Tue Nov 21 21:05:44 2006 +0000
@@ -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);