diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php index 1ac2a90a34..c6de362dcb 100644 --- a/app/Helpers/Helper.php +++ b/app/Helpers/Helper.php @@ -64,6 +64,7 @@ class Helper 'nl' => 'nl-NL', // Dutch 'no' => 'no-NO', // Norwegian 'pl' => 'pl-PL', // Polish + 'pt' => 'pt-PT', // Portuguese 'ro' => 'ro-RO', // Romanian 'ru' => 'ru-RU', // Russian 'sk' => 'sk-SK', // Slovak @@ -1440,7 +1441,6 @@ class Helper foreach (self::$language_map as $legacy => $new) { if ($language_code == $legacy) { - Log::debug('Current language is '.$legacy.', using '.$new.' instead'); return $new; } } @@ -1451,6 +1451,7 @@ class Helper public static function mapBackToLegacyLocale($new_locale = null) { + if (strlen($new_locale) <= 4) { return $new_locale; //"new locale" apparently wasn't quite so new } @@ -1458,12 +1459,21 @@ class Helper // This does a *reverse* search against our new language map array - given the value, find the *key* for it $legacy_locale = array_search($new_locale, self::$language_map); - if($legacy_locale !== false) { + if ($legacy_locale !== false) { return $legacy_locale; } return $new_locale; // better that you have some weird locale that doesn't fit into our mappings anywhere than 'void' } + public static function determineLanguageDirection() { + return in_array(app()->getLocale(), + [ + 'ar-SA', + 'fa-IR', + 'he-IL' + ]) ? 'rtl' : 'ltr'; + } + static public function getRedirectOption($request, $id, $table, $asset_id = null) { diff --git a/app/Http/Controllers/CustomFieldsetsController.php b/app/Http/Controllers/CustomFieldsetsController.php index b68fa57767..8b9844d152 100644 --- a/app/Http/Controllers/CustomFieldsetsController.php +++ b/app/Http/Controllers/CustomFieldsetsController.php @@ -211,7 +211,7 @@ class CustomFieldsetsController extends Controller return redirect()->route('fieldsets.show', [$id])->with('success', trans('admin/custom_fields/message.field.create.assoc_success')); } - return redirect()->route('fieldsets.show', [$id])->with('error', 'No field selected.'); + return redirect()->route('fieldsets.show', [$id])->with('error', trans('admin/custom_fields/message.field.none_selected')); } /** diff --git a/app/Http/Controllers/Licenses/LicenseCheckoutController.php b/app/Http/Controllers/Licenses/LicenseCheckoutController.php index 83bcb52a7c..2fb0434f62 100644 --- a/app/Http/Controllers/Licenses/LicenseCheckoutController.php +++ b/app/Http/Controllers/Licenses/LicenseCheckoutController.php @@ -94,14 +94,14 @@ class LicenseCheckoutController extends Controller if (! $licenseSeat) { if ($seatId) { - throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'This Seat is not available for checkout.')); + throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.unavailable'))); } - throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'There are no available seats for this license.')); + throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.not_enough_seats'))); } if (! $licenseSeat->license->is($license)) { - throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'The license seat provided does not match the license.')); + throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.mismatch'))); } return $licenseSeat; diff --git a/app/Http/Transformers/ActionlogsTransformer.php b/app/Http/Transformers/ActionlogsTransformer.php index ef00c74471..8a09cc8402 100644 --- a/app/Http/Transformers/ActionlogsTransformer.php +++ b/app/Http/Transformers/ActionlogsTransformer.php @@ -256,7 +256,7 @@ class ActionlogsTransformer $clean_meta['rtd_location_id']['old'] = $clean_meta['rtd_location_id']['old'] ? "[id: ".$clean_meta['rtd_location_id']['old']."] ". $oldRtdName : ''; $clean_meta['rtd_location_id']['new'] = $clean_meta['rtd_location_id']['new'] ? "[id: ".$clean_meta['rtd_location_id']['new']."] ". $newRtdName : ''; - $clean_meta['Default Location'] = $clean_meta['rtd_location_id']; + $clean_meta[trans('admin/hardware/form.default_location')] = $clean_meta['rtd_location_id']; unset($clean_meta['rtd_location_id']); } @@ -272,7 +272,7 @@ class ActionlogsTransformer $clean_meta['location_id']['old'] = $clean_meta['location_id']['old'] ? "[id: ".$clean_meta['location_id']['old']."] ". $oldLocationName : ''; $clean_meta['location_id']['new'] = $clean_meta['location_id']['new'] ? "[id: ".$clean_meta['location_id']['new']."] ". $newLocationName : ''; - $clean_meta['Current Location'] = $clean_meta['location_id']; + $clean_meta[trans('admin/locations/message.current_location')] = $clean_meta['location_id']; unset($clean_meta['location_id']); } @@ -287,7 +287,7 @@ class ActionlogsTransformer $clean_meta['model_id']['old'] = "[id: ".$clean_meta['model_id']['old']."] ".$oldModelName; $clean_meta['model_id']['new'] = "[id: ".$clean_meta['model_id']['new']."] ".$newModelName; /** model is required at asset creation */ - $clean_meta['Model'] = $clean_meta['model_id']; + $clean_meta[trans('admin/hardware/form.model')] = $clean_meta['model_id']; unset($clean_meta['model_id']); } if(array_key_exists('company_id', $clean_meta)) { @@ -300,7 +300,7 @@ class ActionlogsTransformer $clean_meta['company_id']['old'] = $clean_meta['company_id']['old'] ? "[id: ".$clean_meta['company_id']['old']."] ". $oldCompanyName : trans('general.unassigned'); $clean_meta['company_id']['new'] = $clean_meta['company_id']['new'] ? "[id: ".$clean_meta['company_id']['new']."] ". $newCompanyName : trans('general.unassigned'); - $clean_meta['Company'] = $clean_meta['company_id']; + $clean_meta[trans('general.company')] = $clean_meta['company_id']; unset($clean_meta['company_id']); } if(array_key_exists('supplier_id', $clean_meta)) { @@ -313,7 +313,7 @@ class ActionlogsTransformer $clean_meta['supplier_id']['old'] = $clean_meta['supplier_id']['old'] ? "[id: ".$clean_meta['supplier_id']['old']."] ". $oldSupplierName : trans('general.unassigned'); $clean_meta['supplier_id']['new'] = $clean_meta['supplier_id']['new'] ? "[id: ".$clean_meta['supplier_id']['new']."] ". $newSupplierName : trans('general.unassigned'); - $clean_meta['Supplier'] = $clean_meta['supplier_id']; + $clean_meta[trans('general.supplier')] = $clean_meta['supplier_id']; unset($clean_meta['supplier_id']); } if(array_key_exists('status_id', $clean_meta)) { @@ -326,11 +326,11 @@ class ActionlogsTransformer $clean_meta['status_id']['old'] = $clean_meta['status_id']['old'] ? "[id: ".$clean_meta['status_id']['old']."] ". $oldStatusName : trans('general.unassigned'); $clean_meta['status_id']['new'] = $clean_meta['status_id']['new'] ? "[id: ".$clean_meta['status_id']['new']."] ". $newStatusName : trans('general.unassigned'); - $clean_meta['Status'] = $clean_meta['status_id']; + $clean_meta[trans('general.status_label')] = $clean_meta['status_id']; unset($clean_meta['status_id']); } if(array_key_exists('asset_eol_date', $clean_meta)) { - $clean_meta['EOL date'] = $clean_meta['asset_eol_date']; + $clean_meta[trans('admin/hardware/form.eol_date')] = $clean_meta['asset_eol_date']; unset($clean_meta['asset_eol_date']); } diff --git a/app/Http/Transformers/LicenseSeatsTransformer.php b/app/Http/Transformers/LicenseSeatsTransformer.php index 47133a9b95..7ae68e9e44 100644 --- a/app/Http/Transformers/LicenseSeatsTransformer.php +++ b/app/Http/Transformers/LicenseSeatsTransformer.php @@ -51,7 +51,7 @@ class LicenseSeatsTransformer ]; if ($seat_count != 0) { - $array['name'] = 'Seat '.$seat_count; + $array['name'] = trans('admin/licenses/general.seat_count', ['count' => $seat_count]); } $permissions_array['available_actions'] = [ diff --git a/public/js/build/app.js b/public/js/build/app.js index 50fab0d8d0..bec87e49ba 100644 Binary files a/public/js/build/app.js and b/public/js/build/app.js differ diff --git a/public/js/dist/all.js b/public/js/dist/all.js index dc66cc43f5..a8dbd199aa 100644 Binary files a/public/js/dist/all.js and b/public/js/dist/all.js differ diff --git a/public/js/select2/i18n/af.js b/public/js/select2/i18n/af.js new file mode 100644 index 0000000000..32e5ac7de8 Binary files /dev/null and b/public/js/select2/i18n/af.js differ diff --git a/public/js/select2/i18n/ar.js b/public/js/select2/i18n/ar.js new file mode 100644 index 0000000000..64e1caad34 Binary files /dev/null and b/public/js/select2/i18n/ar.js differ diff --git a/public/js/select2/i18n/az.js b/public/js/select2/i18n/az.js new file mode 100644 index 0000000000..1d52c260f2 Binary files /dev/null and b/public/js/select2/i18n/az.js differ diff --git a/public/js/select2/i18n/bg.js b/public/js/select2/i18n/bg.js new file mode 100644 index 0000000000..73b730a705 Binary files /dev/null and b/public/js/select2/i18n/bg.js differ diff --git a/public/js/select2/i18n/bn.js b/public/js/select2/i18n/bn.js new file mode 100644 index 0000000000..2d17b9d8e0 Binary files /dev/null and b/public/js/select2/i18n/bn.js differ diff --git a/public/js/select2/i18n/bs.js b/public/js/select2/i18n/bs.js new file mode 100644 index 0000000000..46b084d758 Binary files /dev/null and b/public/js/select2/i18n/bs.js differ diff --git a/public/js/select2/i18n/build.txt b/public/js/select2/i18n/build.txt new file mode 100644 index 0000000000..8f319f29c3 Binary files /dev/null and b/public/js/select2/i18n/build.txt differ diff --git a/public/js/select2/i18n/ca.js b/public/js/select2/i18n/ca.js new file mode 100644 index 0000000000..82dbbb7a21 Binary files /dev/null and b/public/js/select2/i18n/ca.js differ diff --git a/public/js/select2/i18n/cs.js b/public/js/select2/i18n/cs.js new file mode 100644 index 0000000000..7116d6c1df Binary files /dev/null and b/public/js/select2/i18n/cs.js differ diff --git a/public/js/select2/i18n/da.js b/public/js/select2/i18n/da.js new file mode 100644 index 0000000000..cda32c34aa Binary files /dev/null and b/public/js/select2/i18n/da.js differ diff --git a/public/js/select2/i18n/de.js b/public/js/select2/i18n/de.js new file mode 100644 index 0000000000..c2e61e5800 Binary files /dev/null and b/public/js/select2/i18n/de.js differ diff --git a/public/js/select2/i18n/dsb.js b/public/js/select2/i18n/dsb.js new file mode 100644 index 0000000000..02f283abad Binary files /dev/null and b/public/js/select2/i18n/dsb.js differ diff --git a/public/js/select2/i18n/el.js b/public/js/select2/i18n/el.js new file mode 100644 index 0000000000..d4922a1df5 Binary files /dev/null and b/public/js/select2/i18n/el.js differ diff --git a/public/js/select2/i18n/en.js b/public/js/select2/i18n/en.js new file mode 100644 index 0000000000..3b19285734 Binary files /dev/null and b/public/js/select2/i18n/en.js differ diff --git a/public/js/select2/i18n/es.js b/public/js/select2/i18n/es.js new file mode 100644 index 0000000000..68afd6d259 Binary files /dev/null and b/public/js/select2/i18n/es.js differ diff --git a/public/js/select2/i18n/et.js b/public/js/select2/i18n/et.js new file mode 100644 index 0000000000..070b61a26d Binary files /dev/null and b/public/js/select2/i18n/et.js differ diff --git a/public/js/select2/i18n/eu.js b/public/js/select2/i18n/eu.js new file mode 100644 index 0000000000..90d5e73f8a Binary files /dev/null and b/public/js/select2/i18n/eu.js differ diff --git a/public/js/select2/i18n/fa.js b/public/js/select2/i18n/fa.js new file mode 100644 index 0000000000..e1ffdbed0d Binary files /dev/null and b/public/js/select2/i18n/fa.js differ diff --git a/public/js/select2/i18n/fi.js b/public/js/select2/i18n/fi.js new file mode 100644 index 0000000000..ffed1247dd Binary files /dev/null and b/public/js/select2/i18n/fi.js differ diff --git a/public/js/select2/i18n/fr.js b/public/js/select2/i18n/fr.js new file mode 100644 index 0000000000..dd02f973ff Binary files /dev/null and b/public/js/select2/i18n/fr.js differ diff --git a/public/js/select2/i18n/gl.js b/public/js/select2/i18n/gl.js new file mode 100644 index 0000000000..208a005705 Binary files /dev/null and b/public/js/select2/i18n/gl.js differ diff --git a/public/js/select2/i18n/he.js b/public/js/select2/i18n/he.js new file mode 100644 index 0000000000..25a8805aa0 Binary files /dev/null and b/public/js/select2/i18n/he.js differ diff --git a/public/js/select2/i18n/hi.js b/public/js/select2/i18n/hi.js new file mode 100644 index 0000000000..f3ed798434 Binary files /dev/null and b/public/js/select2/i18n/hi.js differ diff --git a/public/js/select2/i18n/hr.js b/public/js/select2/i18n/hr.js new file mode 100644 index 0000000000..cb3268db16 Binary files /dev/null and b/public/js/select2/i18n/hr.js differ diff --git a/public/js/select2/i18n/hsb.js b/public/js/select2/i18n/hsb.js new file mode 100644 index 0000000000..3d5bf09dbd Binary files /dev/null and b/public/js/select2/i18n/hsb.js differ diff --git a/public/js/select2/i18n/hu.js b/public/js/select2/i18n/hu.js new file mode 100644 index 0000000000..4893aa2f70 Binary files /dev/null and b/public/js/select2/i18n/hu.js differ diff --git a/public/js/select2/i18n/hy.js b/public/js/select2/i18n/hy.js new file mode 100644 index 0000000000..8230007141 Binary files /dev/null and b/public/js/select2/i18n/hy.js differ diff --git a/public/js/select2/i18n/id.js b/public/js/select2/i18n/id.js new file mode 100644 index 0000000000..4a0b3bf009 Binary files /dev/null and b/public/js/select2/i18n/id.js differ diff --git a/public/js/select2/i18n/is.js b/public/js/select2/i18n/is.js new file mode 100644 index 0000000000..cca5bbecf0 Binary files /dev/null and b/public/js/select2/i18n/is.js differ diff --git a/public/js/select2/i18n/it.js b/public/js/select2/i18n/it.js new file mode 100644 index 0000000000..507c7d9f29 Binary files /dev/null and b/public/js/select2/i18n/it.js differ diff --git a/public/js/select2/i18n/ja.js b/public/js/select2/i18n/ja.js new file mode 100644 index 0000000000..451025e2c7 Binary files /dev/null and b/public/js/select2/i18n/ja.js differ diff --git a/public/js/select2/i18n/ka.js b/public/js/select2/i18n/ka.js new file mode 100644 index 0000000000..60c593b705 Binary files /dev/null and b/public/js/select2/i18n/ka.js differ diff --git a/public/js/select2/i18n/km.js b/public/js/select2/i18n/km.js new file mode 100644 index 0000000000..4dca94f414 Binary files /dev/null and b/public/js/select2/i18n/km.js differ diff --git a/public/js/select2/i18n/ko.js b/public/js/select2/i18n/ko.js new file mode 100644 index 0000000000..f2880fb004 Binary files /dev/null and b/public/js/select2/i18n/ko.js differ diff --git a/public/js/select2/i18n/lt.js b/public/js/select2/i18n/lt.js new file mode 100644 index 0000000000..f6a42155ad Binary files /dev/null and b/public/js/select2/i18n/lt.js differ diff --git a/public/js/select2/i18n/lv.js b/public/js/select2/i18n/lv.js new file mode 100644 index 0000000000..806dc5c433 Binary files /dev/null and b/public/js/select2/i18n/lv.js differ diff --git a/public/js/select2/i18n/mk.js b/public/js/select2/i18n/mk.js new file mode 100644 index 0000000000..cb7b84a263 Binary files /dev/null and b/public/js/select2/i18n/mk.js differ diff --git a/public/js/select2/i18n/ms.js b/public/js/select2/i18n/ms.js new file mode 100644 index 0000000000..6bd7eaa3e0 Binary files /dev/null and b/public/js/select2/i18n/ms.js differ diff --git a/public/js/select2/i18n/nb.js b/public/js/select2/i18n/nb.js new file mode 100644 index 0000000000..25d89c6870 Binary files /dev/null and b/public/js/select2/i18n/nb.js differ diff --git a/public/js/select2/i18n/ne.js b/public/js/select2/i18n/ne.js new file mode 100644 index 0000000000..1c39f67210 Binary files /dev/null and b/public/js/select2/i18n/ne.js differ diff --git a/public/js/select2/i18n/nl.js b/public/js/select2/i18n/nl.js new file mode 100644 index 0000000000..2b74058d23 Binary files /dev/null and b/public/js/select2/i18n/nl.js differ diff --git a/public/js/select2/i18n/pl.js b/public/js/select2/i18n/pl.js new file mode 100644 index 0000000000..4ca5748c38 Binary files /dev/null and b/public/js/select2/i18n/pl.js differ diff --git a/public/js/select2/i18n/ps.js b/public/js/select2/i18n/ps.js new file mode 100644 index 0000000000..9b008e4c14 Binary files /dev/null and b/public/js/select2/i18n/ps.js differ diff --git a/public/js/select2/i18n/pt-BR.js b/public/js/select2/i18n/pt-BR.js new file mode 100644 index 0000000000..c991e2550a Binary files /dev/null and b/public/js/select2/i18n/pt-BR.js differ diff --git a/public/js/select2/i18n/pt.js b/public/js/select2/i18n/pt.js new file mode 100644 index 0000000000..b5da1a6b49 Binary files /dev/null and b/public/js/select2/i18n/pt.js differ diff --git a/public/js/select2/i18n/ro.js b/public/js/select2/i18n/ro.js new file mode 100644 index 0000000000..1ba7b40bef Binary files /dev/null and b/public/js/select2/i18n/ro.js differ diff --git a/public/js/select2/i18n/ru.js b/public/js/select2/i18n/ru.js new file mode 100644 index 0000000000..63a7d66c3b Binary files /dev/null and b/public/js/select2/i18n/ru.js differ diff --git a/public/js/select2/i18n/sk.js b/public/js/select2/i18n/sk.js new file mode 100644 index 0000000000..5049528ad0 Binary files /dev/null and b/public/js/select2/i18n/sk.js differ diff --git a/public/js/select2/i18n/sl.js b/public/js/select2/i18n/sl.js new file mode 100644 index 0000000000..4d0b7d3e34 Binary files /dev/null and b/public/js/select2/i18n/sl.js differ diff --git a/public/js/select2/i18n/sq.js b/public/js/select2/i18n/sq.js new file mode 100644 index 0000000000..59162024ed Binary files /dev/null and b/public/js/select2/i18n/sq.js differ diff --git a/public/js/select2/i18n/sr-Cyrl.js b/public/js/select2/i18n/sr-Cyrl.js new file mode 100644 index 0000000000..ce13ce8f9a Binary files /dev/null and b/public/js/select2/i18n/sr-Cyrl.js differ diff --git a/public/js/select2/i18n/sr.js b/public/js/select2/i18n/sr.js new file mode 100644 index 0000000000..dd407a06dc Binary files /dev/null and b/public/js/select2/i18n/sr.js differ diff --git a/public/js/select2/i18n/sv.js b/public/js/select2/i18n/sv.js new file mode 100644 index 0000000000..1bc8724a79 Binary files /dev/null and b/public/js/select2/i18n/sv.js differ diff --git a/public/js/select2/i18n/th.js b/public/js/select2/i18n/th.js new file mode 100644 index 0000000000..63eab7114b Binary files /dev/null and b/public/js/select2/i18n/th.js differ diff --git a/public/js/select2/i18n/tk.js b/public/js/select2/i18n/tk.js new file mode 100644 index 0000000000..30255ff377 Binary files /dev/null and b/public/js/select2/i18n/tk.js differ diff --git a/public/js/select2/i18n/tr.js b/public/js/select2/i18n/tr.js new file mode 100644 index 0000000000..fc4c0bf051 Binary files /dev/null and b/public/js/select2/i18n/tr.js differ diff --git a/public/js/select2/i18n/uk.js b/public/js/select2/i18n/uk.js new file mode 100644 index 0000000000..63697e3884 Binary files /dev/null and b/public/js/select2/i18n/uk.js differ diff --git a/public/js/select2/i18n/vi.js b/public/js/select2/i18n/vi.js new file mode 100644 index 0000000000..24f3bc2d61 Binary files /dev/null and b/public/js/select2/i18n/vi.js differ diff --git a/public/js/select2/i18n/zh-CN.js b/public/js/select2/i18n/zh-CN.js new file mode 100644 index 0000000000..2c5649d310 Binary files /dev/null and b/public/js/select2/i18n/zh-CN.js differ diff --git a/public/js/select2/i18n/zh-TW.js b/public/js/select2/i18n/zh-TW.js new file mode 100644 index 0000000000..570a566937 Binary files /dev/null and b/public/js/select2/i18n/zh-TW.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 5cc37e83a8..02b517c2e7 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,5 +1,5 @@ { - "/js/build/app.js": "/js/build/app.js?id=d47043e03f80612693d9b9034d94e28f", + "/js/build/app.js": "/js/build/app.js?id=842cc33168d973ac10d35eb664be2a2c", "/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=44bf834f2110504a793dadec132a5898", "/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374", "/css/build/overrides.css": "/css/build/overrides.css?id=004835e70ed3ae2e2340162b7a37c752", @@ -21,6 +21,66 @@ "/css/dist/all.css": "/css/dist/all.css?id=0f9956c66f93c6417f69f0134c6ae128", "/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7", "/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7", + "/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde", + "/js/select2/i18n/ar.js": "/js/select2/i18n/ar.js?id=65aa8e36bf5da57ff4e3f22a835ab035", + "/js/select2/i18n/az.js": "/js/select2/i18n/az.js?id=270c257daf8140a0cf23ad5de6f8ed1b", + "/js/select2/i18n/bg.js": "/js/select2/i18n/bg.js?id=39b8be30d4f06779839cfaaa415d0690", + "/js/select2/i18n/bn.js": "/js/select2/i18n/bn.js?id=6d42b4dd5665d0fa28f06994eedb4899", + "/js/select2/i18n/bs.js": "/js/select2/i18n/bs.js?id=91624382358e95086b80f00fa0bd6955", + "/js/select2/i18n/build.txt": "/js/select2/i18n/build.txt?id=c9fb9399ed170dfbc76c0d3b26267c1f", + "/js/select2/i18n/ca.js": "/js/select2/i18n/ca.js?id=a166b745933a48ce3d0580a74210617d", + "/js/select2/i18n/cs.js": "/js/select2/i18n/cs.js?id=4f43e8e7d33aa1e6aadf3286c7e379e9", + "/js/select2/i18n/da.js": "/js/select2/i18n/da.js?id=766346afe4dd72c003242cfb1cbe2617", + "/js/select2/i18n/de.js": "/js/select2/i18n/de.js?id=8a1c222b0204c8faaf6d3c07c961d8aa", + "/js/select2/i18n/dsb.js": "/js/select2/i18n/dsb.js?id=56372c92d2f1bcb2b8e382981dca0546", + "/js/select2/i18n/el.js": "/js/select2/i18n/el.js?id=27097f071856a0f4e82298fe407d1eac", + "/js/select2/i18n/en.js": "/js/select2/i18n/en.js?id=cf932ba09a98fe11bde8e1f3dd5e2cfa", + "/js/select2/i18n/es.js": "/js/select2/i18n/es.js?id=66dbc2652fb1b769bf29058e707b43c8", + "/js/select2/i18n/et.js": "/js/select2/i18n/et.js?id=2b96fd98289dc3fc5e61f21e6e1a7d52", + "/js/select2/i18n/eu.js": "/js/select2/i18n/eu.js?id=adfe5c97b72c20bb0afbc0968b440e50", + "/js/select2/i18n/fa.js": "/js/select2/i18n/fa.js?id=3b5bd1961cfd0a6f96ac4cd2ea16c243", + "/js/select2/i18n/fi.js": "/js/select2/i18n/fi.js?id=614ec42aa9baaf687ab9ff44705dfd2e", + "/js/select2/i18n/fr.js": "/js/select2/i18n/fr.js?id=05e0542fcfe6df5ab074a377dc1a5a9b", + "/js/select2/i18n/gl.js": "/js/select2/i18n/gl.js?id=d99b1fedaa86d011818cfbab11dd355c", + "/js/select2/i18n/he.js": "/js/select2/i18n/he.js?id=e420ff6cd3ed77ab9271c9b3d441442c", + "/js/select2/i18n/hi.js": "/js/select2/i18n/hi.js?id=70640d41628f36284af78b22ea8b283b", + "/js/select2/i18n/hr.js": "/js/select2/i18n/hr.js?id=a2b092cc1147f07b978145d407c67fa1", + "/js/select2/i18n/hsb.js": "/js/select2/i18n/hsb.js?id=fa3b55265efe8f4182d5e65a1a506252", + "/js/select2/i18n/hu.js": "/js/select2/i18n/hu.js?id=6ec6039cb8a354e2bc6a1794f729caae", + "/js/select2/i18n/hy.js": "/js/select2/i18n/hy.js?id=c7babaeef5a625566434ea79b19d4c7e", + "/js/select2/i18n/id.js": "/js/select2/i18n/id.js?id=04debded514d3962bb74f05532e793d4", + "/js/select2/i18n/is.js": "/js/select2/i18n/is.js?id=3ddd9a6a97e93e1910210c9eefc1bca1", + "/js/select2/i18n/it.js": "/js/select2/i18n/it.js?id=be4fe8d365b5916432504d1f98e2e0af", + "/js/select2/i18n/ja.js": "/js/select2/i18n/ja.js?id=170ae885d74f1634271e1eb470cb4621", + "/js/select2/i18n/ka.js": "/js/select2/i18n/ka.js?id=2083264a54f0873f55468affa796d61e", + "/js/select2/i18n/km.js": "/js/select2/i18n/km.js?id=c23089cb06ca871153ba9bfe8458a378", + "/js/select2/i18n/ko.js": "/js/select2/i18n/ko.js?id=e7be6c20e67393698a0f05971e9720c1", + "/js/select2/i18n/lt.js": "/js/select2/i18n/lt.js?id=23c7ce903300fc118947994b9cdd16cb", + "/js/select2/i18n/lv.js": "/js/select2/i18n/lv.js?id=08e62128eac1d0e8ac32cfaf75f2ec9f", + "/js/select2/i18n/mk.js": "/js/select2/i18n/mk.js?id=dabbb90871300ce3a295969bc0260420", + "/js/select2/i18n/ms.js": "/js/select2/i18n/ms.js?id=4ba82c9a51ce975fe0e4eff5f6eece65", + "/js/select2/i18n/nb.js": "/js/select2/i18n/nb.js?id=da2fce143f2794208e36dc8520e4c36a", + "/js/select2/i18n/ne.js": "/js/select2/i18n/ne.js?id=3d79fd3f08dbfd0973cf91dd6a62bccd", + "/js/select2/i18n/nl.js": "/js/select2/i18n/nl.js?id=997868a37ed89062ad7b19c9a88f1bb0", + "/js/select2/i18n/pl.js": "/js/select2/i18n/pl.js?id=6031b4f164521f58dfec7d1e46238861", + "/js/select2/i18n/ps.js": "/js/select2/i18n/ps.js?id=38dfa47af9e086eece5a333d711abc79", + "/js/select2/i18n/pt-BR.js": "/js/select2/i18n/pt-BR.js?id=e1b294433e7fc3175842ce37b9f15014", + "/js/select2/i18n/pt.js": "/js/select2/i18n/pt.js?id=33b4a3b44d437614b83497e36c138ca9", + "/js/select2/i18n/ro.js": "/js/select2/i18n/ro.js?id=f75cb460ec3b98b4b9017e9513ca20cf", + "/js/select2/i18n/ru.js": "/js/select2/i18n/ru.js?id=934aa95f5b5f32c72c80857bb2622074", + "/js/select2/i18n/sk.js": "/js/select2/i18n/sk.js?id=33d02cef8d110f358acd1624f7f79ffe", + "/js/select2/i18n/sl.js": "/js/select2/i18n/sl.js?id=131a78bc075237a13750ead3807683d2", + "/js/select2/i18n/sq.js": "/js/select2/i18n/sq.js?id=5636b60d29c9bdd55f18a4585746b6d1", + "/js/select2/i18n/sr-Cyrl.js": "/js/select2/i18n/sr-Cyrl.js?id=f254bb8c4c7ce00d9d17e9e91945ad9b", + "/js/select2/i18n/sr.js": "/js/select2/i18n/sr.js?id=5ed85a48f483d17a7ad102832cb11ea1", + "/js/select2/i18n/sv.js": "/js/select2/i18n/sv.js?id=7a9c2f71e7779a263b2cf3520b1aa611", + "/js/select2/i18n/th.js": "/js/select2/i18n/th.js?id=f38c20b0221b68924d6c8f0773cb252d", + "/js/select2/i18n/tk.js": "/js/select2/i18n/tk.js?id=7c572a68c78fb798f11f7d8c78ebb9d6", + "/js/select2/i18n/tr.js": "/js/select2/i18n/tr.js?id=b5a0643d1545f4a3e1622e65e46ddc7c", + "/js/select2/i18n/uk.js": "/js/select2/i18n/uk.js?id=8cede7f4803c7dbd1e8261bfa1932b7c", + "/js/select2/i18n/vi.js": "/js/select2/i18n/vi.js?id=097a5b75b3e146e2d94ab8e1510be607", + "/js/select2/i18n/zh-CN.js": "/js/select2/i18n/zh-CN.js?id=2cff662ec5f972b4613566cf5988cda2", + "/js/select2/i18n/zh-TW.js": "/js/select2/i18n/zh-TW.js?id=04554a227c2ba0f3bb6ca3d2e01e5440", "/css/webfonts/fa-brands-400.ttf": "/css/webfonts/fa-brands-400.ttf?id=0141634c24336be626e05c8b77d1fa27", "/css/webfonts/fa-brands-400.woff2": "/css/webfonts/fa-brands-400.woff2?id=b3cf7a6dd618bd392f3ddcc61343a463", "/css/webfonts/fa-regular-400.ttf": "/css/webfonts/fa-regular-400.ttf?id=9cf69d99de9d83f82466a647f5cb1f94", @@ -33,7 +93,7 @@ "/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=5f79123a6750afd34dbf565faec3dda3", "/js/build/vendor.js": "/js/build/vendor.js?id=e27070bdbc5fce3bfd132b952d641fd6", "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=e5918703a22f8992c4c98f1dbbecb8f7", - "/js/dist/all.js": "/js/dist/all.js?id=a12331d6be1bd143c3d24719ba56ff3f", + "/js/dist/all.js": "/js/dist/all.js?id=01108f9d8f4f67b20669f0c25a64eb5d", "/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=0a82a6ae6bb4e58fe62d162c4fb50397", "/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=553ee68741b5a392037abcf04da80adc", "/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=76482123f6c70e866d6b971ba91de7bb", diff --git a/resources/assets/js/snipeit.js b/resources/assets/js/snipeit.js index bd03690ca7..f8b0a21efc 100755 --- a/resources/assets/js/snipeit.js +++ b/resources/assets/js/snipeit.js @@ -219,6 +219,8 @@ $(document).ready(function () { */ placeholder: '', allowClear: true, + language: $('meta[name="language"]').attr('content'), + dir: $('meta[name="language-direction"]').attr('content'), ajax: { diff --git a/resources/lang/en-US/admin/custom_fields/message.php b/resources/lang/en-US/admin/custom_fields/message.php index 43ba821821..6442359b7f 100644 --- a/resources/lang/en-US/admin/custom_fields/message.php +++ b/resources/lang/en-US/admin/custom_fields/message.php @@ -5,6 +5,7 @@ return array( 'field' => array( 'invalid' => 'That field does not exist.', 'already_added' => 'Field already added', + 'none_selected' => 'No field selected', 'create' => array( 'error' => 'Field was not created, please try again.', diff --git a/resources/lang/en-US/admin/hardware/message.php b/resources/lang/en-US/admin/hardware/message.php index 32698b1c07..d06bf4a0e0 100644 --- a/resources/lang/en-US/admin/hardware/message.php +++ b/resources/lang/en-US/admin/hardware/message.php @@ -2,8 +2,7 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. - If this status has changed, please update the asset status.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', 'does_not_exist' => 'Asset does not exist.', 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', 'no_tag' => 'No asset tag provided.', @@ -52,6 +51,7 @@ return [ ], 'import' => [ + 'import_button' => 'Process Import', 'error' => 'Some items did not import correctly.', 'errorDetail' => 'The following Items were not imported because of errors.', 'success' => 'Your file has been imported', diff --git a/resources/lang/en-US/admin/licenses/general.php b/resources/lang/en-US/admin/licenses/general.php index 79b69a3d94..b39030afd4 100644 --- a/resources/lang/en-US/admin/licenses/general.php +++ b/resources/lang/en-US/admin/licenses/general.php @@ -14,6 +14,7 @@ return array( 'info' => 'License Info', 'license_seats' => 'License Seats', 'seat' => 'Seat', + 'seat_count' => 'Seat :count', 'seats' => 'Seats', 'software_licenses' => 'Software Licenses', 'user' => 'User', @@ -23,12 +24,12 @@ return array( [ 'checkin_all' => [ 'button' => 'Checkin All Seats', - 'modal' => 'This will action checkin one seat. | This action will checkin all :checkedout_seats_count seats for this license.', + 'modal' => 'This action will checkin one seat. | This action will checkin all :checkedout_seats_count seats for this license.', 'enabled_tooltip' => 'Checkin ALL seats for this license from both users and assets', 'disabled_tooltip' => 'This is disabled because there are no seats currently checked out', 'disabled_tooltip_reassignable' => 'This is disabled because the License is not reassignable', 'success' => 'License successfully checked in! | All licenses were successfully checked in!', - 'log_msg' => 'Checked in via bulk license checkout in license GUI', + 'log_msg' => 'Checked in via bulk license checkin in license GUI', ], 'checkout_all' => [ diff --git a/resources/lang/en-US/admin/licenses/message.php b/resources/lang/en-US/admin/licenses/message.php index 27fbfe38a9..7f5981aa05 100644 --- a/resources/lang/en-US/admin/licenses/message.php +++ b/resources/lang/en-US/admin/licenses/message.php @@ -44,6 +44,8 @@ return array( 'error' => 'There was an issue checking out the license. Please try again.', 'success' => 'The license was checked out successfully', 'not_enough_seats' => 'Not enough license seats available for checkout', + 'mismatch' => 'The license seat provided does not match the license', + 'unavailable' => 'This seat is not available for checkout.', ), 'checkin' => array( diff --git a/resources/lang/en-US/admin/settings/general.php b/resources/lang/en-US/admin/settings/general.php index 06b70a3301..d571d7f55a 100644 --- a/resources/lang/en-US/admin/settings/general.php +++ b/resources/lang/en-US/admin/settings/general.php @@ -94,7 +94,7 @@ return [ 'ldap_login_sync_help' => 'This only tests that LDAP can sync correctly. If your LDAP Authentication query is not correct, users may still not be able to login. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.', 'ldap_manager' => 'LDAP Manager', 'ldap_server' => 'LDAP Server', - 'ldap_server_help' => 'This should start with ldap:// (for unencrypted or TLS) or ldaps:// (for SSL)', + 'ldap_server_help' => 'This should start with ldap:// (for unencrypted) or ldaps:// (for TLS or SSL)', 'ldap_server_cert' => 'LDAP SSL certificate validation', 'ldap_server_cert_ignore' => 'Allow invalid SSL Certificate', 'ldap_server_cert_help' => 'Select this checkbox if you are using a self signed SSL cert and would like to accept an invalid SSL certificate.', diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.php index 60f9af30e1..71bbb05a4f 100644 --- a/resources/lang/en-US/general.php +++ b/resources/lang/en-US/general.php @@ -556,5 +556,6 @@ return [ 'something_went_wrong' => 'Something went wrong with your request.', 'close' => 'Close', 'expires' => 'Expires', + 'map_fields'=> 'Map :item_type Field', ]; diff --git a/resources/lang/en-US/validation.php b/resources/lang/en-US/validation.php index f1a5b9ed0f..b33548e2ff 100644 --- a/resources/lang/en-US/validation.php +++ b/resources/lang/en-US/validation.php @@ -218,8 +218,16 @@ return [ /* |-------------------------------------------------------------------------- - | Generic Validation Messages + | Generic Validation Messages - we use these in the jquery validation where we don't have + | access to the :attribute |-------------------------------------------------------------------------- */ + 'generic' => [ + 'invalid_value_in_field' => 'Invalid value included in this field', + 'required' => 'This field is required', + 'email' => 'Please enter a valid email address', + ], + + ]; diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 63c5bca440..ee235d358e 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -1,6 +1,6 @@ getLocale(),['ar-SA','fa-IR', 'he-IL']) ? 'rtl' : 'ltr' }}"> +dir="{{ Helper::determineLanguageDirection() }}">
@@ -24,6 +24,8 @@ dir="{{ in_array(app()->getLocale(),['ar-SA','fa-IR', 'he-IL']) ? 'rtl' : 'ltr' + + + @@ -974,7 +979,7 @@ dir="{{ in_array(app()->getLocale(),['ar-SA','fa-IR', 'he-IL']) ? 'rtl' : 'ltr' }); // Reference: https://jqueryvalidation.org/validate/ - $('#create-form').validate({ + var validator = $('#create-form').validate({ ignore: 'input[type=hidden]', errorClass: 'alert-msg', errorElement: 'span', @@ -992,6 +997,12 @@ dir="{{ in_array(app()->getLocale(),['ar-SA','fa-IR', 'he-IL']) ? 'rtl' : 'ltr' onfocusout: function(element) { return $(element).valid(); }, + + }); + + $.extend($.validator.messages, { + required: "{{ trans('validation.generic.required') }}", + email: "{{ trans('validation.generic.email') }}" }); diff --git a/resources/views/licenses/edit.blade.php b/resources/views/licenses/edit.blade.php index 347826eb7d..450e4357a4 100755 --- a/resources/views/licenses/edit.blade.php +++ b/resources/views/licenses/edit.blade.php @@ -11,30 +11,30 @@ @include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'license']) - -@can('viewKeys', $item) -