var t, last, next;
+ var tokfind = function (j,dir) {
+ while (1) {
+ if ((dir < 0) && (j < 0)) {
+ return false;
+ }
+ if ((dir > 0) && (j >= toks.length)) {
+ return false;
+ }
+ j += dir;
+ if (toks[j].type != 'WHIT') {
+ return toks[j];
+ }
+ }
+ return false;
+
+ }
+
+
for (var i=0;i<toks.length;i++) {
t = toks[i];
continue;
}
- last = i > 0 ? toks[i-1] : false;
- next = i+1 < toks.length ? toks[i+1] : false;
+ last = tokfind(i,-1);
+ next = tokfind(i,+1);
// we have to ignore key values on objects
}
- toks.forEach(function (t) {
-
- })
+
var transfile = minfile + '.lang.trans';
var transmd5 = minfile + '.lang';
if (!v.length) {
continue;
}
- File.append(transfile, l + "\n\t" + JSON.stringify(v) + " : " + JSON.stringify(v));
+ File.append(transfile, l + "\n\t\"" + v + "\" : \"" + v);
l = ',';
// strings are raw... - as the where encoded to start with!!!
- File.append(transmd5, '_T["' + this.md5(ffn + '-' + v) + '"]='+JSON.stringify(v)+";\n");
+ // so we should not need to encode them again.. - just wrap with "
+ File.append(transmd5, '_T["' + this.md5(ffn + '-' + v) + '"]="'+v+"\";\n");
}
File.append(transfile, "\n},"); // always one trailing..