Change to consistent use of @lang in views where possible

This commit is contained in:
Deon George 2023-04-02 22:41:06 +10:00
parent a62e7ddeca
commit 02f3152ffd
9 changed files with 51 additions and 51 deletions

View File

@ -14,10 +14,10 @@
<div class="col-12 col-sm-6 col-lg-4">
@if($o->is_rdn)
<span class="btn btn-sm btn-outline-focus mt-3 mb-3"><i class="fas fa-fw fa-exchange"></i> {{ __('Rename') }}</span>
<span class="btn btn-sm btn-outline-focus mt-3 mb-3"><i class="fas fa-fw fa-exchange"></i> @lang('Rename')</span>
@elseif($edit && $o->can_addvalues)
<div class="p-0 m-0 addable" id="{{ $o->name_lc }}">
<span class="btn btn-sm btn-outline-primary mt-3 mb-3"><i class="fas fa-fw fa-plus"></i> {{ __('Add Value') }}</span>
<span class="btn btn-sm btn-outline-primary mt-3 mb-3"><i class="fas fa-fw fa-plus"></i> @lang('Add Value')</span>
</div>
@endif
</div>

View File

@ -14,10 +14,10 @@
<div class="col-12 col-sm-6 col-lg-4">
@if($o->is_rdn)
<span class="btn btn-sm btn-outline-focus mt-3 mb-3"><i class="fas fa-fw fa-exchange"></i> {{ __('Rename') }}</span>
<span class="btn btn-sm btn-outline-focus mt-3 mb-3"><i class="fas fa-fw fa-exchange"></i> @lang('Rename')</span>
@elseif($edit && $o->can_addvalues)
<div class="p-0 m-0 addable" id="{{ $o->name_lc }}">
<span class="btn btn-sm btn-outline-primary mt-3 mb-3"><i class="fas fa-fw fa-plus"></i> {{ __('Add Value') }}</span>
<span class="btn btn-sm btn-outline-primary mt-3 mb-3"><i class="fas fa-fw fa-plus"></i> @lang('Add Value')</span>
</div>
@endif
</div>

View File

@ -65,10 +65,10 @@
<div class="card-body">
<div class="card-header-tabs">
<ul class="nav nav-tabs">
<li class="nav-item"><a data-bs-toggle="tab" href="#attributes" class="nav-link active">{{ __('Attributes') }}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#internal" class="nav-link">{{ __('Internal') }}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#attributes" class="nav-link active">@lang('Attributes')</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#internal" class="nav-link">@lang('Internal')</a></li>
@env(['local'])
<li class="nav-item"><a data-bs-toggle="tab" href="#debug" class="nav-link">{{ __('Debug') }}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#debug" class="nav-link">@lang('Debug')</a></li>
@endenv
</ul>
@ -108,8 +108,8 @@
<div class="row">
<div class="col-12 offset-sm-2 col-sm-4 col-lg-2">
<span id="form-reset" class="btn btn-outline-danger">{{ __('Reset') }}</span>
<span id="form-submit" class="btn btn-success">{{ __('Update') }}</span>
<span id="form-reset" class="btn btn-outline-danger">@lang('Reset')</span>
<span id="form-submit" class="btn btn-success">@lang('Update')</span>
</div>
</div>
</form>

View File

@ -4,7 +4,7 @@
<table class="table table-borderless">
<tr>
<td style="border-radius: 5px;"><div class="page-title-icon f32"><i class="fas fa-info"></i></div></td>
<td class="top text-end align-text-top p-0 pt-2 }}"><strong>{{ __('Server Info') }}</strong><br><small>{{ $s->rootDSE()->entryuuid[0] ?? '' }}</small></td>
<td class="top text-end align-text-top p-0 pt-2 }}"><strong>@lang('Server Info')</strong><br><small>{{ $s->rootDSE()->entryuuid[0] ?? '' }}</small></td>
</tr>
</table>
@endsection

View File

@ -12,13 +12,13 @@
@section('main-content')
<div class="main-card mb-3 card">
<div class="card-body">
<h5 class="card-title">{{ __('Schema Information') }}</h5>
<h5 class="card-title">@lang('Schema Information')</h5>
<ul class="nav nav-tabs">
<li class="nav-item"><a data-bs-toggle="tab" href="#objectclasses" class="nav-link">{{ __('Object Classes') }}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#attributetypes" class="nav-link">{{ __('Attribute Types') }}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#ldapsyntaxes" class="nav-link">{{ __('Syntaxes') }}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#matchingrules" class="nav-link">{{ __('Matching Rules') }}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#objectclasses" class="nav-link">@lang('Object Classes')</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#attributetypes" class="nav-link">@lang('Attribute Types')</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#ldapsyntaxes" class="nav-link">@lang('Syntaxes')</a></li>
<li class="nav-item"><a data-bs-toggle="tab" href="#matchingrules" class="nav-link">@lang('Matching Rules')</a></li>
</ul>
<div class="tab-content">
<!-- Object Classes -->

View File

@ -21,24 +21,24 @@
<tbody>
<tr>
<td class="w-25">{{ __('Description') }}</td><td><strong>{{ __($o->description ?: '(no description)') }}</strong></td>
<td class="w-25">@lang('Description')</td><td><strong>{{ $o->description ?: __('(no description)')}}</strong></td>
</tr>
<tr>
<td><abbr title="{{ __('Object Identifier') }}">OID</abbr></td><td><strong>{{ $o->oid }}</strong></td>
<td><abbr title="@lang('Object Identifier')">OID</abbr></td><td><strong>{{ $o->oid }}</strong></td>
</tr>
<tr>
<td>{{ __('Obsolete') }}</td><td><strong>{{ $o->is_obsolete ? __('Yes') : __('No') }}</strong></td>
<td>@lang('Obsolete')</td><td><strong>@lang($o->is_obsolete ? 'Yes' : 'No')</strong></td>
</tr>
<tr>
<td>{{ __('Inherits from') }}</td>
<td><strong>@if ($o->sup_attribute)<a class="attributetype" id="{{ strtolower($o->sup_attribute) }}" href="#{{ strtolower($o->sup_attribute) }}">{{ $o->sup_attribute }}</a>@else {{ __('(none)') }}@endif</strong></td>
<td>@lang('Inherits from')</td>
<td><strong>@if ($o->sup_attribute)<a class="attributetype" id="{{ strtolower($o->sup_attribute) }}" href="#{{ strtolower($o->sup_attribute) }}">{{ $o->sup_attribute }}</a>@else @lang('(none)')@endif</strong></td>
</tr>
<tr>
<td>{{ __('Parent to') }}</td>
<td>@lang('Parent to')</td>
<td>
<strong>
@if (! $o->children->count())
{{ __('(none)') }}
@lang('(none)')
@else
@foreach ($o->children->sort() as $child)
@if($loop->index)</strong> <strong>@endif
@ -49,34 +49,34 @@
</td>
</tr>
<tr>
<td>{{ __('Equality') }}</td><td><strong>{{ $o->equality ?: __('(not specified)') }}</strong></td>
<td>@lang('Equality')</td><td><strong>{{ $o->equality ?: __('(not specified)') }}</strong></td>
</tr>
<tr>
<td>{{ __('Ordering') }}</td><td><strong>{{ $o->ordering ?: __('(not specified)') }}</strong></td>
<td>@lang('Ordering')</td><td><strong>{{ $o->ordering ?: __('(not specified)') }}</strong></td>
</tr>
<tr>
<td>{{ __('Substring Rule') }}</td><td><strong>{{ $o->sub_str_rule ?: __('(not specified)') }}</strong></td>
<td>@lang('Substring Rule')</td><td><strong>{{ $o->sub_str_rule ?: __('(not specified)') }}</strong></td>
</tr>
<tr>
<td>{{ __('Syntax') }}</td><td><strong>{{ ($o->syntax_oid && $x=$server->schemaSyntaxName($o->syntax_oid)) ? $x->description : __('(unknown syntax)') }} @if($o->syntax_oid)({{ $o->syntax_oid }})@endif</strong></td>
<td>@lang('Syntax')</td><td><strong>{{ ($o->syntax_oid && $x=$server->schemaSyntaxName($o->syntax_oid)) ? $x->description : __('(unknown syntax)') }} @if($o->syntax_oid)({{ $o->syntax_oid }})@endif</strong></td>
</tr>
<tr>
<td>{{ __('Single Valued') }}</td><td><strong>{{ $o->is_single_value ? __('Yes') : __('No') }}</strong></td>
<td>@lang('Single Valued')</td><td><strong>@lang($o->is_single_value ? 'Yes' : 'No')</strong></td>
</tr>
<tr>
<td>{{ __('Collective') }}</td><td><strong>{{ $o->is_collective ? __('Yes') : __('No') }}</strong></td>
<td>@lang('Collective')</td><td><strong>@lang($o->is_collective ? 'Yes' : 'No')</strong></td>
</tr>
<tr>
<td>{{ __('User Modification') }}</td><td><strong>{{ $o->is_no_user_modification ? __('Yes') : __('No') }}</strong></td>
<td>@lang('User Modification')</td><td><strong>@lang($o->is_no_user_modification ? 'Yes' : 'No')</strong></td>
</tr>
<tr>
<td>{{ __('Usage') }}</td><td><strong>{{ $o->usage ?: __('(not specified)') }}</strong></td>
<td>@lang('Usage')</td><td><strong>{{ $o->usage ?: __('(not specified)') }}</strong></td>
</tr>
<tr>
<td>{{ __('Maximum Length') }}</td><td><strong>{{ is_null($o->max_length) ? __('(not applicable)') : sprintf('%s %s',number_format($o->max_length),Str::plural('character',$o->max_length)) }}</strong></td>
<td>@lang('Maximum Length')</td><td><strong>{{ is_null($o->max_length) ? __('(not applicable)') : sprintf('%s %s',number_format($o->max_length),Str::plural('character',$o->max_length)) }}</strong></td>
</tr>
<tr>
<td>{{ __('Aliases') }}</td>
<td>@lang('Aliases')</td>
<td><strong>
@if ($o->aliases->count())
@foreach ($o->aliases as $alias)
@ -84,12 +84,12 @@
<a class="attributetype" id="{{ strtolower($alias) }}" href="#{{ strtolower($alias) }}">{{ $alias }}</a>
@endforeach
@else
{{ __('(none)') }}
@lang('(none)')
@endif
</strong></td>
</tr>
<tr>
<td>{{ __('Used by ObjectClasses') }}</td>
<td>@lang('Used by ObjectClasses')</td>
<td><strong>
@if ($o->used_in_object_classes->count())
@foreach ($o->used_in_object_classes as $class)
@ -97,12 +97,12 @@
<a class="objectclass" id="{{ strtolower($class) }}" href="#{{ strtolower($class) }}">{{ $class }}</a>
@endforeach
@else
{{ __('(none)') }}
@lang('(none)')
@endif
</strong></td>
</tr>
<tr>
<td>{{ __('Force as MAY by config') }}</td><td><strong>{{ $o->forced_as_may ? __('Yes') : __('No') }}</strong></td>
<td>@lang('Force as MAY by config')</td><td><strong>@lang($o->forced_as_may ? 'Yes' : 'No')</strong></td>
</tr>
</tbody>
</table>

View File

@ -3,7 +3,7 @@
<table class="schema table table-sm table-bordered table-striped">
<thead>
<tr>
<th class="table-dark">{{ __('Description') }}</th>
<th class="table-dark">@lang('Description')</th>
<th class="table-dark">OID</th>
</tr>
</thead>

View File

@ -20,20 +20,20 @@
<tbody>
<tr>
<td class="w-25">{{ __('Description') }}</td><td><strong>{{ __($o->description ?: '(no description)') }}</strong></td>
<td class="w-25">@lang('Description')</td><td><strong>{{ $o->description ?: __('(no description)') }}</strong></td>
</tr>
<tr>
<td class="w-25"><abbr title="{{ __('Object Identifier') }}">OID</abbr></td><td><strong>{{ $o->oid }}</strong></td>
<td class="w-25"><abbr title="@lang('Object Identifier')">OID</abbr></td><td><strong>{{ $o->oid }}</strong></td>
</tr>
<tr>
<td class="w-25">{{ __('Syntax') }}</td><td><strong>{{ $o->syntax }}</strong></td>
<td class="w-25">@lang('Syntax')</td><td><strong>{{ $o->syntax }}</strong></td>
</tr>
<tr>
<td>{{ __('Used by Attributes') }}</td>
<td>@lang('Used by Attributes')</td>
<td>
<strong>
@if ($o->used_by_attrs->count() === 0)
{{ __('(none)') }}
@lang('(none)')
@else
@foreach ($o->used_by_attrs as $attr)
@if($loop->index)</strong> <strong>@endif

View File

@ -20,20 +20,20 @@
<tbody>
<tr>
<td class="w-25">{{ __('Description') }}</td><td colspan="3"><strong>{{ __($o->description ?: '(no description)') }}</strong></td>
<td class="w-25">@lang('Description')</td><td colspan="3"><strong>{{ $o->description ?: __('(no description)') }}</strong></td>
</tr>
<tr>
<td class="w-25"><abbr title="{{ __('Object Identifier') }}">OID</abbr></td><td colspan="3"><strong>{{ $o->oid }}</strong></td>
<td class="w-25"><abbr title="@lang('Object Identifier')">OID</abbr></td><td colspan="3"><strong>{{ $o->oid }}</strong></td>
</tr>
<tr>
<td>{{ __('Type') }}</td><td colspan="3"><strong>{{ __($o->type_name) }}</strong></td>
<td>@lang('Type')</td><td colspan="3"><strong>{{ $o->type_name }}</strong></td>
</tr>
<tr>
<td>{{ __('Inherits from') }}</td>
<td>@lang('Inherits from')</td>
<td colspan="3">
<strong>
@if ($o->sup->count() === 0)
{{ __('(none)') }}
@lang('(none)')
@else
@foreach ($o->sup as $sup)
@if($loop->index)</strong> <strong>@endif
@ -45,13 +45,13 @@
</tr>
<tr>
<td>{{ __('Parent to') }}</td>
<td>@lang('Parent to')</td>
<td colspan="3">
<strong>
@if (strtolower($o->name) === 'top')
<a class="objectclass" id="-all-">(all)</a>
@elseif (! $o->getChildObjectClasses()->count())
{{ __('(none)') }}
@lang('(none)')
@else
@foreach ($o->getChildObjectClasses() as $childoc)
@if($loop->index)</strong> <strong>@endif
@ -67,7 +67,7 @@
<table class="clearfix table table-sm table-borderless">
<thead>
<tr>
<th class="table-primary">{{ __('Required Attributes') }}</th>
<th class="table-primary">@lang('Required Attributes')</th>
</tr>
</thead>
@ -89,7 +89,7 @@
<table class="clearfix table table-sm table-borderless">
<thead>
<tr>
<th class="table-primary">{{ __('Optional Attributes') }}</th>
<th class="table-primary">@lang('Optional Attributes')</th>
</tr>
</thead>