Dan Brown

Moved text from auth views into lang files

...@@ -43,8 +43,9 @@ class ResetPassword extends Notification ...@@ -43,8 +43,9 @@ class ResetPassword extends Notification
43 public function toMail() 43 public function toMail()
44 { 44 {
45 return (new MailMessage) 45 return (new MailMessage)
46 - ->line('You are receiving this email because we received a password reset request for your account.') 46 + ->subject(trans('auth.email_reset_subject', ['appName' => setting('app-name')]))
47 - ->action('Reset Password', baseUrl('password/reset/' . $this->token)) 47 + ->line(trans('auth.email_reset_text'))
48 - ->line('If you did not request a password reset, no further action is required.'); 48 + ->action(trans('auth.reset_password'), baseUrl('password/reset/' . $this->token))
49 + ->line(trans('auth.email_reset_not_requested'));
49 } 50 }
50 } 51 }
......
...@@ -14,7 +14,41 @@ return [ ...@@ -14,7 +14,41 @@ return [
14 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 14 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
15 15
16 /** 16 /**
17 - * Email Confirmation Text 17 + * Login & Register
18 + */
19 + 'sign_up' => 'Sign up',
20 + 'log_in' => 'Log in',
21 +
22 + 'name' => 'Name',
23 + 'username' => 'Username',
24 + 'email' => 'Email',
25 + 'password' => 'Password',
26 + 'password_confirm' => 'Confirm Password',
27 + 'password_hint' => 'Must be over 5 characters',
28 + 'forgot_password' => 'Forgot Password?',
29 + 'remember_me' => 'Remember Me',
30 + 'ldap_email_hint' => 'Please enter an email to use for this account.',
31 + 'create_account' => 'Create Account',
32 + 'social_login' => 'Social Login',
33 + 'social_registration' => 'Social Registration',
34 + 'social_registration_text' => 'Register and sign in using another service.',
35 +
36 + 'register_thanks' => 'Thanks for registering!',
37 + 'register_confirm' => 'Please check your email and click the confirmation button to access :appName.',
38 +
39 + /**
40 + * Password Reset
41 + */
42 + 'reset_password' => 'Reset Password',
43 + 'reset_password_send_instructions' => 'Enter your email below and you will be sent an email with a password reset link.',
44 + 'reset_password_send_button' => 'Send Reset Link',
45 +
46 + 'email_reset_subject' => 'Reset your :appName password',
47 + 'email_reset_text' => 'You are receiving this email because we received a password reset request for your account.',
48 + 'email_reset_not_requested' => 'If you did not request a password reset, no further action is required.',
49 +
50 + /**
51 + * Email Confirmation
18 */ 52 */
19 'email_confirm_subject' => 'Confirm your email on :appName', 53 'email_confirm_subject' => 'Confirm your email on :appName',
20 'email_confirm_greeting' => 'Thanks for joining :appName!', 54 'email_confirm_greeting' => 'Thanks for joining :appName!',
...@@ -23,4 +57,10 @@ return [ ...@@ -23,4 +57,10 @@ return [
23 'email_confirm_send_error' => 'Email confirmation required but the system could not send the email. Contact the admin to ensure email is set up correctly.', 57 'email_confirm_send_error' => 'Email confirmation required but the system could not send the email. Contact the admin to ensure email is set up correctly.',
24 'email_confirm_success' => 'Your email has been confirmed!', 58 'email_confirm_success' => 'Your email has been confirmed!',
25 'email_confirm_resent' => 'Confirmation email resent, Please check your inbox.', 59 'email_confirm_resent' => 'Confirmation email resent, Please check your inbox.',
60 +
61 + 'email_not_confirmed' => 'Email Address Not Confirmed',
62 + 'email_not_confirmed_text' => 'Your email address has not yet been confirmed.',
63 + 'email_not_confirmed_click_link' => 'Please click the link in the email that was sent shortly after you registered.',
64 + 'email_not_confirmed_resend' => 'If you cannot find the email you can re-send the confirmation email by submitting the form below.',
65 + 'email_not_confirmed_resend_button' => 'Resend Confirmation Email',
26 ]; 66 ];
...\ No newline at end of file ...\ No newline at end of file
......
1 <div class="form-group"> 1 <div class="form-group">
2 - <label for="username">Username</label> 2 + <label for="username">{{ trans('auth.username') }}</label>
3 @include('form/text', ['name' => 'username', 'tabindex' => 1]) 3 @include('form/text', ['name' => 'username', 'tabindex' => 1])
4 </div> 4 </div>
5 5
6 @if(session('request-email', false) === true) 6 @if(session('request-email', false) === true)
7 <div class="form-group"> 7 <div class="form-group">
8 - <label for="email">Email</label> 8 + <label for="email">{{ trans('auth.email') }}</label>
9 @include('form/text', ['name' => 'email', 'tabindex' => 1]) 9 @include('form/text', ['name' => 'email', 'tabindex' => 1])
10 <span class="text-neg"> 10 <span class="text-neg">
11 - Please enter an email to use for this account. 11 + {{ trans('auth.ldap_email_hint') }}
12 </span> 12 </span>
13 </div> 13 </div>
14 @endif 14 @endif
15 15
16 <div class="form-group"> 16 <div class="form-group">
17 - <label for="password">Password</label> 17 + <label for="password">{{ trans('auth.password') }}</label>
18 @include('form/password', ['name' => 'password', 'tabindex' => 2]) 18 @include('form/password', ['name' => 'password', 'tabindex' => 2])
19 </div> 19 </div>
...\ No newline at end of file ...\ No newline at end of file
......
1 <div class="form-group"> 1 <div class="form-group">
2 - <label for="email">Email</label> 2 + <label for="email">{{ trans('auth.email') }}</label>
3 @include('form/text', ['name' => 'email', 'tabindex' => 1]) 3 @include('form/text', ['name' => 'email', 'tabindex' => 1])
4 </div> 4 </div>
5 5
6 <div class="form-group"> 6 <div class="form-group">
7 - <label for="password">Password</label> 7 + <label for="password">{{ trans('auth.password') }}</label>
8 @include('form/password', ['name' => 'password', 'tabindex' => 2]) 8 @include('form/password', ['name' => 'password', 'tabindex' => 2])
9 - <span class="block small"><a href="{{ baseUrl('/password/email') }}">Forgot Password?</a></span> 9 + <span class="block small"><a href="{{ baseUrl('/password/email') }}">{{ trans('auth.forgot_password') }}</a></span>
10 </div> 10 </div>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 2
3 @section('header-buttons') 3 @section('header-buttons')
4 @if(setting('registration-enabled', false)) 4 @if(setting('registration-enabled', false))
5 - <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>Sign up</a> 5 + <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>{{ trans('auth.sign_up') }}</a>
6 @endif 6 @endif
7 @stop 7 @stop
8 8
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
10 10
11 <div class="text-center"> 11 <div class="text-center">
12 <div class="center-box"> 12 <div class="center-box">
13 - <h1>Log In</h1> 13 + <h1>{{ title_case(trans('auth.log_in')) }}</h1>
14 14
15 <form action="{{ baseUrl("/login") }}" method="POST" id="login-form"> 15 <form action="{{ baseUrl("/login") }}" method="POST" id="login-form">
16 {!! csrf_field() !!} 16 {!! csrf_field() !!}
...@@ -19,20 +19,20 @@ ...@@ -19,20 +19,20 @@
19 @include('auth/forms/login/' . $authMethod) 19 @include('auth/forms/login/' . $authMethod)
20 20
21 <div class="form-group"> 21 <div class="form-group">
22 - <label for="remember" class="inline">Remember Me</label> 22 + <label for="remember" class="inline">{{ trans('auth.remember_me') }}</label>
23 <input type="checkbox" id="remember" name="remember" class="toggle-switch-checkbox"> 23 <input type="checkbox" id="remember" name="remember" class="toggle-switch-checkbox">
24 <label for="remember" class="toggle-switch"></label> 24 <label for="remember" class="toggle-switch"></label>
25 </div> 25 </div>
26 26
27 27
28 <div class="from-group"> 28 <div class="from-group">
29 - <button class="button block pos" tabindex="3"><i class="zmdi zmdi-sign-in"></i> Sign In</button> 29 + <button class="button block pos" tabindex="3"><i class="zmdi zmdi-sign-in"></i> {{ title_case(trans('auth.log_in')) }}</button>
30 </div> 30 </div>
31 </form> 31 </form>
32 32
33 @if(count($socialDrivers) > 0) 33 @if(count($socialDrivers) > 0)
34 <hr class="margin-top"> 34 <hr class="margin-top">
35 - <h3 class="text-muted">Social Login</h3> 35 + <h3 class="text-muted">{{ trans('auth.social_login') }}</h3>
36 @if(isset($socialDrivers['google'])) 36 @if(isset($socialDrivers['google']))
37 <a href="{{ baseUrl("/login/service/google") }}" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a> 37 <a href="{{ baseUrl("/login/service/google") }}" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
38 @endif 38 @endif
......
1 @extends('public') 1 @extends('public')
2 2
3 @section('header-buttons') 3 @section('header-buttons')
4 - <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a> 4 + <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a>
5 @if(setting('registration-enabled')) 5 @if(setting('registration-enabled'))
6 - <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>Sign up</a> 6 + <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>{{ trans('auth.sign_up') }}</a>
7 @endif 7 @endif
8 @stop 8 @stop
9 9
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
12 12
13 <div class="text-center"> 13 <div class="text-center">
14 <div class="center-box text-left"> 14 <div class="center-box text-left">
15 - <h1>Reset Password</h1> 15 + <h1>{{ trans('auth.reset_password') }}</h1>
16 16
17 - <p class="muted small">Enter your email below and you will be sent an email with a password reset link.</p> 17 + <p class="muted small">{{ trans('auth.reset_password_send_instructions') }}</p>
18 18
19 <form action="{{ baseUrl("/password/email") }}" method="POST"> 19 <form action="{{ baseUrl("/password/email") }}" method="POST">
20 {!! csrf_field() !!} 20 {!! csrf_field() !!}
21 21
22 <div class="form-group"> 22 <div class="form-group">
23 - <label for="email">Email</label> 23 + <label for="email">{{ trans('auth.email') }}</label>
24 @include('form/text', ['name' => 'email']) 24 @include('form/text', ['name' => 'email'])
25 </div> 25 </div>
26 26
27 <div class="from-group"> 27 <div class="from-group">
28 - <button class="button block pos">Send Reset Link</button> 28 + <button class="button block pos">{{ trans('auth.reset_password_send_button') }}</button>
29 </div> 29 </div>
30 </form> 30 </form>
31 </div> 31 </div>
......
1 -@extends('public') 1 +1@extends('public')
2 2
3 @section('header-buttons') 3 @section('header-buttons')
4 - <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a> 4 + <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a>
5 @if(setting('registration-enabled')) 5 @if(setting('registration-enabled'))
6 - <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>Sign up</a> 6 + <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>{{ trans('auth.sign_up') }}</a>
7 @endif 7 @endif
8 @stop 8 @stop
9 9
...@@ -14,29 +14,29 @@ ...@@ -14,29 +14,29 @@
14 14
15 <div class="text-center"> 15 <div class="text-center">
16 <div class="center-box text-left"> 16 <div class="center-box text-left">
17 - <h1>Reset Password</h1> 17 + <h1>{{ trans('auth.reset_password') }}</h1>
18 18
19 <form action="{{ baseUrl("/password/reset") }}" method="POST"> 19 <form action="{{ baseUrl("/password/reset") }}" method="POST">
20 {!! csrf_field() !!} 20 {!! csrf_field() !!}
21 <input type="hidden" name="token" value="{{ $token }}"> 21 <input type="hidden" name="token" value="{{ $token }}">
22 22
23 <div class="form-group"> 23 <div class="form-group">
24 - <label for="email">Email</label> 24 + <label for="email">{{ trans('auth.email') }}</label>
25 @include('form/text', ['name' => 'email']) 25 @include('form/text', ['name' => 'email'])
26 </div> 26 </div>
27 27
28 <div class="form-group"> 28 <div class="form-group">
29 - <label for="password">Password</label> 29 + <label for="password">{{ trans('auth.password') }}</label>
30 @include('form/password', ['name' => 'password']) 30 @include('form/password', ['name' => 'password'])
31 </div> 31 </div>
32 32
33 <div class="form-group"> 33 <div class="form-group">
34 - <label for="password_confirmation">Confirm Password</label> 34 + <label for="password_confirmation">{{ trans('auth.password_confirm') }}</label>
35 @include('form/password', ['name' => 'password_confirmation']) 35 @include('form/password', ['name' => 'password_confirmation'])
36 </div> 36 </div>
37 37
38 <div class="from-group"> 38 <div class="from-group">
39 - <button class="button block pos">Reset Password</button> 39 + <button class="button block pos">{{ trans('auth.reset_password') }}</button>
40 </div> 40 </div>
41 </form> 41 </form>
42 </div> 42 </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 2
3 @section('header-buttons') 3 @section('header-buttons')
4 @if(!$signedIn) 4 @if(!$signedIn)
5 - <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a> 5 + <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a>
6 @endif 6 @endif
7 @stop 7 @stop
8 8
...@@ -10,10 +10,9 @@ ...@@ -10,10 +10,9 @@
10 10
11 <div class="text-center"> 11 <div class="text-center">
12 <div class="center-box"> 12 <div class="center-box">
13 - <h2>Thanks for registering!</h2> 13 + <h2>{{ trans('auth.register_thanks') }}</h2>
14 - <p>Please check your email and click the confirmation button to access {{ setting('app-name', 'BookStack') }}.</p> 14 + <p>{{ trans('auth.register_confirm', ['appName' => setting('app-name')]) }}</p>
15 </div> 15 </div>
16 </div> 16 </div>
17 17
18 -
19 @stop 18 @stop
......
1 @extends('public') 1 @extends('public')
2 2
3 @section('header-buttons') 3 @section('header-buttons')
4 - <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a> 4 + <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a>
5 @stop 5 @stop
6 6
7 @section('content') 7 @section('content')
8 8
9 <div class="text-center"> 9 <div class="text-center">
10 <div class="center-box"> 10 <div class="center-box">
11 - <h1>Sign Up</h1> 11 + <h1>{{ title_case(trans('auth.sign_up')) }}</h1>
12 12
13 <form action="{{ baseUrl("/register") }}" method="POST"> 13 <form action="{{ baseUrl("/register") }}" method="POST">
14 {!! csrf_field() !!} 14 {!! csrf_field() !!}
15 15
16 <div class="form-group"> 16 <div class="form-group">
17 - <label for="email">Name</label> 17 + <label for="email">{{ trans('auth.name') }}</label>
18 @include('form/text', ['name' => 'name']) 18 @include('form/text', ['name' => 'name'])
19 </div> 19 </div>
20 20
21 <div class="form-group"> 21 <div class="form-group">
22 - <label for="email">Email</label> 22 + <label for="email">{{ trans('auth.email') }}</label>
23 @include('form/text', ['name' => 'email']) 23 @include('form/text', ['name' => 'email'])
24 </div> 24 </div>
25 25
26 <div class="form-group"> 26 <div class="form-group">
27 - <label for="password">Password</label> 27 + <label for="password">{{ trans('auth.password') }}</label>
28 - @include('form/password', ['name' => 'password', 'placeholder' => 'Must be over 5 characters']) 28 + @include('form/password', ['name' => 'password', 'placeholder' => trans('auth.password_hint')])
29 </div> 29 </div>
30 30
31 <div class="from-group"> 31 <div class="from-group">
32 - <button class="button block pos">Create Account</button> 32 + <button class="button block pos">{{ trans('auth.create_account') }}</button>
33 </div> 33 </div>
34 </form> 34 </form>
35 35
36 @if(count($socialDrivers) > 0) 36 @if(count($socialDrivers) > 0)
37 <hr class="margin-top"> 37 <hr class="margin-top">
38 - <h3 class="text-muted">Social Registration</h3> 38 + <h3 class="text-muted">{{ trans('auth.social_registration') }}</h3>
39 - <p class="text-small">Register and sign in using another service.</p> 39 + <p class="text-small">{{ trans('auth.social_registration_text') }}</p>
40 @if(isset($socialDrivers['google'])) 40 @if(isset($socialDrivers['google']))
41 <a href="{{ baseUrl("/register/service/google") }}" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a> 41 <a href="{{ baseUrl("/register/service/google") }}" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
42 @endif 42 @endif
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
4 4
5 <div class="row"> 5 <div class="row">
6 <div class="col-md-6 col-md-offset-3"> 6 <div class="col-md-6 col-md-offset-3">
7 - <h2>Email Address not confirmed</h2> 7 + <h2>{{ trans('auth.email_not_confirmed') }}</h2>
8 - <p class="text-muted">Your email address has not yet been confirmed. <br> 8 + <p class="text-muted">{{ trans('auth.email_not_confirmed_text') }}<br>
9 - Please click the link in the email that was sent shortly after you registered. <br> 9 + {{ trans('auth.email_not_confirmed_click_link') }} <br>
10 - If you cannot find the email you can re-send the confirmation email by submitting the form below. 10 + {{ trans('auth.email_not_confirmed_resend') }}
11 </p> 11 </p>
12 <hr> 12 <hr>
13 <form action="{{ baseUrl("/register/confirm/resend") }}" method="POST"> 13 <form action="{{ baseUrl("/register/confirm/resend") }}" method="POST">
14 {!! csrf_field() !!} 14 {!! csrf_field() !!}
15 <div class="form-group"> 15 <div class="form-group">
16 - <label for="email">Email Address</label> 16 + <label for="email">{{ trans('auth.email') }}</label>
17 @if(auth()->check()) 17 @if(auth()->check())
18 @include('form/text', ['name' => 'email', 'model' => auth()->user()]) 18 @include('form/text', ['name' => 'email', 'model' => auth()->user()])
19 @else 19 @else
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 @endif 21 @endif
22 </div> 22 </div>
23 <div class="form-group"> 23 <div class="form-group">
24 - <button type="submit" class="button pos">Resend Confirmation Email</button> 24 + <button type="submit" class="button pos">{{ trans('auth.email_not_confirmed_resend_button') }}</button>
25 </div> 25 </div>
26 </form> 26 </form>
27 </div> 27 </div>
......
...@@ -19,4 +19,4 @@ if (! empty($outroLines)) { ...@@ -19,4 +19,4 @@ if (! empty($outroLines)) {
19 } 19 }
20 20
21 echo 'Regards,', "\n"; 21 echo 'Regards,', "\n";
22 -echo config('app.name'), "\n"; 22 +echo setting('app-name'), "\n";
......