]> BookStack Code Mirror - bookstack/commitdiff
Moved text from auth views into lang files
authorDan Brown <redacted>
Sun, 13 Nov 2016 16:34:28 +0000 (16:34 +0000)
committerDan Brown <redacted>
Sun, 13 Nov 2016 16:34:28 +0000 (16:34 +0000)
app/Notifications/ResetPassword.php
resources/lang/en/auth.php
resources/views/auth/forms/login/ldap.blade.php
resources/views/auth/forms/login/standard.blade.php
resources/views/auth/login.blade.php
resources/views/auth/passwords/email.blade.php
resources/views/auth/passwords/reset.blade.php
resources/views/auth/register-confirm.blade.php
resources/views/auth/register.blade.php
resources/views/auth/user-unconfirmed.blade.php
resources/views/vendor/notifications/email-plain.blade.php

index 646030a103f6f9ff648d602753ce807147ca91ca..affd8f07638330d2bc70acfbceb8e2c0150c2980 100644 (file)
@@ -43,8 +43,9 @@ class ResetPassword extends Notification
     public function toMail()
     {
         return (new MailMessage)
-            ->line('You are receiving this email because we received a password reset request for your account.')
-            ->action('Reset Password', baseUrl('password/reset/' . $this->token))
-            ->line('If you did not request a password reset, no further action is required.');
+            ->subject(trans('auth.email_reset_subject', ['appName' => setting('app-name')]))
+            ->line(trans('auth.email_reset_text'))
+            ->action(trans('auth.reset_password'), baseUrl('password/reset/' . $this->token))
+            ->line(trans('auth.email_reset_not_requested'));
     }
 }
index ffdb1cf45cfc6ef8359f4d23ef3076449db01690..5e364799d1550f97399b6731773395a0ba6195b5 100644 (file)
@@ -14,7 +14,41 @@ return [
     'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
 
     /**
-     * Email Confirmation Text
+     * Login & Register
+     */
+    'sign_up' => 'Sign up',
+    'log_in' => 'Log in',
+
+    'name' => 'Name',
+    'username' => 'Username',
+    'email' => 'Email',
+    'password' => 'Password',
+    'password_confirm' => 'Confirm Password',
+    'password_hint' => 'Must be over 5 characters',
+    'forgot_password' => 'Forgot Password?',
+    'remember_me' => 'Remember Me',
+    'ldap_email_hint' => 'Please enter an email to use for this account.',
+    'create_account' => 'Create Account',
+    'social_login' => 'Social Login',
+    'social_registration' => 'Social Registration',
+    'social_registration_text' => 'Register and sign in using another service.',
+
+    'register_thanks' => 'Thanks for registering!',
+    'register_confirm' => 'Please check your email and click the confirmation button to access :appName.',
+
+    /**
+     * Password Reset
+     */
+    'reset_password' => 'Reset Password',
+    'reset_password_send_instructions' => 'Enter your email below and you will be sent an email with a password reset link.',
+    'reset_password_send_button' => 'Send Reset Link',
+
+    'email_reset_subject' => 'Reset your :appName password',
+    'email_reset_text' => 'You are receiving this email because we received a password reset request for your account.',
+    'email_reset_not_requested' => 'If you did not request a password reset, no further action is required.',
+
+    /**
+     * Email Confirmation
      */
     'email_confirm_subject' => 'Confirm your email on :appName',
     'email_confirm_greeting' => 'Thanks for joining :appName!',
@@ -23,4 +57,10 @@ return [
     '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.',
     'email_confirm_success' => 'Your email has been confirmed!',
     'email_confirm_resent' => 'Confirmation email resent, Please check your inbox.',
+
+    'email_not_confirmed' => 'Email Address Not Confirmed',
+    'email_not_confirmed_text' => 'Your email address has not yet been confirmed.',
+    'email_not_confirmed_click_link' => 'Please click the link in the email that was sent shortly after you registered.',
+    'email_not_confirmed_resend' => 'If you cannot find the email you can re-send the confirmation email by submitting the form below.',
+    'email_not_confirmed_resend_button' => 'Resend Confirmation Email',
 ];
\ No newline at end of file
index 5230d43ca03086fde6fdab5c8ca925a0e2b4112c..b52b5f13e9148a497c79248f4e811885da5c7092 100644 (file)
@@ -1,19 +1,19 @@
 <div class="form-group">
-    <label for="username">Username</label>
+    <label for="username">{{ trans('auth.username') }}</label>
     @include('form/text', ['name' => 'username', 'tabindex' => 1])
 </div>
 
 @if(session('request-email', false) === true)
     <div class="form-group">
-        <label for="email">Email</label>
+        <label for="email">{{ trans('auth.email') }}</label>
         @include('form/text', ['name' => 'email', 'tabindex' => 1])
         <span class="text-neg">
-            Please enter an email to use for this account.
+            {{ trans('auth.ldap_email_hint') }}
         </span>
     </div>
 @endif
 
 <div class="form-group">
-    <label for="password">Password</label>
+    <label for="password">{{ trans('auth.password') }}</label>
     @include('form/password', ['name' => 'password', 'tabindex' => 2])
 </div>
\ No newline at end of file
index abefd21a1b6cc5e6064ff61ca0b29bfac5c65893..4ea1f35ba2b89c4ff8b34e8839cca16943feb16c 100644 (file)
@@ -1,10 +1,10 @@
 <div class="form-group">
-    <label for="email">Email</label>
+    <label for="email">{{ trans('auth.email') }}</label>
     @include('form/text', ['name' => 'email', 'tabindex' => 1])
 </div>
 
 <div class="form-group">
-    <label for="password">Password</label>
+    <label for="password">{{ trans('auth.password') }}</label>
     @include('form/password', ['name' => 'password', 'tabindex' => 2])
-    <span class="block small"><a href="{{ baseUrl('/password/email') }}">Forgot Password?</a></span>
+    <span class="block small"><a href="{{ baseUrl('/password/email') }}">{{ trans('auth.forgot_password') }}</a></span>
 </div>
\ No newline at end of file
index 4fa97c1d5bba0b0303c2ec56cf675ea0e890b2bb..295d1a801da8427945081288f8484ee73aa48e8f 100644 (file)
@@ -2,7 +2,7 @@
 
 @section('header-buttons')
     @if(setting('registration-enabled', false))
-        <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>Sign up</a>
+        <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>{{ trans('auth.sign_up') }}</a>
     @endif
 @stop
 
@@ -10,7 +10,7 @@
 
     <div class="text-center">
         <div class="center-box">
-            <h1>Log In</h1>
+            <h1>{{ title_case(trans('auth.log_in')) }}</h1>
 
             <form action="{{ baseUrl("/login") }}" method="POST" id="login-form">
                 {!! csrf_field() !!}
                 @include('auth/forms/login/' . $authMethod)
 
                 <div class="form-group">
-                    <label for="remember" class="inline">Remember Me</label>
+                    <label for="remember" class="inline">{{ trans('auth.remember_me') }}</label>
                     <input type="checkbox" id="remember" name="remember"  class="toggle-switch-checkbox">
                     <label for="remember" class="toggle-switch"></label>
                 </div>
 
 
                 <div class="from-group">
-                    <button class="button block pos" tabindex="3"><i class="zmdi zmdi-sign-in"></i> Sign In</button>
+                    <button class="button block pos" tabindex="3"><i class="zmdi zmdi-sign-in"></i> {{ title_case(trans('auth.log_in')) }}</button>
                 </div>
             </form>
 
             @if(count($socialDrivers) > 0)
                 <hr class="margin-top">
-                <h3 class="text-muted">Social Login</h3>
+                <h3 class="text-muted">{{ trans('auth.social_login') }}</h3>
                 @if(isset($socialDrivers['google']))
                     <a href="{{ baseUrl("/login/service/google") }}" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
                 @endif
index 115785ab2eb43893df69e64b3573c7aa3b3a9101..07bd2c3835e5ad200ed8d04e90a03b01647eab67 100644 (file)
@@ -1,9 +1,9 @@
 @extends('public')
 
 @section('header-buttons')
-    <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
+    <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a>
     @if(setting('registration-enabled'))
-        <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>Sign up</a>
+        <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>{{ trans('auth.sign_up') }}</a>
     @endif
 @stop
 
 
     <div class="text-center">
         <div class="center-box text-left">
-            <h1>Reset Password</h1>
+            <h1>{{ trans('auth.reset_password') }}</h1>
 
-            <p class="muted small">Enter your email below and you will be sent an email with a password reset link.</p>
+            <p class="muted small">{{ trans('auth.reset_password_send_instructions') }}</p>
 
             <form action="{{ baseUrl("/password/email") }}" method="POST">
                 {!! csrf_field() !!}
 
                 <div class="form-group">
-                    <label for="email">Email</label>
+                    <label for="email">{{ trans('auth.email') }}</label>
                     @include('form/text', ['name' => 'email'])
                 </div>
 
                 <div class="from-group">
-                    <button class="button block pos">Send Reset Link</button>
+                    <button class="button block pos">{{ trans('auth.reset_password_send_button') }}</button>
                 </div>
             </form>
         </div>
index 612b50ff835eb069f54b77ae0bf8af91c8d09acf..fef9ad476ae3a2bb357a83af7deedb81f196db47 100644 (file)
@@ -1,9 +1,9 @@
-@extends('public')
+1@extends('public')
 
 @section('header-buttons')
-    <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
+    <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a>
     @if(setting('registration-enabled'))
-        <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>Sign up</a>
+        <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>{{ trans('auth.sign_up') }}</a>
     @endif
 @stop
 
 
     <div class="text-center">
         <div class="center-box text-left">
-            <h1>Reset Password</h1>
+            <h1>{{ trans('auth.reset_password') }}</h1>
 
             <form action="{{ baseUrl("/password/reset") }}" method="POST">
                 {!! csrf_field() !!}
                 <input type="hidden" name="token" value="{{ $token }}">
 
                 <div class="form-group">
-                    <label for="email">Email</label>
+                    <label for="email">{{ trans('auth.email') }}</label>
                     @include('form/text', ['name' => 'email'])
                 </div>
 
                 <div class="form-group">
-                    <label for="password">Password</label>
+                    <label for="password">{{ trans('auth.password') }}</label>
                     @include('form/password', ['name' => 'password'])
                 </div>
 
                 <div class="form-group">
-                    <label for="password_confirmation">Confirm Password</label>
+                    <label for="password_confirmation">{{ trans('auth.password_confirm') }}</label>
                     @include('form/password', ['name' => 'password_confirmation'])
                 </div>
 
                 <div class="from-group">
-                    <button class="button block pos">Reset Password</button>
+                    <button class="button block pos">{{ trans('auth.reset_password') }}</button>
                 </div>
             </form>
         </div>
index 97fd65ab51238f3df8e6ceca5c0b9593dcc37b0f..364df92664182694c103ebea3757d46576491c13 100644 (file)
@@ -2,7 +2,7 @@
 
 @section('header-buttons')
     @if(!$signedIn)
-        <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
+        <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a>
     @endif
 @stop
 
 
     <div class="text-center">
         <div class="center-box">
-            <h2>Thanks for registering!</h2>
-            <p>Please check your email and click the confirmation button to access {{ setting('app-name', 'BookStack') }}.</p>
+            <h2>{{ trans('auth.register_thanks') }}</h2>
+            <p>{{ trans('auth.register_confirm', ['appName' => setting('app-name')]) }}</p>
         </div>
     </div>
 
-
 @stop
index 8ae5fcf5067725e00c64d30867fd163db3dbf807..7a119ddba880f8ee8f14af1e2999babf6c9aed8d 100644 (file)
@@ -1,42 +1,42 @@
 @extends('public')
 
 @section('header-buttons')
-    <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
+    <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a>
 @stop
 
 @section('content')
 
     <div class="text-center">
         <div class="center-box">
-            <h1>Sign Up</h1>
+            <h1>{{ title_case(trans('auth.sign_up')) }}</h1>
 
             <form action="{{ baseUrl("/register") }}" method="POST">
                 {!! csrf_field() !!}
 
                 <div class="form-group">
-                    <label for="email">Name</label>
+                    <label for="email">{{ trans('auth.name') }}</label>
                     @include('form/text', ['name' => 'name'])
                 </div>
 
                 <div class="form-group">
-                    <label for="email">Email</label>
+                    <label for="email">{{ trans('auth.email') }}</label>
                     @include('form/text', ['name' => 'email'])
                 </div>
 
                 <div class="form-group">
-                    <label for="password">Password</label>
-                    @include('form/password', ['name' => 'password', 'placeholder' => 'Must be over 5 characters'])
+                    <label for="password">{{ trans('auth.password') }}</label>
+                    @include('form/password', ['name' => 'password', 'placeholder' => trans('auth.password_hint')])
                 </div>
 
                 <div class="from-group">
-                    <button class="button block pos">Create Account</button>
+                    <button class="button block pos">{{ trans('auth.create_account') }}</button>
                 </div>
             </form>
 
             @if(count($socialDrivers) > 0)
                 <hr class="margin-top">
-                <h3 class="text-muted">Social Registration</h3>
-                <p class="text-small">Register and sign in using another service.</p>
+                <h3 class="text-muted">{{ trans('auth.social_registration') }}</h3>
+                <p class="text-small">{{ trans('auth.social_registration_text') }}</p>
                 @if(isset($socialDrivers['google']))
                     <a href="{{ baseUrl("/register/service/google") }}" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
                 @endif
index 08178e891a633b6af530601d9eb2d589f8e4dcee..13567b412817e1f20fbb6245fcdf6062b9e37f74 100644 (file)
@@ -4,16 +4,16 @@
 
     <div class="row">
         <div class="col-md-6 col-md-offset-3">
-            <h2>Email Address not confirmed</h2>
-            <p class="text-muted">Your email address has not yet been confirmed. <br>
-                Please click the link in the email that was sent shortly after you registered. <br>
-                If you cannot find the email you can re-send the confirmation email by submitting the form below.
+            <h2>{{ trans('auth.email_not_confirmed') }}</h2>
+            <p class="text-muted">{{ trans('auth.email_not_confirmed_text') }}<br>
+                {{ trans('auth.email_not_confirmed_click_link') }} <br>
+                {{ trans('auth.email_not_confirmed_resend') }}
             </p>
             <hr>
             <form action="{{ baseUrl("/register/confirm/resend") }}" method="POST">
                 {!! csrf_field() !!}
                 <div class="form-group">
-                    <label for="email">Email Address</label>
+                    <label for="email">{{ trans('auth.email') }}</label>
                     @if(auth()->check())
                         @include('form/text', ['name' => 'email', 'model' => auth()->user()])
                     @else
@@ -21,7 +21,7 @@
                     @endif
                 </div>
                 <div class="form-group">
-                    <button type="submit" class="button pos">Resend Confirmation Email</button>
+                    <button type="submit" class="button pos">{{ trans('auth.email_not_confirmed_resend_button') }}</button>
                 </div>
             </form>
         </div>
index acefa652383d18d49dc722e2e7342f28ea543590..79634b611fd049eb27cad2793a46bf0ade721197 100644 (file)
@@ -19,4 +19,4 @@ if (! empty($outroLines)) {
 }
 
 echo 'Regards,', "\n";
-echo config('app.name'), "\n";
+echo setting('app-name'), "\n";