--- /dev/null
+<?php
+
+namespace App\Console\Commands;
+
+use App\Models\ToolboxTranslate;
+use App\Models\Traits\FluidbookPlayerBranches;
+use Cubist\Backpack\Console\Commands\CubistCommand;
+use Cubist\Backpack\Facades\App;
+use Cubist\Locale\Translate;
+use Cubist\Util\PHP;
+
+class ToolboxTranslations extends CubistCommand
+{
+ protected $signature = 'translate:toolbox';
+
+
+ use FluidbookPlayerBranches;
+
+ public function handle()
+ {
+ App::setLocale('en');
+
+ dd(ToolboxTranslate::find(1));
+
+ $paths = [];
+ foreach (self::getActiveBranches() as $branch) {
+ $paths['Player - git:' . $branch] = 'resources/fluidbookpublication/player/branches/' . $branch . '/js';
+ $paths['Player - local:' . $branch] = 'resources/fluidbookpublication/player/local/' . $branch . '/js';
+ }
+
+ $t = new Translate();
+ $t->setExtensions(['js']);
+ foreach ($paths as $path) {
+ $t->addPath(base_path() . '/' . $path);
+ }
+ $t->parseFiles();
+ dd($t->getStringToTranslate());
+ }
+}
use Cubist\Backpack\Facades\App;
use Cubist\Backpack\Magic\Models\Translate;
use Cubist\Util\PHP;
+
// __('!!Traduction des fluidbooks')
class FluidbookTranslate extends Translate
{
public function setFields()
{
- $this->addField(['name' => 'nsis', 'type' => NSISLocale::class, 'label' => __('Langue de l\'installeur'), 'translatable' => true, 'default' => 'English']);
+ $this->addField(['name' => 'nsis', 'type' => NSISLocale::class, 'label' => __('Langue de l\'installeur') . ' (' . __('Version offline windows') . ')', 'translatable' => true, 'default' => 'English']);
parent::setFields();
}
public static function getFluidbookTranslation($locale)
{
$all = self::getAllFluidbookTranslations();
- $res= $all[$locale] ?? null;
+ $res = $all[$locale] ?? null;
return $res;
}
namespace App\Models;
+use App\Models\Traits\FluidbookPlayerBranches;
use Cubist\Backpack\Magic\Models\Translate;
class ToolboxTranslate extends Translate
'plural' => 'traductions',
'oneinstance' => true];
+
protected $_enableTrackEmptyValues = true;
public function getPaths()
return array_merge(parent::getPaths(), ['vendor/cubedesigners']);
}
+ public function onUpdating(): bool
+ {
+ dd($this);
+
+ return parent::onUpdating();
+ }
+
protected function _defaultTranslations()
{
return ['en' => [
*/
'token_username' => env('BACKPACK_TOKEN_USERNAME', false),
+
+ 'locales' => explode(',', env('BACKPACK_LOCALES', 'en')),
];
| Extension, without the server-side code. It uses Debugbar collectors instead.
|
*/
- 'clockwork' => false,
+ 'clockwork' => true,
/*
|--------------------------------------------------------------------------
box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}
+table.dataTable thead > tr > th.sorting_asc::before, table.dataTable thead > tr > th.sorting_desc::after, table.dataTable thead > tr > td.sorting_asc::before, table.dataTable thead > tr > td.sorting_desc::after {
+ opacity: 1.0 !important;
+}
+
+table.dataTable thead .sorting::before, table.dataTable thead .sorting::after, table.dataTable thead .sorting_asc::before, table.dataTable thead .sorting_asc::after, table.dataTable thead .sorting_desc::before, table.dataTable thead .sorting_desc::after, table.dataTable thead .sorting_asc_disabled::before, table.dataTable thead .sorting_asc_disabled::after, table.dataTable thead .sorting_desc_disabled::before, table.dataTable thead .sorting_desc_disabled::after {
+ opacity: 0.3 !important;
+}
+
+.table-striped tbody tr:nth-of-type(2n) {
+ background-color: rgba(0, 0, 0, .02);
+}
+
+table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1):hover {
+ background-color: rgba(124, 124, 124, .1);
+}
+
@import "context-menu";
@import "loader";
@endcan
@can('fluidbook-translate:write')
<li class="nav-item"><a class="nav-link"
- href='{{ backpack_url('fluidbook-translate/1/edit/?locale=en') }}'><i
+ href='{{ backpack_url('fluidbook-translate/1/edit/?_locale=en') }}'><i
class='la la-language nav-icon'></i>
<span> {{__('Traductions')}}</span></a>
</li>
<ul class='nav-dropdown-items'>
@can('toolbox-translate:admin')
<li class="nav-item"><a class="nav-link"
- href='{{ backpack_url('toolbox-translate/1/edit/?locale=en') }}'><i
+ href='{{ backpack_url('toolbox-translate/1/edit/?_locale=en') }}'><i
class='la la-language'></i>
<span>{{__('Traduction')}}</span></a>
</li>