for (var i in props) {
this._props[i] = props[i];
}
+ } else {
+ var msg = "messageCatalog: No text from " + this.src;
+ alert(msg); throw(msg);
}
]]>
</body>
} while ( cont == true );
props[k] = v;
- }
+ }
return props;
]]>
try {
return this._props[key];
} catch(e) {
- dump("*** Failed to get string " + key + " in bundle: " + this.src + "\n");
+ alert("*** Failed to get string " + key + " in bundle: " + this.src + "\n");
throw(e);
}
]]>
<body>
<![CDATA[
try {
- var str = this._props[key];
- var val = this.sprintf.apply(this,[ str ].concat(params));
+ var str = this._props[key]; if (!str) throw("messageCatalog: Failed to get string " + key + " in bundle.");
+ var these = [ str ].concat(params);
+ var val = this.sprintf.apply(this,these);
return val;
} catch(e) {
- dump("*** Failed to get string " + key + " in bundle: " + this.src + "\n");
+ alert("*** Failed to get string " + key + " in bundle: " + this.src + "\n");
throw(e);
}
]]>
}
var a = arguments, i = 0, format = a[i++];
- return format.replace(sprintf.regex, function(substring, valueIndex, flags, minWidth, _, precision, type) {
+ return format.replace(this.regex, function(substring, valueIndex, flags, minWidth, _, precision, type) {
if (substring == '%%') return '%';
// parse flags