Fix \n use in localized message, cause parse error in callback execution 05/15105/1
Bruno JOFRET [Wed, 20 Aug 2014 13:27:04 +0000 (15:27 +0200)]
Change-Id: I217dde29cae2e313e5f49152bc025243c00f30e7
(cherry picked from commit 760eba26fc89b7a134812f50e04811c09313239f)

scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/datatip/Datatip.java

index 8194544..43f1773 100755 (executable)
@@ -348,7 +348,9 @@ public class Datatip extends Text {
             }
         }
 
-        String errMsg =  Messages.gettext("Wrong value for ''%s'' property: A valid function name expected.\n");
+        String errMsg =  Messages.gettext("Wrong value for '%s' property: A valid function name expected.\n");
+        errMsg = errMsg.replace("'", "''");
+        errMsg = errMsg.replace("\n", "\\n");
         String updateCommand = "try;" +
                                "GDZa786XBSq7899SHKp=getcallbackobject(" + getIdentifier() + ");" +
                                "set(GDZa786XBSq7899SHKp,\"text\"," + fnc + "(GDZa786XBSq7899SHKp));" +