Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Translation strings to General and Branding Settings #16150

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions resources/lang/en-US/admin/depreciations/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@
'no_depreciations_warning' => '<strong>Warning: </strong>
You do not currently have any depreciations set up.
Please set up at least one depreciation to view the depreciation report.',
'depreciation_method' => 'Depreciation Method',
'linear_depreciation' => 'Linear (Default)',
'half_1' => 'Half-year convention, always applied',
'half_2' => 'Half-year convention, applied with condition',
];
15 changes: 15 additions & 0 deletions resources/lang/en-US/admin/settings/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
'confirm_purge' => 'Confirm Purge',
'confirm_purge_help' => 'Enter the text "DELETE" in the box below to purge your deleted records. This action cannot be undone and will PERMANENTLY delete all soft-deleted items and users. (You should make a backup first, just to be safe.)',
'custom_css' => 'Custom CSS',
'custom_css_placeholder' => 'Add your custom CSS',
'custom_css_help' => 'Enter any custom CSS overrides you would like to use. Do not include the &lt;style&gt;&lt;/style&gt; tags.',
'custom_forgot_pass_url' => 'Custom Password Reset URL',
'custom_forgot_pass_url_help' => 'This replaces the built-in forgotten password URL on the login screen, useful to direct people to internal or hosted LDAP password reset functionality. It will effectively disable local user forgotten password functionality.',
Expand Down Expand Up @@ -69,6 +70,7 @@
'favicon_size' => 'Favicons should be square images, 16x16 pixels.',
'footer_text' => 'Additional Footer Text ',
'footer_text_help' => 'This text will appear in the right-side footer. Links are allowed using <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>. Line breaks, headers, images, etc may result in unpredictable results.',
'footer_text_placeholder' => 'Optional footer text',
'general_settings' => 'General Settings',
'general_settings_help' => 'Default EULA and more',
'generate_backup' => 'Generate Backup',
Expand Down Expand Up @@ -132,6 +134,7 @@
'login_user_agent' => 'User Agent',
'login_help' => 'List of attempted logins',
'login_note' => 'Login Note',
'login_note_placeholder' => "If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you.",
'login_note_help' => 'Optionally include a few sentences on your login screen, for example to assist people who have found a lost or stolen device. This field accepts <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>',
'login_remote_user_text' => 'Remote User login options',
'login_remote_user_enabled_text' => 'Enable Login with Remote User Header',
Expand Down Expand Up @@ -341,6 +344,8 @@
'setup_migration_create_user' => 'Next: Create User',
'ldap_settings_link' => 'LDAP Settings Page',
'slack_test' => 'Test <i class="fab fa-slack"></i> Integration',
'status_label_name' => 'Status Label Name',
'super_admin_only' => 'Super Admin Only',
'label2_enable' => 'New Label Engine',
'label2_enable_help' => 'Switch to the new label engine. <b>Note: You will need to save this setting before setting others.</b>',
'label2_template' => 'Template',
Expand Down Expand Up @@ -374,6 +379,7 @@
'database_driver' => 'Database Driver',
'bs_table_storage' => 'Table Storage',
'timezone' => 'Timezone',
'test_mail' => 'Test Mail',
'profile_edit' => 'Edit Profile',
'profile_edit_help' => 'Allow users to edit their own profiles.',
'default_avatar' => 'Upload custom default avatar',
Expand All @@ -383,6 +389,15 @@
'due_checkin_days' => 'Due For Checkin Warning',
'due_checkin_days_help' => 'How many days before the expected checkin of an asset should it be listed in the "Due for checkin" page?',
'no_groups' => 'No groups have been created yet. Visit <code>Admin Settings > Permission Groups</code> to add one.',
'text' => 'Text',


'logo_option_types' => [
'text' => 'Text',
'logo' => 'Logo',
'logo_and_text' => 'Logo and Text',
],



/* Keywords for settings overview help */
Expand Down
31 changes: 19 additions & 12 deletions resources/views/settings/branding.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,23 @@
</div>
</div>


@php
$optionTypes = trans('admin/settings/general.logo_option_types');
@endphp

<!-- Branding -->
<div class="form-group {{ $errors->has('brand') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('brand', trans('admin/settings/general.web_brand')) }}
<label for="brand">{{ trans('admin/settings/general.web_brand') }}</label>
</div>
<div class="col-md-9">
{!! Form::select('brand', array('1'=>'Text','2'=>'Logo','3'=>'Logo + Text'), old('brand', $setting->brand), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
{!! $errors->first('brand', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<select name="brand" id="brand" class="form-control select2 minimumResultsForSearch" style="width: 150px;">
@foreach($optionTypes as $value => $label)
<option value="{{ $value }}" {{ old('brand', $setting->brand) == $value ? 'selected' : '' }}>
{{ $label }}
</option>
@endforeach
</select>
</div>
</div>

Expand Down Expand Up @@ -233,11 +240,11 @@
</div>
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
{{ Form::textarea('custom_css', old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS','disabled'=>'disabled', 'aria-label'=>'custom_css')) }}
{{ Form::textarea('custom_css', old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => trans('admin/settings/general.custom_css_placeholder'),'disabled'=>'disabled', 'aria-label'=>'custom_css')) }}
{!! $errors->first('custom_css', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{{ Form::textarea('custom_css', old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS', 'aria-label'=>'custom_css')) }}
{{ Form::textarea('custom_css', old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => trans('admin/settings/general.custom_css_placeholder'), 'aria-label'=>'custom_css')) }}
{!! $errors->first('custom_css', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@endif
<p class="help-block">{!! trans('admin/settings/general.custom_css_help') !!}</p>
Expand All @@ -252,10 +259,10 @@
</div>
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
{!! Form::select('support_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), old('support_footer', $setting->support_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
{!! Form::select('support_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('support_footer', $setting->support_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{!! Form::select('support_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), old('support_footer', $setting->support_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
{!! Form::select('support_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('support_footer', $setting->support_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
@endif


Expand All @@ -271,10 +278,10 @@
</div>
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
{!! Form::select('version_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), old('version_footer', $setting->version_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
{!! Form::select('version_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('version_footer', $setting->version_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{!! Form::select('version_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), old('version_footer', $setting->version_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
{!! Form::select('version_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('version_footer', $setting->version_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
@endif

<p class="help-block">{{ trans('admin/settings/general.version_footer_help') }}</p>
Expand All @@ -289,10 +296,10 @@
</div>
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
{{ Form::textarea('footer_text', old('footer_text', $setting->footer_text), array('class' => 'form-control', 'rows' => '4', 'placeholder' => 'Optional footer text','disabled'=>'disabled')) }}
{{ Form::textarea('footer_text', old('footer_text', $setting->footer_text), array('class' => 'form-control', 'rows' => '4', 'placeholder' => trans('admin/settings/general.footer_text_placeholder'),'disabled'=>'disabled')) }}
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{{ Form::textarea('footer_text', old('footer_text', $setting->footer_text), array('class' => 'form-control','rows' => '4','placeholder' => 'Optional footer text')) }}
{{ Form::textarea('footer_text', old('footer_text', $setting->footer_text), array('class' => 'form-control','rows' => '4','placeholder' => trans('admin/settings/general.footer_text_placeholder'))) }}
@endif
<p class="help-block">{!! trans('admin/settings/general.footer_text_help') !!}</p>
{!! $errors->first('footer_text', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
Expand Down
16 changes: 8 additions & 8 deletions resources/views/settings/general.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,11 @@
<div class="col-md-9">
@if (config('app.lock_passwords'))

<textarea class="form-control disabled" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2" aria-label="login_note" readonly>{{ old('login_note', $setting->login_note) }}</textarea>
<textarea class="form-control disabled" name="login_note" placeholder="{{trans('admin/settings/general.login_note_placeholder')}}" rows="2" aria-label="login_note" readonly>{{ old('login_note', $setting->login_note) }}</textarea>
{!! $errors->first('login_note', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
<textarea class="form-control" name="login_note" aria-label="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2">{{ old('login_note', $setting->login_note) }}</textarea>
<textarea class="form-control" name="login_note" aria-label="login_note" placeholder="{{trans('admin/settings/general.login_note_placeholder')}}" rows="2">{{ old('login_note', $setting->login_note) }}</textarea>
{!! $errors->first('login_note', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@endif
<p class="help-block">{!! trans('admin/settings/general.login_note_help') !!}</p>
Expand All @@ -255,7 +255,7 @@
<!-- Mail test -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('login_note', 'Test Mail') }}
{{ Form::label('login_note', trans('admin/settings/general.test_mail')) }}
</div>
<div class="col-md-9" id="mailtestrow">
<a class="btn btn-default btn-sm pull-left" id="mailtest" style="margin-right: 10px;">
Expand Down Expand Up @@ -360,7 +360,7 @@
</div>
<div class="col-md-9">
{{ Form::select('dash_chart_type', array(
'name' => 'Status Label Name',
'name' => trans('admin/settings/general.status_label_name'),
'type' => 'Status Label Type'), old('dash_chart_type', $setting->dash_chart_type), ['class' =>'select2', 'style' => 'width: 80%']) }}
</div>
</div>
Expand All @@ -369,13 +369,13 @@
<!-- Depreciation method -->
<div class="form-group {{ $errors->has('depreciation_method') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('depreciation_method', trans('Depreciation method')) }}
{{ Form::label('depreciation_method', trans('admin/depreciations/general.depreciation_method')) }}
</div>
<div class="col-md-9">
{{ Form::select('depreciation_method', array(
'default' => 'Linear (default)',
'half_1' => 'Half-year convention, always applied',
'half_2' => 'Half-year convention, applied with condition',
'default' => trans('admin/depreciations/general.linear_depreciation'),
'half_1' => trans('admin/depreciations/general.half_1'),
'half_2' => trans('admin/depreciations/general.half_2'),
), old('username_format', $setting->depreciation_method), ['class' =>'select2', 'style' => 'width: 80%']) }}
</div>
</div>
Expand Down
Loading