Skip to content

Commit d556d1c

Browse files
authored
Merge pull request #16150 from Godmartinz/add-translations-to-settings
Adds Translation strings to General and Branding Settings
2 parents 3bb94e9 + cc0b9f4 commit d556d1c

File tree

4 files changed

+40
-14
lines changed

4 files changed

+40
-14
lines changed

resources/lang/en-US/admin/depreciations/general.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@
1313
'no_depreciations_warning' => '<strong>Warning: </strong>
1414
You do not currently have any depreciations set up.
1515
Please set up at least one depreciation to view the depreciation report.',
16+
'depreciation_method' => 'Depreciation Method',
17+
'linear_depreciation' => 'Linear (Default)',
18+
'half_1' => 'Half-year convention, always applied',
19+
'half_2' => 'Half-year convention, applied with condition',
1620
];

resources/lang/en-US/admin/settings/general.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
'confirm_purge' => 'Confirm Purge',
4343
'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.)',
4444
'custom_css' => 'Custom CSS',
45+
'custom_css_placeholder' => 'Add your custom CSS',
4546
'custom_css_help' => 'Enter any custom CSS overrides you would like to use. Do not include the &lt;style&gt;&lt;/style&gt; tags.',
4647
'custom_forgot_pass_url' => 'Custom Password Reset URL',
4748
'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.',
@@ -69,6 +70,7 @@
6970
'favicon_size' => 'Favicons should be square images, 16x16 pixels.',
7071
'footer_text' => 'Additional Footer Text ',
7172
'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.',
73+
'footer_text_placeholder' => 'Optional footer text',
7274
'general_settings' => 'General Settings',
7375
'general_settings_help' => 'Default EULA and more',
7476
'generate_backup' => 'Generate Backup',
@@ -134,6 +136,7 @@
134136
'login_user_agent' => 'User Agent',
135137
'login_help' => 'List of attempted logins',
136138
'login_note' => 'Login Note',
139+
'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.",
137140
'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>',
138141
'login_remote_user_text' => 'Remote User login options',
139142
'login_remote_user_enabled_text' => 'Enable Login with Remote User Header',
@@ -347,6 +350,8 @@
347350
'setup_migration_create_user' => 'Next: Create User',
348351
'ldap_settings_link' => 'LDAP Settings Page',
349352
'slack_test' => 'Test <i class="fab fa-slack"></i> Integration',
353+
'status_label_name' => 'Status Label Name',
354+
'super_admin_only' => 'Super Admin Only',
350355
'label2_enable' => 'New Label Engine',
351356
'label2_enable_help' => 'Switch to the new label engine. <b>Note: You will need to save this setting before setting others.</b>',
352357
'label2_template' => 'Template',
@@ -380,6 +385,7 @@
380385
'database_driver' => 'Database Driver',
381386
'bs_table_storage' => 'Table Storage',
382387
'timezone' => 'Timezone',
388+
'test_mail' => 'Test Mail',
383389
'profile_edit' => 'Edit Profile',
384390
'profile_edit_help' => 'Allow users to edit their own profiles.',
385391
'default_avatar' => 'Upload custom default avatar',
@@ -389,6 +395,15 @@
389395
'due_checkin_days' => 'Due For Checkin Warning',
390396
'due_checkin_days_help' => 'How many days before the expected checkin of an asset should it be listed in the "Due for checkin" page?',
391397
'no_groups' => 'No groups have been created yet. Visit <code>Admin Settings > Permission Groups</code> to add one.',
398+
'text' => 'Text',
399+
400+
401+
'logo_option_types' => [
402+
'text' => 'Text',
403+
'logo' => 'Logo',
404+
'logo_and_text' => 'Logo and Text',
405+
],
406+
392407

393408

394409
/* Keywords for settings overview help */

resources/views/settings/branding.blade.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,23 @@ class="form-horizontal"
6868
</div>
6969
</div>
7070

71-
71+
@php
72+
$optionTypes = trans('admin/settings/general.logo_option_types');
73+
@endphp
7274

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

@@ -272,10 +279,10 @@ class="form-horizontal"
272279
</div>
273280
<div class="col-md-9">
274281
@if (config('app.lock_passwords')===true)
275-
{!! 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']) !!}
282+
{!! 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']) !!}
276283
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
277284
@else
278-
{!! 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 ;')) !!}
285+
{!! 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 ;')) !!}
279286
@endif
280287

281288

@@ -291,10 +298,10 @@ class="form-horizontal"
291298
</div>
292299
<div class="col-md-9">
293300
@if (config('app.lock_passwords')===true)
294-
{!! 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']) !!}
301+
{!! 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']) !!}
295302
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
296303
@else
297-
{!! 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 ;')) !!}
304+
{!! 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 ;')) !!}
298305
@endif
299306

300307
<p class="help-block">{{ trans('admin/settings/general.version_footer_help') }}</p>

resources/views/settings/general.blade.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@
245245
<div class="col-md-9">
246246
@if (config('app.lock_passwords'))
247247

248-
<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>
248+
<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>
249249
{!! $errors->first('login_note', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
250250
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
251251
@else
252-
<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>
252+
<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>
253253
{!! $errors->first('login_note', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
254254
@endif
255255
<p class="help-block">{!! trans('admin/settings/general.login_note_help') !!}</p>
@@ -259,7 +259,7 @@
259259
<!-- Mail test -->
260260
<div class="form-group">
261261
<div class="col-md-3">
262-
<label for="login_note">Test Mail</label>
262+
<label for="login_note">{{trans('admin/settings/general.test_mail')}}</label>
263263
</div>
264264
<div class="col-md-9" id="mailtestrow">
265265
<a class="btn btn-default btn-sm pull-left" id="mailtest" style="margin-right: 10px;">
@@ -374,13 +374,13 @@
374374
<!-- Depreciation method -->
375375
<div class="form-group {{ $errors->has('depreciation_method') ? 'error' : '' }}">
376376
<div class="col-md-3">
377-
<label for="depreciation_method">{{ trans('Depreciation method') }}</label>
377+
<label for="depreciation_method">{{ trans('admin/depreciations/general.depreciation_method') }}</label>
378378
</div>
379379
<div class="col-md-9">
380380
{{ Form::select('depreciation_method', array(
381-
'default' => 'Linear (default)',
382-
'half_1' => 'Half-year convention, always applied',
383-
'half_2' => 'Half-year convention, applied with condition',
381+
'default' => trans('admin/depreciations/general.linear_depreciation'),
382+
'half_1' => trans('admin/depreciations/general.half_1'),
383+
'half_2' => trans('admin/depreciations/general.half_2'),
384384
), old('username_format', $setting->depreciation_method), ['class' =>'select2', 'style' => 'width: 80%']) }}
385385
</div>
386386
</div>

0 commit comments

Comments
 (0)