Code

i18n. Fix for bug #425202 (script messages not translated).
authorJazzyNico <nicoduf@yahoo.fr>
Sun, 25 Apr 2010 14:10:07 +0000 (16:10 +0200)
committerJazzyNico <nicoduf@yahoo.fr>
Sun, 25 Apr 2010 14:10:07 +0000 (16:10 +0200)
src/extension/implementation/script.cpp

index 53a666e25af1974840a2598abb3cc5ad31837634..e075feb913bb3b4a7820250dfd4fd99651f36491 100644 (file)
@@ -835,7 +835,13 @@ void Script::checkStderr (const Glib::ustring &data,
     textview->set_wrap_mode(Gtk::WRAP_WORD);
     textview->show();
 
-    textview->get_buffer()->set_text(data.c_str());
+    // Remove the last character
+    char *errormsg = (char*) data.c_str();
+    while (*errormsg != '\0') errormsg++;
+    errormsg -= 1;
+    *errormsg = '\0';
+
+    textview->get_buffer()->set_text(_(data.c_str()));
 
     Gtk::ScrolledWindow * scrollwindow = new Gtk::ScrolledWindow();
     scrollwindow->add(*textview);