includes/clientside/static/l10n.js
changeset 335 67bd3121a12e
parent 334 c72b545f1304
child 387 92664d2efab8
--- a/includes/clientside/static/l10n.js	Wed Dec 26 00:37:26 2007 -0500
+++ b/includes/clientside/static/l10n.js	Thu Dec 27 22:09:33 2007 -0500
@@ -23,13 +23,13 @@
   
   this.perform_subst = function(str, subst)
   {
-    // var this_regex = /%this\.([a-z0-9_]+)%/;
-    // var match;
-    // while ( str.match(this_regex) )
-    // {
-    //   match = str.match(this_regex);
-    //   alert(match);
-    // }
+    var this_regex = /%this\.([a-z0-9_]+)%/;
+    var match;
+    while ( str.match(this_regex) )
+    {
+      match = str.match(this_regex);
+      str = str.replace(match[0], this.get(match[1]));
+    }
     // hackish workaround for %config.*%
     str = str.replace(/%config\.([a-z0-9_]+)%/g, '%$1%');
     if ( typeof(subst) == 'object' )