aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Klapper <a9016009@gmx.de>2007-09-06 18:33:29 +0800
committerAndre Klapper <aklapper@src.gnome.org>2007-09-06 18:33:29 +0800
commit6e0bf464f3337147bbc43f1bb5e0785369c1bcfb (patch)
tree3748d033c07663c48f441b768e00fd91bd9a729a
parent4ad0649ac83869ba74787e9adf49bcb8059df8e3 (diff)
downloadgsoc2013-evolution-6e0bf464f3337147bbc43f1bb5e0785369c1bcfb.tar.gz
gsoc2013-evolution-6e0bf464f3337147bbc43f1bb5e0785369c1bcfb.tar.zst
gsoc2013-evolution-6e0bf464f3337147bbc43f1bb5e0785369c1bcfb.zip
Don't translate empty label names. Fixes bug 363645. Thanks to Bastien
2007-09-06 Andre Klapper <a9016009@gmx.de> * mail-config.c: (config_cache_labels): Don't translate empty label names. Fixes bug 363645. Thanks to Bastien Nocera. svn path=/trunk/; revision=34186
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-config.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ab5878ee2c..3ed9f52111 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-06 Andre Klapper <a9016009@gmx.de>
+
+ * mail-config.c: (config_cache_labels):
+ Don't translate empty label names.
+ Fixes bug 363645. Thanks to Bastien Nocera.
+
2007-09-06 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #304993 (Novell Bugzilla)
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 362083ee9e..19e46073b2 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -175,7 +175,13 @@ config_cache_labels (void)
*colour++ = '\0';
label->tag = g_strdup(label_defaults[num].tag);
- label->name = g_strdup (_(buf));
+
+ /* Don't translate an empty string */
+ if (buf == NULL || buf[0] == '\0')
+ label->name = g_strdup (_("Unnamed"));
+ else
+ label->name = g_strdup (_(buf));
+
label->colour = g_strdup (colour);
n = g_slist_alloc ();