mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Working on multi-language support
This commit is contained in:
parent
c53528f997
commit
1b7c885367
@ -26,9 +26,9 @@ class UserController extends BaseController {
|
|||||||
$user->force_pdfjs = true;
|
$user->force_pdfjs = true;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
Session::flash('message', 'Successfully updated PDF settings');
|
Session::flash('message', trans('texts.confide.updated_settings'));
|
||||||
|
|
||||||
return Redirect::to('/invoices/create');
|
return Redirect::to('/dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,6 +86,7 @@ class UserController extends BaseController {
|
|||||||
if( Confide::user() )
|
if( Confide::user() )
|
||||||
{
|
{
|
||||||
Event::fire('user.login');
|
Event::fire('user.login');
|
||||||
|
Session::reflash();
|
||||||
|
|
||||||
$invoice = Invoice::scope()->orderBy('id', 'desc')->first();
|
$invoice = Invoice::scope()->orderBy('id', 'desc')->first();
|
||||||
|
|
||||||
@ -95,7 +96,7 @@ class UserController extends BaseController {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return Redirect::to('/invoices/create');
|
return Redirect::to('/dashboard');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -137,7 +138,7 @@ class UserController extends BaseController {
|
|||||||
// Check if there was too many login attempts
|
// Check if there was too many login attempts
|
||||||
if( Confide::isThrottled( $input ) )
|
if( Confide::isThrottled( $input ) )
|
||||||
{
|
{
|
||||||
$err_msg = Lang::get('confide::confide.alerts.too_many_attempts');
|
$err_msg = trans('texts.confide.too_many_attempts');
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) )
|
elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) )
|
||||||
@ -147,7 +148,7 @@ class UserController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$err_msg = Lang::get('confide::confide.alerts.wrong_credentials');
|
$err_msg = trans('texts.confide.wrong_credentials');
|
||||||
}
|
}
|
||||||
|
|
||||||
return Redirect::action('UserController@login')
|
return Redirect::action('UserController@login')
|
||||||
@ -165,15 +166,13 @@ class UserController extends BaseController {
|
|||||||
{
|
{
|
||||||
if ( Confide::confirm( $code ) )
|
if ( Confide::confirm( $code ) )
|
||||||
{
|
{
|
||||||
$notice_msg = Lang::get('confide::confide.alerts.confirmation');
|
$notice_msg = trans('texts.confide.confirmation');
|
||||||
return Redirect::action('UserController@login')
|
return Redirect::action('UserController@login')->with( 'message', $notice_msg );
|
||||||
->with( 'notice', $notice_msg );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$error_msg = Lang::get('confide::confide.alerts.wrong_confirmation');
|
$error_msg = trans('texts.confide.wrong_confirmation');
|
||||||
return Redirect::action('UserController@login')
|
return Redirect::action('UserController@login')->with( 'error', $error_msg );
|
||||||
->with( 'error', $error_msg );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +193,7 @@ class UserController extends BaseController {
|
|||||||
{
|
{
|
||||||
Confide::forgotPassword( Input::get( 'email' ) );
|
Confide::forgotPassword( Input::get( 'email' ) );
|
||||||
|
|
||||||
$notice_msg = Lang::get('confide::confide.alerts.password_forgot');
|
$notice_msg = trans('texts.confide.password_forgot');
|
||||||
return Redirect::action('UserController@login')
|
return Redirect::action('UserController@login')
|
||||||
->with( 'notice', $notice_msg );
|
->with( 'notice', $notice_msg );
|
||||||
|
|
||||||
@ -241,13 +240,13 @@ class UserController extends BaseController {
|
|||||||
// By passing an array with the token, password and confirmation
|
// By passing an array with the token, password and confirmation
|
||||||
if( Confide::resetPassword( $input ) )
|
if( Confide::resetPassword( $input ) )
|
||||||
{
|
{
|
||||||
$notice_msg = Lang::get('confide::confide.alerts.password_reset');
|
$notice_msg = trans('texts.confide.password_reset');
|
||||||
return Redirect::action('UserController@login')
|
return Redirect::action('UserController@login')
|
||||||
->with( 'notice', $notice_msg );
|
->with( 'notice', $notice_msg );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');
|
$error_msg = trans('texts.confide.wrong_password_reset');
|
||||||
return Redirect::action('UserController@reset_password', array('token'=>$input['token']))
|
return Redirect::action('UserController@reset_password', array('token'=>$input['token']))
|
||||||
->withInput()
|
->withInput()
|
||||||
->with( 'error', $error_msg );
|
->with( 'error', $error_msg );
|
||||||
|
@ -277,5 +277,15 @@ return array(
|
|||||||
'expiration_year' => 'Expiration year',
|
'expiration_year' => 'Expiration year',
|
||||||
'cvv' => 'CVV',
|
'cvv' => 'CVV',
|
||||||
|
|
||||||
|
// Security alerts
|
||||||
|
'confide' => array(
|
||||||
|
'too_many_attempts' => 'Too many attempts. Try again in few minutes.',
|
||||||
|
'wrong_credentials' => 'Incorrect email or password.',
|
||||||
|
'confirmation' => 'Your account has been confirmed!',
|
||||||
|
'wrong_confirmation' => 'Wrong confirmation code.',
|
||||||
|
'password_forgot' => 'The information regarding password reset was sent to your email.',
|
||||||
|
'password_reset' => 'Your password has been changed successfully.',
|
||||||
|
'wrong_password_reset' => 'Invalid password. Try again',
|
||||||
|
),
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -277,6 +277,16 @@ return array(
|
|||||||
'expiration_year' => 'Expiration year',
|
'expiration_year' => 'Expiration year',
|
||||||
'cvv' => 'CVV',
|
'cvv' => 'CVV',
|
||||||
|
|
||||||
|
// Security alerts
|
||||||
|
'confide' => array(
|
||||||
|
'too_many_attempts' => 'Too many attempts. Try again in few minutes.',
|
||||||
|
'wrong_credentials' => 'Incorrect email or password.',
|
||||||
|
'confirmation' => 'Your account has been confirmed!',
|
||||||
|
'wrong_confirmation' => 'Wrong confirmation code.',
|
||||||
|
'password_forgot' => 'The information regarding password reset was sent to your email.',
|
||||||
|
'password_reset' => 'Your password has been changed successfully.',
|
||||||
|
'wrong_password_reset' => 'Invalid password. Try again',
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
@ -276,5 +276,16 @@ return array(
|
|||||||
'expiration_year' => 'Expiration year',
|
'expiration_year' => 'Expiration year',
|
||||||
'cvv' => 'CVV',
|
'cvv' => 'CVV',
|
||||||
|
|
||||||
|
// Security alerts
|
||||||
|
'confide' => array(
|
||||||
|
'too_many_attempts' => 'Too many attempts. Try again in few minutes.',
|
||||||
|
'wrong_credentials' => 'Incorrect email or password.',
|
||||||
|
'confirmation' => 'Your account has been confirmed!',
|
||||||
|
'wrong_confirmation' => 'Wrong confirmation code.',
|
||||||
|
'password_forgot' => 'The information regarding password reset was sent to your email.',
|
||||||
|
'password_reset' => 'Your password has been changed successfully.',
|
||||||
|
'wrong_password_reset' => 'Invalid password. Try again',
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -277,5 +277,16 @@ return array(
|
|||||||
'expiration_year' => 'Expiration year',
|
'expiration_year' => 'Expiration year',
|
||||||
'cvv' => 'CVV',
|
'cvv' => 'CVV',
|
||||||
|
|
||||||
|
// Security alerts
|
||||||
|
'confide' => array(
|
||||||
|
'too_many_attempts' => 'Too many attempts. Try again in few minutes.',
|
||||||
|
'wrong_credentials' => 'Incorrect email or password.',
|
||||||
|
'confirmation' => 'Your account has been confirmed!',
|
||||||
|
'wrong_confirmation' => 'Wrong confirmation code.',
|
||||||
|
'password_forgot' => 'The information regarding password reset was sent to your email.',
|
||||||
|
'password_reset' => 'Your password has been changed successfully.',
|
||||||
|
'wrong_password_reset' => 'Invalid password. Try again',
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -277,6 +277,17 @@ return array(
|
|||||||
'expiration_year' => 'Expiration year',
|
'expiration_year' => 'Expiration year',
|
||||||
'cvv' => 'CVV',
|
'cvv' => 'CVV',
|
||||||
|
|
||||||
|
// Security alerts
|
||||||
|
'confide' => array(
|
||||||
|
'too_many_attempts' => 'Too many attempts. Try again in few minutes.',
|
||||||
|
'wrong_credentials' => 'Incorrect email or password.',
|
||||||
|
'confirmation' => 'Your account has been confirmed!',
|
||||||
|
'wrong_confirmation' => 'Wrong confirmation code.',
|
||||||
|
'password_forgot' => 'The information regarding password reset was sent to your email.',
|
||||||
|
'password_reset' => 'Your password has been changed successfully.',
|
||||||
|
'wrong_password_reset' => 'Invalid password. Try again',
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
@ -276,5 +276,16 @@ return array(
|
|||||||
'expiration_year' => 'Expiration year',
|
'expiration_year' => 'Expiration year',
|
||||||
'cvv' => 'CVV',
|
'cvv' => 'CVV',
|
||||||
|
|
||||||
|
// Security alerts
|
||||||
|
'confide' => array(
|
||||||
|
'too_many_attempts' => 'Too many attempts. Try again in few minutes.',
|
||||||
|
'wrong_credentials' => 'Incorrect email or password.',
|
||||||
|
'confirmation' => 'Your account has been confirmed!',
|
||||||
|
'wrong_confirmation' => 'Wrong confirmation code.',
|
||||||
|
'password_forgot' => 'The information regarding password reset was sent to your email.',
|
||||||
|
'password_reset' => 'Your password has been changed successfully.',
|
||||||
|
'wrong_password_reset' => 'Invalid password. Try again',
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<h1>{{ trans('texts.confirmation_header') }}</h1>
|
<h1>{{ trans('texts.confirmation_header') }}</h1>
|
||||||
|
|
||||||
<p>{{ trans('texts.confirmation_message') }}</p>
|
{{ trans('texts.confirmation_message') }}<p/>
|
||||||
<a href='{{{ URL::to("user/confirm/{$user->confirmation_code}") }}}'>
|
<a href='{{{ URL::to("user/confirm/{$user->confirmation_code}") }}}'>
|
||||||
{{{ URL::to("user/confirm/{$user->confirmation_code}") }}}
|
{{{ URL::to("user/confirm/{$user->confirmation_code}") }}}
|
||||||
</a>
|
</a><p/>
|
||||||
|
|
||||||
{{ trans('texts.email_signature') }}<br/>
|
{{ trans('texts.email_signature') }}<br/>
|
||||||
{{ trans('texts.email_from') }}
|
{{ trans('texts.email_from') }}
|
@ -172,14 +172,6 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div><!-- /.navbar-collapse -->
|
</div><!-- /.navbar-collapse -->
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -475,9 +475,10 @@ function wordWrapText(value, width)
|
|||||||
if (numLines <= 1) continue;
|
if (numLines <= 1) continue;
|
||||||
var j = 0; space = lines[i].length;
|
var j = 0; space = lines[i].length;
|
||||||
while (j++ < lines[i].length) {
|
while (j++ < lines[i].length) {
|
||||||
if (lines[i].charAt(j) === " ") space = j;
|
if (lines[i].charAt(j) === ' ') space = j;
|
||||||
}
|
}
|
||||||
lines[i + 1] = lines[i].substring(space + 1) + ' ' + (lines[i + 1] || "");
|
if (space == lines[i].length) space = width/6;
|
||||||
|
lines[i + 1] = lines[i].substring(space + 1) + ' ' + (lines[i + 1] || '');
|
||||||
lines[i] = lines[i].substring(0, space);
|
lines[i] = lines[i].substring(0, space);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user