Skip to content

Commit c6af076

Browse files
committed
change out all @lang with trans
1 parent e9bc062 commit c6af076

File tree

11 files changed

+89
-89
lines changed

11 files changed

+89
-89
lines changed

src/resources/views/layouts/app.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<li><a class="nav-link" href="{{ route('login') }}">Login</a></li>
5252
<li><a class="nav-link" href="{{ route('register') }}">Register</a></li>
5353
@else
54-
<li><a class="nav-link" href="{{ route('users') }}">@lang('laravelusers::app.nav.users')</a></li>
54+
<li><a class="nav-link" href="{{ route('users') }}">{!! trans('laravelusers::app.nav.users') !!}</a></li>
5555
<li class="nav-item dropdown">
5656
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
5757
{{ Auth::user()->name }} <span class="caret"></span>

src/resources/views/modals/modal-delete.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="modal-content">
44
<div class="modal-header">
55
<h5 class="modal-title">
6-
@lang('laravelusers::modals.delete_user_title')
6+
{!! trans('laravelusers::modals.delete_user_title') !!}
77
</h5>
88
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
99
<span aria-hidden="true">&times;</span>
@@ -12,7 +12,7 @@
1212
</div>
1313
<div class="modal-body">
1414
<p>
15-
@lang('laravelusers::modals.delete_user_message')
15+
{!! trans('laravelusers::modals.delete_user_message') !!}
1616
</p>
1717
</div>
1818
<div class="modal-footer">

src/resources/views/modals/modal-save.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="modal-content">
44
<div class="modal-header">
55
<h5 class="modal-title">
6-
@lang('laravelusers::modals.edit_user__modal_text_confirm_title')
6+
{!! trans('laravelusers::modals.edit_user__modal_text_confirm_title') !!}
77
</h5>
88
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
99
<span aria-hidden="true">&times;</span>
@@ -12,7 +12,7 @@
1212
</div>
1313
<div class="modal-body">
1414
<p>
15-
@lang('laravelusers::modals.confirm_modal_title_text')
15+
{!! trans('laravelusers::modals.confirm_modal_title_text') !!}
1616
</p>
1717
</div>
1818
<div class="modal-footer">

src/resources/views/partials/search-users-form.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<div class="input-group mb-3">
66
{!! Form::text('user_search_box', NULL, ['id' => 'user_search_box', 'class' => 'form-control', 'placeholder' => trans('laravelusers::forms.search-users-ph'), 'aria-label' => trans('laravelusers::forms.search-users-ph'), 'required' => false]) !!}
77
<div class="input-group-append">
8-
<a href="#" class="btn btn-warning clear-search" data-toggle="tooltip" title="@lang('laravelusers::laravelusers.tooltips.clear-search')">
8+
<a href="#" class="btn btn-warning clear-search" data-toggle="tooltip" title="{!! trans('laravelusers::laravelusers.tooltips.clear-search') !!}">
99
@if(config('laravelusers.fontAwesomeEnabled'))
1010
<i class="fas fa-times" aria-hidden="true"></i>
1111
<span class="sr-only">
12-
@lang('laravelusers::laravelusers.tooltips.clear-search')
12+
{!! trans('laravelusers::laravelusers.tooltips.clear-search') !!}
1313
</span>
1414
@else
15-
@lang('laravelusers::laravelusers.tooltips.clear-search')
15+
{!! trans('laravelusers::laravelusers.tooltips.clear-search') !!}
1616
@endif
1717
</a>
1818
@if(config('laravelusers.fontAwesomeEnabled'))

src/resources/views/scripts/check-changed.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$('.pw-change-container').slideToggle(100);
55
$(this).find('.fa').toggleClass('fa-times');
66
$(this).find('.fa').toggleClass('fa-lock');
7-
$(this).find('span').toggleText('', '{{ trans("laravelusers::forms.cancel") }}');
7+
$(this).find('span').toggleText('', '{!! trans("laravelusers::forms.cancel") !!}');
88
});
99
$("input").keyup(function() {
1010
checkChanged();

src/resources/views/scripts/search-users.blade.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
usersTable.hide();
1919
clearSearchTrigger.show();
2020
let noResulsHtml = '<tr>' +
21-
'<td>@lang("laravelusers::laravelusers.search.no-results")</td>' +
21+
'<td>{!! trans("laravelusers::laravelusers.search.no-results") !!}</td>' +
2222
'<td></td>' +
2323
'<td class="hidden-xs"></td>' +
2424
'<td class="hidden-sm hidden-xs"></td>' +
@@ -39,13 +39,13 @@
3939
$.each(jsonData, function(index, val) {
4040
let rolesHtml = '';
4141
let roleClass = '';
42-
let showCellHtml = '<a class="btn btn-sm btn-success btn-block" href="users/' + val.id + '" data-toggle="tooltip" title="@lang("laravelusers::laravelusers.tooltips.show")">@lang("laravelusers::laravelusers.buttons.show")</a>';
43-
let editCellHtml = '<a class="btn btn-sm btn-info btn-block" href="users/' + val.id + '/edit" data-toggle="tooltip" title="@lang("laravelusers::laravelusers.tooltips.edit")">@lang("laravelusers::laravelusers.buttons.edit")</a>';
42+
let showCellHtml = '<a class="btn btn-sm btn-success btn-block" href="users/' + val.id + '" data-toggle="tooltip" title="{{ trans("laravelusers::laravelusers.tooltips.show") }}">{!! trans("laravelusers::laravelusers.buttons.show") !!}</a>';
43+
let editCellHtml = '<a class="btn btn-sm btn-info btn-block" href="users/' + val.id + '/edit" data-toggle="tooltip" title="{{ trans("laravelusers::laravelusers.tooltips.edit") }}">{!! trans("laravelusers::laravelusers.buttons.edit") !!}</a>';
4444
let deleteCellHtml = '<form method="POST" action="http://laravel.local/users/'+ val.id +'" accept-charset="UTF-8" data-toggle="tooltip" title="Delete">' +
4545
'{!! Form::hidden("_method", "DELETE") !!}' +
4646
'{!! csrf_field() !!}' +
47-
'<button class="btn btn-danger btn-sm" type="button" style="width: 100%;" data-toggle="modal" data-target="#confirmDelete" data-title="Delete User" data-message="@lang("laravelusers::modals.delete_user_message", ["user" => "'+val.name+'"])">' +
48-
'@lang("laravelusers::laravelusers.buttons.delete")' +
47+
'<button class="btn btn-danger btn-sm" type="button" style="width: 100%;" data-toggle="modal" data-target="#confirmDelete" data-title="Delete User" data-message="{{ trans("laravelusers::modals.delete_user_message", ["user" => "'+val.name+'"]) }}">' +
48+
'{!! trans("laravelusers::laravelusers.buttons.delete") !!}' +
4949
'</button>' +
5050
'</form>';
5151
@@ -76,14 +76,14 @@
7676
} else {
7777
resultsContainer.append(noResulsHtml);
7878
};
79-
usersCount.html(jsonData.length + " @lang('laravelusers::laravelusers.search.found-footer')");
80-
cardTitle.html("@lang('laravelusers::laravelusers.search.title')");
79+
usersCount.html(jsonData.length + " {!! trans('laravelusers::laravelusers.search.found-footer') !!}");
80+
cardTitle.html("{!! trans('laravelusers::laravelusers.search.title') !!}");
8181
},
8282
error: function (response, status, error) {
8383
if (response.status === 422) {
8484
resultsContainer.append(noResulsHtml);
85-
usersCount.html(0 + " @lang('laravelusers::laravelusers.search.found-footer')");
86-
cardTitle.html("@lang('laravelusers::laravelusers.search.title')");
85+
usersCount.html(0 + " {!! trans('laravelusers::laravelusers.search.found-footer') !!}");
86+
cardTitle.html("{!! trans('laravelusers::laravelusers.search.title') !!}");
8787
};
8888
},
8989
});
@@ -95,8 +95,8 @@
9595
clearSearchTrigger.hide();
9696
resultsContainer.html('');
9797
usersTable.show();
98-
cardTitle.html("@lang('laravelusers::laravelusers.showing-all-users')");
99-
usersCount.html("{{ trans_choice('laravelusers::laravelusers.users-table.caption', 1, ['userscount' => $users->count()]) }}");
98+
cardTitle.html("{!! trans('laravelusers::laravelusers.showing-all-users') !!}");
99+
usersCount.html("{!! trans_choice('laravelusers::laravelusers.users-table.caption', 1, ['userscount' => $users->count()]) !!}");
100100
};
101101
});
102102
clearSearchTrigger.click(function(e) {
@@ -105,8 +105,8 @@
105105
usersTable.show();
106106
resultsContainer.html('');
107107
searchformInput.val('');
108-
cardTitle.html("@lang('laravelusers::laravelusers.showing-all-users')");
109-
usersCount.html("{{ trans_choice('laravelusers::laravelusers.users-table.caption', 1, ['userscount' => $users->count()]) }}");
108+
cardTitle.html("{!! trans('laravelusers::laravelusers.showing-all-users') !!}");
109+
usersCount.html("{!! trans_choice('laravelusers::laravelusers.users-table.caption', 1, ['userscount' => $users->count()]) !!}");
110110
});
111111
});
112112
</script>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script type="text/javascript">
22
$.fn.extend({
3-
toggleText: function(a, b){
4-
return this.text(this.text() == b ? a : b);
5-
}
3+
toggleText: function(a, b){
4+
return this.text(this.text() == b ? a : b);
5+
}
66
});
77
</script>

src/resources/views/usersmanagement/create-user.blade.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@extends(config('laravelusers.laravelUsersBladeExtended'))
22

33
@section('template_title')
4-
@lang('laravelusers::laravelusers.create-new-user')
4+
{!! trans('laravelusers::laravelusers.create-new-user') !!}
55
@endsection
66

77
@section('template_linked_css')
@@ -29,13 +29,13 @@
2929
<div class="card">
3030
<div class="card-header">
3131
<div style="display: flex; justify-content: space-between; align-items: center;">
32-
@lang('laravelusers::laravelusers.create-new-user')
32+
{!! trans('laravelusers::laravelusers.create-new-user') !!}
3333
<div class="pull-right">
34-
<a href="{{ route('users') }}" class="btn btn-light btn-sm float-right" data-toggle="tooltip" data-placement="left" title="@lang('laravelusers::laravelusers.tooltips.back-users')">
34+
<a href="{{ route('users') }}" class="btn btn-light btn-sm float-right" data-toggle="tooltip" data-placement="left" title="{!! trans('laravelusers::laravelusers.tooltips.back-users') !!}">
3535
@if(config('laravelusers.fontAwesomeEnabled'))
3636
<i class="fas fa-fw fa-reply-all" aria-hidden="true"></i>
3737
@endif
38-
@lang('laravelusers::laravelusers.buttons.back-to-users')
38+
{!! trans('laravelusers::laravelusers.buttons.back-to-users') !!}
3939
</a>
4040
</div>
4141
</div>
@@ -53,9 +53,9 @@
5353
<div class="input-group-append">
5454
<label for="email" class="input-group-text">
5555
@if(config('laravelusers.fontAwesomeEnabled'))
56-
<i class="fa fa-fw {{ trans('laravelusers::forms.create_user_icon_email') }}" aria-hidden="true"></i>
56+
<i class="fa fa-fw {!! trans('laravelusers::forms.create_user_icon_email') !!}" aria-hidden="true"></i>
5757
@else
58-
@lang('laravelusers::forms.create_user_label_email')
58+
{!! trans('laravelusers::forms.create_user_label_email') !!}
5959
@endif
6060
</label>
6161
</div>
@@ -77,9 +77,9 @@
7777
<div class="input-group-append">
7878
<label class="input-group-text" for="name">
7979
@if(config('laravelusers.fontAwesomeEnabled'))
80-
<i class="fa fa-fw {{ trans('laravelusers::forms.create_user_icon_username') }}" aria-hidden="true"></i>
80+
<i class="fa fa-fw {!! trans('laravelusers::forms.create_user_icon_username') !!}" aria-hidden="true"></i>
8181
@else
82-
@lang('laravelusers::forms.create_user_label_username')
82+
{!! trans('laravelusers::forms.create_user_label_username') !!}
8383
@endif
8484
</label>
8585
</div>
@@ -99,7 +99,7 @@
9999
<div class="col-md-9">
100100
<div class="input-group">
101101
<select class="custom-select form-control" name="role" id="role">
102-
<option value="">{{ trans('laravelusers::forms.create_user_ph_role') }}</option>
102+
<option value="">{!! trans('laravelusers::forms.create_user_ph_role') !!}</option>
103103
@if ($roles)
104104
@foreach($roles as $role)
105105
<option value="{{ $role->id }}">{{ $role->name }}</option>
@@ -109,9 +109,9 @@
109109
<div class="input-group-append">
110110
<label class="input-group-text" for="role">
111111
@if(config('laravelusers.fontAwesomeEnabled'))
112-
<i class="{{ trans('laravelusers::forms.create_user_icon_role') }}" aria-hidden="true"></i>
112+
<i class="{!! trans('laravelusers::forms.create_user_icon_role') !!}" aria-hidden="true"></i>
113113
@else
114-
@lang('laravelusers::forms.create_user_label_username')
114+
{!! trans('laravelusers::forms.create_user_label_username') !!}
115115
@endif
116116
</label>
117117
</div>
@@ -134,9 +134,9 @@
134134
<div class="input-group-append">
135135
<label class="input-group-text" for="password">
136136
@if(config('laravelusers.fontAwesomeEnabled'))
137-
<i class="fa fa-fw {{ trans('laravelusers::forms.create_user_icon_password') }}" aria-hidden="true"></i>
137+
<i class="fa fa-fw {!! trans('laravelusers::forms.create_user_icon_password') !!}" aria-hidden="true"></i>
138138
@else
139-
@lang('laravelusers::forms.create_user_label_password')
139+
{!! trans('laravelusers::forms.create_user_label_password') !!}
140140
@endif
141141
</label>
142142
</div>
@@ -158,9 +158,9 @@
158158
<div class="input-group-append">
159159
<label class="input-group-text" for="password_confirmation">
160160
@if(config('laravelusers.fontAwesomeEnabled'))
161-
<i class="fa fa-fw {{ trans('laravelusers::forms.create_user_icon_pw_confirmation') }}" aria-hidden="true"></i>
161+
<i class="fa fa-fw {!! trans('laravelusers::forms.create_user_icon_pw_confirmation') !!}" aria-hidden="true"></i>
162162
@else
163-
@lang('laravelusers::forms.create_user_label_pw_confirmation')
163+
{!! trans('laravelusers::forms.create_user_label_pw_confirmation') !!}
164164
@endif
165165
</label>
166166
</div>

0 commit comments

Comments
 (0)