Skip to content

Commit

Permalink
Translations
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell committed Aug 19, 2021
1 parent e0458fd commit cda27af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
14 changes: 9 additions & 5 deletions Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function registerNavigation()
'class' => 'pages',
'href' => admin_url('thoughtco/outofstock/menus'),
'title' => lang('lang:thoughtco.outofstock::default.text_title'),
'permission' => 'Thoughtco.Outofstock.Manage',
'permission' => 'Thoughtco.Outofstock.*',
],
],
],
Expand All @@ -91,7 +91,11 @@ public function registerPermissions()
{
return [
'Thoughtco.OutOfStock.Manage' => [
'description' => 'Manage Out Of Stock Settings',
'description' => lang('lang:thoughtco.outofstock::default.text_permissions'),
'group' => 'module',
],
'Thoughtco.OutOfStock.Settings' => [
'description' => lang('lang:thoughtco.outofstock::default.text_permissions_settings'),
'group' => 'module',
],
];
Expand All @@ -102,10 +106,10 @@ public function registerSettings()
return [
'settings' => [
'icon' => 'fa fa-random',
'label' => 'Out of stock Settings',
'description' => 'Configure out of stock settings',
'label' => lang('lang:thoughtco.outofstock::default.text_settings_label'),
'description' => lang('lang:thoughtco.outofstock::default.text_settings_description'),
'model' => 'Thoughtco\OutOfStock\Models\Settings',
'permissions' => ['Thoughtco.OutOfStock.Manage'],
'permissions' => ['Thoughtco.OutOfStock.Settings'],
],
];
}
Expand Down
3 changes: 2 additions & 1 deletion database/migrations/2021_06_02_setup_stock_tables.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php

namespace Thoughtco\Outofstock\Database\Migrations;

Expand All @@ -17,6 +17,7 @@ public function up()
$table->string('type', 15);
$table->integer('type_id');
$table->integer('location_id');
$table->dateTime('timeout')->nullable();
});
}

Expand Down
4 changes: 4 additions & 0 deletions language/en/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
'label_filter_search_options' => 'Search menu options',

'text_empty' => 'No results found',
'text_permissions' => 'Use Out Of Stock views',
'text_permissions_settings' => 'Manage Out Of Stock Settings',
'text_select_location' => 'Select a location',
'text_settings_label' => 'Out of stock Settings',
'text_settings_description' => 'Configure out of stock settings',
'text_title' => 'Out of stock',
];

0 comments on commit cda27af

Please sign in to comment.