{
- print("load Items!");
+ GLib.debug("load Items!");
if (this.tree != null) {
return;
}
if (kflag == "$") {
continue;
}
+ // skip cms-id nodes...
+ if (kname == "html" && node.has("cms-id")) {
+ continue;
+ }
+
var str = iter.get_value();
if (this.doubleStringProps.index_of(kname) > -1) {
print("flag=%s type=%s name=%s : %s\n", kflag,ktype,kname,str);
this.transStrings.set(str,
- GLib.Checksum.compute_for_string (ChecksumType.MD5, str)
+ GLib.Checksum.compute_for_string (ChecksumType.MD5, str.strip())
);
continue;
}
if (ktype.down() == "string" && kname[0] == '_') {
print("flag=%s type=%s name=%s : %s\n", kflag,ktype,kname,str);
this.transStrings.set(str,
- GLib.Checksum.compute_for_string (ChecksumType.MD5, str)
+ GLib.Checksum.compute_for_string (ChecksumType.MD5, str.strip())
);
continue;
}
*
*
*/
+ public override string toSourceCode()
+ {
+ this.transStrings = new Gee.HashMap<string,string>();
+ this.findTransStrings(this.tree);
+ return this.toSource();
+ }
+
public override string toSource()
{
// dump the file tree back out to a string.
if (top == null) {
return "";
}
- // get the translatable strings..
+ // get the translatable strings.. = we reload them again so calling methods get the right data...
+ this.transStrings = new Gee.HashMap<string,string>();
+ this.findTransStrings(this.tree);
+
+
if (top.contains("Dialog")) {
return this.toSourceDialog(false);
}
return "";
}
var x = new NodeToJs(this.tree, this.doubleStringProps, pad, null);
+ x.renderer = this;
x.cur_line = prefix.split("\n").length;
var ret = x.munge();