[anjuta] bgo #628099 - Remove markup from translatable strings
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] bgo #628099 - Remove markup from translatable strings
- Date: Sat, 28 Aug 2010 10:10:24 +0000 (UTC)
commit 987a1dc579604ba838c7dbfb1bce606327b04eff
Author: Philip Withnall <bugzilla tecnocode co uk>
Date: Sat Aug 28 12:06:11 2010 +0200
bgo #628099 - Remove markup from translatable strings
libanjuta/anjuta-save-prompt.c | 14 ++++----
plugins/gtodo/export.c | 5 ++-
.../anjuta-language-javascript.ui | 6 ++-
.../python-plugin-properties.ui | 30 +++++++++++++------
plugins/project-wizard/druid.c | 3 +-
plugins/snippets-manager/snippets-editor.ui | 18 ++++++++----
.../snippets-manager-preferences.ui | 6 ++-
7 files changed, 53 insertions(+), 29 deletions(-)
---
diff --git a/libanjuta/anjuta-save-prompt.c b/libanjuta/anjuta-save-prompt.c
index 9b6874f..5a36292 100644
--- a/libanjuta/anjuta-save-prompt.c
+++ b/libanjuta/anjuta-save-prompt.c
@@ -264,8 +264,7 @@ anjuta_save_prompt_add_item (AnjutaSavePrompt *save_prompt,
{
GtkTreeModel *model;
GtkTreeIter iter;
- gchar *label;
- const gchar *markup;
+ gchar *label, *markup;
gint items_count;
g_return_if_fail (ANJUTA_IS_SAVE_PROMPT (save_prompt));
@@ -294,17 +293,18 @@ anjuta_save_prompt_add_item (AnjutaSavePrompt *save_prompt,
if (items_count > 1)
{
label = g_strdup_printf(
- ngettext ("<b>There is %d item with unsaved changes. Save changes before closing?</b>",
- "<b>There are %d items with unsaved changes. Save changes before closing?</b>",
+ ngettext ("There is %d item with unsaved changes. Save changes before closing?",
+ "There are %d items with unsaved changes. Save changes before closing?",
items_count), items_count);
+ markup = g_strdup_printf ("<b>%s</b>", label);
+ g_free (label);
}
else
{
- label = g_strdup_printf("<b>%s</b>",
+ markup = g_strdup_printf ("<b>%s</b>",
_("There is an item with unsaved changes. Save changes before closing?"));
}
- markup = label;
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (save_prompt), markup);
- g_free (label);
+ g_free (markup);
}
diff --git a/plugins/gtodo/export.c b/plugins/gtodo/export.c
index 57ca391..fd628cc 100644
--- a/plugins/gtodo/export.c
+++ b/plugins/gtodo/export.c
@@ -149,6 +149,7 @@ gtodo_export_gui_create_extra_widget ()
GtkWidget *box;
GtkWidget *hbox;
GtkWidget *w;
+ gchar *markup;
ExportExtraWidget *eex = g_new0 (ExportExtraWidget, 1);
@@ -168,7 +169,9 @@ gtodo_export_gui_create_extra_widget ()
gtk_box_pack_start(GTK_BOX(extra_widget), eex->cb_curcat, FALSE, TRUE, 0);
w = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (w), _("<b>HTML export options:</b>"));
+ markup = g_strdup_printf ("<b>%s</b>", _("HTML export options:"));
+ gtk_label_set_markup (GTK_LABEL (w), markup);
+ g_free (markup);
gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (extra_widget), w, FALSE, FALSE, 0);
diff --git a/plugins/language-support-js/anjuta-language-javascript.ui b/plugins/language-support-js/anjuta-language-javascript.ui
index d47cc0a..9b4f58e 100644
--- a/plugins/language-support-js/anjuta-language-javascript.ui
+++ b/plugins/language-support-js/anjuta-language-javascript.ui
@@ -98,8 +98,10 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>JS Find dirs</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">JS Find dirs</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
diff --git a/plugins/language-support-python/python-plugin-properties.ui b/plugins/language-support-python/python-plugin-properties.ui
index 46d4660..e5e9ffe 100755
--- a/plugins/language-support-python/python-plugin-properties.ui
+++ b/plugins/language-support-python/python-plugin-properties.ui
@@ -138,8 +138,10 @@
<child type="label">
<object class="GtkLabel" id="label12355">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Indentation parameters</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Indentation parameters</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
@@ -153,8 +155,10 @@
<child type="label">
<object class="GtkLabel" id="label12321">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Smart Indentation</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Smart Indentation</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
@@ -252,8 +256,10 @@
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes"><b>Autocompletion</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Autocompletion</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
@@ -297,8 +303,10 @@
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Calltips</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Calltips</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
@@ -407,8 +415,10 @@
<child type="label">
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Interpreter</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Interpreter</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
diff --git a/plugins/project-wizard/druid.c b/plugins/project-wizard/druid.c
index 12baa80..29a3bb8 100644
--- a/plugins/project-wizard/druid.c
+++ b/plugins/project-wizard/druid.c
@@ -229,7 +229,8 @@ npw_druid_fill_summary_page (NPWDruid* druid)
GString* text;
GtkLabel* label;
- text = g_string_new (_("<b>Confirm the following information:</b>\n\n"));
+ text = g_string_new (NULL);
+ g_string_append_printf (text, "<b>%s</b>\n\n", _("Confirm the following information:"));
/* The project type is translated too, it is something like
* generic, GNOME applet, Makefile project... */
diff --git a/plugins/snippets-manager/snippets-editor.ui b/plugins/snippets-manager/snippets-editor.ui
index 71de686..68d3813 100644
--- a/plugins/snippets-manager/snippets-editor.ui
+++ b/plugins/snippets-manager/snippets-editor.ui
@@ -285,8 +285,10 @@ The role of the name is purely informative.</property>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Snippet Properties</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Snippet Properties</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
@@ -381,8 +383,10 @@ The role of the name is purely informative.</property>
<child type="label">
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Snippet Content</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Snippet Content</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
@@ -498,8 +502,10 @@ The role of the name is purely informative.</property>
<child type="label">
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Snippet Variables</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Snippet Variables</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
diff --git a/plugins/snippets-manager/snippets-manager-preferences.ui b/plugins/snippets-manager/snippets-manager-preferences.ui
index 227810f..0a54e16 100644
--- a/plugins/snippets-manager/snippets-manager-preferences.ui
+++ b/plugins/snippets-manager/snippets-manager-preferences.ui
@@ -96,8 +96,10 @@
<child type="label">
<object class="GtkLabel" id="global_vars_label">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Anjuta variables</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Anjuta variables</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ </attributes>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]