[gnome-system-monitor] Remove markup from translated strings
- From: Chris KÃhl <chriskuehl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Remove markup from translated strings
- Date: Tue, 7 Aug 2012 01:52:06 +0000 (UTC)
commit c45ed812a74874ada38feaf4883de807d2a26cfb
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Aug 5 23:25:26 2012 -0400
Remove markup from translated strings
Including the markup in the translated strings makes the
translators job unnecessarily harder.
https://bugzilla.gnome.org/show_bug.cgi?id=681271
src/lsof.cpp | 8 +++++---
src/sysinfo.cpp | 4 ++--
src/util.cpp | 7 +++++--
3 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/src/lsof.cpp b/src/lsof.cpp
index 723dae9..430a080 100644
--- a/src/lsof.cpp
+++ b/src/lsof.cpp
@@ -121,10 +121,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 9ac79dd..5a0169a 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -756,7 +756,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);
@@ -775,7 +775,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 33e9d0f..d930059 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]