diff --git a/Modules/Core/Config/core.php b/Modules/Core/Config/core.php index cceffa89f..9e199313d 100644 --- a/Modules/Core/Config/core.php +++ b/Modules/Core/Config/core.php @@ -172,4 +172,11 @@ | useViewNamespaces.backend-theme needs to be enabled at module level */ 'enable-theme-overrides' => false, + + /* + |-------------------------------------------------------------------------- + | Check if asgard was installed + |-------------------------------------------------------------------------- + */ + 'is_installed' => env('INSTALLED', false) ]; diff --git a/Modules/Core/Foundation/AsgardCms.php b/Modules/Core/Foundation/AsgardCms.php index 8afcc3495..09d571e12 100644 --- a/Modules/Core/Foundation/AsgardCms.php +++ b/Modules/Core/Foundation/AsgardCms.php @@ -8,5 +8,5 @@ class AsgardCms * The AsgardCms version. * @var string */ - const VERSION = '3.5.2'; + const VERSION = '3.5.3'; } diff --git a/Modules/Core/Http/Middleware/Authorization.php b/Modules/Core/Http/Middleware/Authorization.php index 7808d3e7b..a48df6de3 100644 --- a/Modules/Core/Http/Middleware/Authorization.php +++ b/Modules/Core/Http/Middleware/Authorization.php @@ -49,7 +49,7 @@ public function handle($request, \Closure $next, $permission) */ private function handleUnauthorizedRequest(Request $request, $permission) { - if ($request->ajax()) { + if ($request->ajax() || $request->wantsJson()) { return response('Unauthorized.', Response::HTTP_FORBIDDEN); } if ($request->user() === null) { diff --git a/Modules/Core/Providers/CoreServiceProvider.php b/Modules/Core/Providers/CoreServiceProvider.php index d392ad7d9..1e3166188 100644 --- a/Modules/Core/Providers/CoreServiceProvider.php +++ b/Modules/Core/Providers/CoreServiceProvider.php @@ -70,7 +70,7 @@ public function boot() public function register() { $this->app->singleton('asgard.isInstalled', function () { - return true === env('INSTALLED', false); + return true === config('asgard.core.core.is_installed'); }); $this->app->singleton('asgard.onBackend', function () { return $this->onBackend(); @@ -349,7 +349,7 @@ public function bladeDirectives() */ private function onBackend() { - $url = app(Request::class)->url(); + $url = app(Request::class)->path(); if (str_contains($url, config('asgard.core.core.admin-prefix'))) { return true; } diff --git a/Modules/Core/Providers/RoutingServiceProvider.php b/Modules/Core/Providers/RoutingServiceProvider.php index dd88970a7..11494872d 100644 --- a/Modules/Core/Providers/RoutingServiceProvider.php +++ b/Modules/Core/Providers/RoutingServiceProvider.php @@ -52,14 +52,30 @@ public function map(Router $router) $this->loadApiRoutes($router); }); - $router->group([ - 'namespace' => $this->namespace, - 'prefix' => LaravelLocalization::setLocale(), - 'middleware' => ['localizationRedirect', 'web'], - ], function (Router $router) { - $this->loadBackendRoutes($router); - $this->loadFrontendRoutes($router); - }); + $prefixes = $this->getPrefixes(); + foreach ($prefixes as $prefix) { + $router->group([ + 'namespace' => $this->namespace, + 'prefix' => $prefix, + 'middleware' => ['localizationRedirect', 'web'], + ], function (Router $router) { + $this->loadBackendRoutes($router); + $this->loadFrontendRoutes($router); + }); + } + } + + /** + * Get locale prefixes + * @return array + */ + private function getPrefixes() + { + if (app('asgard.isInstalled')) { + return array_merge(json_decode(setting('core::locales')), ['']); + } + + return [LaravelLocalization::setLocale()]; } /** diff --git a/Modules/Core/changelog.yml b/Modules/Core/changelog.yml index 0f1abffe7..d5f8f7cee 100644 --- a/Modules/Core/changelog.yml +++ b/Modules/Core/changelog.yml @@ -1,5 +1,16 @@ url: https://github.com/AsgardCms/Platform versions: + "@unreleased": + added: + - New Hungarian translations + changed: + - Updating Dutch translations + - Fix Carbon locale + - Fixed how the admin url is parsed by reading the path instead of url + "3.5.3": + changed: + - Updating Polish translations + - Updating Spanish translations "3.5.2": changed: - Correctly returning the Query object from allWithBuilder method in base repository diff --git a/Modules/Media/Assets/js/components/MultipleMedia.vue b/Modules/Media/Assets/js/components/MultipleMedia.vue new file mode 100644 index 000000000..fc139d08b --- /dev/null +++ b/Modules/Media/Assets/js/components/MultipleMedia.vue @@ -0,0 +1,123 @@ + + + + diff --git a/Modules/Media/Assets/js/mixins/MultipleFileSelector.js b/Modules/Media/Assets/js/mixins/MultipleFileSelector.js new file mode 100644 index 000000000..1f8f6ff2d --- /dev/null +++ b/Modules/Media/Assets/js/mixins/MultipleFileSelector.js @@ -0,0 +1,27 @@ +export default { + methods: { + selectMultipleFile(event, model) { + if (!this[model].medias_multi) { + this[model].medias_multi = {}; + } + if (!this[model].medias_multi[event.zone]) { + this[model].medias_multi[event.zone] = { files: [] }; + } + this[model].medias_multi[event.zone].files.push(event.id); + }, + unselectFile(event, model) { + if (!this[model].medias_multi) { + this[model].medias_multi = {}; + } + if (!this[model].medias_multi[event.zone]) { + this[model].medias_multi[event.zone] = { files: [] }; + if (this.$refs['multiple-media'] !== undefined && this.$refs['multiple-media'].selectedMedia !== undefined && !_.isEmpty(this.$refs['multiple-media'].selectedMedia)) { + _.forEach(this.$refs['multiple-media'].selectedMedia, (file, key) => { + this[model].medias_multi[event.zone].files.push(file.id); + }); + } + } + this[model].medias_multi[event.zone].files = _.reject(this[model].medias_multi[event.zone].files, media => media === event.id); + }, + }, +}; diff --git a/Modules/Media/Http/Controllers/Admin/MediaGridController.php b/Modules/Media/Http/Controllers/Admin/MediaGridController.php index cb7d044cb..c20f78d55 100644 --- a/Modules/Media/Http/Controllers/Admin/MediaGridController.php +++ b/Modules/Media/Http/Controllers/Admin/MediaGridController.php @@ -2,9 +2,11 @@ namespace Modules\Media\Http\Controllers\Admin; +use Illuminate\Http\Request; use Modules\Core\Http\Controllers\Admin\AdminBaseController; use Modules\Media\Image\ThumbnailManager; use Modules\Media\Repositories\FileRepository; +use Modules\Media\Transformers\MediaTransformer; class MediaGridController extends AdminBaseController { @@ -39,13 +41,34 @@ public function index() /** * A grid view of uploaded files used for the wysiwyg editor + * @param Request $request * @return \Illuminate\View\View */ - public function ckIndex() + public function ckIndex(Request $request) { - $files = $this->file->allForGrid(); - $thumbnails = $this->thumbnailsManager->all(); + if ($request->isXmlHttpRequest()) { + $cols = $request->get('columns'); + $start = $request->get('start', 0); + $length = $request->get('length', 25); + $page = ($start/$length) + 1; + $requestData = ['per_page' => $length, 'page' => $page]; + foreach ($cols as $col) { + if ($col['searchable'] && isset($col['search']['value'])) { + $requestData[$col['data']] = $col['search']['value']; + } + } + $request->merge($requestData); + $files = $this->file->pagingForGrid($request); + + $output = [ + "draw" => $request->get('draw'), + "recordsTotal" => $files->total(), + "recordsFiltered" => $files->total(), + 'data' => MediaTransformer::collection($files) + ]; + return response()->json($output); - return view('media::admin.grid.ckeditor', compact('files', 'thumbnails')); + } + return view('media::admin.grid.ckeditor'); } } diff --git a/Modules/Media/Http/Controllers/Api/MediaController.php b/Modules/Media/Http/Controllers/Api/MediaController.php index e5b2d0b9d..2d8ea5594 100644 --- a/Modules/Media/Http/Controllers/Api/MediaController.php +++ b/Modules/Media/Http/Controllers/Api/MediaController.php @@ -93,6 +93,23 @@ public function findFirstByZoneEntity(Request $request) return new MediaTransformer($file); } + /** + * Get a media collection by zone and entity object. Require some params that were passed to request: entity (Full class name of entity), entity_id and zone + * + * @param Request $request + * @return JsonResponse|\Illuminate\Http\Resources\Json\AnonymousResourceCollection + */ + public function getByZoneEntity(Request $request) + { + $entityName = (string)$request->get('entity'); + $entityModel = new $entityName; + $entity = $entityModel::find($request->get('entity_id')); + if ($entity && in_array('Modules\Media\Support\Traits\MediaRelation', class_uses($entity)) && $entity->files()->count()) { + $files = $this->file->findMultipleFilesByZoneForEntity($request->get('zone'), $entity); + return MediaTransformer::collection($files); + } + return response()->json(['data' => null]); + } /** * Store a newly created resource in storage. * diff --git a/Modules/Media/Http/apiRoutes.php b/Modules/Media/Http/apiRoutes.php index 14762968c..0d1adda11 100644 --- a/Modules/Media/Http/apiRoutes.php +++ b/Modules/Media/Http/apiRoutes.php @@ -70,6 +70,11 @@ 'as' => 'api.media.find-first-by-zone-and-entity', ]); + $router->get('media/get-by-zone-and-entity', [ + 'uses' => 'MediaController@getByZoneEntity', + 'as' => 'api.media.get-by-zone-and-entity', + ]); + $router->get('media/{media}', [ 'uses' => 'MediaController@find', 'as' => 'api.media.media.find', diff --git a/Modules/Media/Http/backendRoutes.php b/Modules/Media/Http/backendRoutes.php index f9a022b04..d7b1364da 100644 --- a/Modules/Media/Http/backendRoutes.php +++ b/Modules/Media/Http/backendRoutes.php @@ -3,10 +3,6 @@ use Illuminate\Routing\Router; /** @var Router $router */ -$router->bind('media', function ($id) { - return app(\Modules\Media\Repositories\FileRepository::class)->find($id); -}); - $router->group(['prefix' => '/media'], function (Router $router) { $router->get('media', [ 'as' => 'admin.media.media.index', diff --git a/Modules/Media/Providers/MediaServiceProvider.php b/Modules/Media/Providers/MediaServiceProvider.php index 5bf1f03e0..39eda6e8c 100644 --- a/Modules/Media/Providers/MediaServiceProvider.php +++ b/Modules/Media/Providers/MediaServiceProvider.php @@ -72,6 +72,10 @@ public function register() $event->load('media', array_dot(trans('media::media'))); $event->load('folders', array_dot(trans('media::folders'))); }); + + app('router')->bind('media', function ($id) { + return app(FileRepository::class)->find($id); + }); } public function boot(DispatcherContract $events) diff --git a/Modules/Media/Repositories/Eloquent/EloquentFileRepository.php b/Modules/Media/Repositories/Eloquent/EloquentFileRepository.php index c90a7a10d..6f7f5be0d 100644 --- a/Modules/Media/Repositories/Eloquent/EloquentFileRepository.php +++ b/Modules/Media/Repositories/Eloquent/EloquentFileRepository.php @@ -196,6 +196,34 @@ public function allForGrid(): Collection return $this->model->where('is_folder', 0)->get(); } + /** + * @param Request $request + * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator + */ + public function pagingForGrid(Request $request) + { + + $media = $this->allWithBuilder(); + $media->where('is_folder', 0); + if ($request->get('search') !== null) { + $term = $request->get('search'); + if (is_array($term)) { + $term = $term['value']; + } + $media->where('filename', 'LIKE', "%{$term}%"); + } + + if ($request->get('order_by') !== null && $request->get('order') !== 'null') { + $order = $request->get('order') === 'ascending' ? 'asc' : 'desc'; + + $media->orderBy($request->get('order_by'), $order); + } else { + $media->orderBy('created_at', 'desc'); + } + + return $media->paginate($request->get('per_page', 10)); + } + public function move(File $file, File $destination) : File { $previousData = [ diff --git a/Modules/Media/Repositories/FileRepository.php b/Modules/Media/Repositories/FileRepository.php index e8107bca5..2e4e6d130 100644 --- a/Modules/Media/Repositories/FileRepository.php +++ b/Modules/Media/Repositories/FileRepository.php @@ -50,5 +50,7 @@ public function findForVirtualPath(string $path); public function allForGrid() : Collection; + public function pagingForGrid(Request $request); + public function move(File $file, File $destination) : File; } diff --git a/Modules/Media/Resources/views/admin/grid/ckeditor.blade.php b/Modules/Media/Resources/views/admin/grid/ckeditor.blade.php index ab860b15e..b535f97c7 100644 --- a/Modules/Media/Resources/views/admin/grid/ckeditor.blade.php +++ b/Modules/Media/Resources/views/admin/grid/ckeditor.blade.php @@ -1,21 +1,3 @@ -@include('media::admin.grid.partials.content', ['isWysiwyg' => true]) - +@include('media::admin.grid.partials.ckContent', ['isWysiwyg' => true]) diff --git a/Modules/Media/Resources/views/admin/grid/partials/ckContent.blade.php b/Modules/Media/Resources/views/admin/grid/partials/ckContent.blade.php new file mode 100644 index 000000000..1997ed307 --- /dev/null +++ b/Modules/Media/Resources/views/admin/grid/partials/ckContent.blade.php @@ -0,0 +1,161 @@ + + + + + {{ trans('media::media.file picker') }} + {!! Theme::style('vendor/bootstrap/dist/css/bootstrap.min.css') !!} + {!! Theme::style('vendor/admin-lte/dist/css/AdminLTE.css') !!} + {!! Theme::style('vendor/datatables.net-bs/css/dataTables.bootstrap.min.css') !!} + {!! Theme::style('vendor/font-awesome/css/font-awesome.min.css') !!} + + + + @include('partials.asgard-globals') + + +
+
+
+ {!! Form::token() !!} +
+
+
+
+
+
+

{{ trans('media::media.choose file') }}

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + +
Id{{ trans('core::core.table.thumbnail') }}{{ trans('media::media.table.filename') }}{{ trans('core::core.table.actions') }}
Id{{ trans('core::core.table.thumbnail') }}{{ trans('media::media.table.filename') }}{{ trans('core::core.table.actions') }}
+
+
+
+
+{!! Theme::script('vendor/jquery/jquery.min.js') !!} +{!! Theme::script('vendor/bootstrap/dist/js/bootstrap.min.js') !!} +{!! Theme::script('vendor/datatables.net/js/jquery.dataTables.min.js') !!} +{!! Theme::script('vendor/datatables.net-bs/js/dataTables.bootstrap.min.js') !!} + + + + + + + + diff --git a/Modules/Media/Transformers/MediaTransformer.php b/Modules/Media/Transformers/MediaTransformer.php index 555a43e68..34102f410 100644 --- a/Modules/Media/Transformers/MediaTransformer.php +++ b/Modules/Media/Transformers/MediaTransformer.php @@ -36,6 +36,7 @@ public function toArray($request) 'is_image' => $this->isImage(), 'is_folder' => $this->isFolder(), 'media_type' => $this->media_type, + 'mimetype' => $this->mimetype, 'fa_icon' => FileHelper::getFaIcon($this->media_type), 'created_at' => $this->created_at, 'folder_id' => $this->folder_id, diff --git a/Modules/Menu/Http/backendRoutes.php b/Modules/Menu/Http/backendRoutes.php index c0899d926..2e74a46f1 100644 --- a/Modules/Menu/Http/backendRoutes.php +++ b/Modules/Menu/Http/backendRoutes.php @@ -3,13 +3,6 @@ use Illuminate\Routing\Router; /** @var Router $router */ -$router->bind('menu', function ($id) { - return app(\Modules\Menu\Repositories\MenuRepository::class)->find($id); -}); -$router->bind('menuitem', function ($id) { - return app(\Modules\Menu\Repositories\MenuItemRepository::class)->find($id); -}); - $router->group(['prefix' => '/menu'], function (Router $router) { $router->get('menus', [ 'as' => 'admin.menu.menu.index', diff --git a/Modules/Menu/Providers/MenuServiceProvider.php b/Modules/Menu/Providers/MenuServiceProvider.php index 3783743a7..847931cb6 100644 --- a/Modules/Menu/Providers/MenuServiceProvider.php +++ b/Modules/Menu/Providers/MenuServiceProvider.php @@ -54,6 +54,13 @@ public function register() $event->load('menu', array_dot(trans('menu::menu'))); $event->load('menu-items', array_dot(trans('menu::menu-items'))); }); + + app('router')->bind('menu', function ($id) { + return app(MenuRepository::class)->find($id); + }); + app('router')->bind('menuitem', function ($id) { + return app(MenuItemRepository::class)->find($id); + }); } /** diff --git a/Modules/Menu/changelog.yml b/Modules/Menu/changelog.yml index 3910d0c0a..dc36cd7e9 100644 --- a/Modules/Menu/changelog.yml +++ b/Modules/Menu/changelog.yml @@ -1,5 +1,10 @@ url: https://github.com/AsgardCms/Platform versions: + "3.5.3": + changed: + - Description field added for extra convenience + - Use LaravelLocalization When Generating Menu Item URIs + - Updating typicms/nestablecollection package "3.4.0": changed: - Using new remember method in the CacheMenuDecorator class diff --git a/Modules/Page/Database/Migrations/2018_05_23_145242_edit_body_column_nullable.php b/Modules/Page/Database/Migrations/2018_05_23_145242_edit_body_column_nullable.php new file mode 100644 index 000000000..e7cfe5b4f --- /dev/null +++ b/Modules/Page/Database/Migrations/2018_05_23_145242_edit_body_column_nullable.php @@ -0,0 +1,32 @@ +text('body')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('page__page_translations', function (Blueprint $table) { + $table->text('body')->nullable(false)->change(); + }); + } +} diff --git a/Modules/Page/Http/Controllers/PublicController.php b/Modules/Page/Http/Controllers/PublicController.php index 5a207c2f6..d7b2cf693 100644 --- a/Modules/Page/Http/Controllers/PublicController.php +++ b/Modules/Page/Http/Controllers/PublicController.php @@ -19,6 +19,8 @@ class PublicController extends BasePublicController */ private $app; + private $disabledPage = false; + public function __construct(PageRepository $page, Application $app) { parent::__construct(); @@ -84,12 +86,12 @@ private function getTemplateForPage($page) } /** - * Throw a 404 error page if the given page is not found + * Throw a 404 error page if the given page is not found or draft * @param $page */ private function throw404IfNotFound($page) { - if (is_null($page)) { + if (null === $page || $page->status === $this->disabledPage) { $this->app->abort('404'); } } diff --git a/Modules/Page/Http/Requests/CreatePageRequest.php b/Modules/Page/Http/Requests/CreatePageRequest.php index 1e1f15087..cfbd309be 100644 --- a/Modules/Page/Http/Requests/CreatePageRequest.php +++ b/Modules/Page/Http/Requests/CreatePageRequest.php @@ -19,8 +19,7 @@ public function translationRules() { return [ 'title' => 'required', - 'slug' => 'required', - 'body' => 'required', + 'slug' => 'required', ]; } diff --git a/Modules/Page/Http/Requests/UpdatePageRequest.php b/Modules/Page/Http/Requests/UpdatePageRequest.php index 823baee73..2b4596e91 100644 --- a/Modules/Page/Http/Requests/UpdatePageRequest.php +++ b/Modules/Page/Http/Requests/UpdatePageRequest.php @@ -19,8 +19,7 @@ public function translationRules() { return [ 'title' => 'required', - 'slug' => 'required', - 'body' => 'required', + 'slug' => 'required', ]; } diff --git a/Modules/Page/Http/apiRoutes.php b/Modules/Page/Http/apiRoutes.php index c949c3cf8..e9ea120ef 100644 --- a/Modules/Page/Http/apiRoutes.php +++ b/Modules/Page/Http/apiRoutes.php @@ -3,10 +3,6 @@ use Illuminate\Routing\Router; /** @var Router $router */ -$router->bind('page', function ($id) { - return app(\Modules\Page\Repositories\PageRepository::class)->find($id); -}); - $router->group(['prefix' => '/page', 'middleware' => ['api.token', 'auth.admin']], function (Router $router) { $router->get('pages', [ 'as' => 'api.page.page.index', diff --git a/Modules/Page/Http/backendRoutes.php b/Modules/Page/Http/backendRoutes.php index 719e2d255..d997c64b0 100644 --- a/Modules/Page/Http/backendRoutes.php +++ b/Modules/Page/Http/backendRoutes.php @@ -3,10 +3,6 @@ use Illuminate\Routing\Router; /** @var Router $router */ -$router->bind('page', function ($id) { - return app(\Modules\Page\Repositories\PageRepository::class)->find($id); -}); - $router->group(['prefix' => '/page'], function (Router $router) { $router->get('pages', [ 'as' => 'admin.page.page.index', diff --git a/Modules/Page/Http/frontendRoutes.php b/Modules/Page/Http/frontendRoutes.php index 426d4ccc4..250a02143 100644 --- a/Modules/Page/Http/frontendRoutes.php +++ b/Modules/Page/Http/frontendRoutes.php @@ -3,15 +3,13 @@ use Illuminate\Routing\Router; /** @var Router $router */ -if (! App::runningInConsole()) { - $router->get('/', [ - 'uses' => 'PublicController@homepage', - 'as' => 'homepage', - 'middleware' => config('asgard.page.config.middleware'), - ]); - $router->any('{uri}', [ - 'uses' => 'PublicController@uri', - 'as' => 'page', - 'middleware' => config('asgard.page.config.middleware'), - ])->where('uri', '.*'); -} +$router->get('/', [ + 'uses' => 'PublicController@homepage', + 'as' => 'homepage', + 'middleware' => config('asgard.page.config.middleware'), +]); +$router->any('{uri}', [ + 'uses' => 'PublicController@uri', + 'as' => 'page', + 'middleware' => config('asgard.page.config.middleware'), +])->where('uri', '.*'); diff --git a/Modules/Page/Providers/PageServiceProvider.php b/Modules/Page/Providers/PageServiceProvider.php index 01d0058af..cd81b2cbc 100644 --- a/Modules/Page/Providers/PageServiceProvider.php +++ b/Modules/Page/Providers/PageServiceProvider.php @@ -45,6 +45,10 @@ public function register() $this->app['events']->listen(LoadingBackendTranslations::class, function (LoadingBackendTranslations $event) { $event->load('pages', array_dot(trans('page::pages'))); }); + + app('router')->bind('page', function ($id) { + return app(PageRepository::class)->find($id); + }); } public function boot() diff --git a/Modules/Page/changelog.yml b/Modules/Page/changelog.yml index 4bd3521af..cf0890004 100644 --- a/Modules/Page/changelog.yml +++ b/Modules/Page/changelog.yml @@ -1,6 +1,10 @@ url: https://github.com/AsgardCms/Platform versions: "@unreleased": + changed: + - Don't show draft pages + - Throw a 404 if page status is disabled + "3.5.2": changed: - Adding support for UTF-8 slug for non ASCII characters (Chinese etc.) "3.4.0": diff --git a/Modules/Setting/changelog.yml b/Modules/Setting/changelog.yml index 03d2c61bc..540bd1c57 100644 --- a/Modules/Setting/changelog.yml +++ b/Modules/Setting/changelog.yml @@ -1,5 +1,11 @@ url: https://github.com/AsgardCms/Platform versions: + "@unreleased": + added: + - New @hasSetting() and @endHasSetting directives + "3.5.3": + added: + - New setting type media-single "3.4.0": changed: - Fix settings with falsey values not getting returned diff --git a/Modules/Tag/Http/backendRoutes.php b/Modules/Tag/Http/backendRoutes.php index e9127c4ae..66e33ddc2 100644 --- a/Modules/Tag/Http/backendRoutes.php +++ b/Modules/Tag/Http/backendRoutes.php @@ -4,9 +4,6 @@ /** @var Router $router */ $router->group(['prefix' => 'tag'], function (Router $router) { - $router->bind('tag__tag', function ($id) { - return app(\Modules\Tag\Repositories\TagRepository::class)->find($id); - }); $router->get('tags', [ 'as' => 'admin.tag.tag.index', 'uses' => 'TagController@index', diff --git a/Modules/Tag/Providers/TagServiceProvider.php b/Modules/Tag/Providers/TagServiceProvider.php index 2ee9d82c1..265c35592 100644 --- a/Modules/Tag/Providers/TagServiceProvider.php +++ b/Modules/Tag/Providers/TagServiceProvider.php @@ -46,6 +46,10 @@ public function register() $this->app['events']->listen(LoadingBackendTranslations::class, function (LoadingBackendTranslations $event) { $event->load('tags', array_dot(trans('tag::tags'))); }); + + app('router')->bind('tag__tag', function ($id) { + return app(TagRepository::class)->find($id); + }); } public function boot() diff --git a/Modules/Tag/Tests/Integration/TaggableTraitTest.php b/Modules/Tag/Tests/Integration/TaggableTraitTest.php index ccee276ea..ae219772e 100644 --- a/Modules/Tag/Tests/Integration/TaggableTraitTest.php +++ b/Modules/Tag/Tests/Integration/TaggableTraitTest.php @@ -153,6 +153,17 @@ public function it_gets_pages_with_non_latin_tags() $this->assertCount(1, Page::whereTag(['한글-태그'])->get()); } + /** @test */ + public function it_creates_page_without_tags() + { + $this->createPage(['original tag']); + + $page = $this->page->find(1); + $page->setTags(null); + + $this->assertEmpty(Page::first()->tags->count()); + } + private function createPage(array $tags = []) { return $this->page->create([ diff --git a/Modules/Tag/Traits/TaggableTrait.php b/Modules/Tag/Traits/TaggableTrait.php index 2c6df68e2..08fb9275b 100644 --- a/Modules/Tag/Traits/TaggableTrait.php +++ b/Modules/Tag/Traits/TaggableTrait.php @@ -97,6 +97,10 @@ public static function allTags() */ public function setTags($tags, $type = 'slug') { + if (empty($tags)) { + $tags = []; + } + // Get the current entity tags $entityTags = $this->tags->pluck($type)->all(); diff --git a/Modules/Tag/changelog.yml b/Modules/Tag/changelog.yml index f1e61b25f..c2d71f8de 100644 --- a/Modules/Tag/changelog.yml +++ b/Modules/Tag/changelog.yml @@ -1,5 +1,8 @@ url: https://github.com/AsgardCms/Platform versions: + "3.5.3": + changed: + - Set tags only if passed any "3.4.0": changed: - Using new remember method in the CacheTagDecorator diff --git a/Modules/Translation/Http/backendRoutes.php b/Modules/Translation/Http/backendRoutes.php index 73a996a51..d535e1a02 100644 --- a/Modules/Translation/Http/backendRoutes.php +++ b/Modules/Translation/Http/backendRoutes.php @@ -4,9 +4,6 @@ /** @var Router $router */ $router->group(['prefix' =>'/translation'], function (Router $router) { - $router->bind('translations', function ($id) { - return \Modules\Translation\Entities\TranslationTranslation::find($id); - }); $router->get('translations', [ 'uses' => 'TranslationController@index', 'as' => 'admin.translation.translation.index', diff --git a/Modules/Translation/Providers/TranslationServiceProvider.php b/Modules/Translation/Providers/TranslationServiceProvider.php index 03a0e52d6..8551b8d54 100644 --- a/Modules/Translation/Providers/TranslationServiceProvider.php +++ b/Modules/Translation/Providers/TranslationServiceProvider.php @@ -12,6 +12,7 @@ use Modules\Core\Traits\CanPublishConfiguration; use Modules\Translation\Console\BuildTranslationsCacheCommand; use Modules\Translation\Entities\Translation; +use Modules\Translation\Entities\TranslationTranslation; use Modules\Translation\Events\Handlers\RegisterTranslationSidebar; use Modules\Translation\Repositories\Cache\CacheTranslationDecorator; use Modules\Translation\Repositories\Eloquent\EloquentTranslationRepository; @@ -50,6 +51,10 @@ public function register() $this->app['events']->listen(LoadingBackendTranslations::class, function (LoadingBackendTranslations $event) { $event->load('translations', array_dot(trans('translation::translations'))); }); + + app('router')->bind('translations', function ($id) { + return TranslationTranslation::find($id); + }); } public function boot() diff --git a/Modules/Translation/Resources/lang/core/en/core.php b/Modules/Translation/Resources/lang/core/en/core.php index 361623145..d15967b13 100644 --- a/Modules/Translation/Resources/lang/core/en/core.php +++ b/Modules/Translation/Resources/lang/core/en/core.php @@ -7,6 +7,8 @@ ], 'table' => [ 'created at' => 'Created at', + 'updated at' => 'Updated at', + 'deleted at' => 'Deleted at', 'actions' => 'Actions', 'thumbnail' => 'Thumbnail', ], @@ -25,6 +27,7 @@ 'czech' => 'Czech', 'swedish' => 'Svenska', 'korean' => 'Korean', + 'hungarian' => 'Magyar', ], 'button' => [ 'cancel' => 'Cancel', @@ -32,11 +35,15 @@ 'update' => 'Update', 'delete' => 'Delete', 'reset' => 'Reset', + 'see' => 'See', + 'visualize' => 'Visualize', 'update and back' => 'Update and go back', ], 'save' => 'Save', 'confirm' => 'Confirm', 'move' => 'Move', + 'widget' => 'Widget', + 'widgets' => 'Widgets', 'breadcrumb' => [ 'home' => 'Home', ], @@ -77,7 +84,7 @@ 'unauthorized' => 'Unauthorized', 'unauthorized-access' => 'You do not have the appropriate permissions to access that page.', 'unauthenticated' => 'Niet ingelogd', - 'unauthenticated-access' => 'U moet inloggen om toegang te krijgen tot deze pagina', + 'unauthenticated-access' => 'You need to be logged in to be able to view this page', 'something went wrong' => 'Whoops! Something went wrong.', 'mark as online' => 'Mark as online', 'mark as offline' => 'Mark as offline', diff --git a/Modules/Translation/Resources/lang/core/es/core.php b/Modules/Translation/Resources/lang/core/es/core.php index d41c96d7d..305592155 100644 --- a/Modules/Translation/Resources/lang/core/es/core.php +++ b/Modules/Translation/Resources/lang/core/es/core.php @@ -7,6 +7,8 @@ ], 'table' => [ 'created at' => 'Creado el', + 'updated at' => 'Actualizado el', + 'deleted at' => 'Eliminado el', 'actions' => 'Acciones', 'thumbnail' => 'Miniaturas', ], @@ -32,11 +34,15 @@ 'update' => 'Actualizar', 'delete' => 'Eliminar', 'reset' => 'Reiniciar', + 'see' => 'Ver', + 'visualize' => 'Visualize', 'update and back' => 'Actualizar y regresar', ], 'save' => 'Guardar', 'confirm' => 'Confirmar', 'move' => 'Mover', + 'widget' => 'Complemento', + 'widgets' => 'Complementos', 'breadcrumb' => [ 'home' => 'Inicio', ], @@ -68,7 +74,7 @@ 'destroy resource' => 'Eliminar :name', 'error token mismatch' => 'Tu session se ha terminado, por favor envia el formulario nuevamente.', 'error 404' => '404', - 'error 404 title' => 'Oops! Lo sentimos esta páginapágina no fue encontrada.', + 'error 404 title' => 'Oops! Lo sentimos esta página no fue encontrada.', 'error 404 description' => 'La página que estas buscando no fue encontrada.', 'error 500' => '500', 'error 500 title' => 'Oops! Algo salió mal', diff --git a/Modules/Translation/Resources/lang/core/hu/core.php b/Modules/Translation/Resources/lang/core/hu/core.php new file mode 100644 index 000000000..cdb56c45c --- /dev/null +++ b/Modules/Translation/Resources/lang/core/hu/core.php @@ -0,0 +1,92 @@ + [ + 'title' => 'Megerősítés', + 'confirmation-message' => 'Bizotsan törölni szeretnéd ezt az elemet?', + ], + 'table' => [ + 'created at' => 'Létrehozva', + 'updated at' => 'Frissítve', + 'deleted at' => 'Törölve', + 'actions' => 'Műveletek', + 'thumbnail' => 'Miniatűr', + ], + 'tab' => [ + 'english' => 'English', + 'french' => 'French', + 'dutch' => 'Dutch', + 'italian' => 'Italian', + 'greek' => 'Ελληνικά', + 'spanish' => 'Spanish', + 'polish' => 'Polish', + 'portuguese' => 'Portuguese', + 'arabic' => 'Arabic', + 'macedonian' => 'Македонски', + 'turkish' => 'Türkçe', + 'czech' => 'Czech', + 'swedish' => 'Svenska', + 'korean' => 'Korean', + 'hungarian' => 'Magyar', + ], + 'button' => [ + 'cancel' => 'Mégsem', + 'create' => 'Létrehozás', + 'update' => 'Frissítés', + 'delete' => 'Törlés', + 'reset' => 'Visszaállítás', + 'see' => 'Megnéz', + 'visualize' => 'Vizualizáció', + 'update and back' => 'Frissítés és vissza', + ], + 'save' => 'Mentés', + 'confirm' => 'Megerősít', + 'move' => 'Mozgat', + 'widget' => 'Widget', + 'widgets' => 'Widgetek', + 'breadcrumb' => [ + 'home' => 'Kezdőlap', + ], + 'title' => [ + 'translatable fields' => 'Fordítható mezők', + 'non translatable fields' => 'Nem fordítható mezők', + 'create resource' => 'Létrehozás: :name', + 'edit resource' => 'Szerkesztés: :name', + ], + 'general' => [ + 'available keyboard shortcuts' => 'Elérhető billanytűparancsok', + 'view website' => 'Weboldal megnyitsa', + 'complete your profile' => 'Profil befejezése', + 'profile' => 'Profil', + 'sign out' => 'Kijelentkezés', + ], + 'messages' => [ + 'resource created' => 'Sikeresen létrehoztad a következőt: :name.', + 'resource not found' => ':name nem található.', + 'resource updated' => 'Sikeresen frissítetted a következőt: :name.', + 'resource deleted' => 'Sikeresen törölted a következőt: :name.', + ], + 'back' => 'Vissza', + 'back to index' => 'Vissza a :name kezdőoldalára', + 'permission denied' => 'Hozzáférés megtagadva. (szükséges jogosultság: ":permission")', + 'list resource' => 'Listázás: :name', + 'create resource' => 'Létrehozás: :name', + 'edit resource' => 'Szerkesztés :name', + 'destroy resource' => 'Törlés: :name', + 'error token mismatch' => 'A munkameneted lejárt, kérlek küld el újra az űrlapot.', + 'error 404' => '404', + 'error 404 title' => 'Hoppá! Ez az oldal nem található.', + 'error 404 description' => 'A kereset oldal nem található.', + 'error 500' => '500', + 'error 500 title' => 'Hoppá! Úgytűnik valami hiba történt.', + 'error 500 description' => 'A weboldal adminisztrátora értesítve lett.', + 'delete cancelled' => 'Törlés megszakítva', + 'unauthorized' => 'Hozzáférés megtagadva', + 'unauthorized-access' => 'Nincs megfelelő jogosultságod a kért oldal megtekintéséhez.', + 'unauthenticated' => 'Bejelentkezés szükséges', + 'unauthenticated-access' => 'Kérlek jelentkezz be, hogy megtekinthesd a kért oldalt.', + 'something went wrong' => 'Hoppá! Valami elromlott.', + 'mark as online' => 'Megjelölés aktívként', + 'mark as offline' => 'Megjelölés inaktívként', + 'back to backend' => 'Vissza az admin felületre', +]; diff --git a/Modules/Translation/Resources/lang/core/hu/settings.php b/Modules/Translation/Resources/lang/core/hu/settings.php new file mode 100644 index 000000000..7059ce50a --- /dev/null +++ b/Modules/Translation/Resources/lang/core/hu/settings.php @@ -0,0 +1,10 @@ + 'Weboldal neve', + 'site-name-mini' => 'Weboldal rövid neve', + 'site-description' => 'Weboldal leírása', + 'template' => 'Publikus oldal sablonja', + 'analytics-script' => 'Analytics Script', + 'locales' => 'Weboldal nyelvei', +]; diff --git a/Modules/Translation/Resources/lang/core/hu/sidebar.php b/Modules/Translation/Resources/lang/core/hu/sidebar.php new file mode 100644 index 000000000..6453a400e --- /dev/null +++ b/Modules/Translation/Resources/lang/core/hu/sidebar.php @@ -0,0 +1,6 @@ + 'Tartalom', + 'show group' => 'Oldalsáv csoport mutatása', +]; diff --git a/Modules/Translation/Resources/lang/core/nl/core.php b/Modules/Translation/Resources/lang/core/nl/core.php index 6a51ad8da..49a0beafa 100644 --- a/Modules/Translation/Resources/lang/core/nl/core.php +++ b/Modules/Translation/Resources/lang/core/nl/core.php @@ -3,7 +3,7 @@ return [ 'modal' => [ 'title' => 'Bevestiging', - 'confirmation-message' => 'Weet je zeker dat je dit item wil verwijderen?', + 'confirmation-message' => 'Weet je zeker dat je dit item wilt verwijderen?', ], 'table' => [ 'created at' => 'Aangemaakt op', @@ -24,11 +24,11 @@ 'turkish' => 'Turks', 'czech' => 'Tsjechisch', 'swedish' => 'Zweeds', - 'korean' => 'Korean', + 'korean' => 'Koreaans', ], 'button' => [ 'cancel' => 'Annuleren', - 'create' => 'Creëeren', + 'create' => 'Aanmaken', 'update' => 'Wijzigen', 'delete' => 'Verwijderen', 'reset' => 'Herstellen', @@ -42,13 +42,13 @@ ], 'title' => [ 'translatable fields' => 'Vertaalbare velden', - 'non translatable fields' => 'Niet vertaalbare velden', - 'create resource' => 'Creëer :name', - 'edit resource' => 'Wijzig :name', + 'non translatable fields' => 'Vaste velden', + 'create resource' => ':name Aanmaken', + 'edit resource' => ':name Wijzigen', ], 'general' => [ 'available keyboard shortcuts' => 'Beschikbare sneltoetsen op deze pagina', - 'view website' => 'Bekijk website', + 'view website' => 'Bekijk de website', 'complete your profile' => 'Vul je profiel verder aan', 'profile' => 'Profiel', 'sign out' => 'Uitloggen', @@ -63,24 +63,24 @@ 'back to index' => 'Terug naar :name overzicht', 'permission denied' => 'Toegang geweigerd. (vereiste permissie: ":permission")', 'unauthorized' => 'Toegang geweigerd', - 'unauthorized-access' => 'U heefd de vereiste permissies niet om deze pagina te bekijken', + 'unauthorized-access' => 'U heeft de vereiste permissies niet om deze pagina te bekijken', 'unauthenticated' => '', - 'unauthenticated-access' => 'Vous devez vous connecter pour accéder à cette page', + 'unauthenticated-access' => 'U moet inloggen om toegang te krijgen tot deze pagina', 'something went wrong' => 'Whoops! Er iets misgegaan.', 'mark as online' => 'Markeer als online', 'mark as offline' => 'Markeer als offline', 'back to backend' => 'Naar de backend', - 'list resource' => ':name overzicht', - 'create resource' => 'Creëer :name', - 'edit resource' => 'Wijzig :name', - 'destroy resource' => 'Verwijder :name', + 'list resource' => ':name Overzicht', + 'create resource' => ':name Aanmaken', + 'edit resource' => ':name Wijzigen', + 'destroy resource' => ':name Verwijderen', 'error token mismatch' => 'Je sessie is verlopen, verstuur het formulier opnieuw.', 'error 404' => '404', - 'error 404 title' => 'Oops! De pagina is niet gevonden.', + 'error 404 title' => 'Oeps! De pagina is niet gevonden.', 'error 404 description' => 'De pagina die je hebt opgevraagd kan niet worden gevonden.', 'error 500' => '500', - 'error 500 title' => 'Oops! Er is iets fout gegaan', + 'error 500 title' => 'Oeps! Er is iets fout gegaan', 'error 500 description' => 'Een beheerder is op de hoogte gesteld.', 'delete cancelled' => 'Verwijderen geannuleerd', ]; diff --git a/Modules/Translation/Resources/lang/core/nl/settings.php b/Modules/Translation/Resources/lang/core/nl/settings.php index a492768f3..66dc6f8d7 100644 --- a/Modules/Translation/Resources/lang/core/nl/settings.php +++ b/Modules/Translation/Resources/lang/core/nl/settings.php @@ -2,9 +2,9 @@ return [ 'site-name' => 'Site naam', - 'site-name-mini' => 'Site naam afkorting', + 'site-name-mini' => 'Site afkorting', 'site-description' => 'Site beschrijving', 'template' => 'Front-end thema', 'google-analytics' => 'Google Analytics Code', - 'locales' => 'Site talen', + 'locales' => 'talen', ]; diff --git a/Modules/Translation/Resources/lang/core/nl/sidebar.php b/Modules/Translation/Resources/lang/core/nl/sidebar.php index c6aaf97fe..1384415ed 100644 --- a/Modules/Translation/Resources/lang/core/nl/sidebar.php +++ b/Modules/Translation/Resources/lang/core/nl/sidebar.php @@ -2,5 +2,5 @@ return [ 'content' => 'Inhoud', - 'show group' => 'Zijbalk hoofdgroep weergeven', + 'show group' => 'Zijbalk onderdeel weergeven', ]; diff --git a/Modules/Translation/Resources/lang/dashboard/hu/dashboard.php b/Modules/Translation/Resources/lang/dashboard/hu/dashboard.php new file mode 100644 index 000000000..4d3eefa5c --- /dev/null +++ b/Modules/Translation/Resources/lang/dashboard/hu/dashboard.php @@ -0,0 +1,21 @@ + 'Vezérlőpult', + 'edit grid' => 'Rács szerkesztése', + 'reset grid' => 'Rács visszaállítása', + 'save grid' => 'Rács mentése', + 'add widget' => 'Widget hozzáadása', + 'add widget to dashboard' => 'Widget elhelyezése a rácson', + 'reset not needed' => 'A vezérlőpulton nincs szükség visszaállításra', + 'dashboard reset' => 'A vezérlőpult visszaállítva', + 'list resource' => 'Vezérlőpult mutatása', + 'edit resource' => 'Vezérlőpult szerkesztése', + 'reset resource' => 'Vezérlőpult visszaállítása', + 'welcome-title' => 'Üdvőzlő cím', + 'welcome-description' => 'Üdvözlő leírás', + 'welcome-enabled' => 'Üdvözlő doboz engedélyezése?', + 'configure your website' => 'Weboldal beállítása', + 'add pages' => 'Oldalak hozzáadása', + 'add menus' => 'Menük hozzadása', +]; diff --git a/Modules/Translation/Resources/lang/dashboard/nl/dashboard.php b/Modules/Translation/Resources/lang/dashboard/nl/dashboard.php index 1b4263497..b3d596bdb 100644 --- a/Modules/Translation/Resources/lang/dashboard/nl/dashboard.php +++ b/Modules/Translation/Resources/lang/dashboard/nl/dashboard.php @@ -4,15 +4,15 @@ 'name' => 'Dashboard', 'edit grid' => 'Wijzig indeling', 'reset grid' => 'Herstel indeling', - 'save grid' => 'Bewaar indeling', + 'save grid' => 'Indeling opslaan', 'add widget' => 'Voeg widget toe', 'add widget to dashboard' => 'Voeg widget toe aan dashboard', - 'reset not needed' => 'De dashboard indeling moest niet hersteld worden.', - 'dashboard reset' => 'De dashboard indeling werd hersteld.', + 'reset not needed' => 'De dashboard indeling hoefde niet hersteld te worden.', + 'dashboard reset' => 'De dashboard indeling is hersteld.', 'list resource' => 'Dashboard weergeven', 'edit resource' => 'Dashboard wijzigen', 'reset resource' => 'Dashboard resetten', - 'welcome-title' => 'Welkom titel', + 'welcome-title' => 'Welkoms Titel', 'welcome-description' => 'Welkom descriptie', 'welcome-enabled' => 'Welkom box activeren?', 'configure your website' => 'Configureer uw website', diff --git a/Modules/Translation/Resources/lang/media/hu/folders.php b/Modules/Translation/Resources/lang/media/hu/folders.php new file mode 100644 index 000000000..2ed3b068b --- /dev/null +++ b/Modules/Translation/Resources/lang/media/hu/folders.php @@ -0,0 +1,11 @@ + 'Mappák listázása', + 'create resource' => 'Új mappa', + 'edit resource' => 'Mappa szerkesztése', + 'destroy resource' => 'Mappa törlése', + 'folder was created' => 'A mappát sikeresen létrehoztad', + 'folder was updated' => 'A mappát sikeresen szerkesztetted', + 'folder name' => 'Mappa neve', +]; diff --git a/Modules/Translation/Resources/lang/media/hu/media.php b/Modules/Translation/Resources/lang/media/hu/media.php new file mode 100644 index 000000000..a259f4d58 --- /dev/null +++ b/Modules/Translation/Resources/lang/media/hu/media.php @@ -0,0 +1,44 @@ + [ + 'media' => 'Média', + 'edit media' => 'Média szerkesztése', + ], + 'breadcrumb' => [ + 'media' => 'Média', + ], + 'table' => [ + 'filename' => 'Fájlnév', + 'width' => 'Szélesség', + 'height' => 'Magasság', + ], + 'form' => [ + 'alt_attribute' => 'Alternatív szöveg', + 'description' => 'Leírás', + 'keywords' => 'Kulcsszavak', + ], + 'validation' => [ + 'max_size' => 'Elérted a Média mappa maximális méretét (:size).', + ], + 'file-sizes' => [ + 'B' => 'Bytes', + 'KB' => 'Kb', + 'MB' => 'Mb', + 'GB' => 'Gb', + 'TB' => 'Tb', + ], + 'choose file' => 'Válassz ki egy fájlt', + 'insert' => 'Fájl beillesztése', + 'file picker' => 'Fájl kereső', + 'Browse' => 'Böngészés ...', + 'upload file' => 'Fájl feltöltése', + 'remove media' => 'Média eltávolítása', + 'list resource' => 'Média listázás', + 'create resource' => 'Média létrehozása', + 'edit resource' => 'Média szerkesztése', + 'destroy resource' => 'Média törlése', + 'file too large' => 'Túl nagy a fájl. Maximum méret: :size MB', + 'some files not moved' => 'Néhány fájl nem került áthelyezésre', + 'files moved successfully' => 'A fájlokat sikeresen áthelyezted', +]; diff --git a/Modules/Translation/Resources/lang/media/hu/messages.php b/Modules/Translation/Resources/lang/media/hu/messages.php new file mode 100644 index 000000000..8ba81ac02 --- /dev/null +++ b/Modules/Translation/Resources/lang/media/hu/messages.php @@ -0,0 +1,9 @@ + 'Fájl frissítve', + 'file deleted' => 'Fájl törölve', + 'folder updated' => 'Mappa frissítve', + 'folder deleted' => 'Mappa törölve', + 'selected items deleted' => 'A kiválasztott elemek törlésre kerültek.', +]; diff --git a/Modules/Translation/Resources/lang/media/nl/folders.php b/Modules/Translation/Resources/lang/media/nl/folders.php index 64ce67440..8c137af6f 100644 --- a/Modules/Translation/Resources/lang/media/nl/folders.php +++ b/Modules/Translation/Resources/lang/media/nl/folders.php @@ -1,11 +1,11 @@ 'List folder', - 'create resource' => 'Nieuw folder', - 'edit resource' => 'Edit folder', - 'destroy resource' => 'Delete folder', - 'folder was created' => 'Folder succesvol aangemaakt.', - 'folder was updated' => 'Folder succesvol gewijzigd.', - 'folder name' => 'Folder naam', + 'list resource' => 'Geef map weer', + 'create resource' => 'Nieuwe map', + 'edit resource' => 'Wijzig map', + 'destroy resource' => 'Verwijder map', + 'folder was created' => 'Map succesvol aangemaakt.', + 'folder was updated' => 'Map succesvol gewijzigd.', + 'folder name' => 'Map naam', ]; diff --git a/Modules/Translation/Resources/lang/media/nl/media.php b/Modules/Translation/Resources/lang/media/nl/media.php index 057752e03..374cc7ba0 100644 --- a/Modules/Translation/Resources/lang/media/nl/media.php +++ b/Modules/Translation/Resources/lang/media/nl/media.php @@ -19,7 +19,7 @@ 'keywords' => 'Sleutelwoorden', ], 'validation' => [ - 'max_size' => 'De maximum grootte (:size) voor dit media folder werd bereikt.', + 'max_size' => 'De maximum grootte (:size) voor deze map is bereikt.', ], 'file-sizes' => [ 'B' => 'Bytes', @@ -29,11 +29,11 @@ 'TB' => 'Tb', ], 'choose file' => 'Kies een bestand', - 'insert' => 'Voeg dit bestand in', + 'insert' => 'Voeg dit bestand toe', 'file picker' => 'Bestandskiezer', 'Browse' => 'Bladeren ...', - 'upload file' => 'File uploaded', - 'remove media' => 'File verwijderen', + 'upload file' => 'Upload bestand', + 'remove media' => 'Verwijder bestand', 'some files not moved' => 'Sommige bestanden zijn niet verplaatst', 'files moved successfully' => 'Bestanden zijn succesvol verplaatst', 'list resource' => 'Media overzicht', diff --git a/Modules/Translation/Resources/lang/media/nl/messages.php b/Modules/Translation/Resources/lang/media/nl/messages.php index 8a8f9bdaa..97a33b7fd 100644 --- a/Modules/Translation/Resources/lang/media/nl/messages.php +++ b/Modules/Translation/Resources/lang/media/nl/messages.php @@ -3,7 +3,7 @@ return [ 'file updated' => 'Bestand bijgewerkt', 'file deleted' => 'Bestand verwijderd', - 'folder updated' => 'Folder gewijzigd', - 'folder deleted' => 'Folder verwijderd', + 'folder updated' => 'Map gewijzigd', + 'folder deleted' => 'Map verwijderd', 'selected items deleted' => 'De geselecteerde item(s) zijn verwijderd', ]; diff --git a/Modules/Translation/Resources/lang/menu/hu/menu-items.php b/Modules/Translation/Resources/lang/menu/hu/menu-items.php new file mode 100644 index 000000000..5303f6519 --- /dev/null +++ b/Modules/Translation/Resources/lang/menu/hu/menu-items.php @@ -0,0 +1,24 @@ + [ + 'page' => 'Oldal', + 'module' => 'Modu1', + 'target' => 'Cél', + 'same tab' => 'Ugyan az a fül', + 'new tab' => 'Új fül', + 'icon' => 'Ikon', + 'class' => 'CSS Osztály', + 'parent menu item' => 'Szülő menü elem', + ], + 'link-type' => [ + 'link type' => 'Link típusa', + 'page' => 'Oldal', + 'internal' => 'Belső', + 'external' => 'Külső', + ], + 'list resource' => 'Menü elem listázás', + 'create resource' => 'Menü elem létrehozás', + 'edit resource' => 'Menü elem szerkesztés', + 'destroy resource' => 'Menü elem törlés', +]; diff --git a/Modules/Translation/Resources/lang/menu/hu/menu.php b/Modules/Translation/Resources/lang/menu/hu/menu.php new file mode 100644 index 000000000..1a4086a6a --- /dev/null +++ b/Modules/Translation/Resources/lang/menu/hu/menu.php @@ -0,0 +1,43 @@ + 'Menü', + 'titles' => [ + 'menu' => 'Menü kezelés', + 'create menu' => 'Menü létrehozása', + 'edit menu' => 'Menü szerkesztése', + 'create menu item' => 'Menü elem létrehozása', + 'edit menu item' => 'Menü elem szerkesztése', + ], + 'breadcrumb' => [ + 'menu' => 'Menü kezelés', + 'create menu' => 'Menü létrehozása', + 'edit menu' => 'Menü szerkesztése', + 'create menu item' => 'Menü elem létrehozása', + 'edit menu item' => 'Menü elem szerkesztése', + ], + 'button' => [ + 'create menu item' => 'Menü elem létrehozása', + 'create menu' => 'Menü létrehozása', + ], + 'table' => [ + 'name' => 'Név', + 'title' => 'Cím', + ], + 'form' => [ + 'title' => 'Cím', + 'name' => 'Név', + 'status' => 'Státusz', + 'uri' => 'URI', + 'url' => 'URL', + 'primary' => 'Főmenü (publikus oldalon használt az útvonalakhoz)', + 'description' => 'Menü leírás (Itt megadhatsz néhány extra információt)', + ], + 'navigation' => [ + 'back to index' => 'Vissza a menükezeléshez', + ], + 'list resource' => 'Menü listázás', + 'create resource' => 'Menü létrehozás', + 'edit resource' => 'Menü szerkesztés', + 'destroy resource' => 'Menü törlés', +]; diff --git a/Modules/Translation/Resources/lang/menu/hu/messages.php b/Modules/Translation/Resources/lang/menu/hu/messages.php new file mode 100644 index 000000000..6e9d98a75 --- /dev/null +++ b/Modules/Translation/Resources/lang/menu/hu/messages.php @@ -0,0 +1,14 @@ + 'A menü sikeresen létrehozva.', + 'menu not found' => 'A menü nem található.', + 'menu updated' => 'A menü sikeresen frissítve.', + 'menu deleted' => 'A menü sikeresen törölve.', + /* MenuItem management */ + 'menuitem created' => 'A menü elem sikeresen létrehozva.', + 'menuitem not found' => 'A menü elem nem található.', + 'menuitem updated' => 'A menü elem sikeresen frissítve.', + 'menuitem deleted' => 'A menü elem sikeresen törölve.', +]; diff --git a/Modules/Translation/Resources/lang/menu/hu/validation.php b/Modules/Translation/Resources/lang/menu/hu/validation.php new file mode 100644 index 000000000..e162b844c --- /dev/null +++ b/Modules/Translation/Resources/lang/menu/hu/validation.php @@ -0,0 +1,6 @@ + 'Egyszerre csak egy főmenü lehet', + 'name is required' => 'A név kitöltése kötelező', +]; diff --git a/Modules/Translation/Resources/lang/menu/nl/menu-items.php b/Modules/Translation/Resources/lang/menu/nl/menu-items.php index e391145d6..03894dde7 100644 --- a/Modules/Translation/Resources/lang/menu/nl/menu-items.php +++ b/Modules/Translation/Resources/lang/menu/nl/menu-items.php @@ -9,7 +9,7 @@ 'new tab' => 'Nieuw tabblad', 'icon' => 'Icoon', 'class' => 'CSS Klasse', - 'parent menu item' => 'Bovenliggende menu item', + 'parent menu item' => 'Bovenliggend menu item', ], 'link-type' => [ 'link type' => 'Linktype', diff --git a/Modules/Translation/Resources/lang/menu/nl/menu.php b/Modules/Translation/Resources/lang/menu/nl/menu.php index 83099f867..b320d55d2 100644 --- a/Modules/Translation/Resources/lang/menu/nl/menu.php +++ b/Modules/Translation/Resources/lang/menu/nl/menu.php @@ -4,21 +4,21 @@ 'title' => 'Menu', 'titles' => [ 'menu' => 'Menu beheer', - 'create menu' => 'Creëer een menu', - 'edit menu' => 'Wijzig een menu', - 'create menu item' => 'Creëer een menu item', - 'edit menu item' => 'Wijzig een menu item', + 'create menu' => 'Menu aanmaken', + 'edit menu' => 'menu wijzigen', + 'create menu item' => 'Menu item aanmaken', + 'edit menu item' => 'Menu item wijzigen', ], 'breadcrumb' => [ 'menu' => 'Menu beheer', - 'create menu' => 'Creëer een menu', - 'edit menu' => 'Wijzig een menu', - 'create menu item' => 'Creëer een menu item', - 'edit menu item' => 'Wijzig een menu item', + 'create menu' => 'Menu aanmaken', + 'edit menu' => 'menu wijzigen', + 'create menu item' => 'Menu item aanmaken', + 'edit menu item' => 'Menu item wijzigen', ], 'button' => [ - 'create menu item' => 'Creëer een menu item', - 'create menu' => 'Creëer een menu', + 'create menu item' => 'Menu item aanmaken', + 'create menu' => 'Menu aanmaken', ], 'table' => [ 'name' => 'Naam', @@ -27,7 +27,7 @@ 'form' => [ 'title' => 'Titel', 'name' => 'Naam', - 'status' => 'Online', + 'status' => 'Live', 'uri' => 'URI', 'url' => 'URL', 'primary' => 'Primair menu (gebruikt voor front-end routing)', @@ -37,7 +37,7 @@ 'back to index' => 'Ga terug naar het menu overzicht', ], 'list resource' => 'Menu overzicht', - 'create resource' => 'Menu creëren', + 'create resource' => 'Menu aanmaken', 'edit resource' => 'Menu wijzigen', 'destroy resource' => 'Menu verwijderen', ]; diff --git a/Modules/Translation/Resources/lang/notification/hu/messages.php b/Modules/Translation/Resources/lang/notification/hu/messages.php new file mode 100644 index 000000000..b6e51fc2e --- /dev/null +++ b/Modules/Translation/Resources/lang/notification/hu/messages.php @@ -0,0 +1,20 @@ + 'Nincsenek értesítése', + 'notifications' => 'Értesítések', + 'delete all confirmation' => 'Biztos törlöd az összes értesítést?', + 'time' => 'Időpont', + 'title' => 'Cím', + 'message' => 'Üzenet', + 'is read' => 'Olvasott', + 'mark all as read' => 'Összes megjelölése olvasottként', + 'delete all' => 'Összes törlése', + 'all notifications deleted' => 'Az összes értesítés törlésre került.', + 'all notifications marked as read' => 'Az összes értesítés megjelölve olvasottként.', + 'view all' => 'Összes megtekintése', + 'list resource' => 'Értesítések listázása', + 'destroy resource' => 'Értesítés törlése', + 'destroy all resource' => 'Összes értesítés törlése', + 'markAllAsRead resource' => 'Összes értesítés megjelölése olvasottként', +]; diff --git a/Modules/Translation/Resources/lang/notification/nl/messages.php b/Modules/Translation/Resources/lang/notification/nl/messages.php index 8d1990e97..aea5ed899 100644 --- a/Modules/Translation/Resources/lang/notification/nl/messages.php +++ b/Modules/Translation/Resources/lang/notification/nl/messages.php @@ -3,15 +3,15 @@ return [ 'no notifications' => 'Er zijn geen nieuwe berichten.', 'notifications' => 'Berichten', - 'delete all confirmation' => 'Ben je zeker dat je alle berichten wil verwijderen?', + 'delete all confirmation' => 'Ben je zeker dat je alle berichten wilt verwijderen?', 'time' => 'Tijdstip', 'title' => 'Titel', 'message' => 'Bericht', 'is read' => 'Gelezen', 'mark all as read' => 'Markeer alle berichten als gelezen', 'delete all' => 'Verwijderen alle berichten', - 'all notifications deleted' => 'Alle berichten werden succesvol verwijderd.', - 'all notifications marked as read' => 'Alle berichten werden succesvol gemarkeerd als gelezen.', + 'all notifications deleted' => 'Alle berichten zijn succesvol verwijderd.', + 'all notifications marked as read' => 'Alle berichten zijn gemarkeerd als gelezen.', 'view all' => 'Toon alle berichten', 'list resource' => 'Notificaties overzicht', 'destroy resource' => 'Notificaties verwijderen', diff --git a/Modules/Translation/Resources/lang/page/hu/messages.php b/Modules/Translation/Resources/lang/page/hu/messages.php new file mode 100644 index 000000000..a2d9b83bd --- /dev/null +++ b/Modules/Translation/Resources/lang/page/hu/messages.php @@ -0,0 +1,14 @@ + 'Az oldal sikeresen létrehozva.', + 'page not found' => 'Az oldal nem található.', + 'page updated' => 'Az oldal sikeresen frissítve.', + 'page deleted' => 'Az oldal sikeresen törölve.', + + 'template is required' => 'A salbon neve kötelező.', + 'title is required' => 'A cím kitöltése kötelező.', + 'slug is required' => 'A slug kitöltése kötelező.', + 'body is required' => 'Az oldal törzs kitöltése kötelező.', + 'only one homepage allowed' => 'Egyszerre csak egy kezdőlap lehet.', +]; diff --git a/Modules/Translation/Resources/lang/page/hu/pages.php b/Modules/Translation/Resources/lang/page/hu/pages.php new file mode 100644 index 000000000..7dfa84c76 --- /dev/null +++ b/Modules/Translation/Resources/lang/page/hu/pages.php @@ -0,0 +1,44 @@ + 'Oldalak', + 'create page' => 'Oldal létrehozása', + 'edit page' => 'Oldal szerkesztése', + 'name' => 'Név', + + 'slug' => 'Slug', + 'title' => 'Cím', + + 'meta_data' => 'Meta adatok', + 'meta_title' => 'Meta cím', + 'meta_description' => 'Meta leírás', + 'facebook_data' => 'Facebook adatok', + 'og_title' => 'Facebook cím', + 'og_description' => 'Facebook leírás', + 'og_type' => 'Facebook típus', + 'template' => 'Oldal sablon', + 'is homepage' => 'Kezdőlap?', + 'body' => 'Oldal törzs', + 'status' => 'Státusz', + 'pages were updated' => 'Az oldalak frissítve', + + 'back to index' => 'Vissza az oldalakhoz', + 'list resource' => 'Oldalak listázása', + 'create resource' => 'Oldal létrehozása', + 'edit resource' => 'Oldal szerkesztése', + 'destroy resource' => 'Oldal törlése', + + 'view-page' => 'Oldal megtekintése', + 'edit-page' => 'Oldal szerkesztése', + 'validation' => [ + 'attributes' => [ + 'title' => 'cím', + 'body' => 'oldal törzs', + ], + ], + 'facebook-types' => [ + 'website' => 'Weboldal', + 'product' => 'Temék', + 'article' => 'Cikk', + ], +]; diff --git a/Modules/Translation/Resources/lang/page/nl/pages.php b/Modules/Translation/Resources/lang/page/nl/pages.php index 466d1899c..4acc07d86 100644 --- a/Modules/Translation/Resources/lang/page/nl/pages.php +++ b/Modules/Translation/Resources/lang/page/nl/pages.php @@ -2,10 +2,10 @@ return [ 'pages' => 'Pagina\'s', - 'create page' => 'Creëer een pagina', - 'edit page' => 'Wijzig een pagina', + 'create page' => 'Pagina aanmaken', + 'edit page' => 'Pagina wijzigen', 'name' => 'Naam', - 'slug' => 'URL onderdeel', + 'slug' => 'URL slug', 'title' => 'Titel', 'meta_data' => 'Meta data', 'meta_title' => 'Meta titel', @@ -18,7 +18,7 @@ 'is homepage' => 'Startpagina?', 'body' => 'Inhoud', 'status' => 'Status', - 'pages were updated' => 'De paginas werden gewijzigd', + 'pages were updated' => 'De paginas zijn gewijzigd', 'list resource' => 'Pagina overzicht', 'create resource' => 'Pagina\'s aanmaken', diff --git a/Modules/Translation/Resources/lang/setting/hu/messages.php b/Modules/Translation/Resources/lang/setting/hu/messages.php new file mode 100644 index 000000000..2af1492f9 --- /dev/null +++ b/Modules/Translation/Resources/lang/setting/hu/messages.php @@ -0,0 +1,5 @@ + 'Beállítások elmentve!', +]; diff --git a/Modules/Translation/Resources/lang/setting/hu/settings.php b/Modules/Translation/Resources/lang/setting/hu/settings.php new file mode 100644 index 000000000..c9ef105eb --- /dev/null +++ b/Modules/Translation/Resources/lang/setting/hu/settings.php @@ -0,0 +1,16 @@ + [ + 'settings' => 'Beállítások', + 'general settings' => 'Általános beállítások', + 'module settings' => 'Modul beállítások', + 'module name settings' => ':module modul beállításai', + ], + 'breadcrumb' => [ + 'settings' => 'Beállítások', + 'module settings' => ':module modul beállításai', + ], + 'list resource' => 'Beállítások listázása', + 'edit resource' => 'Beállítások módosítása', +]; diff --git a/Modules/Translation/Resources/lang/setting/nl/messages.php b/Modules/Translation/Resources/lang/setting/nl/messages.php index bef861f78..7f6046722 100644 --- a/Modules/Translation/Resources/lang/setting/nl/messages.php +++ b/Modules/Translation/Resources/lang/setting/nl/messages.php @@ -1,5 +1,5 @@ 'Instellingen bewaard!', + 'settings saved' => 'Instellingen opgeslagen!', ]; diff --git a/Modules/Translation/Resources/lang/tag/hu/tags.php b/Modules/Translation/Resources/lang/tag/hu/tags.php new file mode 100644 index 000000000..af677e8c9 --- /dev/null +++ b/Modules/Translation/Resources/lang/tag/hu/tags.php @@ -0,0 +1,15 @@ + 'Cimkék listázása', + 'create resource' => 'Cimke létrehozása', + 'edit resource' => 'Cimke szerkesztése', + 'destroy resource' => 'Cimke törlése', + 'tags' => 'Cimkék', + 'tag' => 'Cimke', + 'create tag' => 'Cimke létrehozása', + 'edit tag' => 'Cimke szerkesztése', + 'name' => 'Név', + 'slug' => 'Slug', + 'namespace' => 'Névtér', +]; diff --git a/Modules/Translation/Resources/lang/tag/nl/tags.php b/Modules/Translation/Resources/lang/tag/nl/tags.php index 6ad89e897..4ebf76b3b 100644 --- a/Modules/Translation/Resources/lang/tag/nl/tags.php +++ b/Modules/Translation/Resources/lang/tag/nl/tags.php @@ -11,5 +11,5 @@ 'edit tag' => 'Tag wijzigen', 'name' => 'Naam', 'slug' => 'URL onderdeel', - 'namespace' => 'Naamruimte', + 'namespace' => 'Onderdeel', ]; diff --git a/Modules/Translation/Resources/lang/translation/hu/translations.php b/Modules/Translation/Resources/lang/translation/hu/translations.php new file mode 100644 index 000000000..79c27ea14 --- /dev/null +++ b/Modules/Translation/Resources/lang/translation/hu/translations.php @@ -0,0 +1,40 @@ + [ + 'translations' => 'Fordítások', + 'edit translation' => 'Fordítás szerkesztése', + ], + 'button' => [ + 'create translation' => 'Fordítás létrehozása', + ], + 'table' => [ + ], + 'form' => [ + ], + 'messages' => [ + ], + 'validation' => [ + ], + 'Clear translation cache' => 'Fordítások cache ürítése', + 'Export' => 'Export', + 'Import' => 'Import', + 'Import csv translations file' => 'Fordítások importálása CSV-ből', + 'only for developers' => 'Git kezelés szükséges!', + 'Translations exported' => 'Fordítások exportálva.', + 'Translations imported' => 'Fordítások importálva.', + 'select CSV file' => 'CSV fájl kiválasztása...', + 'csv only allowed' => 'Kérlek csak CSV fájlt tölts fel.', + 'time' => 'Időpont', + 'author' => 'Szerző', + 'history' => 'Előzmények', + 'No Revisions yet' => 'Még nincsenek módosítások', + 'event' => 'Esemény', + 'created' => 'Létrehozva', + 'edited' => 'Szerkesztve', + 'revert history' => 'Módosítás történet', + 'list resource' => 'Fordítások listázása', + 'edit resource' => 'Fordítások szerkesztése', + 'import resource' => 'Fordítások importálása', + 'export resource' => 'Fordítások exportálása', +]; diff --git a/Modules/Translation/Resources/lang/translation/nl/translations.php b/Modules/Translation/Resources/lang/translation/nl/translations.php index 79d4234ff..cff175f58 100644 --- a/Modules/Translation/Resources/lang/translation/nl/translations.php +++ b/Modules/Translation/Resources/lang/translation/nl/translations.php @@ -6,7 +6,7 @@ 'edit translation' => 'Wijzig een vertaling', ], 'button' => [ - 'create translation' => 'Creëer een vertaling', + 'create translation' => 'Vertaling aanmaken', ], 'table' => [ ], @@ -16,7 +16,7 @@ ], 'validation' => [ ], - 'Clear translation cache' => 'Maak vertalingsgeheugen vrij', + 'Clear translation cache' => 'Maak vertalingscache leeg', 'Export' => 'Exporteren', 'Import' => 'Importeren', 'Import csv translations file' => 'Importeer CSV vertalingen', diff --git a/Modules/Translation/Resources/lang/user/hu/auth.php b/Modules/Translation/Resources/lang/user/hu/auth.php new file mode 100644 index 000000000..c8830a600 --- /dev/null +++ b/Modules/Translation/Resources/lang/user/hu/auth.php @@ -0,0 +1,23 @@ + 'Bejelentkezés', + 'email' => 'Email', + 'remember me' => 'Emlékezz rám', + 'forgot password' => 'Elfelejtettem a jelszavam', + 'register' => 'Új fiók létrehozása', + 'password' => 'Jelszó', + 'password confirmation' => 'Jelszó megerősítése', + 'register me' => 'Regisztráció', + 'I already have a membership' => 'Már van fiókom', + 'reset password' => 'Jelszó visszaállítása', + 'I remembered my password' => 'Már emlékszem a jelszavamra', + 'to reset password complete this form' => 'A jelszó visszaállításhoz töltsd ki ezt az űrlapot: ', + 'welcome title' => 'Üdvözöllek', + 'please confirm email' => 'Kérlek erősítsd meg az email címed az alábbi linkre kattintva.', + 'additional confirm email message' => 'Előfordulhat, hogy fontos információkat kell küldenünk neked a szolgáltatásunkról, és fontos, hogy pontos e-mail címünk legyen.', + 'confirm email button' => 'Email cím megerősítése', + 'end greeting' => 'A csapat', + 'sign in welcome message' => 'Jelentkezz be a munkamenet megkezdéséhez', + 'reset password email was sent' => 'Jelszó emlékeztető elküldve', +]; diff --git a/Modules/Translation/Resources/lang/user/hu/button.php b/Modules/Translation/Resources/lang/user/hu/button.php new file mode 100644 index 000000000..724355e41 --- /dev/null +++ b/Modules/Translation/Resources/lang/user/hu/button.php @@ -0,0 +1,8 @@ + 'Mégsem', + 'delete' => 'Törlés', + 'create' => 'Létrehozás', + 'update' => 'Szerkesztés', +]; diff --git a/Modules/Translation/Resources/lang/user/hu/messages.php b/Modules/Translation/Resources/lang/user/hu/messages.php new file mode 100644 index 000000000..bd51a30fe --- /dev/null +++ b/Modules/Translation/Resources/lang/user/hu/messages.php @@ -0,0 +1,29 @@ + 'Sikeresen bejelentkeztél', + 'account created check email for activation' => 'A fiókod elkészült. Nézd meg az e-mail címed és aktiváld a fiókod.', + 'account activated you can now login' => 'Siekresen aktiváltad a fiókod, mostmár beléphetsz.', + 'there was an error with the activation' => 'Ez a fiók már aktiválva van. A megfelelő adatokkal be tudsz lépni.', + 'no user found' => 'Ez az email cím még nincs regisztrálva a rendszerben.', + 'check email to reset password' => 'Nézd meg az email címed a jelszavad visszaállításához.', + 'user no longer exists' => 'Ez a fiók már nem létezik.', + 'invalid reset code' => 'Érvénytelen vagy lejárt jelszó visszaállító kód.', + 'password reset' => 'A jelszó sikeresen visszaállítva. Most már beléphetsz az új jelszavaddal.', + /* Email subjects */ + 'welcome' => 'Üdvözöllek.', + 'reset password' => 'Állítsd vissza a fiókod jelszavát.', + /* User management */ + 'user created' => 'A felhasználó sikeresen létrehozva.', + 'user not found' => 'A felhasználó nem található.', + 'user updated' => 'A felhasználó sikeresen frissítve.', + 'user deleted' => 'A felhasználó sikeresen törölve.', + /* Role management */ + 'role created' => 'A szerepkör sikeresen létrehozva.', + 'role not found' => 'A szerepkör nem található.', + 'role updated' => 'A szerepkör sikeresen firssítve.', + 'role deleted' => 'A szerepkör sikeresen törölve.', + /* Profile management */ + 'profile updated' => 'Profil frissítve.', +]; diff --git a/Modules/Translation/Resources/lang/user/hu/roles.php b/Modules/Translation/Resources/lang/user/hu/roles.php new file mode 100644 index 000000000..91869b4ad --- /dev/null +++ b/Modules/Translation/Resources/lang/user/hu/roles.php @@ -0,0 +1,43 @@ + 'Új szerepkör', + 'title' => [ + 'roles' => 'Szerepkörök', + 'edit' => 'Szerepkör szerkesztése', + 'users-with-roles' => 'Felhasználók ezzel a szerepkörrel', + ], + 'breadcrumb' => [ + 'roles' => 'Szerepkörök', + 'new' => 'Új', + 'edit' => 'Szerepkör szerkesztése', + ], + 'table' => [ + 'name' => 'Név', + 'slug' => 'Slug', + ], + 'tabs' => [ + 'data' => 'Adat', + 'permissions' => 'Engedélyek', + ], + 'form' => [ + 'name' => 'Szerepkör neve', + 'slug' => 'Szerepkör slug', + ], + 'navigation' => [ + 'back to index' => 'Vissza a szerepkörökhöz', + ], + 'select all' => 'Összes kiválasztása', + 'deselect all' => 'Kiválasztások visszavonása', + 'swap' => 'Felcserél', + 'allow all' => 'Össze engedélyezése', + 'deny all' => 'Összes tiltása', + 'inherit all' => 'Összes örököltetése', + 'allow' => 'Engedélyez', + 'deny' => 'Tilt', + 'inherit' => 'Örököltetés a szerepkörből', + 'list resource' => 'Szerepkörök listázása', + 'create resource' => 'Szerepkör létrehozása', + 'edit resource' => 'Szerepkör szerkesztése', + 'destroy resource' => 'Szerepkör törlése', +]; diff --git a/Modules/Translation/Resources/lang/user/hu/users.php b/Modules/Translation/Resources/lang/user/hu/users.php new file mode 100644 index 000000000..995a7d2ee --- /dev/null +++ b/Modules/Translation/Resources/lang/user/hu/users.php @@ -0,0 +1,72 @@ + [ + 'new-user' => 'Új felhasználó', + ], + 'title' => [ + 'users' => 'Felhasználók', + 'new-user' => 'Új felhasználó', + 'edit-user' => 'Felhasználó szerkesztése', + 'edit-profile' => 'Profil szerkesztése', + ], + 'breadcrumb' => [ + 'home' => 'Kezdőlap', + 'users' => 'Felhasználók', + 'new' => 'Új', + 'edit-user' => 'Felhasználó szerkesztése', + 'edit-profile' => 'Profil szerkesztése', + ], + 'tabs' => [ + 'data' => 'Adat', + 'roles' => 'Szerepkör', + 'permissions' => 'Engedélyek', + 'new password' => 'Új jelszó', + 'or send reset password mail' => 'vagy jelszó emlékeztető küldése', + ], + 'form' => [ + 'first-name' => 'Keresztnév', + 'last-name' => 'Vezetéknév', + 'email' => 'Email', + 'status' => 'Státusz', + 'password' => 'Jelszó', + 'password-confirmation' => 'Jelszó megerősítése', + 'new password' => 'Új jelszó', + 'new password confirmation' => 'Új jelszó megerősítése', + 'is activated' => 'Aktiválva', + ], + 'table' => [ + 'created-at' => 'Létrehozva', + 'first-name' => 'Keresztnév', + 'last-name' => 'Vezetéknév', + 'email' => 'Email', + 'actions' => 'Műveletek', + ], + 'navigation' => [ + 'back to index' => 'Vissza a felhasználókhoz', + ], + 'new password setup' => 'Új jelszó beállítása', + 'or send reset password mail' => 'vagy jelszó emlékeztető küldése', + 'send reset password email' => 'Jelszó emlékeztető email küldése.', + 'my account' => 'Profilom', + 'profile' => 'Profil', + 'api-keys' => 'API kulcsok', + 'generate new api key' => 'Új API kulcs generálása', + 'delete api key confirm' => 'Az API kulcs törlésével az alkalmazások nem fogják tudni használni az API-t.', + 'your api keys' => 'API kulcsaid', + 'you have no api keys' => 'Nincsenek API kulcsaid', + 'generate one' => 'Generálok egyet.', + 'token generated' => 'API token legenerálva', + 'token deleted' => 'API token törölve', + 'list user' => 'Userek listázása', + 'create user' => 'Felhasználók létrehozása', + 'edit user' => 'Felhasználó szerkesztése', + 'destroy user' => 'Felhasználó törlése', + 'edit profile' => 'Profil szerkesztése', + 'list api key' => 'API kulcsok listázása', + 'create api key' => 'API kulcs létrehozása', + 'destroy api key' => 'API kulcs törlése', + 'invalid login or password' => 'Nem megfelelő felhasználónév vagy jelszó', + 'account not validated' => 'A profil még nincs aktiválva. Kérlek nézd meg az email címed.', + 'account is blocked' => 'A profilod blokkolva van még :delay másodpercig.', +]; diff --git a/Modules/Translation/Resources/lang/user/nl/auth.php b/Modules/Translation/Resources/lang/user/nl/auth.php index e81d62d63..92c8b19df 100644 --- a/Modules/Translation/Resources/lang/user/nl/auth.php +++ b/Modules/Translation/Resources/lang/user/nl/auth.php @@ -5,13 +5,13 @@ 'email' => 'Email', 'remember me' => 'Blijf ingelogd', 'forgot password' => 'Ik ben mijn wachtwoord vergeten', - 'register' => 'Maak een nieuwe account aan', + 'register' => 'Maak een nieuw account aan', 'password' => 'Wachtwoord', 'password confirmation' => 'Wachtwoord bevestiging', 'register me' => 'Registreren', 'I already have a membership' => 'Ik heb al een account', - 'reset password' => 'Wachtwoord herinstellen', - 'I remembered my password' => 'I weet mijn wachtwoord terug', + 'reset password' => 'Wachtwoord herstellen', + 'I remembered my password' => 'Ik weet mijn wachtwoord weer', 'to reset password complete this form' => 'Vul het volgende formulier in om je wachtwoord te herstellen: ', 'welcome title' => 'Welkom', 'please confirm email' => 'Gelieve je email-adres te bevestigen door op de volgende link te klikken.', diff --git a/Modules/Translation/Resources/lang/user/nl/button.php b/Modules/Translation/Resources/lang/user/nl/button.php index b74c21178..3150c8acb 100644 --- a/Modules/Translation/Resources/lang/user/nl/button.php +++ b/Modules/Translation/Resources/lang/user/nl/button.php @@ -3,6 +3,6 @@ return [ 'cancel' => 'Annuleren', 'delete' => 'Verwijderen', - 'create' => 'Creëeren', - 'update' => 'Bewaren', + 'create' => 'Aanmaken', + 'update' => 'Wijzigen', ]; diff --git a/Modules/Translation/Resources/lang/user/nl/messages.php b/Modules/Translation/Resources/lang/user/nl/messages.php index b9b09acaa..6a655f2a1 100644 --- a/Modules/Translation/Resources/lang/user/nl/messages.php +++ b/Modules/Translation/Resources/lang/user/nl/messages.php @@ -3,14 +3,14 @@ return [ /* Authentication */ 'successfully logged in' => 'Succesvol ingelogd', - 'account created check email for activation' => 'Account aangemaakt, je ontvangt een email om je account te activeren.', - 'account activated you can now login' => 'Account geactiveerd, je kan je nu aanmelden.', + 'account created check email for activation' => 'Account is aangemaakt, je ontvangt een email om je account te activeren.', + 'account activated you can now login' => 'Account is geactiveerd, je kan je nu aanmelden.', 'there was an error with the activation' => 'Deze gebruiker is al geactiveerd, je kan je reeds aanmelden.', 'no user found' => 'Er werd geen gebruiker met dit email-adres terug gevonden.', 'check email to reset password' => 'Je ontvangt een email om je wachtwoord opnieuw in te stellen.', 'user no longer exists' => 'Deze gebruiker bestaat niet meer.', 'invalid reset code' => 'Ongeldige of verlopen herstelcode.', - 'password reset' => 'Je wachtwoord werd hersteld, je kan je nu aanmelden met je nieuwe wachtwoord.', + 'password reset' => 'Je wachtwoord is hersteld, je kan je nu aanmelden met je nieuwe wachtwoord.', /* Email subjects */ 'welcome' => 'Welkom.', 'reset password' => 'Een nieuw wachtwoord instellen.', diff --git a/Modules/Translation/Resources/lang/user/nl/roles.php b/Modules/Translation/Resources/lang/user/nl/roles.php index 98fa7a27a..e0f22b83b 100644 --- a/Modules/Translation/Resources/lang/user/nl/roles.php +++ b/Modules/Translation/Resources/lang/user/nl/roles.php @@ -32,12 +32,12 @@ 'swap' => 'Wisselen', 'allow all' => 'Alles toestaan', 'deny all' => 'Alles weigeren', - 'inherit all' => 'Alles erven', - 'allow' => 'Allow', - 'deny' => 'Deny', - 'inherit' => 'Erf van rol', + 'inherit all' => 'Alles overnemen', + 'allow' => 'Toestaan', + 'deny' => 'Weigeren', + 'inherit' => 'Overnemen van rol', 'list resource' => 'Rollen overzicht', - 'create resource' => 'Rollen creëren', + 'create resource' => 'Rollen aanmaken', 'edit resource' => 'Rollen wijzigen', 'destroy resource' => 'Rollen verwijderen', ]; diff --git a/Modules/Translation/Resources/lang/user/nl/users.php b/Modules/Translation/Resources/lang/user/nl/users.php index 2fb584cb6..0e3427475 100644 --- a/Modules/Translation/Resources/lang/user/nl/users.php +++ b/Modules/Translation/Resources/lang/user/nl/users.php @@ -21,7 +21,7 @@ 'data' => 'Data', 'roles' => 'Rollen', 'permissions' => 'Permissies', - 'new password' => 'Nieuwe wachtwoord', + 'new password' => 'Nieuw wachtwoord', 'or send reset password mail' => 'of, stuur wachtwoord herstel email', ], 'form' => [ @@ -30,9 +30,9 @@ 'email' => 'Email', 'status' => 'Staat', 'password' => 'Wachtwoord', - 'password-confirmation' => 'Wachtwoord bevestiging', + 'password-confirmation' => 'Bevestig Wachtwoord', 'new password' => 'Nieuw wachtwoord', - 'new password confirmation' => 'Nieuw wachtwoord bevestiging', + 'new password confirmation' => 'Bevestig Nieuw Wachtwoord', 'is activated' => 'Geactiveerd', ], 'table' => [ diff --git a/Modules/Translation/Resources/lang/workshop/hu/modules.php b/Modules/Translation/Resources/lang/workshop/hu/modules.php new file mode 100644 index 000000000..1c0cee302 --- /dev/null +++ b/Modules/Translation/Resources/lang/workshop/hu/modules.php @@ -0,0 +1,39 @@ + 'Modul kezelés', + 'breadcrumb' => [ + 'modules' => 'Modulok', + ], + 'tab' => [ + 'module list' => 'Modul lista', + ], + 'button' => [ + 'save module configuration' => 'Modul beállítások elmentése', + ], + 'table' => [ + 'vendor' => 'Szerző', + 'name' => 'Név', + 'enabled' => 'Engedélyezve', + 'version' => 'Verzió', + ], + 'enabled' => 'Engedélyezve', + 'enable' => 'Engedélyez', + 'disabled' => 'Letiltva', + 'disable' => 'Letiltás', + 'viewing module' => 'Modul megtekintése', + 'module' => 'Modul', + 'publish assets' => 'Eszköztárak publikálása', + 'module enabled' => 'Modul engedélyezve.', + 'module disabled' => 'Modul letiltva.', + 'module cannot be disabled' => 'Ez egy alap modul, nem tudod letiltani.', + 'changelog' => 'Changelog', + 'added' => 'Hozzáadva', + 'changed' => 'Módosítva', + 'removed' => 'Eltávolítva', + 'list resource' => 'Modulok listázása', + 'show resource' => 'Modul megtekintése', + 'update resource' => 'Modul szerkesztése', + 'disable resource' => 'Modul letiltása', + 'enable resource' => 'Modul engedélyezése', +]; diff --git a/Modules/Translation/Resources/lang/workshop/hu/themes.php b/Modules/Translation/Resources/lang/workshop/hu/themes.php new file mode 100644 index 000000000..ec95b75ef --- /dev/null +++ b/Modules/Translation/Resources/lang/workshop/hu/themes.php @@ -0,0 +1,14 @@ + 'Témák kezelése', + 'breadcrumb' => [ + 'themes' => 'Témák', + ], + 'theme' => 'Téma', + 'viewing theme' => 'Jelenleg nézett téma: :theme', + 'type' => 'Típus', + 'list resource' => 'Témák listázása', + 'show resource' => 'Téma megtekintése', + 'publish assets' => 'Eszköztárak publikálása', +]; diff --git a/Modules/Translation/Resources/lang/workshop/hu/workbench.php b/Modules/Translation/Resources/lang/workshop/hu/workbench.php new file mode 100644 index 000000000..9d784180d --- /dev/null +++ b/Modules/Translation/Resources/lang/workshop/hu/workbench.php @@ -0,0 +1,25 @@ + 'Modul segítők', + 'subtitle' => [ + 'generate new module' => 'Új modul generálása', + 'install new module by vendor name' => 'Modul telepítése szerző/név alapján', + ], + 'tab' => [ + 'generators' => 'Generátorok', + 'migrations' => 'Migrációk', + 'seeds' => 'Seeds', + ], + 'form' => [ + 'module name' => 'Modul neve', + 'vendor name of the module' => 'Szerzője/neve a modulnak', + 'install as subtree' => 'Telepítés almodulként?', + ], + 'button' => [ + 'generate new module' => 'Új modul generálása', + 'install new module' => 'Új modul telepítése', + 'migrate' => 'Migrálás', + 'seed' => 'Seed', + ], +]; diff --git a/Modules/Translation/Resources/lang/workshop/hu/workshop.php b/Modules/Translation/Resources/lang/workshop/hu/workshop.php new file mode 100644 index 000000000..0570eb81c --- /dev/null +++ b/Modules/Translation/Resources/lang/workshop/hu/workshop.php @@ -0,0 +1,8 @@ + 'Műhely', + 'modules' => 'Modulok', + 'themes' => 'Témák', + 'show sidebar group' => 'Oldalsáv csoport mutatása', +]; diff --git a/Modules/Translation/Resources/lang/workshop/nl/workbench.php b/Modules/Translation/Resources/lang/workshop/nl/workbench.php index ca614a203..86ee0f589 100644 --- a/Modules/Translation/Resources/lang/workshop/nl/workbench.php +++ b/Modules/Translation/Resources/lang/workshop/nl/workbench.php @@ -3,8 +3,8 @@ return [ 'title' => 'Module gereedschap', 'subtitle' => [ - 'generate new module' => 'Creëer een nieuwe module', - 'install new module by vendor name' => 'Installeer een nieuwe module via auteur/naam', + 'generate new module' => 'Maak een nieuwe module', + 'install new module by vendor name' => 'Installeer een nieuwe module met auteur/naam', ], 'tab' => [ 'generators' => 'Generatoren', @@ -17,7 +17,7 @@ 'install as subtree' => 'Installeren als onderdeel?', ], 'button' => [ - 'generate new module' => 'Creëer een nieuwe module', + 'generate new module' => 'Maak een nieuwe module', 'install new module' => 'Installeer nieuwe module', 'migrate' => 'Migreer', 'seed' => 'Populeer', diff --git a/Modules/User/Assets/js/components/UserForm.vue b/Modules/User/Assets/js/components/UserForm.vue index f531aa070..e7d4e7515 100644 --- a/Modules/User/Assets/js/components/UserForm.vue +++ b/Modules/User/Assets/js/components/UserForm.vue @@ -51,7 +51,7 @@ - Activated + Activated
@@ -161,6 +161,7 @@ permissions: {}, roles: {}, is_new: false, + is_activated: false, }, roles: {}, form: new Form(), diff --git a/Modules/User/Http/apiRoutes.php b/Modules/User/Http/apiRoutes.php index 6ba9024fb..3df344c18 100644 --- a/Modules/User/Http/apiRoutes.php +++ b/Modules/User/Http/apiRoutes.php @@ -5,9 +5,6 @@ /** @var Router $router */ $router->group(['prefix' => '/user', 'middleware' => ['api.token', 'auth.admin']], function (Router $router) { $router->group(['prefix' => 'roles'], function (Router $router) { - $router->bind('role', function ($id) { - return app(\Modules\User\Repositories\RoleRepository::class)->find($id); - }); $router->get('/', [ 'as' => 'api.user.role.index', 'uses' => 'RoleController@index', @@ -46,9 +43,6 @@ }); $router->group(['prefix' => 'users'], function (Router $router) { - $router->bind('user', function ($id) { - return app(\Modules\User\Repositories\UserRepository::class)->find($id); - }); $router->get('/', [ 'as' => 'api.user.user.index', 'uses' => 'UserController@index', @@ -96,10 +90,6 @@ 'uses' => 'ProfileController@update', ]); - $router->bind('userTokenId', function ($id) { - return app(\Modules\User\Repositories\UserTokenRepository::class)->find($id); - }); - $router->get('api-keys', [ 'as' => 'api.account.api.index', 'uses' => 'ApiKeysController@index', diff --git a/Modules/User/Http/backendRoutes.php b/Modules/User/Http/backendRoutes.php index 3145d09d4..491383c61 100644 --- a/Modules/User/Http/backendRoutes.php +++ b/Modules/User/Http/backendRoutes.php @@ -81,9 +81,6 @@ 'as' => 'admin.account.profile.update', 'uses' => 'Account\ProfileController@update', ]); - $router->bind('userTokenId', function ($id) { - return app(\Modules\User\Repositories\UserTokenRepository::class)->find($id); - }); $router->get('api-keys', [ 'as' => 'admin.account.api.index', 'uses' => 'Account\ApiKeysController@index', diff --git a/Modules/User/Providers/UserServiceProvider.php b/Modules/User/Providers/UserServiceProvider.php index da0a17868..856e1ddc6 100644 --- a/Modules/User/Providers/UserServiceProvider.php +++ b/Modules/User/Providers/UserServiceProvider.php @@ -77,6 +77,16 @@ public function register() GrantModulePermissionsCommand::class, RemoveModulePermissionsCommand::class, ]); + + app('router')->bind('role', function ($id) { + return app(RoleRepository::class)->find($id); + }); + app('router')->bind('user', function ($id) { + return app(UserRepository::class)->find($id); + }); + app('router')->bind('userTokenId', function ($id) { + return app(UserTokenRepository::class)->find($id); + }); } /** diff --git a/Modules/User/Tests/ApiUserControllerTest.php b/Modules/User/Tests/ApiUserControllerTest.php new file mode 100644 index 000000000..92f02675c --- /dev/null +++ b/Modules/User/Tests/ApiUserControllerTest.php @@ -0,0 +1,53 @@ +user = app(UserRepository::class); + $this->permissions = app(PermissionManager::class); + $this->userToken = app(UserTokenRepository::class); + } + + /** @test */ + public function it_creates_a_new_activated_user() + { + $data = [ + 'email' => 'user@domain.tld', + 'password' => 'Pa$$w0rd', + 'is_activated' => true, + ]; + + $request = CreateUserRequest::create('', '', $data); + $controller = new UserController($this->user, $this->permissions, $this->userToken); + + $controller->store($request); + $user = $this->user->find(1); + + $this->assertInstanceOf(User::class, $user); + $this->assertTrue($user->isActivated()); + } +} diff --git a/Modules/User/Tests/SentinelUserRepositoryTest.php b/Modules/User/Tests/SentinelUserRepositoryTest.php index e97ee182d..1896ce8d3 100644 --- a/Modules/User/Tests/SentinelUserRepositoryTest.php +++ b/Modules/User/Tests/SentinelUserRepositoryTest.php @@ -182,6 +182,19 @@ public function it_creates_user_with_given_role() $this->assertCount(1, $this->user->all()); } + /** @test */ + public function it_creates_a_user_token_when_creating_user_with_roles() + { + $this->createRole('User'); + + $user = $this->user->createWithRoles([ + 'email' => 'n.widart@gmail.com', + 'password' => 'demo1234', + ], ['User']); + + $this->assertCount(1, $user->api_keys); + } + /** @test */ public function it_creates_user_without_triggering_events_for_cli() { diff --git a/Modules/User/Transformers/FullUserTransformer.php b/Modules/User/Transformers/FullUserTransformer.php index d544fd0dd..9ccb52640 100644 --- a/Modules/User/Transformers/FullUserTransformer.php +++ b/Modules/User/Transformers/FullUserTransformer.php @@ -17,7 +17,7 @@ public function toArray($request) 'first_name' => $this->first_name, 'last_name' => $this->last_name, 'email' => $this->email, - 'activated' => $this->isActivated(), + 'is_activated' => $this->isActivated(), 'last_login' => $this->last_login, 'created_at' => $this->created_at, 'permissions' => $permissions, diff --git a/Modules/User/changelog.yml b/Modules/User/changelog.yml index 3e13dc5aa..3dad65dca 100644 --- a/Modules/User/changelog.yml +++ b/Modules/User/changelog.yml @@ -1,5 +1,9 @@ url: https://github.com/AsgardCms/Platform versions: + "@unreleased": + changed: + - Adding a test the user token is correctly generated + - Fix creation of an activated user "3.5.1": changed: - Fix issue 467 id() method checks null instead of false diff --git a/Modules/Workshop/Http/backendRoutes.php b/Modules/Workshop/Http/backendRoutes.php index e65e3b64b..a02a6ca28 100644 --- a/Modules/Workshop/Http/backendRoutes.php +++ b/Modules/Workshop/Http/backendRoutes.php @@ -3,13 +3,6 @@ use Illuminate\Routing\Router; /** @var Router $router */ -$router->bind('module', function ($module) { - return app(\Nwidart\Modules\Contracts\RepositoryInterface::class)->find($module); -}); -$router->bind('theme', function ($theme) { - return app(\Modules\Workshop\Manager\ThemeManager::class)->find($theme); -}); - $router->group( ['prefix' => '/workshop'], function (Router $router) { diff --git a/Modules/Workshop/Providers/WorkshopServiceProvider.php b/Modules/Workshop/Providers/WorkshopServiceProvider.php index b2314ad73..00e8ec664 100644 --- a/Modules/Workshop/Providers/WorkshopServiceProvider.php +++ b/Modules/Workshop/Providers/WorkshopServiceProvider.php @@ -21,6 +21,7 @@ use Modules\Workshop\Scaffold\Module\ModuleScaffold; use Modules\Workshop\Scaffold\Theme\ThemeGeneratorFactory; use Modules\Workshop\Scaffold\Theme\ThemeScaffold; +use Nwidart\Modules\Repository; class WorkshopServiceProvider extends ServiceProvider { @@ -52,6 +53,13 @@ public function register() $event->load('modules', array_dot(trans('workshop::modules'))); $event->load('themes', array_dot(trans('workshop::themes'))); }); + + app('router')->bind('module', function ($module) { + return app(Repository::class)->find($module); + }); + app('router')->bind('theme', function ($theme) { + return app(ThemeManager::class)->find($theme); + }); } public function boot() diff --git a/Themes/Adminlte/assets/img/blur-background09.jpg b/Themes/Adminlte/assets/img/blur-background09.jpg index dbca2059b..3c51e5ed2 100644 Binary files a/Themes/Adminlte/assets/img/blur-background09.jpg and b/Themes/Adminlte/assets/img/blur-background09.jpg differ diff --git a/Themes/Adminlte/views/partials/top-nav.blade.php b/Themes/Adminlte/views/partials/top-nav.blade.php index fe426f173..703d33f11 100644 --- a/Themes/Adminlte/views/partials/top-nav.blade.php +++ b/Themes/Adminlte/views/partials/top-nav.blade.php @@ -19,6 +19,7 @@
  • {{ trans('core::core.general.view website') }}
  • + @if(count(LaravelLocalization::getSupportedLocales())>1) + @endif