Update of /cvsroot/phpwebapp/web_app/timer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1556/timer
Modified Files:
class.Timer.php class.Timer.js
Log Message:
i18n and l10n of web_app messages
Index: class.Timer.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/timer/class.Timer.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** class.Timer.php 22 Jul 2004 16:25:36 -0000 1.9
--- class.Timer.php 1 Nov 2005 13:24:25 -0000 1.10
***************
*** 99,102 ****
--- 99,105 ----
}
+ /**
+ * Returns a JS code that is appended at the head of the page.
+ */
function JSTimer()
{
***************
*** 104,107 ****
--- 107,111 ----
$timer_path = WebApp::to_url(TIMER_PATH);
+ $comment = TF_("Time that spends the web-page to be transfered and loaded in browser");
$js_code = "
<script type=\"text/javascript\" language=\"javascript\" src=\"".$timer_path."class.Timer.js\"></script>
***************
*** 109,117 ****
//<![CDATA[
var timer = new Timer();
! var comment = 'Time that spends the web-page to be transfered and loaded in browser';
timer.Start('web-page', comment);
//]]>
</script>
";
return $js_code;
}
--- 113,125 ----
//<![CDATA[
var timer = new Timer();
! var comment = '$comment';
timer.Start('web-page', comment);
//]]>
</script>
";
+
+ global $webPage;
+ $webPage->extract_js_l10n_messages(TIMER_PATH."class.Timer.js");
+
return $js_code;
}
Index: class.Timer.js
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/timer/class.Timer.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** class.Timer.js 15 Jul 2004 14:46:04 -0000 1.5
--- class.Timer.js 1 Nov 2005 13:24:25 -0000 1.6
***************
*** 65,69 ****
}
else
! alert("Timer.Start: '" + proc_id + "' already exists.");
}
--- 65,73 ----
}
else
! {
! var msg = TF_("'v_proc_id' already exists.");
! msg = msg.replace(/v_proc_id/, proc_id);
! alert("Timer.Start: " + msg);
! }
}
***************
*** 73,77 ****
if (idx == -1) //does not exist
{
! alert("Timer.Start: '" + proc_id + "' does not exist.");
}
else
--- 77,83 ----
if (idx == -1) //does not exist
{
! var msg = TF_("'v_proc_id' does not exist.");
! msg = msg.replace(/v_proc_id/, proc_id);
! alert("Timer.Start: " + msg);
}
else
|