diff options
author | Garrett Regier <garrettregier@gmail.com> | 2015-03-29 20:30:02 -0700 |
---|---|---|
committer | Garrett Regier <gregier@garrett.regier> | 2015-04-21 11:39:27 -0400 |
commit | bf58b9ca98c7bde43aea9fc41edc8c131121f746 (patch) | |
tree | 897901dae90858f61ea0da99a0cb38eb59f96d00 | |
parent | 619fe32c259e317a691d333f8b8bbfdd160668a9 (diff) | |
download | libpeas-bf58b9ca98c7bde43aea9fc41edc8c131121f746.tar.gz |
Be more explicit about a string's message
While trying to avoid having the markup be
translated it caused some translations to be incorrect.
In the case which was noticed, the space after the colon
was missing in various translations.
-rw-r--r-- | libpeas-gtk/peas-gtk-plugin-manager-view.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libpeas-gtk/peas-gtk-plugin-manager-view.c b/libpeas-gtk/peas-gtk-plugin-manager-view.c index 134b3d5..c4d0c3f 100644 --- a/libpeas-gtk/peas-gtk-plugin-manager-view.c +++ b/libpeas-gtk/peas-gtk-plugin-manager-view.c @@ -613,7 +613,7 @@ peas_gtk_plugin_manager_view_query_tooltip (GtkWidget *widget, gboolean is_row; GtkTreeIter iter; PeasPluginInfo *info; - gchar *to_bold, *message; + gchar *to_bold, *error_msg, *message; GError *error = NULL; is_row = gtk_tree_view_get_tooltip_context (GTK_TREE_VIEW (widget), @@ -633,14 +633,18 @@ peas_gtk_plugin_manager_view_query_tooltip (GtkWidget *widget, /* Avoid having markup in a translated string */ to_bold = g_strdup_printf (_("The plugin '%s' could not be loaded"), peas_plugin_info_get_name (info)); - message = g_markup_printf_escaped ("<b>%s</b>\n%s%s", - to_bold, - _("An error occurred: "), - error->message); + + /* Keep separate because some translations do special things + * for the ':' and might accidentally not keep the space after it + */ + error_msg = g_strdup_printf (_("An error occurred: %s"), error->message); + + message = g_strconcat ("<b>", to_bold, "</b>\n", error_msg, NULL); gtk_tooltip_set_markup (tooltip, message); g_free (message); + g_free (error_msg); g_free (to_bold); g_error_free (error); |