aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-04-23 17:20:50 +0800
committerMilan Crha <mcrha@redhat.com>2010-04-23 17:20:50 +0800
commit91020b05a3107e4ae51d7aa33dc0bebe5b668e6d (patch)
treee3b2445f54a7d74e5ff00ebbd8ecfa70235ed016
parentedf6286a38279e6db82dee4da50e94c587f06e02 (diff)
downloadgsoc2013-evolution-91020b05a3107e4ae51d7aa33dc0bebe5b668e6d.tar.gz
gsoc2013-evolution-91020b05a3107e4ae51d7aa33dc0bebe5b668e6d.tar.zst
gsoc2013-evolution-91020b05a3107e4ae51d7aa33dc0bebe5b668e6d.zip
Bug #360461 - Avoid markup in translatable messages
-rw-r--r--calendar/gui/e-itip-control.c79
-rw-r--r--capplet/settings/mail-account-view.c13
-rw-r--r--capplet/settings/mail-settings-view.c5
-rw-r--r--composer/e-msg-composer.c5
-rw-r--r--mail/em-format-html.c10
-rw-r--r--mail/mail-config.ui36
-rw-r--r--plugins/caldav/caldav-browse-server.c7
-rw-r--r--plugins/google-account-setup/google-contacts-source.c5
-rw-r--r--plugins/groupwise-features/properties.ui5
-rw-r--r--plugins/groupwise-features/proxy-login-dialog.ui5
-rw-r--r--plugins/itip-formatter/itip-view.c108
-rw-r--r--plugins/webdav-account-setup/webdav-contacts-source.c5
12 files changed, 186 insertions, 97 deletions
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index c941310a2e..fed200d34c 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -758,7 +758,7 @@ write_recurrence_piece (EItipControl *itip, ECalComponent *comp,
struct icalrecurrencetype *r;
gint i;
- g_string_append_len (buffer, "<b>Recurring:</b> ", 18);
+ g_string_append_printf (buffer, "<b>%s</b> ", _("Recurring:"));
if (!e_cal_component_has_simple_recurrence (comp)) {
g_string_append_printf (
@@ -1021,6 +1021,18 @@ write_error_html (EItipControl *itip, const gchar *itip_err)
g_string_free (buffer, TRUE);
}
+static gchar *
+dupe_first_bold (const gchar *format, const gchar *organizer, const gchar *delegator)
+{
+ gchar *tmp, *res;
+
+ tmp = g_strconcat ("<b>", organizer ? organizer : "", "</b>", NULL);
+ res = g_strdup_printf (format, tmp, delegator ? delegator : "");
+ g_free (tmp);
+
+ return res;
+}
+
static void
write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, const gchar *options)
{
@@ -1072,12 +1084,12 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
e_cal_component_get_attendee_list (priv->comp, &attendees);
if (attendees != NULL) {
attendee = attendees->data;
- html = g_strdup_printf (itip_desc,
+ html = dupe_first_bold (itip_desc,
attendee->cn ?
attendee->cn :
- itip_strip_mailto (attendee->value));
+ itip_strip_mailto (attendee->value), NULL);
} else {
- html = g_strdup_printf (itip_desc, _("An unknown person"));
+ html = dupe_first_bold (itip_desc, _("An unknown person"), NULL);
}
break;
case ICAL_METHOD_REQUEST:
@@ -1085,7 +1097,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
e_cal_component_get_organizer (priv->comp, &organizer);
if (priv->delegator_address != NULL) {
if (organizer.value != NULL)
- html = g_strdup_printf (itip_desc,
+ html = dupe_first_bold (itip_desc,
organizer.cn ?
organizer.cn :
itip_strip_mailto (organizer.value),
@@ -1093,18 +1105,18 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
priv->delegator_name :
priv->delegator_address);
else
- html = g_strdup_printf (itip_desc, _("An unknown person"),
+ html = dupe_first_bold (itip_desc, _("An unknown person"),
priv->delegator_name ?
priv->delegator_name :
priv->delegator_address);
} else {
if (organizer.value != NULL)
- html = g_strdup_printf (itip_desc,
+ html = dupe_first_bold (itip_desc,
organizer.cn ?
organizer.cn :
- itip_strip_mailto (organizer.value));
+ itip_strip_mailto (organizer.value), NULL);
else
- html = g_strdup_printf (itip_desc, _("An unknown person"));
+ html = dupe_first_bold (itip_desc, _("An unknown person"), NULL);
}
break;
@@ -1116,20 +1128,21 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
/* The organizer sent this */
e_cal_component_get_organizer (priv->comp, &organizer);
if (organizer.value != NULL)
- html = g_strdup_printf (itip_desc,
+ html = dupe_first_bold (itip_desc,
organizer.cn ?
organizer.cn :
- itip_strip_mailto (organizer.value));
+ itip_strip_mailto (organizer.value), NULL);
else
- html = g_strdup_printf (itip_desc, _("An unknown person"));
+ html = dupe_first_bold (itip_desc, _("An unknown person"), NULL);
break;
}
g_string_append_printf (buffer, "%s", html);
g_free (html);
+ g_string_append (buffer, "<br> ");
/* Describe what the user can do */
g_string_append (
- buffer, _("<br> Please review the following information, "
+ buffer, _("Please review the following information, "
"and then select an action from the menu below."));
/* Separator */
@@ -1353,28 +1366,28 @@ show_current_event (EItipControl *itip)
switch (priv->method) {
case ICAL_METHOD_PUBLISH:
- itip_desc = _("<b>%s</b> has published meeting information.");
+ itip_desc = _("%s has published meeting information.");
itip_title = _("Meeting Information");
options = get_publish_options ();
show_selector = TRUE;
break;
case ICAL_METHOD_REQUEST:
if (priv->delegator_address != NULL)
- itip_desc = _("<b>%s</b> requests the presence of %s at a meeting.");
+ itip_desc = _("%s requests the presence of %s at a meeting.");
else
- itip_desc = _("<b>%s</b> requests your presence at a meeting.");
+ itip_desc = _("%s requests your presence at a meeting.");
itip_title = _("Meeting Proposal");
options = get_request_options ();
show_selector = TRUE;
break;
case ICAL_METHOD_ADD:
/* FIXME Whats going on here? */
- itip_desc = _("<b>%s</b> wishes to be added to an existing meeting.");
+ itip_desc = _("%s wishes to be added to an existing meeting.");
itip_title = _("Meeting Update");
options = get_publish_options ();
break;
case ICAL_METHOD_REFRESH:
- itip_desc = _("<b>%s</b> wishes to receive the latest meeting information.");
+ itip_desc = _("%s wishes to receive the latest meeting information.");
itip_title = _("Meeting Update Request");
options = get_refresh_options ();
@@ -1382,7 +1395,7 @@ show_current_event (EItipControl *itip)
adjust_item (itip, priv->comp);
break;
case ICAL_METHOD_REPLY:
- itip_desc = _("<b>%s</b> has replied to a meeting request.");
+ itip_desc = _("%s has replied to a meeting request.");
itip_title = _("Meeting Reply");
options = get_reply_options ();
@@ -1390,7 +1403,7 @@ show_current_event (EItipControl *itip)
adjust_item (itip, priv->comp);
break;
case ICAL_METHOD_CANCEL:
- itip_desc = _("<b>%s</b> has canceled a meeting.");
+ itip_desc = _("%s has canceled a meeting.");
itip_title = _("Meeting Cancelation");
/* FIXME priv->current_ecal will always be NULL so the
* user won't see an error message, the OK button will
@@ -1401,7 +1414,7 @@ show_current_event (EItipControl *itip)
adjust_item (itip, priv->comp);
break;
default:
- itip_desc = _("<b>%s</b> has sent an unintelligible message.");
+ itip_desc = _("%s has sent an unintelligible message.");
itip_title = _("Bad Meeting Message");
options = NULL;
}
@@ -1429,7 +1442,7 @@ show_current_todo (EItipControl *itip)
switch (priv->method) {
case ICAL_METHOD_PUBLISH:
- itip_desc = _("<b>%s</b> has published task information.");
+ itip_desc = _("%s has published task information.");
itip_title = _("Task Information");
options = get_publish_options ();
show_selector = TRUE;
@@ -1437,21 +1450,21 @@ show_current_todo (EItipControl *itip)
case ICAL_METHOD_REQUEST:
/* FIXME Does this need to handle like events above? */
if (priv->delegator_address != NULL)
- itip_desc = _("<b>%s</b> requests %s to perform a task.");
+ itip_desc = _("%s requests %s to perform a task.");
else
- itip_desc = _("<b>%s</b> requests you perform a task.");
+ itip_desc = _("%s requests you perform a task.");
itip_title = _("Task Proposal");
options = get_request_options ();
show_selector = TRUE;
break;
case ICAL_METHOD_ADD:
/* FIXME Whats going on here? */
- itip_desc = _("<b>%s</b> wishes to be added to an existing task.");
+ itip_desc = _("%s wishes to be added to an existing task.");
itip_title = _("Task Update");
options = get_publish_options ();
break;
case ICAL_METHOD_REFRESH:
- itip_desc = _("<b>%s</b> wishes to receive the latest task information.");
+ itip_desc = _("%s wishes to receive the latest task information.");
itip_title = _("Task Update Request");
options = get_refresh_options ();
@@ -1459,7 +1472,7 @@ show_current_todo (EItipControl *itip)
adjust_item (itip, priv->comp);
break;
case ICAL_METHOD_REPLY:
- itip_desc = _("<b>%s</b> has replied to a task assignment.");
+ itip_desc = _("%s has replied to a task assignment.");
itip_title = _("Task Reply");
options = get_reply_options ();
@@ -1467,7 +1480,7 @@ show_current_todo (EItipControl *itip)
adjust_item (itip, priv->comp);
break;
case ICAL_METHOD_CANCEL:
- itip_desc = _("<b>%s</b> has canceled a task.");
+ itip_desc = _("%s has canceled a task.");
itip_title = _("Task Cancelation");
/* FIXME priv->current_ecal will always be NULL so the
* user won't see an error message, the OK button will
@@ -1478,7 +1491,7 @@ show_current_todo (EItipControl *itip)
adjust_item (itip, priv->comp);
break;
default:
- itip_desc = _("<b>%s</b> has sent an unintelligible message.");
+ itip_desc = _("%s has sent an unintelligible message.");
itip_title = _("Bad Task Message");
options = NULL;
}
@@ -1503,22 +1516,22 @@ show_current_freebusy (EItipControl *itip)
switch (priv->method) {
case ICAL_METHOD_PUBLISH:
- itip_desc = _("<b>%s</b> has published free/busy information.");
+ itip_desc = _("%s has published free/busy information.");
itip_title = _("Free/Busy Information");
options = NULL;
break;
case ICAL_METHOD_REQUEST:
- itip_desc = _("<b>%s</b> requests your free/busy information.");
+ itip_desc = _("%s requests your free/busy information.");
itip_title = _("Free/Busy Request");
options = get_request_fb_options ();
break;
case ICAL_METHOD_REPLY:
- itip_desc = _("<b>%s</b> has replied to a free/busy request.");
+ itip_desc = _("%s has replied to a free/busy request.");
itip_title = _("Free/Busy Reply");
options = NULL;
break;
default:
- itip_desc = _("<b>%s</b> has sent an unintelligible message.");
+ itip_desc = _("%s has sent an unintelligible message.");
itip_title = _("Bad Free/Busy Message");
options = NULL;
}
diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c
index 8c488af5b4..6e2299b308 100644
--- a/capplet/settings/mail-account-view.c
+++ b/capplet/settings/mail-account-view.c
@@ -169,6 +169,7 @@ create_review (MailAccountView *view)
gchar *uri;
gchar *enc;
CamelURL *url;
+ gchar *buff;
uri = (gchar *)e_account_get_string(em_account_editor_get_modified_account(view->edit), E_ACCOUNT_SOURCE_URL);
if (!uri || (url = camel_url_new(uri, NULL)) == NULL)
@@ -178,7 +179,9 @@ create_review (MailAccountView *view)
gtk_table_set_row_spacings ((GtkTable *)table, 4);
label = gtk_label_new (NULL);
- gtk_label_set_markup ((GtkLabel *)label, _("<span size=\"large\" weight=\"bold\">Personal details:</span>"));
+ buff = g_strconcat ("<span size=\"large\" weight=\"bold\">", _("Personal details:"), "</span>", NULL);
+ gtk_label_set_markup ((GtkLabel *)label, buff);
+ g_free (buff);
gtk_widget_show (label);
PACK_BOXF(label)
gtk_table_attach ((GtkTable *)table, box, 0, 1, 0, 1, GTK_EXPAND|GTK_FILL, GTK_SHRINK, 10, 3);
@@ -202,7 +205,9 @@ create_review (MailAccountView *view)
gtk_table_attach ((GtkTable *)table, box, 1, 2, 2, 3, GTK_EXPAND|GTK_FILL, GTK_SHRINK, 10, 3);
label = gtk_label_new (NULL);
- gtk_label_set_markup ((GtkLabel *)label, _("<span size=\"large\" weight=\"bold\">Receiving details:</span>"));
+ buff = g_strconcat ("<span size=\"large\" weight=\"bold\">", _("Receiving details:"), "</span>", NULL);
+ gtk_label_set_markup ((GtkLabel *)label, buff);
+ g_free (buff);
gtk_widget_show (label);
PACK_BOXF(label);
gtk_table_attach ((GtkTable *)table, box, 0, 1, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, 10, 3);
@@ -250,7 +255,9 @@ create_review (MailAccountView *view)
return NULL;
label = gtk_label_new (NULL);
- gtk_label_set_markup ((GtkLabel *)label, _("<span size=\"large\" weight=\"bold\">Sending details:</span>"));
+ buff = g_strconcat ("<span size=\"large\" weight=\"bold\">", _("Sending details:"), "</span>", NULL);
+ gtk_label_set_markup ((GtkLabel *)label, buff);
+ g_free (buff);
gtk_widget_show (label);
PACK_BOXF(label);
gtk_table_attach ((GtkTable *)table, box, 0, 1, 8, 9, GTK_EXPAND|GTK_FILL, GTK_SHRINK, 10, 3);
diff --git a/capplet/settings/mail-settings-view.c b/capplet/settings/mail-settings-view.c
index ee5858c893..25a87cfbd4 100644
--- a/capplet/settings/mail-settings-view.c
+++ b/capplet/settings/mail-settings-view.c
@@ -176,11 +176,14 @@ msv_regen_view (MailSettingsView *acview)
EAccountList *accounts = acview->priv->accounts;
EIterator *node;
GtkWidget *box, *label;
+ gchar *buff;
gtk_container_foreach((GtkContainer *)acview->priv->box, (GtkCallback)gtk_widget_destroy, NULL);
label = gtk_label_new (NULL);
- gtk_label_set_markup ((GtkLabel *)label, _("<span size=\"large\" weight=\"bold\">Account management</span>"));
+ buff = g_strconcat ("<span size=\"large\" weight=\"bold\">", _("Account management"), "</span>", NULL);
+ gtk_label_set_markup ((GtkLabel *)label, buff);
+ g_free (buff);
PACK_BOX(label,12);
node = e_list_get_iterator ((EList *) accounts);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 2edf313a5e..1705d85c3a 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -3305,12 +3305,15 @@ e_msg_composer_set_body (EMsgComposer *composer,
{
EMsgComposerPrivate *p = composer->priv;
EComposerHeaderTable *table;
+ gchar *buff;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
table = e_msg_composer_get_header_table (composer);
- set_editor_text (composer, _("<b>(The composer contains a non-text message body, which cannot be edited.)</b>"), FALSE);
+ buff = g_strconcat ("<b>(", _("The composer contains a non-text message body, which cannot be edited."), ")</b>", NULL);
+ set_editor_text (composer, buff, FALSE);
+ g_free (buff);
gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (composer), FALSE);
disable_editor (composer);
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index f89c89a6b9..b521264bd7 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -2587,16 +2587,20 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
}
if (header_sender && header_from && mail_from_delegate) {
+ gchar *bold_sender, *bold_from;
camel_stream_printf(stream, "<tr><td><table border=1 width=\"100%%\" cellspacing=2 cellpadding=2><tr>");
if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL)
camel_stream_printf (stream, "<td align=\"right\" width=\"100%%\">");
else
camel_stream_printf (stream, "<td align=\"left\" width=\"100%%\">");
+ bold_sender = g_strconcat ("<b>", header_sender, "</b>", NULL);
+ bold_from = g_strconcat ("<b>", header_from, "</b>", NULL);
/* To translators: This message suggests to the receipients that the sender of the mail is
- different from the one listed in From field.
- */
- camel_stream_printf(stream, _("This message was sent by <b>%s</b> on behalf of <b>%s</b>"), header_sender, header_from);
+ different from the one listed in From field. */
+ camel_stream_printf(stream, _("This message was sent by %s on behalf of %s"), bold_sender, bold_from);
camel_stream_printf(stream, "</td></tr></table></td></tr>");
+ g_free (bold_sender);
+ g_free (bold_from);
}
g_free (header_sender);
diff --git a/mail/mail-config.ui b/mail/mail-config.ui
index a60a53247c..63fc65d92b 100644
--- a/mail/mail-config.ui
+++ b/mail/mail-config.ui
@@ -4486,12 +4486,38 @@ For example: "Work" or "Personal"</property>
<property name="orientation">vertical</property>
<property name="spacing">8</property>
<child>
- <object class="GtkLabel" id="label588">
+ <object class="GtkHBox" id="hbox242">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0.47999998927116394</property>
- <property name="label" translatable="yes" comments="Translators: Section name for options related to Top Posting. See Edit|Preferences|Composer Preferences for better understanding">&lt;b&gt;Top Posting Option&lt;/b&gt; (Not Recommended)</property>
- <property name="use_markup">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label588">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.47999998927116394</property>
+ <property name="label" translatable="yes" comments="Translators: Section name for options related to Top Posting. See Edit|Preferences|Composer Preferences for better understanding">Top Posting Option</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label589">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.47999998927116394</property>
+ <property name="label" translatable="yes" comments="Translators: This is part of the line with 'Top Posting Option' text. See Edit|Preferences|Composer Preferences for the usage">(Not Recommended)</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/plugins/caldav/caldav-browse-server.c b/plugins/caldav/caldav-browse-server.c
index c1edc21639..8b2d1ae0e4 100644
--- a/plugins/caldav/caldav-browse-server.c
+++ b/plugins/caldav/caldav-browse-server.c
@@ -788,6 +788,7 @@ soup_authenticate (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gbool
if (!password || !*password || retrying) {
gchar *pass, *prompt, *add = NULL;
+ gchar *bold_user, *bold_host;
if (retrying && msg && msg->reason_phrase) {
add = g_strdup_printf (_("Previous attempt failed: %s"), msg->reason_phrase);
@@ -795,7 +796,11 @@ soup_authenticate (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gbool
add = g_strdup_printf (_("Previous attempt failed with code %d"), msg->status_code);
}
- prompt = g_strdup_printf (_("Enter password for user <b>%s</b> on server <b>%s</b>"), username, soup_auth_get_host (auth));
+ bold_user = g_strconcat ("<b>", username, "</b>", NULL);
+ bold_host = g_strconcat ("<b>", soup_auth_get_host (auth), "</b>", NULL);
+ prompt = g_strdup_printf (_("Enter password for user %s on server %s"), bold_user, bold_host);
+ g_free (bold_user);
+ g_free (bold_host);
if (add) {
gchar *tmp;
diff --git a/plugins/google-account-setup/google-contacts-source.c b/plugins/google-account-setup/google-contacts-source.c
index d7554ebe10..289a939dec 100644
--- a/plugins/google-account-setup/google-contacts-source.c
+++ b/plugins/google-account-setup/google-contacts-source.c
@@ -231,6 +231,7 @@ plugin_google_contacts (EPlugin *epl,
const gchar *refresh_interval_str;
guint refresh_interval;
const gchar *use_ssl_str;
+ gchar *buff;
gboolean use_ssl;
GtkWidget *parent;
GtkWidget *vbox;
@@ -270,7 +271,9 @@ plugin_google_contacts (EPlugin *epl,
gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
section = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (section), _("<b>Server</b>"));
+ buff = g_strconcat ("<b>", _("Server"), "</b>", NULL);
+ gtk_label_set_markup (GTK_LABEL (section), buff);
+ g_free (buff);
gtk_misc_set_alignment (GTK_MISC (section), 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (vbox2), section, FALSE, FALSE, 0);
diff --git a/plugins/groupwise-features/properties.ui b/plugins/groupwise-features/properties.ui
index ca39309ff4..941c9a5ae8 100644
--- a/plugins/groupwise-features/properties.ui
+++ b/plugins/groupwise-features/properties.ui
@@ -167,7 +167,7 @@
<child>
<object class="GtkLabel" id="users">
<property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Users:&lt;/b&gt;</property>
+ <property name="label" translatable="yes">Users:</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -177,6 +177,9 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="padding">6</property>
diff --git a/plugins/groupwise-features/proxy-login-dialog.ui b/plugins/groupwise-features/proxy-login-dialog.ui
index a18acf988d..a8c33317ca 100644
--- a/plugins/groupwise-features/proxy-login-dialog.ui
+++ b/plugins/groupwise-features/proxy-login-dialog.ui
@@ -155,7 +155,7 @@
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Account Name&lt;/b&gt;</property>
+ <property name="label" translatable="yes">Account Name</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -169,6 +169,9 @@
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c
index f3d072e922..6ade3cabe3 100644
--- a/plugins/itip-formatter/itip-view.c
+++ b/plugins/itip-formatter/itip-view.c
@@ -333,6 +333,22 @@ format_date_and_time_x (struct tm *date_tm,
buffer[0] = '\0';
}
+static gchar *
+dupe_first_bold (const gchar *format, const gchar *first, const gchar *second)
+{
+ gchar *f, *s, *res;
+
+ f = g_markup_printf_escaped ("<b>%s</b>", first ? first : "");
+ s = g_markup_escape_text (second ? second : "", -1);
+
+ res = g_strdup_printf (format, f, s);
+
+ g_free (f);
+ g_free (s);
+
+ return res;
+}
+
static void
set_calendar_sender_text (ItipView *view)
{
@@ -348,64 +364,64 @@ set_calendar_sender_text (ItipView *view)
/* The current account ID (i.e. the delegatee) is receiving a copy of the request/response. Here we ask the delegatee to respond/accept on behalf of the delegator. */
if (priv->organizer && priv->proxy)
- on_behalf_of = g_markup_printf_escaped (_("Please respond on behalf of <b>%s</b>"), priv->proxy);
+ on_behalf_of = dupe_first_bold (_("Please respond on behalf of %s"), priv->proxy, NULL);
else if (priv->attendee && priv->proxy)
- on_behalf_of = g_markup_printf_escaped (_("Received on behalf of <b>%s</b>"), priv->proxy);
+ on_behalf_of = dupe_first_bold (_("Received on behalf of %s"), priv->proxy, NULL);
switch (priv->mode) {
case ITIP_VIEW_MODE_PUBLISH:
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has published the following meeting information:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s has published the following meeting information:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has published the following meeting information:"), organizer);
+ sender = dupe_first_bold (_("%s has published the following meeting information:"), organizer, NULL);
break;
case ITIP_VIEW_MODE_REQUEST:
/* FIXME is the delegator stuff handled correctly here? */
if (priv->delegator) {
- sender = g_markup_printf_escaped (_("<b>%s</b> has delegated the following meeting to you:"), priv->delegator);
+ sender = dupe_first_bold (_("%s has delegated the following meeting to you:"), priv->delegator, NULL);
} else {
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s requests your presence at the following meeting:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s requests your presence at the following meeting:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> requests your presence at the following meeting:"), organizer);
+ sender = dupe_first_bold (_("%s requests your presence at the following meeting:"), organizer, NULL);
}
break;
case ITIP_VIEW_MODE_ADD:
/* FIXME What text for this? */
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s wishes to add to an existing meeting:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s wishes to add to an existing meeting:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> wishes to add to an existing meeting:"), organizer);
+ sender = dupe_first_bold (_("%s wishes to add to an existing meeting:"), organizer, NULL);
break;
case ITIP_VIEW_MODE_REFRESH:
if (priv->attendee_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s wishes to receive the latest information for the following meeting:"), attendee, priv->attendee_sentby);
+ sender = dupe_first_bold (_("%s through %s wishes to receive the latest information for the following meeting:"), attendee, priv->attendee_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> wishes to receive the latest information for the following meeting:"), attendee);
+ sender = dupe_first_bold (_("%s wishes to receive the latest information for the following meeting:"), attendee, NULL);
break;
case ITIP_VIEW_MODE_REPLY:
if (priv->attendee_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has sent back the following meeting response:"), attendee, priv->attendee_sentby);
+ sender = dupe_first_bold (_("%s through %s has sent back the following meeting response:"), attendee, priv->attendee_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has sent back the following meeting response:"), attendee);
+ sender = dupe_first_bold (_("%s has sent back the following meeting response:"), attendee, NULL);
break;
case ITIP_VIEW_MODE_CANCEL:
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has canceled the following meeting:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s has canceled the following meeting:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has canceled the following meeting."), organizer);
+ sender = dupe_first_bold (_("%s has canceled the following meeting."), organizer, NULL);
break;
case ITIP_VIEW_MODE_COUNTER:
if (priv->attendee_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has proposed the following meeting changes."), attendee, priv->attendee_sentby);
+ sender = dupe_first_bold (_("%s through %s has proposed the following meeting changes."), attendee, priv->attendee_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has proposed the following meeting changes."), attendee);
+ sender = dupe_first_bold (_("%s has proposed the following meeting changes."), attendee, NULL);
break;
case ITIP_VIEW_MODE_DECLINECOUNTER:
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has declined the following meeting changes:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s has declined the following meeting changes:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has declined the following meeting changes."), organizer);
+ sender = dupe_first_bold (_("%s has declined the following meeting changes."), organizer, NULL);
break;
default:
break;
@@ -436,64 +452,64 @@ set_tasklist_sender_text (ItipView *view)
/* The current account ID (i.e. the delegatee) is receiving a copy of the request/response. Here we ask the delegatee to respond/accept on behalf of the delegator. */
if (priv->organizer && priv->proxy)
- on_behalf_of = g_markup_printf_escaped (_("Please respond on behalf of <b>%s</b>"), priv->proxy);
+ on_behalf_of = dupe_first_bold (_("Please respond on behalf of %s"), priv->proxy, NULL);
else if (priv->attendee && priv->proxy)
- on_behalf_of = g_markup_printf_escaped (_("Received on behalf of <b>%s</b>"), priv->proxy);
+ on_behalf_of = dupe_first_bold (_("Received on behalf of %s"), priv->proxy, NULL);
switch (priv->mode) {
case ITIP_VIEW_MODE_PUBLISH:
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has published the following task:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s has published the following task:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has published the following task:"), organizer);
+ sender = dupe_first_bold (_("%s has published the following task:"), organizer, NULL);
break;
case ITIP_VIEW_MODE_REQUEST:
/* FIXME is the delegator stuff handled correctly here? */
if (priv->delegator) {
- sender = g_markup_printf_escaped (_("<b>%s</b> requests the assignment of %s to the following task:"), organizer, priv->delegator);
+ sender = dupe_first_bold (_("%s requests the assignment of %s to the following task:"), organizer, priv->delegator);
} else {
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has assigned you a task:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s has assigned you a task:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has assigned you a task:"), organizer);
+ sender = dupe_first_bold (_("%s has assigned you a task:"), organizer, NULL);
}
break;
case ITIP_VIEW_MODE_ADD:
/* FIXME What text for this? */
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s wishes to add to an existing task:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s wishes to add to an existing task:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> wishes to add to an existing task:"), organizer);
+ sender = dupe_first_bold (_("%s wishes to add to an existing task:"), organizer, NULL);
break;
case ITIP_VIEW_MODE_REFRESH:
if (priv->attendee_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s wishes to receive the latest information for the following assigned task:"), attendee, priv->attendee_sentby);
+ sender = dupe_first_bold (_("%s through %s wishes to receive the latest information for the following assigned task:"), attendee, priv->attendee_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> wishes to receive the latest information for the following assigned task:"), attendee);
+ sender = dupe_first_bold (_("%s wishes to receive the latest information for the following assigned task:"), attendee, NULL);
break;
case ITIP_VIEW_MODE_REPLY:
if (priv->attendee_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has sent back the following assigned task response:"), attendee, priv->attendee_sentby);
+ sender = dupe_first_bold (_("%s through %s has sent back the following assigned task response:"), attendee, priv->attendee_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has sent back the following assigned task response:"), attendee);
+ sender = dupe_first_bold (_("%s has sent back the following assigned task response:"), attendee, NULL);
break;
case ITIP_VIEW_MODE_CANCEL:
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has canceled the following assigned task:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s has canceled the following assigned task:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has canceled the following assigned task:"), organizer);
+ sender = dupe_first_bold (_("%s has canceled the following assigned task:"), organizer, NULL);
break;
case ITIP_VIEW_MODE_COUNTER:
if (priv->attendee_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has proposed the following task assignment changes:"), attendee, priv->attendee_sentby);
+ sender = dupe_first_bold (_("%s through %s has proposed the following task assignment changes:"), attendee, priv->attendee_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has proposed the following task assignment changes:"), attendee);
+ sender = dupe_first_bold (_("%s has proposed the following task assignment changes:"), attendee, NULL);
break;
case ITIP_VIEW_MODE_DECLINECOUNTER:
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has declined the following assigned task:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s has declined the following assigned task:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has declined the following assigned task:"), organizer);
+ sender = dupe_first_bold (_("%s has declined the following assigned task:"), organizer, NULL);
break;
default:
break;
@@ -523,29 +539,29 @@ set_journal_sender_text (ItipView *view)
/* The current account ID (i.e. the delegatee) is receiving a copy of the request/response. Here we ask the delegatee to respond/accept on behalf of the delegator. */
if (priv->organizer && priv->proxy)
- on_behalf_of = g_markup_printf_escaped (_("Please respond on behalf of <b>%s</b>"), priv->proxy);
+ on_behalf_of = dupe_first_bold (_("Please respond on behalf of %s"), priv->proxy, NULL);
else if (priv->attendee && priv->proxy)
- on_behalf_of = g_markup_printf_escaped (_("Received on behalf of <b>%s</b>"), priv->proxy);
+ on_behalf_of = dupe_first_bold (_("Received on behalf of %s"), priv->proxy, NULL);
switch (priv->mode) {
case ITIP_VIEW_MODE_PUBLISH:
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has published the following memo:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s has published the following memo:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has published the following memo:"), organizer);
+ sender = dupe_first_bold (_("%s has published the following memo:"), organizer, NULL);
break;
case ITIP_VIEW_MODE_ADD:
/* FIXME What text for this? */
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s wishes to add to an existing memo:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s wishes to add to an existing memo:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> wishes to add to an existing memo:"), organizer);
+ sender = dupe_first_bold (_("%s wishes to add to an existing memo:"), organizer, NULL);
break;
case ITIP_VIEW_MODE_CANCEL:
if (priv->organizer_sentby)
- sender = g_markup_printf_escaped (_("<b>%s</b> through %s has canceled the following shared memo:"), organizer, priv->organizer_sentby);
+ sender = dupe_first_bold (_("%s through %s has canceled the following shared memo:"), organizer, priv->organizer_sentby);
else
- sender = g_markup_printf_escaped (_("<b>%s</b> has canceled the following shared memo:"), organizer);
+ sender = dupe_first_bold (_("%s has canceled the following shared memo:"), organizer, NULL);
break;
default:
break;
diff --git a/plugins/webdav-account-setup/webdav-contacts-source.c b/plugins/webdav-account-setup/webdav-contacts-source.c
index 9f35d0bd54..8d822e6c9e 100644
--- a/plugins/webdav-account-setup/webdav-contacts-source.c
+++ b/plugins/webdav-account-setup/webdav-contacts-source.c
@@ -212,6 +212,7 @@ plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data)
GtkWidget *label;
ui_data *uidata;
+ gchar *buff;
source = t->source;
@@ -232,7 +233,9 @@ plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_box_pack_start(GTK_BOX(vbox), vbox2, FALSE, FALSE, 0);
section = gtk_label_new(NULL);
- gtk_label_set_markup(GTK_LABEL(section), _("<b>Server</b>"));
+ buff = g_strconcat ("<b>", _("Server"), "</b>", NULL);
+ gtk_label_set_markup(GTK_LABEL(section), buff);
+ g_free (buff);
gtk_misc_set_alignment(GTK_MISC(section), 0.0, 0.0);
gtk_box_pack_start(GTK_BOX(vbox2), section, FALSE, FALSE, 0);