+ this.out_props.set("html", "Pman.Cms.content(" +
+ this.node.quoteString(this.file.name + "::" + this.node.get("cms-id")) +
+ ", " +
+ this.node.quoteString(v) +
+ ")");
+
+ continue;
+ }
+
+
+
+
+ if (Lang.isKeyword(leftv) || Lang.isBuiltin(leftv)) {
+ left = "'" + leftv + "'";
+ } else if (Regex.match_simple("[^A-Za-z_]+",leftv)) { // not plain a-z... - quoted.
+ var val = this.node.quoteString(leftv);
+
+ left = "'" + val.substring(1, val.length-2).replace("'", "\\'") + "'";
+ } else {
+ left = leftv;
+ }
+
+
+ // next.. is it a function.. or a raw string..
+ if (
+ kflag == NodePropType.METHOD
+ ||
+ kflag == NodePropType.RAW
+ ||
+ ktype == "function" // ??? why woudl return type be function? << messed up..
+
+ // ??? any others that are raw output..
+ ) {
+ // does not hapepnd with arrays..
+ if (v.length < 1) { //if (typeof(el) == 'string' && !obj[i].length) { //skip empty.
+ continue;
+ }
+ /*
+ print(v);
+ string str = "";
+ try {
+ str = func_regex.replace(v,v.length, 0, "");
+ } catch(Error e) {
+ print("regex failed");
+ return "";
+ }
+ */
+ var str = v.strip();
+
+ var lines = str.split("\n");
+ var nstr = "" + str;
+ if (lines.length > 0) {
+ nstr = string.joinv("\n" + this.pad, lines);
+ //nstr = string.joinv("\n", lines);
+ }
+ this.out_props.set(left, nstr);
+
+
+
+
+
+ //print("==> " + str + "\n");
+ //this.els.add(left + " : "+ nstr);
+ continue;
+ }
+ // standard..
+
+
+ if (
+ Lang.isNumber(v)
+ ||
+ Lang.isBoolean(v)
+ ||
+ ktype.down() == "boolean"
+ ||
+ ktype.down() == "bool"
+ ||
+ ktype.down() == "number"
+ ||
+ ktype.down() == "int"
+ ) { // boolean or number...?
+ this.out_props.set(left, v.down());
+ //this.els.add(left + " : " + v.down() );
+ continue;
+ }
+
+ // is it a translated string?
+
+
+
+
+ // strings..
+ // doubleStringProps is a list of keys like 'name' 'title' etc.. that we know can be translated..
+
+ if ((this.doubleStringProps.index_of(k) > -1) ||
+ (ktype.down() == "string" && k[0] == '_') // strings starting with '_'
+
+ ) {
+ // then use the translated version...
+
+ var com = " /* " +
+ (v.split("\n").length > 1 ?
+ ("\n" + this.pad + string.joinv(this.pad + "\n", v.split("\n")).replace("*/", "* - /") + "\n" + this.pad + "*/ ") :
+ (v.replace("*/", "* - /") + " */")
+ );
+
+ //this.els.add(left + " : _this._strings['" +
+ // GLib.Checksum.compute_for_string (ChecksumType.MD5, v) +
+ // "']"
+ //);
+
+ // string is stored in Roo.vala
+ var kname = GLib.Checksum.compute_for_string (ChecksumType.MD5, v.strip());
+
+ this.out_props.set(left, "_this._strings['" + kname + "']" + com);
+ continue;
+ }
+
+ // otherwise it needs to be encapsulated.. as single quotes..
+
+ var vv = this.node.quoteString(v);
+ // single quote.. v.substring(1, v.length-1).replace("'", "\\'") + "'";
+ //this.els.add(left + " : " + "'" + vv.substring(1, vv.length-2).replace("'", "\\'") + "'");
+ this.out_props.set(left, "'" + vv.substring(1, vv.length-2).replace("'", "\\'") + "'");
+
+
+
+