+
+ public override void findTransStrings(Node? node )
+ {
+ // iterate properties...
+ // use doubleStringProps
+
+ // flagging a translatable string..
+ // the code would use string _astring to indicate a translatable string
+ // the to use it it would do String.format(this._message, somedata);
+
+ // loop through and find string starting with '_'
+ if (node == null) {
+ return;
+ }
+
+ var iter = node.props.map_iterator();
+ while (iter.next()) {
+ // key formats : XXXX
+ // XXX - plain
+ // string XXX - with type
+ // $ XXX - with flag (no type)
+ // $ string XXX - with flag
+ string kname;
+ string ktype;
+ string kflag;
+ node.normalize_key(iter.get_key(), out kname, out kflag, out ktype);
+ 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) {
+ GLib.debug("flag=%s type=%s name=%s : %s\n", kflag,ktype,kname,str);
+ this.transStrings.set(str,
+ GLib.Checksum.compute_for_string (ChecksumType.MD5, str.strip())
+ );
+ continue;
+ }
+
+ if (ktype.down() == "string" && kname[0] == '_') {
+ GLib.debug("flag=%s type=%s name=%s : %s\n", kflag,ktype,kname,str);
+ this.transStrings.set(str,
+ GLib.Checksum.compute_for_string (ChecksumType.MD5, str.strip())
+ );
+ continue;
+ }
+
+ }
+
+
+
+ // iterate children..
+ for (var i =0; i < node.items.size; i++) {
+ this.findTransStrings(node.items.get(i) );
+ }