Commit a1cf0c31 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Replace hard-coded "Mahara" with site name (bug #901569)



In strings outside the admin area, the user should usually see the
site name rather than 'Mahara', because they don't care what the
software's called.

Change-Id: Ic876a2cd4971315bc4ac8dd62a9ae1272b89d8e9
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 65c27b46
......@@ -290,6 +290,7 @@ function profileform_submit(Pieform $form, $values) {
$key_url_decline = $key_url . '&decline=1';
try {
$sitename = get_config('sitename');
email_user(
(object)array(
'id' => $USER->get('id'),
......@@ -303,7 +304,7 @@ function profileform_submit(Pieform $form, $values) {
),
null,
get_string('emailvalidation_subject', 'artefact.internal'),
get_string('emailvalidation_body', 'artefact.internal', $USER->get('firstname'), $email, $key_url, $key_url_decline)
get_string('emailvalidation_body1', 'artefact.internal', $USER->get('firstname'), $email, $sitename, $key_url, $sitename, $key_url_decline)
);
}
catch (EmailException $e) {
......
......@@ -86,14 +86,14 @@ $string['profilefailedsaved'] = 'Profile saving failed';
$string['emailvalidation_subject'] = 'Email validation';
$string['emailvalidation_body'] = <<<EOF
$string['emailvalidation_body1'] = <<<EOF
Hello %s,
You have added email address %s to your user account in Mahara. Please visit the link below to activate this address.
You have added email address %s to your user account at %s. Please visit the link below to activate this address.
%s
If this email belongs to you but you have not requested adding it to your Mahara account, follow the link below to decline email activation.
If this email belongs to you but you have not requested adding it to your %s account, follow the link below to decline email activation.
%s
EOF;
......
......@@ -182,7 +182,7 @@ catch (XmlrpcClientException $e) {
throw new AccessDeniedException($e->getMessage());
}
catch (AuthInstanceException $e) {
throw new AccessDeniedException(get_string('errormissinguserattributes', 'auth.saml'));
throw new AccessDeniedException(get_string('errormissinguserattributes1', 'auth.saml', get_config('sitename')));
}
// if we can login with SAML - then let them go
......
......@@ -38,7 +38,7 @@ $string['errorbadlib'] = 'SimpleSAMLPHP lib directory %s is not correct.';
$string['errorbadconfig'] = 'SimpleSAMLPHP config directory %s is incorrect.';
$string['errorbadcombo'] = 'You can only choose user auto creation if you have not selected remoteuser';
$string['errorbadinstitutioncombo'] = 'There is already an existing authinstance with this institutionattribute and institutionvalue combination';
$string['errormissinguserattributes'] = 'You seem to be authenticated but we did not receive the required user attributes. Please check that your Identity Provider releases these SSO fields for First Name, Surname, and Email to the Service Provider Mahara is running on or inform the webmaster of this server.';
$string['errormissinguserattributes1'] = 'You seem to be authenticated but we did not receive the required user attributes. Please check that your Identity Provider releases the First Name, Surname, and Email fields for SSO to %s, or inform the administrator.';
$string['errorremoteuser'] = 'Matching on remoteuser is mandatory if usersuniquebyusername is turned off';
$string['institutionattribute'] = 'Institution attribute (contains "%s")';
$string['institutionvalue'] = 'Institution value to check against attribute';
......
......@@ -191,7 +191,7 @@ class AuthSaml extends Auth {
// must have these values
if (empty($firstname) || empty($lastname) || empty($email)) {
throw new AccessDeniedException(get_string('errormissinguserattributes', 'auth.saml'));
throw new AccessDeniedException(get_string('errormissinguserattributes1', 'auth.saml', get_config('sitename')));
}
$user->authinstance = empty($this->config['parent']) ? $this->instanceid : $this->parent;
......
......@@ -122,5 +122,6 @@ if ($res == true) {
if ($rpcconfigured === false) {
throw new XmlrpcUserNotFoundException(get_string('errnoxmlrpcinstances','auth', $remotewwwroot));
} else {
throw new XmlrpcUserNotFoundException(get_string('errnoxmlrpcuser','auth'));
$sitename = get_config('sitename');
throw new XmlrpcUserNotFoundException(get_string('errnoxmlrpcuser1', 'auth', $sitename, $sitename));
}
......@@ -183,7 +183,7 @@ function forgotpass_submit(Pieform $form, $values) {
// warn users that they may not receive the e-mail
if ($mailinfo = get_record_select('artefact_internal_profile_email', '"owner" = ? AND principal = 1', array($user->id))) {
if (check_overcount($mailinfo)) {
$SESSION->add_info_msg(get_string('forgotpassemailsentanyway'));
$SESSION->add_info_msg(get_string('forgotpassemailsentanyway1', 'mahara', get_config('sitename')));
}
}
......
......@@ -68,7 +68,8 @@ $string['enablemultipleblogsdescription'] = 'By default, you have one journal.
$string['hiderealname'] = 'Hide real name';
$string['hiderealnamedescription'] = 'Check this box if you have set a display name and you do not want other users to be able to find you by your real name in user searches.';
$string['showhomeinfo'] = 'Show information about Mahara on the home page';
$string['showhomeinfo1'] = 'Homepage information';
$string['showhomeinfodescription'] = 'Display information about how to use %s on the homepage.';
$string['mobileuploadtoken'] = 'Mobile upload token';
$string['mobileuploadtokendescription'] = 'Enter a token here and on your phone to enable uploads (note: it will change automatically after each upload. <br/>If you have any problems - simply reset it here and on your phone.';
......
......@@ -67,15 +67,15 @@ $string['errnoauthinstances'] = 'We don\'t seem to have any authentication plu
$string['errornotvalidsslcertificate'] = 'This is not a valid SSL Certificate';
$string['errnoxmlrpcinstances'] = 'We don\'t seem to have any XMLRPC authentication plugin instances configured for the host at %s';
$string['errnoxmlrpcwwwroot'] = 'We don\'t have a record for any host at %s';
$string['errnoxmlrpcuser'] = "We were unable to authenticate you at this time. Possible reasons might be:
$string['errnoxmlrpcuser1'] = "We were unable to authenticate you at this time. Possible reasons might be:
* Your SSO session might have expired. Go back to the other application and click the link to sign into Mahara again.
* You may not be allowed to SSO to Mahara. Please check with your administrator if you think you should be allowed to.";
* Your SSO session might have expired. Go back to the other application and click the link to sign into %s again.
* You may not be allowed to SSO to %s. Please check with your administrator if you think you should be allowed to.";
$string['toomanytries'] = 'You have exceeded the maximum login attempts. The account has been locked for up to 5 minutes.';
$string['unabletosigninviasso'] = 'Unable to sign in via SSO';
$string['xmlrpccouldnotlogyouin'] = 'Sorry, could not log you in :(';
$string['xmlrpccouldnotlogyouindetail'] = 'Sorry, we could not log you into Mahara at this time. Please try again shortly, and if the problem persists, contact your administrator';
$string['xmlrpccouldnotlogyouindetail1'] = 'Sorry, we could not log you into %s at this time. Please try again shortly, and if the problem persists, contact your administrator';
$string['requiredfields'] = 'Required profile fields';
$string['requiredfieldsset'] = 'Required profile fields set';
......
......@@ -325,8 +325,8 @@ $string['chooseusernamepassword'] = 'Choose your username and password';
$string['chooseusernamepasswordinfo'] = 'You need a username and password to log in to %s. Please choose them now.';
$string['confirmpassword'] = 'Confirm password';
$string['deleteaccount'] = 'Delete Account of: %s / %s';
$string['javascriptnotenabled'] = 'Your browser does not have javascript enabled for this site. Mahara requires javascript to be enabled before you can log in';
$string['cookiesnotenabled'] = 'Your browser does not have cookies enabled, or is blocking cookies from this site. Mahara requires cookies to be enabled before you can log in';
$string['javascriptnotenabled'] = 'Your browser does not have javascript enabled. This site requires javascript to be enabled before you can log in.';
$string['cookiesnotenabled'] = 'Your browser does not have cookies enabled, or is blocking cookies. This site requires cookies to be enabled before you can log in.';
$string['institution'] = 'Institution';
$string['institutioncontacts'] = '\'%s\' contacts';
$string['institutionlink'] = '<a href="%s">%s</a>';
......@@ -426,7 +426,7 @@ $string['forgotusernamepasswordemailmessagehtml'] = '<p>Dear %s,</p>
<p>Regards, %s Site Administrator</p>';
$string['forgotpassemailsendunsuccessful'] = 'Sorry, it appears that the e-mail could not be sent successfully. This is our fault, please try again shortly';
$string['forgotpassemailsentanyway'] = 'An e-mail was sent to the address stored for this user, but the address may not be correct or the recipient server is returning messages. Please contact your Mahara administrator to reset your password if you do not receive the e-mail.';
$string['forgotpassemailsentanyway1'] = 'An e-mail was sent to the address stored for this user, but the address may not be correct or the recipient server is returning messages. Please contact the %s administrator to reset your password if you do not receive the e-mail.';
$string['forgotpassnosuchemailaddressorusername'] = 'The email address or username you entered doesn\'t match any users for this site';
$string['forgotpasswordenternew'] = 'Please enter your new password to continue';
$string['nosuchpasswordrequest'] = 'No such password request';
......
......@@ -786,7 +786,7 @@ class XmlrpcClientException extends SystemException {
public function strings() {
return array_merge(parent::strings(), array(
'title' => get_string('xmlrpccouldnotlogyouin', 'auth'),
'message' => get_string('xmlrpccouldnotlogyouindetail', 'auth'))
'message' => get_string('xmlrpccouldnotlogyouindetail1', 'auth', get_config('sitename')))
);
}
}
......
......@@ -295,7 +295,8 @@ function general_account_prefs_form_elements($prefs) {
$elements['showhomeinfo'] = array(
'type' => 'checkbox',
'defaultvalue' => $prefs->showhomeinfo,
'title' => get_string('showhomeinfo', 'account'),
'title' => get_string('showhomeinfo1', 'account'),
'description' => get_string('showhomeinfodescription', 'account', hsc(get_config('sitename'))),
'help' => 'true'
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment