Thread: [phpwebapp-commits] CVS: web_app/session wbSession.php,1.7,1.8 class.Session.php,1.13,1.14 class.Ses
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2005-11-01 13:24:46
|
Update of /cvsroot/phpwebapp/web_app/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1556/session Modified Files: wbSession.php class.Session.php class.Session.js Log Message: i18n and l10n of web_app messages Index: wbSession.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/wbSession.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wbSession.php 22 Jul 2004 16:25:36 -0000 1.7 --- wbSession.php 1 Nov 2005 13:24:25 -0000 1.8 *************** *** 31,38 **** --- 31,42 ---- { global $webPage; + $session_url = WebApp::to_url(SESSION_PATH); $func_goto = ' <script type="text/javascript" language="javascript" ' . "src=\"${session_url}func.GoTo.js\"></script>\n"; $webPage->append_to_head($func_goto); + + $webPage->extract_js_l10n_messages(SESSION_PATH."class.Session.js"); + //$webPage->extract_js_l10n_messages(SESSION_PATH."func.GoTo.js"); } Index: class.Session.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/class.Session.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** class.Session.php 30 Jun 2005 06:24:43 -0000 1.13 --- class.Session.php 1 Nov 2005 13:24:25 -0000 1.14 *************** *** 198,203 **** if (isset($this->Vars[$var_name])) { ! $msg = "Session::addVar(): DB var '$var_name' shadows an existing JS var with the same name."; ! print WebApp::warning_msg($msg); } $this->dbVars[$var_name] = $var_value; --- 198,204 ---- if (isset($this->Vars[$var_name])) { ! $msg = TF_("DB var 'v_var_name' shadows an existing JS var with the same name."); ! $msg = str_replace('v_var_name', $var_name, $msg); ! print WebApp::warning_msg("Session::addVar(): $msg"); } $this->dbVars[$var_name] = $var_value; *************** *** 207,212 **** if (isset($this->dbVars[$var_name])) { ! $msg = "Session::addVar(): JS var '$var_name' is shadowed by an existing DB var with the same name."; ! print WebApp::warning_msg($msg); } if (isset($this->Vars[$var_name])) --- 208,214 ---- if (isset($this->dbVars[$var_name])) { ! $msg = TF_("JS var 'v_var_name' is shadowed by an existing DB var with the same name."); ! $msg = str_replace('v_var_name', $var_name, $msg); ! print WebApp::warning_msg("Session::addVar(): $msg"); } if (isset($this->Vars[$var_name])) *************** *** 306,312 **** $this->dbVars = array(); //give a warning ! print WebApp::warning_msg("session DB vars saved as JS vars," ! . " there is no DB connection, make 'true' the USES_DB " ! . " constant in 'config/const.Settings.php'."); } } --- 308,314 ---- $this->dbVars = array(); //give a warning ! $msg = TF_("session DB vars saved as JS vars, there is no DB \ ! connection, make 'true' the USES_DB constant in 'config/const.Settings.php'."); ! print WebApp::warning_msg($msg); } } Index: class.Session.js =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/class.Session.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** class.Session.js 25 Aug 2003 13:18:31 -0000 1.3 --- class.Session.js 1 Nov 2005 13:24:25 -0000 1.4 *************** *** 67,73 **** if (this.isset(var_name)) { ! var msg = "Session.addVar: There is a '" + var_name ! + "' already in the list, use setVar to change its value."; ! alert(msg); } else --- 67,73 ---- if (this.isset(var_name)) { ! var msg = TF_("There is a 'v_var_name' already in the list, use setVar to change its value."); ! msg = msg.replace(/v_var_name/, var_name); ! alert("Session.addVar: " + msg); } else *************** *** 83,87 **** if (idx == -1) //not found { ! alert("Session.getVar: '" + var_name + "' doesn't exist."); return "UNDEFINED"; } --- 83,89 ---- if (idx == -1) //not found { ! var msg = TF_("'v_var_name' doesn't exist."); ! msg = msg.replace(/v_var_name/, var_name); ! alert("Session.getVar: " + msg); return "UNDEFINED"; } *************** *** 94,98 **** var idx = this.find(var_name); if (idx == -1) //not found ! alert("Session.setVar: '" + var_name + "' doesn't exist."); else this.Vars[idx].Value = var_value; --- 96,104 ---- var idx = this.find(var_name); if (idx == -1) //not found ! { ! var msg = TF_("'v_var_name' doesn't exist."); ! msg = msg.replace(/v_var_name/, var_name); ! alert("Session.setVar: " + msg); ! } else this.Vars[idx].Value = var_value; *************** *** 104,108 **** if (idx == -1) //not found { ! alert("Session.rmVar: '" + var_name + "' doesn't exist."); return; } --- 110,116 ---- if (idx == -1) //not found { ! var msg = TF_("'v_var_name' doesn't exist."); ! msg = msg.replace(/v_var_name/, var_name); ! alert("Session.rmVar: " + msg); return; } |