Finished l10n on user CP
authorDan
Mon, 21 Jan 2008 17:38:57 -0500
changeset 364 390eb356cd49
parent 363 2220bab5c784
child 365 cc6bf4d63684
Finished l10n on user CP
language/english/user.json
plugins/SpecialUserPrefs.php
--- a/language/english/user.json	Mon Jan 21 15:38:50 2008 -0500
+++ b/language/english/user.json	Mon Jan 21 17:38:57 2008 -0500
@@ -162,15 +162,14 @@
       emailpassword_err_list: 'The following errors were encountered while saving your e-mail address:',
       emailpassword_err_title: 'Error updating e-mail address',
       emailpassword_err_demo: 'You can\'t change your password in demo mode.',
-      // This is an in-joke.
-      emailpassword_err_password_too_short: 'Password must be at least 6 characters. You hacked my script, darn you!',
+      emailpassword_err_password_too_short: 'The new password must be 6 characters or greater in length.',
       emailpassword_err_password_too_weak: 'Your password did not meet the complexity score requirement for this site. Your password scored %score%, while a score of at least %config.pw_strength_minimum% is needed.',
       emailpassword_msg_profile_success: 'Profile changed',
       emailpassword_msg_pass_success: 'Password changed',
       emailpassword_msg_need_activ_user: 'Your password and e-mail address have been changed. Since e-mail activation is required on this site, you will need to re-activate your account to continue. An e-mail has been sent to the new e-mail address with an activation link. You must click that link in order to log in again.',
       emailpassword_msg_need_activ_admin: 'Your password and e-mail address have been changed. Since administrative activation is requires on this site, a request has been sent to the administrators to activate your account for you. You will not be able to use your account until it is activated by an administrator.',
       emailpassword_msg_password_changed: 'Your password has been changed, and you will now be redirected back to the user control panel.',
-      emailpassword_err_password_no_match: 'The passwords you entered did not match',
+      emailpassword_err_password_no_match: 'The passwords you entered do not match.',
       emailpassword_grp_chpasswd: 'Change password',
       emailpassword_field_newpass: 'Type a new password:',
       emailpassword_field_newpass_confirm: 'Type the password again to confirm:',
@@ -187,6 +186,26 @@
       
       // Additional profile info
       publicinfo_title: 'Editing public profile',
+      publicinfo_msg_save_success: 'Your profile has been updated.',
+      publicinfo_heading_main: 'Your public profile',
+      publicinfo_note_optional: 'Please note that all of the information you enter here will be <b>publicly viewable.</b> All of the fields on this page are optional and may be left blank if you so desire.',
+      publicinfo_field_realname: 'Real name:',
+      publicinfo_field_changetheme_title: 'Change theme:',
+      publicinfo_field_changetheme_hint: 'If you don\'t like the look of the site, need a visual break, or are just curious, we might have some different themes for you to try out!',
+      publicinfo_field_changetheme: 'Change my theme...',
+      publicinfo_th_im: 'Instant messenger contact information',
+      publicinfo_field_aim: 'AIM handle:',
+      publicinfo_field_wlm: '<acronym title="Windows&trade; Live Messenger">WLM</acronym> handle:<br /><small>If you don\'t specify the domain (@whatever.com), "@hotmail.com" will be assumed.</small>',
+      publicinfo_field_yim: 'Yahoo! IM handle:',
+      publicinfo_field_xmpp: 'Jabber&trade;/XMPP handle:',
+      publicinfo_th_contact: 'Extra contact information',
+      publicinfo_field_homepage: 'Your homepage:<br /><small>Please remember the http:// prefix.</small>',
+      publicinfo_field_location: 'Your location:',
+      publicinfo_field_job: 'Your job:',
+      publicinfo_field_hobbies: 'Your hobbies:',
+      publicinfo_field_email_public: 'E-mail address is public',
+      publicinfo_field_email_public_hint: 'If this is checked, your e-mail address will be displayed on your user page. To protect your address from spambots, your e-mail address will be encrypted.',
+      publicinfo_btn_save: 'Save profile',
       
       // Avatar management
       avatar_err_disabled_title: 'Avatar support is disabled.',
--- a/plugins/SpecialUserPrefs.php	Mon Jan 21 15:38:50 2008 -0500
+++ b/plugins/SpecialUserPrefs.php	Mon Jan 21 17:38:57 2008 -0500
@@ -415,6 +415,20 @@
           var frm = document.forms.empwform;
           if ( frm.newpass.value.length < 1 )
             return true;
+          
+          pass1 = frm.newpass.value;
+          pass2 = frm.newpass_conf.value;
+          if ( pass1 != pass2 )
+          {
+            alert($lang.get('usercp_emailpassword_err_password_no_match'));
+            return false;
+          }
+          if ( pass1.length < 6 && pass1.length > 0 )
+          {
+            alert($lang.get('usercp_emailpassword_err_password_too_short'));
+            return false;
+          }
+          
           if(aes_testpassed)
           {
             frm.use_crypt.value = 'yes';
@@ -427,21 +441,6 @@
               len = ( typeof cryptkey == 'string' || typeof cryptkey == 'object' ) ? '\nLen: '+cryptkey.length : '';
               alert('The key is messed up\nType: '+typeof(cryptkey)+len);
             }
-          }
-          pass1 = frm.newpass.value;
-          pass2 = frm.newpass_conf.value;
-          if ( pass1 != pass2 )
-          {
-            alert('The passwords you entered do not match.');
-            return false;
-          }
-          if ( pass1.length < 6 && pass1.length > 0 )
-          {
-            alert('The new password must be 6 characters or greater in length.');
-            return false;
-          }
-          if(aes_testpassed)
-          {
             pass = frm.newpass.value;
             pass = stringToByteArray(pass);
             cryptstring = rijndaelEncrypt(pass, cryptkey, 'ECB');
@@ -548,74 +547,74 @@
         if ( !$q )
           $db->_die();
         
-        echo '<div class="info-box" style="margin: 0 0 10px 0;">Your profile has been updated.</div>';
+        echo '<div class="info-box" style="margin: 0 0 10px 0;">' . $lang->get('usercp_publicinfo_msg_save_success') . '</div>';
       }
       echo '<form action="'.makeUrl($paths->fullpage).'" method="post">';
       ?>
       <div class="tblholder">
         <table border="0" cellspacing="1" cellpadding="4">
           <tr>
-            <th colspan="2">Your public profile</th>
+            <th colspan="2"><?php echo $lang->get('usercp_publicinfo_heading_main'); ?></th>
           </tr>
           <tr>
-            <td colspan="2" class="row3">Please note that all of the information you enter here will be <b>publicly viewable.</b> All of the fields on this page are optional and may be left blank if you so desire.</td>
+            <td colspan="2" class="row3"><?php echo $lang->get('usercp_publicinfo_note_optional'); ?></td>
           </tr>
           <tr>
-            <td class="row2" style="width: 50%;">Real name:</td>
+            <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_realname'); ?></td>
             <td class="row1" style="width: 50%;"><input type="text" name="real_name" value="<?php echo $session->real_name; ?>" size="30" /></td>
           </tr>
           <tr>
-            <td class="row2">Change theme:</td>
-            <td class="row1">If you don't like the look of the site, need a visual break, or are just curious, we might have some different themes for you to try out! <a href="<?php echo makeUrlNS('Special', 'ChangeStyle/' . $paths->page); ?>" onclick="ajaxChangeStyle(); return false;">Change my theme...</a></td>
+            <td class="row2"><?php echo $lang->get('usercp_publicinfo_field_changetheme_title'); ?></td>
+            <td class="row1"><?php echo $lang->get('usercp_publicinfo_field_changetheme_hint'); ?> <a href="<?php echo makeUrlNS('Special', 'ChangeStyle/' . $paths->page); ?>" onclick="ajaxChangeStyle(); return false;"><?php echo $lang->get('usercp_publicinfo_field_changetheme'); ?></a></td>
           </tr>
           <tr>
             <th class="subhead" colspan="2">
-              Instant messenger contact information
+              <?php echo $lang->get('usercp_publicinfo_th_im'); ?>
             </th>
           <tr>
-            <td class="row2" style="width: 50%;">AIM handle:</td>
+            <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_aim'); ?></td>
             <td class="row1" style="width: 50%;"><input type="text" name="imaddr_aim" value="<?php echo $session->user_extra['user_aim']; ?>" size="30" /></td>
           </tr>
           <tr>
-            <td class="row2" style="width: 50%;"><acronym title="Windows&trade; Live Messenger">WLM</acronym> handle:<br /><small>If you don't specify the domain (@whatever.com), "@hotmail.com" will be assumed.</small></td>
+            <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_wlm'); ?></td>
             <td class="row1" style="width: 50%;"><input type="text" name="imaddr_msn" value="<?php echo $session->user_extra['user_msn']; ?>" size="30" /></td>
           </tr>
           <tr>
-            <td class="row2" style="width: 50%;">Yahoo! IM handle:</td>
+            <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_yim'); ?></td>
             <td class="row1" style="width: 50%;"><input type="text" name="imaddr_yahoo" value="<?php echo $session->user_extra['user_yahoo']; ?>" size="30" /></td>
           </tr>
           <tr>
-            <td class="row2" style="width: 50%;">Jabber/XMPP handle:</td>
+            <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_xmpp'); ?></td>
             <td class="row1" style="width: 50%;"><input type="text" name="imaddr_xmpp" value="<?php echo $session->user_extra['user_xmpp']; ?>" size="30" /></td>
           </tr>
           <tr>
             <th class="subhead" colspan="2">
-              Extra contact information
+              <?php echo $lang->get('usercp_publicinfo_th_contact'); ?>
             </th>
           </tr>
           <tr>
-            <td class="row2" style="width: 50%;">Your homepage:<br /><small>Please remember the http:// prefix.</small></td>
+            <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_homepage'); ?></td>
             <td class="row1" style="width: 50%;"><input type="text" name="homepage" value="<?php echo $session->user_extra['user_homepage']; ?>" size="30" /></td>
           </tr>
           <tr>
-            <td class="row2" style="width: 50%;">Your location:</td>
+            <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_location'); ?></td>
             <td class="row1" style="width: 50%;"><input type="text" name="location" value="<?php echo $session->user_extra['user_location']; ?>" size="30" /></td>
           </tr>
           <tr>
-            <td class="row2" style="width: 50%;">Your job:</td>
+            <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_job'); ?></td>
             <td class="row1" style="width: 50%;"><input type="text" name="occupation" value="<?php echo $session->user_extra['user_job']; ?>" size="30" /></td>
           </tr>
           <tr>
-            <td class="row2" style="width: 50%;">Your hobbies:</td>
+            <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_hobbies'); ?></td>
             <td class="row1" style="width: 50%;"><input type="text" name="hobbies" value="<?php echo $session->user_extra['user_hobbies']; ?>" size="30" /></td>
           </tr>
           <tr>
-            <td class="row2" style="width: 50%;"><label for="chk_email_public">E-mail address is public</label><br /><small>If this is checked, your e-mail address will be displayed on your user page. To protect your address from spambots, your e-mail address will be encrypted.</small></td>
+            <td class="row2" style="width: 50%;"><label for="chk_email_public"><?php echo $lang->get('usercp_publicinfo_field_email_public'); ?></label><br /><small><?php echo $lang->get('usercp_publicinfo_field_email_public_hint'); ?></small></td>
             <td class="row1" style="width: 50%;"><input type="checkbox" id="chk_email_public" name="email_public" <?php if ($session->user_extra['email_public'] == 1) echo 'checked="checked"'; ?> size="30" /></td>
           </tr>
           <tr>
             <th class="subhead" colspan="2">
-              <input type="submit" name="submit" value="Save profile" />
+              <input type="submit" name="submit" value="<?php echo $lang->get('usercp_publicinfo_btn_save'); ?>" />
             </th>
           </tr>
         </table>