Skip to content

Commit

Permalink
fix language and preset Namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim-the-Diamond committed Dec 20, 2024
1 parent 32aac61 commit 296b461
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/Locale/Presets/CountryPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Builder\Presets;
namespace App\Locale\Presets;

use Moox\Builder\Blocks\Fields\Text;
use Moox\Builder\Blocks\Features\Tabs;
Expand Down
6 changes: 3 additions & 3 deletions app/Locale/Presets/LocalePreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Builder\Presets;
namespace App\Locale\Presets;

use Moox\Builder\Blocks\Fields\Text;
use Moox\Builder\Blocks\Features\Tabs;
Expand Down Expand Up @@ -54,14 +54,14 @@ protected function initializePreset(): void
label: 'language',
description: 'Language to Locale',
nullable: false,
relatedModel: \App\Builder\Locale\Models\StaticLanguage::class,
relatedModel: \App\Locale\Locale\Models\StaticLanguage::class,
),
new Relationship(
name: 'country',
label: 'country',
description: 'Country to Locale',
nullable: false,
// relatedModel: \App\Builder\Locale\Models\Country::class,
// relatedModel: \App\Locale\Locale\Models\Country::class,
),
];
}
Expand Down
2 changes: 1 addition & 1 deletion app/Locale/Presets/StaticLanguagePreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Builder\Presets;
namespace App\Locale\Presets;

use Moox\Builder\Blocks\Fields\Text;
use Moox\Builder\Blocks\Singles\Simple;
Expand Down
10 changes: 5 additions & 5 deletions config/builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
// 'generator' => \Moox\Builder\Generators\Entity\MigrationGenerator::class,
//],
'translation' => [
'path' => '%BasePath%\app\Locale\lang\%locale%\entities',
'path' => 'Locale\lang\%locale%\entities',
'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/translation.php.stub',
'generator' => \Moox\Builder\Generators\Entity\TranslationGenerator::class,
],
Expand Down Expand Up @@ -214,15 +214,15 @@
'generators' => ['model', 'migration', 'resource'],
],
'language-item' => [
'class' => \App\Builder\Presets\StaticLanguagePreset::class,
'class' => \App\Locale\Presets\StaticLanguagePreset::class,
'generators' => ['model', 'migration', 'resource'],
],
'country-item' => [
'class' => \App\Builder\Presets\CountryPreset::class,
'class' => \App\Locale\Presets\CountryPreset::class,
'generators' => ['model', 'migration', 'resource'],
],
'locale-item' => [
'class' => \App\Builder\Presets\LocalePreset::class,
'class' => \App\Locale\Presets\LocalePreset::class,
'generators' => ['model', 'migration', 'resource'],
],
'soft-delete-item' => [
Expand All @@ -234,7 +234,7 @@
'generators' => ['model', 'migration', 'resource'],
],
'static-language' => [
'class' => \App\Builder\Presets\StaticLanguagePreset::class,
'class' => \App\Locale\Presets\StaticLanguagePreset::class,
'generators' => ['model', 'migration', 'resource'],
],
],
Expand Down
6 changes: 6 additions & 0 deletions resources/lang/en/entities/static-country.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

return [
'static-country' => 'Static Country',
'static-countries' => 'Static Countries',
];
6 changes: 6 additions & 0 deletions resources/lang/en/entities/static-language.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

return [
'static-language' => 'Static Language',
'static-languages' => 'Static Languages',
];

0 comments on commit 296b461

Please sign in to comment.