GNOME Bugzilla – Bug 100268
"Show %s" in nautilus problematic for translation
Last modified: 2005-06-28 12:54:59 UTC
static GtkWidget * create_shortcut (NautilusSidePane *side_pane, SidePanel *panel, GdkPixbuf *pixbuf) { GtkWidget *button; GtkWidget *image; char *tip; button = gtk_button_new (); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); g_object_set_data (G_OBJECT (button), "side-page", panel->widget); g_signal_connect (button, "clicked", G_CALLBACK (shortcut_clicked_callback), side_pane); tip = g_strdup_printf (_("Show %s"), panel->title); gtk_tooltips_set_tip (side_pane->details->tooltips, button, tip, NULL); g_free (tip); image = gtk_image_new_from_pixbuf (pixbuf); gtk_widget_show (image); gtk_container_add (GTK_CONTAINER (button), image); return button; } This "Show %s" message in nautilus-side-pane.c is problematic for translation, for the same reasons as mentioned in bug 45462. It would be much better if the message could be translated as a whole, and the code redesigned to allow for this.
Created attachment 48191 [details] [review] Proposed patch This patch makes tooltips first-tier metadata and includes the necessary infrastructure to bring the strings from each side pane module down to the panel core code. Though, it seems rather academic to me because none of the default panes have icons which means that none of them create shortcuts on which to have tooltips. Nonetheless, if that situation changes, the tooltips will be ready.
Commited, thanks.