From: <tr...@us...> - 2013-01-27 15:15:32
|
Revision: 10928 http://sourceforge.net/p/xoops/svn/10928 Author: trabis Date: 2013-01-27 15:15:23 +0000 (Sun, 27 Jan 2013) Log Message: ----------- Partial update of user languages... Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/extras/login.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/module.textsanitizer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/registerform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/locale/en_US/en_US.php XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/install.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/profile_userform.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userform.html XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Locale/Mailer/Abstract.php Modified: XoopsCore/branches/2.6.x/2.6.0/extras/login.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/extras/login.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/extras/login.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -44,7 +44,7 @@ $user = $member_handler->loginUser(addslashes($myts->stripSlashesGPC($username)), addslashes($myts->stripSlashesGPC($password))); if (is_object($user)) { if (0 == $user->getVar('level')) { - redirect_header(XOOPS_URL . '/index.php', 5, _US_NOACTTPADM); + redirect_header(XOOPS_URL . '/index.php', 5, XoopsLocale::E_SELECTED_USER_DEACTIVATED_OR_NOT_ACTIVE); exit(); } if ($xoopsConfig['closesite'] == 1) { @@ -69,11 +69,11 @@ if (!empty($xoopsConfig['use_ssl'])) { xoops_confirm(array($xoopsConfig['sslpost_name'] => session_id()), XOOPS_URL . '/misc.php?action=showpopups&type=ssllogin', _US_PRESSLOGIN, XoopsLocale::A_LOGIN); } else { - echo sprintf(_US_LOGGINGU, $user->getVar('uname')); + echo sprintf(XoopsLocale::SF_THANK_YOU_FOR_LOGGING_IN, $user->getVar('uname')); echo '<div style="text-align:center;"><input value="' . XoopsLocale::A_CLOSE . '" type="button" onclick="document.window.opener.location.reload();document.window.close();" /></div>'; } } else { - xoops_error(_US_INCORRECTLOGIN . '<br /><a href="login.php">' . XoopsLocale::GO_BACK . '</a>'); + xoops_error(XoopsLocale::E_INCORRECT_LOGIN . '<br /><a href="login.php">' . XoopsLocale::GO_BACK . '</a>'); } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/module.textsanitizer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/module.textsanitizer.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/module.textsanitizer.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -478,7 +478,7 @@ public function htmlSpecialChars($text, $quote_style = ENT_QUOTES, $charset = null, $double_encode = true) { if (version_compare(phpversion(), '5.2.3', '>=')) { - $text = htmlspecialchars($text, $quote_style, $charset ? $charset : class_exists('xoopslocale', false) ? XoopsLocale::getCharset() : 'UTF-8', $double_encode); + $text = htmlspecialchars($text, $quote_style, $charset ? $charset : (class_exists('xoopslocale', false) ? XoopsLocale::getCharset() : 'UTF-8'), $double_encode); } else { $text = htmlspecialchars($text, $quote_style); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -123,13 +123,12 @@ $xoops->header('system_edituser.html'); $xoops->tpl()->assign('uid', $xoops->user->getVar("uid")); $xoops->tpl()->assign('editprofile', true); - include_once $xoops->path('include/comment_constants.php'); $form = new XoopsThemeForm(_US_EDITPROFILE, 'userinfo', 'edituser.php', 'post', true); - $uname_label = new XoopsFormLabel(_US_NICKNAME, $xoops->user->getVar('uname')); + $uname_label = new XoopsFormLabel(XoopsLocale::USERNAME, $xoops->user->getVar('uname')); $form->addElement($uname_label); $name_text = new XoopsFormText(_US_REALNAME, 'name', 30, 60, $xoops->user->getVar('name', 'E')); $form->addElement($name_text); - $email_tray = new XoopsFormElementTray(_US_EMAIL, '<br />'); + $email_tray = new XoopsFormElementTray(XoopsLocale::EMAIL, '<br />'); if ($xoops->getConfig('allow_chgmail') == 1) { $email_text = new XoopsFormText('', 'email', 30, 60, $xoops->user->getVar('email')); } else { @@ -138,13 +137,13 @@ $email_tray->addElement($email_text); $email_cbox_value = $xoops->user->user_viewemail() ? 1 : 0; $email_cbox = new XoopsFormCheckBox('', 'user_viewemail', $email_cbox_value); - $email_cbox->addOption(1, _US_ALLOWVIEWEMAIL); + $email_cbox->addOption(1, XoopsLocale::ALLOW_OTHER_USERS_TO_VIEW_EMAIL); $email_tray->addElement($email_cbox); $form->addElement($email_tray); - $url_text = new XoopsFormText(_US_WEBSITE, 'url', 30, 100, $xoops->user->getVar('url', 'E')); + $url_text = new XoopsFormText(XoopsLocale::WEBSITE, 'url', 30, 100, $xoops->user->getVar('url', 'E')); $form->addElement($url_text); - $timezone_select = new XoopsFormSelectTimezone(_US_TIMEZONE, 'timezone_offset', $xoops->user->getVar('timezone_offset')); + $timezone_select = new XoopsFormSelectTimezone(XoopsLocale::TIME_ZONE, 'timezone_offset', $xoops->user->getVar('timezone_offset')); $icq_text = new XoopsFormText(_US_ICQ, 'user_icq', 15, 15, $xoops->user->getVar('user_icq', 'E')); $aim_text = new XoopsFormText(_US_AIM, 'user_aim', 18, 18, $xoops->user->getVar('user_aim', 'E')); $yim_text = new XoopsFormText(_US_YIM, 'user_yim', 25, 25, $xoops->user->getVar('user_yim', 'E')); @@ -167,7 +166,7 @@ $pwd_tray = new XoopsFormElementTray(_US_PASSWORD . '<br />' . _US_TYPEPASSTWICE); $pwd_tray->addElement($pwd_text); $pwd_tray->addElement($pwd_text2); - $mailok_radio = new XoopsFormRadioYN(_US_MAILOK, 'user_mailok', $xoops->user->getVar('user_mailok')); + $mailok_radio = new XoopsFormRadioYN(XoopsLocale::Q_RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS, 'user_mailok', $xoops->user->getVar('user_mailok')); $uid_hidden = new XoopsFormHidden('uid', $xoops->user->getVar('uid')); $op_hidden = new XoopsFormHidden('op', 'saveuser'); $submit_button = new XoopsFormButton('', 'submit', _US_SAVECHANGES, 'submit'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -25,7 +25,7 @@ $uname = !isset($_POST['uname']) ? '' : trim($_POST['uname']); $pass = !isset($_POST['pass']) ? '' : trim($_POST['pass']); if ($uname == '' || $pass == '') { - $xoops->redirect(XOOPS_URL . '/user.php', 1, _US_INCORRECTLOGIN); + $xoops->redirect(XOOPS_URL . '/user.php', 1, XoopsLocale::E_INCORRECT_LOGIN); exit(); } @@ -38,7 +38,7 @@ if (false != $user) { /* @var $user XoopsUser */ if (0 == $user->getVar('level')) { - $xoops->redirect(XOOPS_URL . '/index.php', 5, _US_NOACTTPADM); + $xoops->redirect(XOOPS_URL . '/index.php', 5, XoopsLocale::E_SELECTED_USER_DEACTIVATED_OR_NOT_ACTIVE); exit(); } if ($xoops->getConfig('closesite') == 1) { @@ -104,7 +104,7 @@ Notifications::getInstance()->getHandlerNotification()->doLoginMaintenance($user->getVar('uid')); } - $xoops->redirect($url, 1, sprintf(_US_LOGGINGU, $user->getVar('uname')), false); + $xoops->redirect($url, 1, sprintf(XoopsLocale::E_INCORRECT_LOGIN, $user->getVar('uname')), false); } else { if (empty($_POST['xoops_redirect'])) { $xoops->redirect(XOOPS_URL . '/user.php', 5, $xoopsAuth->getHtmlErrors()); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/registerform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/registerform.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/registerform.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -17,37 +17,36 @@ */ defined('XOOPS_ROOT_PATH') or die('Restricted access'); -$email_tray = new XoopsFormElementTray(_US_EMAIL, '<br />'); +$email_tray = new XoopsFormElementTray(XoopsLocale::EMAIL, '<br />'); $email_text = new XoopsFormText('', 'email', 25, 60, $myts->htmlSpecialChars($email)); $email_option = new XoopsFormCheckBox('', 'user_viewemail', $user_viewemail); -$email_option->addOption(1, _US_ALLOWVIEWEMAIL); +$email_option->addOption(1, XoopsLocale::ALLOW_OTHER_USERS_TO_VIEW_EMAIL); $email_tray->addElement($email_text, true); $email_tray->addElement($email_option); -$reg_form = new XoopsThemeForm(_US_USERREG, 'userinfo', 'register.php', 'post', true); +$reg_form = new XoopsThemeForm(XoopsLocale::USER_REGISTRATION, 'userinfo', 'register.php', 'post', true); $uname_size = $xoopsConfigUser['maxuname'] < 25 ? $xoopsConfigUser['maxuname'] : 25; -$reg_form->addElement(new XoopsFormText(_US_NICKNAME, 'uname', $uname_size, $uname_size, $myts->htmlSpecialChars($uname)), true); +$reg_form->addElement(new XoopsFormText(XoopsLocale::USERNAME, 'uname', $uname_size, $uname_size, $myts->htmlSpecialChars($uname)), true); $reg_form->addElement($email_tray); $reg_form->addElement(new XoopsFormPassword(_US_PASSWORD, 'pass', 10, 32, $myts->htmlSpecialChars($pass)), true); -$reg_form->addElement(new XoopsFormPassword(_US_VERIFYPASS, 'vpass', 10, 32, $myts->htmlSpecialChars($vpass)), true); -$reg_form->addElement(new XoopsFormText(_US_WEBSITE, 'url', 25, 255, $myts->htmlSpecialChars($url))); +$reg_form->addElement(new XoopsFormPassword(XoopsLocale::VERIFY_PASSWORD, 'vpass', 10, 32, $myts->htmlSpecialChars($vpass)), true); +$reg_form->addElement(new XoopsFormText(XoopsLocale::WEBSITE, 'url', 25, 255, $myts->htmlSpecialChars($url))); $tzselected = ($timezone_offset != '') ? $timezone_offset : $xoopsConfig['default_TZ']; -$reg_form->addElement(new XoopsFormSelectTimezone(_US_TIMEZONE, 'timezone_offset', $tzselected)); +$reg_form->addElement(new XoopsFormSelectTimezone(XoopsLocale::TIME_ZONE, 'timezone_offset', $tzselected)); //$reg_form->addElement($avatar_tray); -$reg_form->addElement(new XoopsFormRadioYN(_US_MAILOK, 'user_mailok', $user_mailok)); +$reg_form->addElement(new XoopsFormRadioYN(XoopsLocale::Q_RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS, 'user_mailok', $user_mailok)); if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') { - $disc_tray = new XoopsFormElementTray(_US_DISCLAIMER, '<br />'); + $disc_tray = new XoopsFormElementTray(XoopsLocale::DISCLAIMER, '<br />'); $disc_text = new XoopsFormTextarea('', 'disclaimer', $xoopsConfigUser['reg_disclaimer'], 15, 80); $disc_text->setExtra('readonly="readonly"'); $disc_tray->addElement($disc_text); $agree_chk = new XoopsFormCheckBox('', 'agree_disc', $agree_disc); - $agree_chk->addOption(1, _US_IAGREE); + $agree_chk->addOption(1, XoopsLocale::I_AGREE_TO_THE_ABOVE); $eltname = $agree_chk->getName(); - $eltmsg = str_replace('"', '\"', stripslashes(sprintf(XoopsLocale::F_ENTER, _US_IAGREE))); + $eltmsg = str_replace('"', '\"', stripslashes(sprintf(XoopsLocale::F_ENTER, XoopsLocale::I_AGREE_TO_THE_ABOVE))); $agree_chk->customValidationCode[] = "if ( myform.{$eltname}.checked == false ) { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }"; $disc_tray->addElement($agree_chk, true); $reg_form->addElement($disc_tray); } $reg_form->addElement(new XoopsFormHidden('op', 'newuser')); -$reg_form->addElement(new XoopsFormButton('', 'submitButton', _US_SUBMIT, 'submit')); -?> \ No newline at end of file +$reg_form->addElement(new XoopsFormButton('', 'submitButton', XoopsLocale::A_SUBMIT, 'submit')); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/user.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/user.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -4,42 +4,42 @@ // _CHARSET : UTF-8 // Translator: XOOPS Translation Team //%%%%%% File Name user.php %%%%% -define('_US_NOTREGISTERED', 'Not registered? Click <a href="register.php">here</a>.'); -define('_US_LOSTPASSWORD', 'Lost your Password?'); -define('_US_NOPROBLEM', 'No problem. Simply enter the e-mail address we have on file for your account.'); -define('_US_YOUREMAIL', 'Your Email: '); -define('_US_SENDPASSWORD', 'Send Password'); -define('_US_LOGGEDOUT', 'You are now logged out'); -define('_US_THANKYOUFORVISIT', 'Thank you for your visit to our site!'); -define('_US_INCORRECTLOGIN', 'Incorrect Login!'); -define('_US_LOGGINGU', 'Thank you for logging in, %s.'); +//define('_US_NOTREGISTERED', 'Not registered? Click <a href="register.php">here</a>.'); +//define('_US_LOSTPASSWORD', 'Lost your Password?'); +//define('_US_NOPROBLEM', 'No problem. Simply enter the e-mail address we have on file for your account.'); +//define('_US_YOUREMAIL', 'Your Email: '); +//define('_US_SENDPASSWORD', 'Send Password'); +//define('_US_LOGGEDOUT', 'You are now logged out'); +//define('_US_THANKYOUFORVISIT', 'Thank you for your visit to our site!'); +//define('_US_INCORRECTLOGIN', 'Incorrect Login!'); +//define('_US_LOGGINGU', 'Thank you for logging in, %s.'); // 2001-11-17 ADD -define('_US_NOACTTPADM', 'The selected user has been deactivated or has not been activated yet.<br />Please contact the administrator for details.'); -define('_US_ACTKEYNOT', 'Activation key not correct!'); -define('_US_ACONTACT', 'Selected account is already activated!'); -define('_US_ACTLOGIN', 'Your account has been activated. Please login with the registered password.'); -define('_US_NOPERMISS', 'Sorry, you do not have the permission to perform this action!'); -define('_US_SURETODEL', 'Are you sure to delete your account?'); -define('_US_REMOVEINFO', 'This will remove all your info from our database.'); -define('_US_BEENDELED', 'Your account has been deleted.'); -define('_US_ACTFAILD', 'Activation failed!'); +//define('_US_NOACTTPADM', 'The selected user has been deactivated or has not been activated yet.<br />Please contact the administrator for details.'); +//define('_US_ACTKEYNOT', 'Activation key not correct!'); +//define('_US_ACONTACT', 'Selected account is already activated!'); +//define('_US_ACTLOGIN', 'Your account has been activated. Please login with the registered password.'); +//define('_US_NOPERMISS', 'Sorry, you do not have the permission to perform this action!'); +//define('_US_SURETODEL', 'Are you sure to delete your account?'); +//define('_US_REMOVEINFO', 'This will remove all your info from our database.'); +//define('_US_BEENDELED', 'Your account has been deleted.'); +//define('_US_ACTFAILD', 'Activation failed!'); //%%%%%% File Name register.php %%%%% -define('_US_USERREG', 'User Registration'); -define('_US_NICKNAME', 'Username'); -define('_US_EMAIL', 'Email'); -define('_US_ALLOWVIEWEMAIL', 'Allow other users to view my email address'); -define('_US_WEBSITE', 'Website'); -define('_US_TIMEZONE', 'Time Zone'); -define('_US_AVATAR', 'Avatar'); -define('_US_VERIFYPASS', 'Verify Password'); -define('_US_SUBMIT', 'Submit'); -define('_US_USERNAME', 'Username'); -define('_US_FINISH', 'Finish'); -define('_US_REGISTERNG', 'Could not register new user.'); -define('_US_MAILOK', 'Receive occasional email notices <br />from administrators and moderators?'); -define('_US_DISCLAIMER', 'Disclaimer'); -define('_US_IAGREE', 'I agree to the above'); -define('_US_UNEEDAGREE', 'Sorry, you have to agree to our disclaimer to get registered.'); +//define('_US_USERREG', 'User Registration'); +//define('_US_NICKNAME', 'Username'); +//define('_US_EMAIL', 'Email'); +//define('_US_ALLOWVIEWEMAIL', 'Allow other users to view my email address'); +//define('_US_WEBSITE', 'Website'); +//define('_US_TIMEZONE', 'Time Zone'); +//define('_US_AVATAR', 'Avatar'); +//define('_US_VERIFYPASS', 'Verify Password'); +//define('_US_SUBMIT', 'Submit'); +//define('_US_USERNAME', 'Username'); +//define('_US_FINISH', 'Finish'); +//define('_US_REGISTERNG', 'Could not register new user.'); +//define('_US_MAILOK', 'Receive occasional email notices <br />from administrators and moderators?'); +//define('_US_DISCLAIMER', 'Disclaimer'); +//define('_US_IAGREE', 'I agree to the above'); +//define('_US_UNEEDAGREE', 'Sorry, you have to agree to our disclaimer to get registered.'); define('_US_NOREGISTER', 'Sorry, we are currently closed for new user registrations'); // %s is username. This is a subject for email define('_US_USERKEYFOR', 'User activation key for %s'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/locale/en_US/en_US.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/locale/en_US/en_US.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/locale/en_US/en_US.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -307,7 +307,6 @@ const ENDS_WITH = "Ends with"; const ENTER_CODE = "Enter the codes that you want to add."; const ENTER_EMAIL = "Enter the email address you want to add."; - const ENTER_EMAIL_WE_HAVE_ON_FILE = "Simply enter the e-mail address we have on file for your account."; const ENTER_IMAGE_POSITION = "Now, enter the position of the image."; const ENTER_IMAGE_URL = "Enter the URL of the image you want to add"; const ENTER_LINK_URL = "Enter the URL of the link you want to add"; @@ -363,6 +362,7 @@ const E_MUST_PROVIDE_PASSWORD = "You must provide a password!"; const E_NAME_IS_RESERVED = "Name is reserved!"; const E_NO_ACCESS_PERMISSION = "Sorry, you don't have the permission to access this area!"; + const E_NO_ACTION_PERMISSION = "Sorry, you do not have the permission to perform this action!"; const E_NO_MODULE = "Selected module does not exist!"; const E_NO_PAGE = "This page does not exist in our database"; const E_NO_RESULT_FOUND = "No result found!"; @@ -887,7 +887,8 @@ const NO_COMMENTS = "No comments"; const NO_FILE_UPLOADED = "No file uploaded"; const NO_MATCH_FOUND_FOR_QUERY = "No match found for your query"; - const NO_PROBLEM = "No problem"; + const NO_PROBLEM_ENTER_EMAIL_WE_HAVE_ON_FILE = "No problem. Simply enter the e-mail address we have on file for your account."; + const NO_TITLE = "No title"; const NUMBER_OF_ITEMS_PER_PAGE_IN_ADMIN_SIDE = "Number of items to display per page in admin side"; const NUMBER_OF_ITEMS_PER_PAGE_IN_USER_SIDE = "Number of items to display per page in user side"; @@ -964,7 +965,7 @@ const READS = "Reads"; const REAL_NAME = "Real name"; const REAL_PLAYER = "Real Player"; - const RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS = "Receive occasional email notices <br />from administrators and moderators?"; + const Q_RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS = "Receive occasional email notices <br />from administrators and moderators?"; const RECENT_ITEMS = "Recent items"; const RECOMMEND_SITE_TO_FRIEND = "Recommend this site to a friend"; const REGISTERED = "Registered"; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -153,7 +153,7 @@ case 'ssllogin': if ($xoops->getConfig('use_ssl') && isset($_POST[$xoops->getConfig('sslpost_name')]) && $xoops->isUser()) { $xoops->loadLanguage('user'); - echo sprintf(_US_LOGGINGU, $xoops->user->getVar('uname')); + echo sprintf(XoopsLocale::E_INCORRECT_LOGIN, $xoops->user->getVar('uname')); echo '<div style="text-align:center;"><input class="formButton" value="' . XoopsLocale::A_CLOSE . '" type="button" onclick="window.opener.location.reload();window.close();" /></div>'; $closebutton = false; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -38,10 +38,10 @@ $xoops->redirect(XOOPS_URL, 1, ''); } if ($thisuser->getVar('actkey') != $actkey) { - $xoops->redirect(XOOPS_URL . '/', 5, _US_ACTKEYNOT); + $xoops->redirect(XOOPS_URL . '/', 5, XoopsLocale::E_ACTIVATION_KEY_INCORRECT); } else { if ($thisuser->getVar('level') > 0) { - $xoops->redirect(XOOPS_URL . '/modules/' . $xoops->module->getVar('dirname', 'n'). '/index.php', 5, _US_ACONTACT, false); + $xoops->redirect(XOOPS_URL . '/modules/' . $xoops->module->getVar('dirname', 'n'). '/index.php', 5, XoopsLocale::E_SELECTED_ACCOUNT_IS_ALREADY_ACTIVATED, false); } else { if (false != $member_handler->activateUser($thisuser)) { $xoops->getConfigs(); @@ -65,7 +65,7 @@ } include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php'; } else { - $xoops->redirect(XOOPS_URL . '/user.php', 5, _US_ACTLOGIN, false); + $xoops->redirect(XOOPS_URL . '/user.php', 5, XoopsLocale::S_YOUR_ACCOUNT_ACTIVATED . ' ' . XoopsLocale::LOGIN_WITH_REGISTERED_PASSWORD, false); } } else { $xoops->redirect(XOOPS_URL . '/index.php', 5, 'Activation failed!'); @@ -83,7 +83,7 @@ /* @var XoopsUser $getuser */ $getuser = $getuser[0]; if ($getuser->isActive()) { - $xoops->redirect(XOOPS_URL, 2, sprintf(_US_ACONTACT, $getuser->getVar('email'))); + $xoops->redirect(XOOPS_URL, 2, XoopsLocale::E_SELECTED_ACCOUNT_IS_ALREADY_ACTIVATED); } $xoopsMailer = $xoops->getMailer(); $xoopsMailer->useMail(); @@ -102,7 +102,7 @@ } } else { $form = new XoopsThemeForm('', 'form', 'activate.php'); - $form->addElement(new XoopsFormText(_US_EMAIL, 'email', 25, 255) ); + $form->addElement(new XoopsFormText(XoopsLocale::EMAIL, 'email', 25, 255) ); $form->addElement(new XoopsFormButton('', 'submit', XoopsLocale::A_SUBMIT, 'submit') ); $form->display(); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -35,7 +35,7 @@ $form = new XoopsThemeForm(_PROFILE_MA_CHANGEPASSWORD, 'form', $_SERVER['REQUEST_URI'], 'post', true); $form->addElement(new XoopsFormPassword(_PROFILE_MA_OLDPASSWORD, 'oldpass', 15, 50), true); $form->addElement(new XoopsFormPassword(_PROFILE_MA_NEWPASSWORD, 'newpass', 15, 50), true); - $form->addElement(new XoopsFormPassword(_US_VERIFYPASS, 'vpass', 15, 50), true); + $form->addElement(new XoopsFormPassword(XoopsLocale::VERIFY_PASSWORD, 'vpass', 15, 50), true); $form->addElement(new XoopsFormButton('', 'submit', XoopsLocale::A_SUBMIT, 'submit')); $form->assign($xoops->tpl()); $xoops->appendConfig('profile_breadcrumbs', array('title' => _PROFILE_MA_CHANGEPASSWORD)); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -47,13 +47,13 @@ //$uname_size = $GLOBALS['xoopsConfigUser']['maxuname'] < 35 ? $GLOBALS['xoopsConfigUser']['maxuname'] : 35; $elements[0][] = array( - 'element' => new XoopsFormText(_US_NICKNAME, 'uname', 5, $xoops->getConfig('maxuname'), $user->getVar('uname', 'e')), + 'element' => new XoopsFormText(XoopsLocale::USERNAME, 'uname', 5, $xoops->getConfig('maxuname'), $user->getVar('uname', 'e')), 'required' => true ); $weights[0][] = 0; $elements[0][] = array( - 'element' => new XoopsFormText(_US_EMAIL, 'email', 5, 255, $user->getVar('email', 'e')), 'required' => true + 'element' => new XoopsFormText(XoopsLocale::EMAIL, 'email', 5, 255, $user->getVar('email', 'e')), 'required' => true ); $weights[0][] = 0; @@ -62,7 +62,7 @@ $weights[0][] = 0; $elements[0][] = - array('element' => new XoopsFormPassword(_US_VERIFYPASS, 'vpass', 5, 32, ''), 'required' => true); + array('element' => new XoopsFormPassword(XoopsLocale::VERIFY_PASSWORD, 'vpass', 5, 32, ''), 'required' => true); $weights[0][] = 0; } @@ -97,11 +97,11 @@ //end of Dynamic User fields $myts = MyTextSanitizer::getInstance(); if ($step_no == 1 && $xoops->getConfig('reg_dispdsclmr') != 0 && $xoops->getConfig('reg_disclaimer') != '') { - $disc_tray = new XoopsFormElementTray(_US_DISCLAIMER, '<br />'); + $disc_tray = new XoopsFormElementTray(XoopsLocale::DISCLAIMER, '<br />'); $disc_text = new XoopsFormLabel("", "<div class=\"pad5\">" . $myts->displayTarea($xoops->getConfig('reg_disclaimer'), 1) . "</div>"); $disc_tray->addElement($disc_text); $agree_chk = new XoopsFormCheckBox('', 'agree_disc'); - $agree_chk->addOption(1, _US_IAGREE); + $agree_chk->addOption(1, XoopsLocale::I_AGREE_TO_THE_ABOVE); $disc_tray->addElement($agree_chk); $reg_form->addElement($disc_tray); } @@ -152,15 +152,15 @@ if ($user->isNew() || $xoops->user->isAdmin()) { $elements[0][] = array( - 'element' => new XoopsFormText(_US_NICKNAME, 'uname', 3, $xoops->user->isAdmin() ? 60 + 'element' => new XoopsFormText(XoopsLocale::USERNAME, 'uname', 3, $xoops->user->isAdmin() ? 60 : $xoops->getConfig('maxuname'), $user->getVar('uname', 'e')), 'required' => 1 ); $email_text = new XoopsFormText('', 'email', 4, 60, $user->getVar('email')); } else { - $elements[0][] = array('element' => new XoopsFormLabel(_US_NICKNAME, $user->getVar('uname')), 'required' => 0); + $elements[0][] = array('element' => new XoopsFormLabel(XoopsLocale::USERNAME, $user->getVar('uname')), 'required' => 0); $email_text = new XoopsFormLabel('', $user->getVar('email')); } - $email_tray = new XoopsFormElementTray(_US_EMAIL, '<br />'); + $email_tray = new XoopsFormElementTray(XoopsLocale::EMAIL, '<br />'); $email_tray->addElement($email_text, ($user->isNew() || $xoops->user->isAdmin()) ? 1 : 0); $weights[0][] = 0; $elements[0][] = array('element' => $email_tray, 'required' => 0); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/install.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/install.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/install.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -44,7 +44,7 @@ profile_install_addField('name', _US_REALNAME, '', 1, 'textbox', 1, 1, 1, array(), 2, 255); profile_install_addField('user_from', _US_LOCATION, '', 1, 'textbox', 1, 2, 1, array(), 2, 255); - profile_install_addField('timezone_offset', _US_TIMEZONE, '', 1, 'timezone', 1, 3, 1, array(), 2, 0); + profile_install_addField('timezone_offset', XoopsLocale::TIME_ZONE, '', 1, 'timezone', 1, 3, 1, array(), 2, 0); profile_install_addField('user_occ', _US_OCCUPATION, '', 1, 'textbox', 1, 4, 1, array(), 2, 255); profile_install_addField('user_intrest', _US_INTEREST, '', 1, 'textbox', 1, 5, 1, array(), 2, 255); profile_install_addField('bio', _US_EXTRAINFO, '', 1, 'textarea', 2, 6, 1, array(), 2, 0); @@ -55,9 +55,9 @@ profile_install_addField('user_yim', _US_YIM, '', 2, 'textbox', 1, 3, 1, array(), 2, 255); profile_install_addField('user_msnm', _US_MSNM, '', 2, 'textbox', 1, 4, 1, array(), 2, 255); - profile_install_addField('user_viewemail', _US_ALLOWVIEWEMAIL, '', 3, 'yesno', 3, 1, 1, array(), 2, 1, false); + profile_install_addField('user_viewemail', XoopsLocale::ALLOW_OTHER_USERS_TO_VIEW_EMAIL, '', 3, 'yesno', 3, 1, 1, array(), 2, 1, false); profile_install_addField('attachsig', _US_SHOWSIG, '', 3, 'yesno', 3, 2, 1, array(), 0, 1, false); - profile_install_addField('user_mailok', _US_MAILOK, '', 3, 'yesno', 3, 3, 1, array(), 2, 1, false); + profile_install_addField('user_mailok', XoopsLocale::Q_RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS, '', 3, 'yesno', 3, 3, 1, array(), 2, 1, false); profile_install_addField('theme', _PROFILE_MA_THEME, '', 3, 'theme', 1, 4, 1, array(), 0, 0, false); profile_install_addField('url', _PROFILE_MI_URL_TITLE, '', 4, 'textbox', 1, 1, 1, array(), 2, 255); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/index.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/index.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -45,11 +45,10 @@ $xoops->tpl()->assign('lang_rememberme', _US_REMEMBERME); } $xoops->tpl()->assign('lang_password', XoopsLocale::C_PASSWORD); - $xoops->tpl()->assign('lang_notregister', _US_NOTREGISTERED); - $xoops->tpl()->assign('lang_lostpassword', _US_LOSTPASSWORD); - $xoops->tpl()->assign('lang_noproblem', _US_NOPROBLEM); - $xoops->tpl()->assign('lang_youremail', _US_YOUREMAIL); - $xoops->tpl()->assign('lang_sendpassword', _US_SENDPASSWORD); + $xoops->tpl()->assign('lang_lostpassword', XoopsLocale::Q_LOST_YOUR_PASSWORD); + $xoops->tpl()->assign('lang_noproblem', XoopsLocale::NO_PROBLEM_ENTER_EMAIL_WE_HAVE_ON_FILE); + $xoops->tpl()->assign('lang_youremail', XoopsLocale::C_YOUR_EMAIL); + $xoops->tpl()->assign('lang_sendpassword', XoopsLocale::SEND_PASSWORD); $xoops->tpl()->assign('mailpasswd_token', $xoops->security()->createToken()); include dirname(__FILE__) . '/footer.php'; } @@ -86,7 +85,7 @@ if ($xoops->isUser()) { $xoops->getHandlerOnline()->destroy($xoops->user->getVar('uid')); } - $message = _US_LOGGEDOUT . '<br />' . _US_THANKYOUFORVISIT; + $message = XoopsLocale::S_YOU_ARE_NOW_LOGGED_OUT . '<br />' . XoopsLocale::S_THANK_YOU_FOR_VISITING_OUR_SITE; $xoops->redirect(XOOPS_URL . '/', 1, $message); } @@ -98,7 +97,7 @@ if ($op == 'delete') { if (!$xoops->isUser() || $xoops->getConfig('self_delete') != 1) { - $xoops->redirect(XOOPS_URL . '/', 5, _US_NOPERMISS); + $xoops->redirect(XOOPS_URL . '/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); } else { $groups = $xoops->user->getGroups(); if (in_array(XOOPS_GROUP_ADMIN, $groups)){ @@ -108,16 +107,20 @@ $ok = !isset($_POST['ok']) ? 0 : intval($_POST['ok']); if ($ok != 1) { $xoops->header(); - $xoops->confirm(array('op' => 'delete', 'ok' => 1), 'user.php', _US_SURETODEL . '<br/>' . _US_REMOVEINFO); + $xoops->confirm(array('op' => 'delete', 'ok' => 1), 'user.php', XoopsLocale::Q_ARE_YOU_SURE_TO_DELETE_ACCOUNT . '<br/>' . XoopsLocale::THIS_WILL_REMOVE_ALL_YOUR_INFO); include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php'; } else { $del_uid = $xoops->user->getVar("uid"); if (false != $xoops->getHandlerMember()->deleteUser($xoops->user)) { $xoops->getHandlerOnline()->destroy($del_uid); - $xoops->getHandlerNotification()->unsubscribeByUser($del_uid); - $xoops->redirect(XOOPS_URL . '/', 5, _US_BEENDELED); + + //todo, use preload here? + if ($xoops->isActiveModule('notifications')) { + Notifications::getInstance()->getHandlerNotification()->unsubscribeByUser($del_uid); + } + $xoops->redirect('index.php', 5, XoopsLocale::S_YOUR_ACCOUNT_DELETED); } - $xoops->redirect(XOOPS_URL . '/', 5, _US_NOPERMISS); + $xoops->redirect(XOOPS_URL . '/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); } } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -38,7 +38,7 @@ $myts = MyTextSanitizer::getInstance(); $xoops->getConfigs(); if (!$xoops->getConfig('allow_register')) { - $xoops->redirect('index.php', 6, _US_NOREGISTER); + $xoops->redirect('index.php', 6, XoopsLocale::E_WE_ARE_CLOSED_FOR_REGISTRATION); } $op = !isset($_POST['op']) ? 'register' : $_POST['op']; @@ -173,7 +173,7 @@ if ($xoops->getConfig('reg_dispdsclmr') != 0 && $xoops->getConfig('reg_disclaimer') != '') { if (empty($agree_disc)) { - $stop .= _US_UNEEDAGREE . '<br />'; + $stop .= XoopsLocale::E_YOU_HAVE_TO_AGREE_TO_DISCLAIMER . '<br />'; } } @@ -218,7 +218,7 @@ // Insert/update user and check if we have succeded if (!$member_handler->insertUser($newuser)) { - $stop .= _US_REGISTERNG . "<br />"; + $stop .= XoopsLocale::E_USER_NOT_REGISTERED . "<br />"; $stop .= implode('<br />', $newuser->getErrors()); } else { // User inserted! Now insert custom profile fields Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/search.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/search.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -50,12 +50,12 @@ $searchform = new XoopsThemeForm("", "searchform", "search.php", "post"); - $name_tray = new XoopsFormElementTray(_US_NICKNAME); + $name_tray = new XoopsFormElementTray(XoopsLocale::USERNAME); $name_tray->addElement(new XoopsFormSelectMatchOption('', 'uname_match')); $name_tray->addElement(new XoopsFormText('', 'uname', 35, 255)); $searchform->addElement($name_tray); - $email_tray = new XoopsFormElementTray(_US_EMAIL); + $email_tray = new XoopsFormElementTray(XoopsLocale::EMAIL); $email_tray->addElement(new XoopsFormSelectMatchOption('', 'email_match')); $email_tray->addElement(new XoopsFormText('', 'email', 35, 255)); $searchform->addElement($email_tray); @@ -126,7 +126,7 @@ } } asort($sortby_arr); - $sortby_arr = array_merge(array("" => XoopsLocale::NONE, "uname" => _US_NICKNAME, "email" => _US_EMAIL), $sortby_arr); + $sortby_arr = array_merge(array("" => XoopsLocale::NONE, "uname" => XoopsLocale::USERNAME, "email" => XoopsLocale::EMAIL), $sortby_arr); $sortby_select = new XoopsFormSelect(_PROFILE_MA_SORTBY, 'sortby'); $sortby_select->addOptionArray($sortby_arr); $searchform->addElement($sortby_select); @@ -396,8 +396,8 @@ } //Get captions - $captions[] = _US_NICKNAME; - $captions[] = _US_EMAIL; + $captions[] = XoopsLocale::USERNAME; + $captions[] = XoopsLocale::EMAIL; foreach (array_keys($fields) as $i) { if (in_array($fields[$i]->getVar('field_id'), $searchable_fields) && in_array($fields[$i]->getVar('field_type'), $searchable_types) && in_array($fields[$i]->getVar('field_name'), $searchvars)) { $captions[] = $fields[$i]->getVar('field_title'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/profile_userform.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/profile_userform.html 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/profile_userform.html 2013-01-27 15:15:23 UTC (rev 10928) @@ -6,14 +6,14 @@ <{if isset($lang_rememberme)}> <input type="checkbox" name="rememberme" value="On" checked /> <{$lang_rememberme}><br /><br /> <{/if}> - + <input type="hidden" name="op" value="login" /> <input type="hidden" name="xoops_redirect" value="<{$redirect_page}>" /> <input type="submit" value="<{$lang_login}>" /> </form> <br /> <a name="lost"></a> - <div><{$lang_notregister}><br /></div> + <div><{translate key='Q_NOT_REGISTERED'}> <{translate key='CLICK_HERE_TO_REGISTER'}><br /></div> </fieldset> <br /> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -47,11 +47,10 @@ $xoops->tpl()->assign('lang_rememberme', _US_REMEMBERME); } $xoops->tpl()->assign('lang_password', XoopsLocale::C_PASSWORD); - $xoops->tpl()->assign('lang_notregister', _US_NOTREGISTERED); - $xoops->tpl()->assign('lang_lostpassword', _US_LOSTPASSWORD); - $xoops->tpl()->assign('lang_noproblem', _US_NOPROBLEM); - $xoops->tpl()->assign('lang_youremail', _US_YOUREMAIL); - $xoops->tpl()->assign('lang_sendpassword', _US_SENDPASSWORD); + $xoops->tpl()->assign('lang_lostpassword', XoopsLocale::Q_LOST_YOUR_PASSWORD); + $xoops->tpl()->assign('lang_noproblem', XoopsLocale::NO_PROBLEM_ENTER_EMAIL_WE_HAVE_ON_FILE); + $xoops->tpl()->assign('lang_youremail', XoopsLocale::C_YOUR_EMAIL); + $xoops->tpl()->assign('lang_sendpassword', XoopsLocale::SEND_PASSWORD); $xoops->tpl()->assign('mailpasswd_token', $xoops->security()->createToken()); include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php'; } @@ -89,7 +88,7 @@ if ($xoops->isUser()) { $xoops->getHandlerOnline()->destroy($xoops->user->getVar('uid')); } - $message = _US_LOGGEDOUT . '<br />' . _US_THANKYOUFORVISIT; + $message = XoopsLocale::S_YOU_ARE_NOW_LOGGED_OUT . '<br />' . XoopsLocale::S_THANK_YOU_FOR_VISITING_OUR_SITE; $xoops->redirect(XOOPS_URL . '/', 1, $message); } @@ -102,7 +101,7 @@ if ($op == 'delete') { $xoops->getConfigs(); if (!$xoops->isUser() || $xoops->getConfig('self_delete') != 1) { - $xoops->redirect(XOOPS_URL . '/', 5, _US_NOPERMISS); + $xoops->redirect(XOOPS_URL . '/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); } else { $groups = $xoops->user->getGroups(); if (in_array(XOOPS_GROUP_ADMIN, $groups)) { @@ -112,16 +111,19 @@ $ok = !isset($_POST['ok']) ? 0 : intval($_POST['ok']); if ($ok != 1) { include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'header.php'; - $xoops->confirm(array('op' => 'delete', 'ok' => 1), 'user.php', _US_SURETODEL . '<br/>' . _US_REMOVEINFO); + $xoops->confirm(array('op' => 'delete', 'ok' => 1), 'user.php', XoopsLocale::Q_ARE_YOU_SURE_TO_DELETE_ACCOUNT . '<br/>' . XoopsLocale::THIS_WILL_REMOVE_ALL_YOUR_INFO); include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php'; } else { $del_uid = $xoops->user->getVar("uid"); if (false != $xoops->getHandlerMember()->deleteUser($xoops->user)) { $xoops->getHandlerOnline()->destroy($del_uid); - $xoops->getHandlerNotification()->unsubscribeByUser($del_uid); - $xoops->redirect(XOOPS_URL . '/', 5, _US_BEENDELED); + //todo, use preload here? + if ($xoops->isActiveModule('notifications')) { + Notifications::getInstance()->getHandlerNotification()->unsubscribeByUser($del_uid); + } + $xoops->redirect(XOOPS_URL . '/', 5, XoopsLocale::S_YOUR_ACCOUNT_DELETED); } - $xoops->redirect(XOOPS_URL . '/', 5, _US_NOPERMISS); + $xoops->redirect(XOOPS_URL . '/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); } } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -46,7 +46,7 @@ $xoops->tpl()->assign('user_ownpage', true); $xoops->tpl()->assign('lang_editprofile', _US_EDITPROFILE); $xoops->tpl()->assign('lang_changepassword', _PROFILE_MA_CHANGEPASSWORD); - $xoops->tpl()->assign('lang_avatar', _US_AVATAR); + $xoops->tpl()->assign('lang_avatar', XoopsLocale::AVATAR); $xoops->tpl()->assign('lang_inbox', _US_INBOX); $xoops->tpl()->assign('lang_logout', _US_LOGOUT); if ($xoops->getConfig('self_delete') == 1) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userform.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userform.html 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userform.html 2013-01-27 15:15:23 UTC (rev 10928) @@ -30,7 +30,7 @@ </div> </fieldset> </form> -<p><{$lang_notregister}></p> +<p><{translate key='Q_NOT_REGISTERED'}> <{translate key='CLICK_HERE_TO_REGISTER'}></p> <fieldset name="lost"> <legend class="bold"><{$lang_lostpassword}></legend> <form class="form-horizontal" action="lostpass.php" method="post"> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -30,7 +30,7 @@ $xoopsConfigUser = $xoops->getConfigs(); if (empty($xoopsConfigUser['allow_register'])) { - $xoops->redirect('index.php', 6, _US_NOREGISTER); + $xoops->redirect('index.php', 6, XoopsLocale::E_WE_ARE_CLOSED_FOR_REGISTRATION); } $op = isset($_POST['op']) ? $_POST['op'] : (isset($_GET["op"]) ? $_GET["op"] : 'register'); @@ -47,26 +47,26 @@ switch ($op) { case 'newuser': $xoops->header(); - $xoops->tpl()->assign('xoops_pagetitle', _US_USERREG); + $xoops->tpl()->assign('xoops_pagetitle', XoopsLocale::USER_REGISTRATION); $stop = ''; if (!$xoops->security()->check()) { $stop .= implode('<br />', $xoops->security()->getErrors()) . "<br />"; } if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') { if (empty($agree_disc)) { - $stop .= _US_UNEEDAGREE . '<br />'; + $stop .= XoopsLocale::E_YOU_HAVE_TO_AGREE_TO_DISCLAIMER . '<br />'; } } $stop .= XoopsUserUtility::validate($uname, $email, $pass, $vpass); if (empty($stop)) { - echo _US_USERNAME . ": " . $myts->htmlSpecialChars($uname) . "<br />"; - echo _US_EMAIL . ": " . $myts->htmlSpecialChars($email) . "<br />"; + echo XoopsLocale::USERNAME . ": " . $myts->htmlSpecialChars($uname) . "<br />"; + echo XoopsLocale::EMAIL . ": " . $myts->htmlSpecialChars($email) . "<br />"; if ($url != '') { $url = $xoops->formatURL($url); - echo _US_WEBSITE . ': ' . $myts->htmlSpecialChars($url) . '<br />'; + echo XoopsLocale::WEBSITE . ': ' . $myts->htmlSpecialChars($url) . '<br />'; } $f_timezone = ($timezone_offset < 0) ? 'GMT ' . $timezone_offset : 'GMT +' . $timezone_offset; - echo _US_TIMEZONE . ": $f_timezone<br />"; + echo XoopsLocale::TIME_ZONE . ": $f_timezone<br />"; echo "<form action='register.php' method='post'>"; $cpatcha = new XoopsFormCaptcha(); echo "<br />" . $cpatcha->getCaption() . ": " . $cpatcha->render(); @@ -78,7 +78,7 @@ <input type='hidden' name='pass' value='" . $myts->htmlSpecialChars($pass) . "' /> <input type='hidden' name='vpass' value='" . $myts->htmlSpecialChars($vpass) . "' /> <input type='hidden' name='user_mailok' value='" . $user_mailok . "' /> - <br /><br /><input type='hidden' name='op' value='finish' />" . $xoops->security()->getTokenHTML() . "<input type='submit' value='" . _US_FINISH . "' /></form>"; + <br /><br /><input type='hidden' name='op' value='finish' />" . $xoops->security()->getTokenHTML() . "<input type='submit' value='" . XoopsLocale::A_FINISH . "' /></form>"; } else { echo "<span class='red'>$stop</span>"; include $xoops->path('include/registerform.php'); @@ -122,17 +122,17 @@ $newuser->setVar('level', 0, true); } if (!$member_handler->insertUser($newuser)) { - echo _US_REGISTERNG; + echo XoopsLocale::E_USER_NOT_REGISTERED; $xoops->footer(); } $newid = $newuser->getVar('uid'); if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) { - echo _US_REGISTERNG; + echo XoopsLocale::E_USER_NOT_REGISTERED; $xoops->footer(); } if ($xoopsConfigUser['activation_type'] == 1) { XoopsUserUtility::sendWelcome($newuser); - $xoops->redirect('index.php', 4, _US_ACTLOGIN); + $xoops->redirect('index.php', 4, XoopsLocale::S_YOUR_ACCOUNT_ACTIVATED . ' ' . XoopsLocale::LOGIN_WITH_REGISTERED_PASSWORD); } // Sending notification email to user for self activation if ($xoopsConfigUser['activation_type'] == 0) { @@ -207,10 +207,10 @@ exit(); } if ($thisuser->getVar('actkey') != $actkey) { - $xoops->redirect('index.php', 5, _US_ACTKEYNOT); + $xoops->redirect('index.php', 5, XoopsLocale::E_ACTIVATION_KEY_INCORRECT); } else { if ($thisuser->getVar('level') > 0) { - $xoops->redirect('user.php', 5, _US_ACONTACT, false); + $xoops->redirect('user.php', 5, XoopsLocale::E_SELECTED_ACCOUNT_IS_ALREADY_ACTIVATED, false); } else { if (false != $member_handler->activateUser($thisuser)) { $xoopsConfigUser = $xoops->getConfigs(); @@ -234,10 +234,10 @@ } $xoops->footer(); } else { - $xoops->redirect('user.php', 5, _US_ACTLOGIN, false); + $xoops->redirect('user.php', 5, XoopsLocale::S_YOUR_ACCOUNT_ACTIVATED . ' ' . XoopsLocale::LOGIN_WITH_REGISTERED_PASSWORD, false); } } else { - $xoops->redirect('index.php', 5, _US_ACTFAILD); + $xoops->redirect('index.php', 5, XoopsLocale::E_ACTIVATION_FAILED); } } } @@ -246,8 +246,8 @@ case 'register': default: $xoops->header(); - $xoops->tpl()->assign('xoops_pagetitle', _US_USERREG); - $xoops->theme()->addMeta('meta', 'keywords', _US_USERREG . ", " . _US_NICKNAME); // FIXME! + $xoops->tpl()->assign('xoops_pagetitle', XoopsLocale::USER_REGISTRATION); + $xoops->theme()->addMeta('meta', 'keywords', XoopsLocale::USER_REGISTRATION . ", " . XoopsLocale::USERNAME); // FIXME! $xoops->theme()->addMeta('meta', 'description', strip_tags($xoopsConfigUser['reg_disclaimer'])); include $xoops->path('include/registerform.php'); $reg_form->display(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -48,8 +48,8 @@ if (!$xoops->isUser()) { $xoops->header('system_userform.html'); $xoops->tpl()->assign('xoops_pagetitle', XoopsLocale::A_LOGIN); - $xoops->theme()->addMeta('meta', 'keywords', XoopsLocale::USERNAME . ", " . _US_PASSWORD . ", " . _US_LOSTPASSWORD); - $xoops->theme()->addMeta('meta', 'description', _US_LOSTPASSWORD . " " . _US_NOPROBLEM); + $xoops->theme()->addMeta('meta', 'keywords', XoopsLocale::USERNAME . ", " . _US_PASSWORD . ", " . XoopsLocale::Q_LOST_YOUR_PASSWORD); + $xoops->theme()->addMeta('meta', 'description', XoopsLocale::Q_LOST_YOUR_PASSWORD . " " . XoopsLocale::NO_PROBLEM_ENTER_EMAIL_WE_HAVE_ON_FILE); $xoops->tpl()->assign('lang_login', XoopsLocale::A_LOGIN); $xoops->tpl()->assign('lang_username', XoopsLocale::C_USERNAME); if (isset($_GET['xoops_redirect'])) { @@ -59,11 +59,10 @@ $xoops->tpl()->assign('lang_rememberme', _US_REMEMBERME); } $xoops->tpl()->assign('lang_password', XoopsLocale::C_PASSWORD); - $xoops->tpl()->assign('lang_notregister', _US_NOTREGISTERED); - $xoops->tpl()->assign('lang_lostpassword', _US_LOSTPASSWORD); - $xoops->tpl()->assign('lang_noproblem', _US_NOPROBLEM); - $xoops->tpl()->assign('lang_youremail', _US_YOUREMAIL); - $xoops->tpl()->assign('lang_sendpassword', _US_SENDPASSWORD); + $xoops->tpl()->assign('lang_lostpassword', XoopsLocale::Q_LOST_YOUR_PASSWORD); + $xoops->tpl()->assign('lang_noproblem', XoopsLocale::NO_PROBLEM_ENTER_EMAIL_WE_HAVE_ON_FILE); + $xoops->tpl()->assign('lang_youremail', XoopsLocale::C_YOUR_EMAIL); + $xoops->tpl()->assign('lang_sendpassword', XoopsLocale::SEND_PASSWORD); $xoops->tpl()->assign('mailpasswd_token', $xoops->security()->createToken()); $xoops->footer(); } @@ -96,14 +95,14 @@ if ($xoops->isUser()) { $xoops->getHandlerOnline()->destroy($xoops->user->getVar('uid')); } - $message = _US_LOGGEDOUT . '<br />' . _US_THANKYOUFORVISIT; + $message = XoopsLocale::S_YOU_ARE_NOW_LOGGED_OUT . '<br />' . XoopsLocale::S_THANK_YOU_FOR_VISITING_OUR_SITE; $xoops->redirect(XOOPS_URL . '/', 1, $message); } if ($op == 'delete') { $xoopsConfigUser = $xoops->getConfigs(); if (!$xoops->isUser() || $xoopsConfigUser['self_delete'] != 1) { - $xoops->redirect('index.php', 5, _US_NOPERMISS); + $xoops->redirect('index.php', 5, XoopsLocale::E_NO_ACTION_PERMISSION); } else { $groups = $xoops->user->getGroups(); if (in_array(XOOPS_GROUP_ADMIN, $groups)) { @@ -113,17 +112,20 @@ $ok = !isset($_POST['ok']) ? 0 : intval($_POST['ok']); if ($ok != 1) { $xoops->header(); - $xoops->confirm(array('op' => 'delete', 'ok' => 1), 'user.php', _US_SURETODEL . '<br/>' . _US_REMOVEINFO); + $xoops->confirm(array('op' => 'delete', 'ok' => 1), 'user.php', XoopsLocale::Q_ARE_YOU_SURE_TO_DELETE_ACCOUNT . '<br/>' . XoopsLocale::THIS_WILL_REMOVE_ALL_YOUR_INFO); $xoops->footer(); } else { $del_uid = $xoops->user->getVar("uid"); $member_handler = $xoops->getHandlerMember(); if (false != $member_handler->deleteUser($xoops->user)) { $xoops->getHandlerOnline()->destroy($del_uid); - $xoops->getHandlerNotification()->unsubscribeByUser($del_uid); - $xoops->redirect('index.php', 5, _US_BEENDELED); + //todo, use preload here? + if ($xoops->isActiveModule('notifications')) { + Notifications::getInstance()->getHandlerNotification()->unsubscribeByUser($del_uid); + } + $xoops->redirect('index.php', 5, XoopsLocale::S_YOUR_ACCOUNT_DELETED); } - $xoops->redirect('index.php', 5, _US_NOPERMISS); + $xoops->redirect('index.php', 5, XoopsLocale::E_NO_ACTION_PERMISSION); } } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -43,7 +43,7 @@ $xoops->header('system_userinfo.html'); $xoops->tpl()->assign('user_ownpage', true); $xoops->tpl()->assign('lang_editprofile', _US_EDITPROFILE); - $xoops->tpl()->assign('lang_avatar', _US_AVATAR); + $xoops->tpl()->assign('lang_avatar', XoopsLocale::AVATAR); $xoops->tpl()->assign('lang_inbox', _US_INBOX); $xoops->tpl()->assign('lang_logout', _US_LOGOUT); if ($xoopsConfigUser['self_delete'] == 1) { @@ -95,13 +95,13 @@ $xoops->tpl()->assign('user_avatarurl', $avatar); $xoops->tpl()->assign('lang_realname', _US_REALNAME); $xoops->tpl()->assign('user_realname', $thisUser->getVar('name')); -$xoops->tpl()->assign('lang_website', _US_WEBSITE); +$xoops->tpl()->assign('lang_website', XoopsLocale::WEBSITE); if ($thisUser->getVar('url', 'E') == '') { $xoops->tpl()->assign('user_websiteurl', ''); } else { $xoops->tpl()->assign('user_websiteurl', '<a href="' . $thisUser->getVar('url', 'E') . '" rel="external">' . $thisUser->getVar('url') . '</a>'); } -$xoops->tpl()->assign('lang_email', _US_EMAIL); +$xoops->tpl()->assign('lang_email', XoopsLocale::EMAIL); $xoops->tpl()->assign('lang_privmsg', _US_PM); $xoops->tpl()->assign('lang_icq', _US_ICQ); $xoops->tpl()->assign('user_icq', $thisUser->getVar('user_icq')); @@ -131,7 +131,6 @@ $xoops->tpl()->assign('lang_myinfo', _US_MYINFO); $xoops->tpl()->assign('user_posts', $thisUser->getVar('posts')); $xoops->tpl()->assign('lang_lastlogin', _US_LASTLOGIN); -$xoops->tpl()->assign('lang_notregistered', _US_NOTREGISTERED); $xoops->tpl()->assign('lang_signature', _US_SIGNATURE); $xoops->tpl()->assign('lang_posts', _US_POSTS); $var = $thisUser->getVar('user_sig', 'N'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Xoops.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth/Xoops.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -57,7 +57,7 @@ $member_handler = $xoops->getHandlerMember(); $user = $member_handler->loginUser($uname, $pwd); if ($user == false) { - $this->setErrors(1, _US_INCORRECTLOGIN); + $this->setErrors(1, XoopsLocale::E_INCORRECT_LOGIN); } return $user; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Auth.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -113,7 +113,7 @@ } $ret .= sprintf(XoopsLocale::F_USING_AUTHENTICATION_METHOD, $this->auth_method); } else { - $ret .= _US_INCORRECTLOGIN; + $ret .= XoopsLocale::E_INCORRECT_LOGIN; } return $ret; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Locale/Mailer/Abstract.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Locale/Mailer/Abstract.php 2013-01-27 09:21:25 UTC (rev 10927) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Locale/Mailer/Abstract.php 2013-01-27 15:15:23 UTC (rev 10928) @@ -42,7 +42,7 @@ // It is supposed no need to change the charset $this->charSet = strtolower(XoopsLocale::getCharset()); // You MUST specify the language code value so that the file exists: XOOPS_ROOT_PAT/class/mail/phpmailer/language/lang-["your-language-code"].php - $this->multimailer->SetLanguage(XoopsLocale::getLocale()); + $this->multimailer->SetLanguage('en'); } /** |