[libslab] Avoid markup in translatable strings.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libslab] Avoid markup in translatable strings.
- Date: Sat, 8 Aug 2009 16:52:32 +0000 (UTC)
commit da80cf7ef30fc0c03aec3ff17a4675822d07a265
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Aug 8 18:51:28 2009 +0200
Avoid markup in translatable strings.
Fix bug #403191. Patch by Gabor Kelemen.
libslab/app-shell.c | 11 +++++++----
libslab/application-tile.c | 5 ++++-
libslab/document-tile.c | 7 +++++--
3 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/libslab/app-shell.c b/libslab/app-shell.c
index ad7293d..a44edba 100644
--- a/libslab/app-shell.c
+++ b/libslab/app-shell.c
@@ -726,7 +726,9 @@ static void
show_no_results_message (AppShellData * app_data, GtkWidget * containing_vbox)
{
gchar *markup;
-
+ gchar *str1;
+ gchar *str2;
+
if (!app_data->filtered_out_everything_widget)
{
GtkWidget *hbox;
@@ -748,9 +750,10 @@ show_no_results_message (AppShellData * app_data, GtkWidget * containing_vbox)
gtk_container_add (GTK_CONTAINER (app_data->filtered_out_everything_widget), hbox);
}
- markup = g_markup_printf_escaped (
- _("<span size=\"large\"><b>No matches found.</b> </span><span>\n\n Your filter \"<b>%s</b>\" does not match any items.</span>"),
- app_data->filter_string);
+ str1 = g_strdup_printf ("<b>%s</b>", app_data->filter_string);
+ str2 = g_strdup_printf (_("Your filter \"%s\" does not match any items."), str1);
+ markup = g_markup_printf_escaped ("<span size=\"large\"><b>%s</b></span>\n\n%s",
+ _("No matches found."), str2);
gtk_label_set_text (app_data->filtered_out_everything_widget_label, markup);
gtk_label_set_use_markup (app_data->filtered_out_everything_widget_label, TRUE);
gtk_box_pack_start (GTK_BOX (containing_vbox), app_data->filtered_out_everything_widget,
diff --git a/libslab/application-tile.c b/libslab/application-tile.c
index bc82f3e..7767e8a 100644
--- a/libslab/application-tile.c
+++ b/libslab/application-tile.c
@@ -304,6 +304,7 @@ application_tile_setup (ApplicationTile *this, const gchar *gconf_prefix)
const gchar *key;
gchar *markup;
+ gchar *str;
/*Fixme - need to address the entire gconf key location issue */
/*Fixme - this is just a temporary stop gap */
@@ -370,10 +371,12 @@ application_tile_setup (ApplicationTile *this, const gchar *gconf_prefix)
/* make start action */
- markup = g_markup_printf_escaped (_("<b>Start %s</b>"), this->name);
+ str = g_strdup_printf (_("Start %s"), this->name);
+ markup = g_markup_printf_escaped ("<b>%s</b>", str);
action = tile_action_new (TILE (this), start_trigger, markup, TILE_ACTION_OPENS_NEW_WINDOW);
actions [APPLICATION_TILE_ACTION_START] = action;
g_free (markup);
+ g_free (str);
menu_item = GTK_WIDGET (tile_action_get_menu_item (action));
diff --git a/libslab/document-tile.c b/libslab/document-tile.c
index 3592ffe..26fdc36 100644
--- a/libslab/document-tile.c
+++ b/libslab/document-tile.c
@@ -137,6 +137,7 @@ document_tile_new (const gchar *in_uri, const gchar *mime_type, time_t modified)
gchar *time_str;
gchar *markup;
+ gchar *str;
AtkObject *accessible;
@@ -189,11 +190,13 @@ document_tile_new (const gchar *in_uri, const gchar *mime_type, time_t modified)
/* make open with default action */
if (priv->default_app) {
- markup = g_markup_printf_escaped (_("<b>Open with \"%s\"</b>"),
- g_app_info_get_name (priv->default_app));
+ str = g_strdup_printf (_("Open with \"%s\""),
+ g_app_info_get_name (priv->default_app));
+ markup = g_markup_printf_escaped ("<b>%s</b>", str);
action = tile_action_new (TILE (this), open_with_default_trigger, markup,
TILE_ACTION_OPENS_NEW_WINDOW);
g_free (markup);
+ g_free (str);
TILE (this)->default_action = action;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]