- Timestamp:
- 10/21/06 20:56:09 (2 years ago)
- Files:
-
- devel/lms/join.php (modified) (5 diffs)
- devel/lms/rss.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/lms/join.php
r269 r659 46 46 // validate 47 47 if (!preg_match("/^[A-Za-z0-9]{3,12}$/",$u->username)) { 48 $messages[] = gettext("Error! Your username must contain letters and numbers only, cannot be blank, and must be between 3 and 12 characters in length.");48 $messages[] = __gettext("Error! Your username must contain letters and numbers only, cannot be blank, and must be between 3 and 12 characters in length."); 49 49 } 50 50 51 51 if (record_exists('users','username',strtolower($u->username))) { 52 $messages[] = gettext("The username '$username' is already taken by another user. You will need to pick a different one.");52 $messages[] = __gettext("The username '$username' is already taken by another user. You will need to pick a different one."); 53 53 } 54 54 55 55 if ($u->password1 != $u->password2 || strlen($u->password1) < 6 || strlen($u->password2) > 16) { 56 $messages[] = gettext("Error! Invalid password. Your passwords must match and be between 6 and 16 characters in length.");56 $messages[] = __gettext("Error! Invalid password. Your passwords must match and be between 6 and 16 characters in length."); 57 57 } 58 58 59 59 if (empty($u->name)) { 60 $messages[] = gettext("Error! You must enter your fullname");60 $messages[] = __gettext("Error! You must enter your fullname"); 61 61 } 62 62 … … 69 69 $alias = $USER->alias; 70 70 if (!authenticate_account($u->username, md5($u->password1))) { 71 $messages[] = gettext('Error! Your username and password does not match our record.');71 $messages[] = __gettext('Error! Your username and password does not match our record.'); 72 72 } 73 73 $USER->alias = $alias; 74 74 $ident = $USER->ident; 75 75 } elseif (!empty($mode)) { 76 $messages[] = gettext('Fatal Error! Unknown action requested.');76 $messages[] = __gettext('Fatal Error! Unknown action requested.'); 77 77 } 78 78 … … 103 103 unset($USER->alias); 104 104 if ($mode == 'join') { // we don't need to do these if the user has already had an account. 105 $_SESSION['messages'][] = gettext('Your account creation was successful!');105 $_SESSION['messages'][] = __gettext('Your account creation was successful!'); 106 106 // authenticate them. 107 107 authenticate_account($u->username,$u->password); … … 115 115 templates_page_setup(); 116 116 117 $title = gettext('Join up');117 $title = __gettext('Join up'); 118 118 ob_start(); 119 119 require_once($CFG->dirroot.'lms/join.html'); … … 127 127 )); 128 128 129 $title1 = gettext('Login');129 $title1 = __gettext('Login'); 130 130 ob_start(); 131 131 require_once($CFG->dirroot.'lms/login.html'); devel/lms/rss.php
r269 r659 26 26 // now start doing the rss feed 27 27 $starttime = time()-(86400*30); 28 $rssdescription = sprintf( gettext("Activity for %s, hosted on %s."),$user->name,$CFG->sitename);28 $rssdescription = sprintf(__gettext("Activity for %s, hosted on %s."),$user->name,$CFG->sitename); 29 29 $mainurl = $CFG->wwwroot.'_activity/'; 30 30 echo ' 31 31 <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"> 32 32 <channel xml:base="'.$mainurl.'"> 33 <title><![CDATA['.$user->name.' : '. gettext("Activity").']]></title>33 <title><![CDATA['.$user->name.' : '.__gettext("Activity").']]></title> 34 34 <description><![CDATA['.$rssdescription.']]></description> 35 35 <link>'.$mainurl.'</link> … … 41 41 WHERE wc.posted >= ? AND wp.owner = ? 42 42 ORDER BY wc.posted DESC LIMIT 10',array($starttime,$user->ident))) { 43 $postedby = gettext("%s posted on weblog post:");43 $postedby = __gettext("%s posted on weblog post:"); 44 44 foreach($activities as $activity) { 45 45 $title = sprintf($postedby,stripslashes($activity->postedname)) . " " . stripslashes($activity->weblogtitle); … … 63 63 LEFT JOIN '.$CFG->prefix.'users u ON u.ident = wp.weblog 64 64 WHERE wl.owner = ? AND wc.posted >= ? ORDER BY wc.posted DESC',array($user->ident,$starttime))) { 65 $postedby = gettext("%s posted on weblog post '%s'");65 $postedby = __gettext("%s posted on weblog post '%s'"); 66 66 foreach($activities as $activity) { 67 67 $title = sprintf($postedby,stripslashes($activity->postedname), stripslashes($activity->weblogtitle)); … … 81 81 } 82 82 if (empty($something)) { 83 $title = gettext('No activity');83 $title = __gettext('No activity'); 84 84 $link = $mainurl; 85 85 echo "
