summaryrefslogtreecommitdiff
path: root/gtk/gtkrecentchoosermenu.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-07-13 16:34:05 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-07-13 16:34:05 +0000
commita6f92ce4b04abd38bc56b4080b48879ae6022ab3 (patch)
treea2c7e42e636fd00077d837a2735118121c1ccc97 /gtk/gtkrecentchoosermenu.c
parentda989212f391c4c10f9b0136bef3167a33239a26 (diff)
downloadgtk+-a6f92ce4b04abd38bc56b4080b48879ae6022ab3.tar.gz
Avoid gratitious use of g_strdup_printf().
2007-07-13 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrecentmanager.c (get_uri_shortname_for_display): Avoid gratitious use of g_strdup_printf(). * gtk/gtkrecentchooserdefault.c: * gtk/gtkrecentchoosermenu.c: Mark some strings for translation. (#439480, Murray Cumming) svn path=/trunk/; revision=18465
Diffstat (limited to 'gtk/gtkrecentchoosermenu.c')
-rw-r--r--gtk/gtkrecentchoosermenu.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gtk/gtkrecentchoosermenu.c b/gtk/gtkrecentchoosermenu.c
index 8720bcd82b..b7c479d5f6 100644
--- a/gtk/gtkrecentchoosermenu.c
+++ b/gtk/gtkrecentchoosermenu.c
@@ -795,9 +795,21 @@ gtk_recent_chooser_menu_create_item (GtkRecentChooserMenu *menu,
/* avoid clashing mnemonics */
if (count <= 10)
- text = g_strdup_printf ("_%d. %s", count, escaped);
+ /* This is the label format that is used for the first 10 items
+ * in a recent files menu. The %d is the number of the item,
+ * the %s is the name of the item. Please keep the _ in front
+ * of the number to give these menu items a mnemonic.
+ *
+ * Don't include the prefix "recent menu label|" in the translation.
+ */
+ text = g_strdup_printf (Q_("recent menu label|_%d. %s"), count, escaped);
else
- text = g_strdup_printf ("%d. %s", count, escaped);
+ /* This is the format that is used for items in a recent files menu.
+ * The %d is the number of the item, the %s is the name of the item.
+ *
+ * Don't include the prefix "recent menu label|" in the translation.
+ */
+ text = g_strdup_printf (Q_("recent menu label|%d. %s"), count, escaped);
item = gtk_image_menu_item_new_with_mnemonic (text);