summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-19 01:17:13 +0100
committerinfirit <[email protected]>2014-12-19 01:17:13 +0100
commitfdd68b3d1577af90bd37d990ac09ba8b5ee2f70d (patch)
treed4136b6e420065db667280b4868fb93b32d8a1b7
parent0dc96be11c125a73113985c37b6d91824578c43c (diff)
downloadmate-system-monitor-fdd68b3d1577af90bd37d990ac09ba8b5ee2f70d.tar.bz2
mate-system-monitor-fdd68b3d1577af90bd37d990ac09ba8b5ee2f70d.tar.xz
Remove markup from translated strings
Including the markup in the translated strings makes the translators job unnecessarily harder. Taken from GSM commit: c45ed812a74874ada38feaf4883de807d2a26cfb From: Matthias Clasen <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=681271
-rw-r--r--src/lsof.cpp8
-rw-r--r--src/sysinfo.cpp4
-rw-r--r--src/util.cpp7
3 files changed, 12 insertions, 7 deletions
diff --git a/src/lsof.cpp b/src/lsof.cpp
index 100394a..aaf2fbd 100644
--- a/src/lsof.cpp
+++ b/src/lsof.cpp
@@ -122,10 +122,12 @@ namespace
void display_regex_error(const Glib::RegexError& error)
{
- const char * msg = _("<b>Error</b>\n"
- "'%s' is not a valid Perl regular expression.\n"
- "%s");
+ char * msg = g_strdup_printf ("<b>%s</b>\n%s\n%s",
+ _("Error"),
+ _("'%s' is not a valid Perl regular expression."),
+ "%s");
std::string message = make_string(g_strdup_printf(msg, this->pattern().c_str(), error.what().c_str()));
+ g_free(msg);
Gtk::MessageDialog dialog(message,
true, // use markup
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index 857570b..257baa1 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -806,7 +806,7 @@ procman_create_sysinfo_view(void)
/* hardware section */
- markup = g_strdup_printf(_("<b>Hardware</b>"));
+ markup = g_strdup_printf("<b>%s</b>", _("Hardware"));
hardware_table = add_section(GTK_BOX(vbox), markup, 1, 2, NULL);
g_free(markup);
@@ -823,7 +823,7 @@ procman_create_sysinfo_view(void)
/* disk space section */
- markup = g_strdup_printf(_("<b>System Status</b>"));
+ markup = g_strdup_printf("<b>%s</b>", _("System Status"));
disk_space_table = add_section(GTK_BOX(vbox), markup, 1, 2, NULL);
g_free(markup);
diff --git a/src/util.cpp b/src/util.cpp
index cdb3287..3573f00 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -416,8 +416,11 @@ namespace procman
g_value_unset(&value);
- if (size == 0)
- g_object_set(renderer, "markup", _("<i>N/A</i>"), NULL);
+ if (size == 0) {
+ char *str = g_strdup_printf ("<i>%s</i>", _("N/A"));
+ g_object_set(renderer, "markup", str, NULL);
+ g_free(str);
+ }
else {
char *str = procman::format_size(size);
g_object_set(renderer, "text", str, NULL);