FEATURE: more translations

This commit is contained in:
Peter Hrdlica
2016-09-29 23:11:42 +02:00
250 changed files with 77827 additions and 1670 deletions
+37 -14
View File
@@ -2,13 +2,14 @@
namespace Modules\StaticPages\Handlers;
use App\Enumerations\ModulesHandlerToId;
use App\Handlers\Contracts\ContentTitles;
use App\Handlers\Handler;
use App\Http\Controllers\Controller;
use App\Http\Requests\Request;
use App\Models\Content;
use App\Models\User;
class StaticPage extends Handler
class StaticPage extends Handler implements ContentTitles
{
public static function registerAdminMenu(User $user)
{
@@ -33,19 +34,6 @@ class StaticPage extends Handler
return $moduleId;
}
/**
* Render given module into visitor area.
*
* @param Content $content DB model from table contents
* @param array $parameters parameters used for modifications/custom settings of given model
*
* @return mixed
*/
public function render(Content $content, $parameters)
{
return Controller::VisitorsView($content->template, ['page' => $content]);
}
/**
* Does given module manage content? Or is it just module with widgets/something internal/something absolutely else?
*
@@ -110,4 +98,39 @@ class StaticPage extends Handler
{
// nothing to do
}
/**
* Get translated title for pages overview of given type.
*
* This value is used for rendering list of all content pages of given type in administration.
*
* @return string
*/
public static function getOverviewTitle()
{
return trans('staticpages::module.allPages');
}
/**
* Title displayed above for for creating new content page
*
* @return string
*/
public static function getCreateNewTitle()
{
return trans('staticpages::module.newPage');
}
/**
* Title for form displayed for editin content page
*
* @param Content $content
*
* @return mixed
*/
public static function getEditTitle(Content $content)
{
return trans('staticpages::module.editPage');
}
}
@@ -1,12 +1,6 @@
<?php namespace Modules\Staticpages\Providers;
use App\Enumerations\ModulesHandlerToId;
use App\Enumerations\ModulesWithIds;
use App\Handlers\Registrators\TemplateRegistrator;
use App\Models\ActionLogType;
use App\Models\Module;
use Illuminate\Support\ServiceProvider;
use Symfony\Component\Process\Exception\InvalidArgumentException;
class StaticPagesServiceProvider extends ServiceProvider
{
@@ -45,7 +39,7 @@ class StaticPagesServiceProvider extends ServiceProvider
*/
protected function registerConfig()
{
$config = __DIR__ . DIRECTORY_SEPARATOR .'../Config/config.php';
$config = __DIR__ . DIRECTORY_SEPARATOR . '../Config/config.php';
$this->publishes([$config => config_path('staticpages.php')]);
$this->mergeConfigFrom($config, 'staticpages');
}
@@ -1,5 +1,8 @@
<?php
return [
"allPages" => "Všechny statické stránky",
"description" => "Statické stránky jsou určeny k zobrazování statického obsahu na stránkách.",
"editPage" => "Upravuji statickou stránku",
"name" => "Statické stránky",
"newPage" => "Vytvářím novou stránku",
];
@@ -1,5 +1,8 @@
<?php
return [
'name' => 'Static pages',
'description' => 'Static pages are intended for displaying static content on webpage.'
'description' => 'Static pages are intended for displaying static content on webpage.',
'allPages' => 'All static pages',
'editPage' => 'Editing static page',
'newPage' => 'Create new static page'
];