language translation deletion

This commit is contained in:
Čarodej
2022-04-27 10:29:06 +02:00
parent 3b3bf62cb8
commit e645291855
13 changed files with 8 additions and 1166 deletions

View File

@@ -3,7 +3,6 @@ namespace Domain\Homepage\Controllers;
use DB;
use PDOException;
use Domain\Pages\Models\Page;
use Illuminate\Contracts\View\View;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\Foundation\Application;

View File

@@ -9,22 +9,15 @@ class SeedDefaultLanguageTranslationsAction
string $license,
string $locale
): void {
$translations = [
'extended' => collect([
config('language-translations.extended'),
config('language-translations.regular'),
config('custom-language-translations'),
])->collapse(),
'regular' => collect([
config('language-translations.regular'),
config('custom-language-translations'),
])->collapse(),
];
$translations = collect([
config('language-translations.regular'),
config('custom-language-translations'),
])->collapse();
$translations = $translations[strtolower($license)]
$translations = $translations
->map(fn ($value, $key) => [
'lang' => $locale,
'value' => $value,
'value' => '___',
'key' => $key,
])->toArray();