[dia] [meta info] Don't let gettext translate the empty string



commit 72075a1ba9308acab8949613547f84af82ce3ad7
Author: Hans Breuer <hans breuer org>
Date:   Thu Aug 5 22:55:23 2010 +0200

    [meta info] Don't let gettext translate the empty string
    
    Admitted it is a hack the string is empty for meta info, but the
    gettext behavior looks suspicious, too.

 lib/propdialogs.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/lib/propdialogs.c b/lib/propdialogs.c
index 9a7a0e3..18dcf1b 100644
--- a/lib/propdialogs.c
+++ b/lib/propdialogs.c
@@ -248,7 +248,14 @@ prop_dialog_add_property(PropDialog *dialog, Property *prop)
   pwa.widget = widget;  
   g_array_append_val(dialog->prop_widgets,pwa);  
 
-  label = gtk_label_new(_(prop->descr->description));
+  /* Don't let gettext translate the empty string (it would give po-info).
+   * Admitted it is a hack the string is empty for meta info, but the
+   * gettext behavior looks suspicious, too.
+   */
+  if (strlen (prop->descr->description) == 0)
+    label = gtk_label_new("");
+  else
+    label = gtk_label_new(_(prop->descr->description));
   gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
 
   prop_dialog_add_widget(dialog, label, widget);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]