Skip to content

Commit

Permalink
Merge pull request #7119 from open-sausages/pulls/4.0/fix-i18n
Browse files Browse the repository at this point in the history
Fix unnamespaced i18n keys
  • Loading branch information
dhensby authored Jul 4, 2017
2 parents 14db11b + 4b23205 commit 9552527
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lang/en.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
en:
Security:
LOGIN: 'Log in'
LOGOUT: 'Log out'
SilverStripe\AssetAdmin\Forms\UploadField:
Dimensions: Dimensions
EDIT: Edit
Expand Down Expand Up @@ -315,6 +312,8 @@ en:
CONFIRMLOGOUT: 'Please click the button below to confirm that you wish to log out.'
ENTERNEWPASSWORD: 'Please enter a new password.'
ERRORPASSWORDPERMISSION: 'You must be logged in in order to change your password!'
LOGIN: 'Log in'
LOGOUT: 'Log out'
LOSTPASSWORDHEADER: 'Lost Password'
NOTEPAGESECURED: 'That page is secured. Enter your credentials below and we will send you right along.'
NOTERESETLINKINVALID: '<p>The password reset link is invalid or expired.</p><p>You can request a new one <a href="{link1}">here</a> or change your password after you <a href="{link2}">logged in</a>.</p>'
Expand Down
7 changes: 4 additions & 3 deletions src/Security/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\RequestHandler;
use SilverStripe\Control\Session;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Injector\Injector;
Expand Down Expand Up @@ -655,6 +654,7 @@ public static function clearSessionMessage()
* @param null|HTTPRequest $request
* @param int $service
* @return HTTPResponse|string Returns the "login" page as HTML code.
* @throws HTTPResponse_Exception
*/
public function login($request = null, $service = Authenticator::LOGIN)
{
Expand Down Expand Up @@ -684,7 +684,7 @@ function (Authenticator &$auth, $name) use ($link) {

return $this->delegateToMultipleHandlers(
$handlers,
_t('Security.LOGIN', 'Log in'),
_t(__CLASS__.'.LOGIN', 'Log in'),
$this->getTemplatesFor('login'),
[$this, 'aggregateTabbedForms']
);
Expand Down Expand Up @@ -721,7 +721,7 @@ function (Authenticator &$auth, $name) use ($link) {

return $this->delegateToMultipleHandlers(
$handlers,
_t('Security.LOGOUT', 'Log out'),
_t(__CLASS__.'.LOGOUT', 'Log out'),
$this->getTemplatesFor('logout'),
[$this, 'aggregateTabbedForms']
);
Expand All @@ -733,6 +733,7 @@ function (Authenticator &$auth, $name) use ($link) {
*
* @param int $service
* @param HTTPRequest $request
* @return Authenticator[]
* @throws HTTPResponse_Exception
*/
protected function getServiceAuthenticatorsFromRequest($service, HTTPRequest $request)
Expand Down

0 comments on commit 9552527

Please sign in to comment.