From 6671d456515db4df04b606936805941d1a24acf9 Mon Sep 17 00:00:00 2001 From: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> Date: Thu, 4 Sep 2025 20:17:59 +0200 Subject: [PATCH] Fix various `Translations` & add Installer & add Notifications (#1632) --- .../Schedule/ProcessRunnableCommand.php | 2 +- .../Commands/User/DisableTwoFactorCommand.php | 2 +- app/Enums/BackupStatus.php | 2 +- app/Enums/ContainerStatus.php | 2 +- app/Filament/Admin/Pages/Health.php | 2 +- app/Filament/Admin/Pages/Settings.php | 4 +- .../Admin/Resources/ApiKeyResource.php | 2 +- .../Resources/EggResource/Pages/CreateEgg.php | 12 ++- .../Resources/EggResource/Pages/EditEgg.php | 12 ++- .../ServersRelationManager.php | 2 +- .../Resources/NodeResource/Pages/EditNode.php | 13 +-- app/Filament/Admin/Resources/RoleResource.php | 1 - .../ServerResource/Pages/CreateServer.php | 4 +- .../ServerResource/Pages/EditServer.php | 22 ++-- app/Filament/Admin/Resources/UserResource.php | 2 +- .../Admin/Resources/WebhookResource.php | 2 +- .../ServerResource/Pages/ListServers.php | 17 +-- .../Components/Actions/ExportEggAction.php | 4 +- .../Components/Actions/ImportEggAction.php | 6 +- .../Actions/ImportScheduleAction.php | 6 +- .../Tables/Actions/ExportEggAction.php | 4 +- .../Tables/Actions/ImportEggAction.php | 6 +- app/Filament/Pages/Auth/EditProfile.php | 23 ++-- app/Filament/Pages/Auth/Login.php | 2 +- app/Filament/Server/Pages/Settings.php | 14 +-- .../Server/Resources/BackupResource.php | 7 +- .../Server/Resources/DatabaseResource.php | 2 +- .../FileResource/Pages/EditFiles.php | 12 +-- .../FileResource/Pages/ListFiles.php | 12 ++- .../FileResource/Pages/SearchFiles.php | 2 +- .../Server/Resources/UserResource.php | 3 +- .../UserResource/Pages/ListUsers.php | 3 +- app/Filament/Server/Widgets/ServerConsole.php | 4 +- .../Server/Widgets/ServerOverview.php | 2 +- .../Server/ServerInstalledListener.php | 6 +- app/Listeners/Server/SubUserAddedListener.php | 6 +- .../Server/SubUserRemovedListener.php | 4 +- app/Livewire/Installer/PanelInstaller.php | 43 ++++++-- app/Livewire/Installer/Steps/CacheStep.php | 24 ++--- app/Livewire/Installer/Steps/DatabaseStep.php | 30 +++--- .../Installer/Steps/EnvironmentStep.php | 20 ++-- app/Livewire/Installer/Steps/QueueStep.php | 14 +-- .../Installer/Steps/RequirementsStep.php | 24 ++--- app/Livewire/Installer/Steps/SessionStep.php | 6 +- app/Models/File.php | 2 +- .../Filament/ServerPanelProvider.php | 2 +- .../Daemon/DaemonServerRepository.php | 4 +- .../Eggs/Variables/VariableUpdateService.php | 4 +- app/Services/Servers/SuspensionService.php | 4 +- lang/en/admin/apikey.php | 2 +- lang/en/admin/egg.php | 2 +- lang/en/admin/health.php | 2 +- lang/en/admin/node.php | 8 +- lang/en/admin/server.php | 4 + lang/en/admin/setting.php | 1 + lang/en/command/messages.php | 5 +- lang/en/commands.php | 4 +- lang/en/installer.php | 101 ++++++++++++++++++ lang/en/notifications.php | 18 ++++ lang/en/profile.php | 2 +- lang/en/server/backup.php | 5 + lang/en/server/console.php | 4 + lang/en/server/dashboard.php | 11 +- lang/en/server/database.php | 1 + lang/en/server/file.php | 23 ++++ lang/en/server/setting.php | 3 +- lang/en/server/user.php | 2 +- 67 files changed, 415 insertions(+), 191 deletions(-) create mode 100644 lang/en/installer.php create mode 100644 lang/en/notifications.php diff --git a/app/Console/Commands/Schedule/ProcessRunnableCommand.php b/app/Console/Commands/Schedule/ProcessRunnableCommand.php index 459830472..49f6997fa 100644 --- a/app/Console/Commands/Schedule/ProcessRunnableCommand.php +++ b/app/Console/Commands/Schedule/ProcessRunnableCommand.php @@ -64,7 +64,7 @@ class ProcessRunnableCommand extends Command } catch (Throwable $exception) { logger()->error($exception, ['schedule_id' => $schedule->id]); - $this->error(trans('commands.schedule.process.no_tasks') . " #$schedule->id: " . $exception->getMessage()); + $this->error(trans('commands.schedule.process.error_message', ['schedules' => " #$schedule->id: " . $exception->getMessage()])); } } } diff --git a/app/Console/Commands/User/DisableTwoFactorCommand.php b/app/Console/Commands/User/DisableTwoFactorCommand.php index 9b9cdff5c..8a14c81fd 100644 --- a/app/Console/Commands/User/DisableTwoFactorCommand.php +++ b/app/Console/Commands/User/DisableTwoFactorCommand.php @@ -19,7 +19,7 @@ class DisableTwoFactorCommand extends Command public function handle(): void { if ($this->input->isInteractive()) { - $this->output->warning(trans('command/messages.user.2fa_help_text.0') . trans('command/messages.user.2fa_help_text.1')); + $this->output->warning(trans('command/messages.user.2fa_help_text')); } $email = $this->option('email') ?? $this->ask(trans('command/messages.user.ask_email')); diff --git a/app/Enums/BackupStatus.php b/app/Enums/BackupStatus.php index 78f9781fa..7d28f73ef 100644 --- a/app/Enums/BackupStatus.php +++ b/app/Enums/BackupStatus.php @@ -32,6 +32,6 @@ enum BackupStatus: string implements HasColor, HasIcon, HasLabel public function getLabel(): string { - return trans('server/backup.backup_status.' . strtolower($this->value)); + return trans('server/backup.backup_status.' . $this->value); } } diff --git a/app/Enums/ContainerStatus.php b/app/Enums/ContainerStatus.php index f7ec159c1..15548c423 100644 --- a/app/Enums/ContainerStatus.php +++ b/app/Enums/ContainerStatus.php @@ -68,7 +68,7 @@ enum ContainerStatus: string implements HasColor, HasIcon, HasLabel public function getLabel(): string { - return trans('server/console.status.' . strtolower($this->value)); + return trans('server/console.status.' . $this->value); } public function isOffline(): bool diff --git a/app/Filament/Admin/Pages/Health.php b/app/Filament/Admin/Pages/Health.php index 8fe2e895a..49978ad74 100644 --- a/app/Filament/Admin/Pages/Health.php +++ b/app/Filament/Admin/Pages/Health.php @@ -123,7 +123,7 @@ class Health extends Page return $carry; }, []); - return trans('admin/health.checks.failed') . implode(', ', $failedNames); + return trans('admin/health.checks.failed', ['checks' => implode(', ', $failedNames)]); } public static function getNavigationIcon(): string diff --git a/app/Filament/Admin/Pages/Settings.php b/app/Filament/Admin/Pages/Settings.php index 9a7ca051d..a0dba95fc 100644 --- a/app/Filament/Admin/Pages/Settings.php +++ b/app/Filament/Admin/Pages/Settings.php @@ -119,7 +119,7 @@ class Settings extends Page implements HasForms ->label(trans('admin/setting.navigation.backup')) ->icon('tabler-box') ->schema($this->backupSettings()), - Tab::make('OAuth') + Tab::make('oauth') ->label(trans('admin/setting.navigation.oauth')) ->icon('tabler-brand-oauth') ->schema($this->oauthSettings()), @@ -553,7 +553,7 @@ class Settings extends Page implements HasForms ->label(trans('admin/setting.oauth.enable')) ->color('success') ->steps($schema->getSetupSteps()) - ->modalHeading(trans('admin/setting.oauth.enable') . ' ' . $schema->getName()) + ->modalHeading(trans('admin/setting.oauth.enable_schema', ['schema' => $schema->getName()])) ->modalSubmitActionLabel(trans('admin/setting.oauth.enable')) ->modalCancelAction(false) ->action(function ($data, Set $set) use ($key) { diff --git a/app/Filament/Admin/Resources/ApiKeyResource.php b/app/Filament/Admin/Resources/ApiKeyResource.php index 6d62d1022..f764eed10 100644 --- a/app/Filament/Admin/Resources/ApiKeyResource.php +++ b/app/Filament/Admin/Resources/ApiKeyResource.php @@ -96,7 +96,7 @@ class ApiKeyResource extends Resource ]) ->emptyStateIcon('tabler-key') ->emptyStateDescription('') - ->emptyStateHeading(trans('admin/apikey.empty_table')) + ->emptyStateHeading(trans('admin/apikey.empty')) ->emptyStateActions([ CreateAction::make(), ]); diff --git a/app/Filament/Admin/Resources/EggResource/Pages/CreateEgg.php b/app/Filament/Admin/Resources/EggResource/Pages/CreateEgg.php index 2efa6bd95..2818046a7 100644 --- a/app/Filament/Admin/Resources/EggResource/Pages/CreateEgg.php +++ b/app/Filament/Admin/Resources/EggResource/Pages/CreateEgg.php @@ -57,7 +57,8 @@ class CreateEgg extends CreateRecord return $form ->schema([ Tabs::make()->tabs([ - Tab::make(trans('admin/egg.tabs.configuration')) + Tab::make('configuration') + ->label(trans('admin/egg.tabs.configuration')) ->columns(['default' => 1, 'sm' => 1, 'md' => 2, 'lg' => 4]) ->schema([ TextInput::make('name') @@ -123,7 +124,8 @@ class CreateEgg extends CreateRecord ->helperText(trans('admin/egg.docker_help')), ]), - Tab::make(trans('admin/egg.tabs.process_management')) + Tab::make('process_management') + ->label(trans('admin/egg.tabs.process_management')) ->columns() ->schema([ CopyFrom::make('copy_process_from') @@ -146,7 +148,8 @@ class CreateEgg extends CreateRecord ->default('{}') ->helperText(trans('admin/egg.log_config_help')), ]), - Tab::make(trans('admin/egg.tabs.egg_variables')) + Tab::make('egg_variables') + ->label(trans('admin/egg.tabs.egg_variables')) ->columnSpanFull() ->schema([ Repeater::make('variables') @@ -239,7 +242,8 @@ class CreateEgg extends CreateRecord ]), ]), ]), - Tab::make(trans('admin/egg.tabs.install_script')) + Tab::make('install_script') + ->label(trans('admin/egg.tabs.install_script')) ->columns(3) ->schema([ CopyFrom::make('copy_script_from') diff --git a/app/Filament/Admin/Resources/EggResource/Pages/EditEgg.php b/app/Filament/Admin/Resources/EggResource/Pages/EditEgg.php index ec4fcb161..48fcbff84 100644 --- a/app/Filament/Admin/Resources/EggResource/Pages/EditEgg.php +++ b/app/Filament/Admin/Resources/EggResource/Pages/EditEgg.php @@ -44,7 +44,8 @@ class EditEgg extends EditRecord return $form ->schema([ Tabs::make()->tabs([ - Tab::make(trans('admin/egg.tabs.configuration')) + Tab::make('configuration') + ->label(trans('admin/egg.tabs.configuration')) ->columns(['default' => 1, 'sm' => 1, 'md' => 2, 'lg' => 4]) ->icon('tabler-egg') ->schema([ @@ -115,7 +116,8 @@ class EditEgg extends EditRecord ->valueLabel(trans('admin/egg.docker_uri')) ->helperText(trans('admin/egg.docker_help')), ]), - Tab::make(trans('admin/egg.tabs.process_management')) + Tab::make('process_management') + ->label(trans('admin/egg.tabs.process_management')) ->columns() ->icon('tabler-server-cog') ->schema([ @@ -135,7 +137,8 @@ class EditEgg extends EditRecord ->label(trans('admin/egg.log_config')) ->helperText(trans('admin/egg.log_config_help')), ]), - Tab::make(trans('admin/egg.tabs.egg_variables')) + Tab::make('egg_variables') + ->label(trans('admin/egg.tabs.egg_variables')) ->columnSpanFull() ->icon('tabler-variable') ->schema([ @@ -228,7 +231,8 @@ class EditEgg extends EditRecord ]), ]), ]), - Tab::make(trans('admin/egg.tabs.install_script')) + Tab::make('install_script') + ->label(trans('admin/egg.tabs.install_script')) ->columns(3) ->icon('tabler-file-download') ->schema([ diff --git a/app/Filament/Admin/Resources/EggResource/RelationManagers/ServersRelationManager.php b/app/Filament/Admin/Resources/EggResource/RelationManagers/ServersRelationManager.php index 1016b0238..9e363ac76 100644 --- a/app/Filament/Admin/Resources/EggResource/RelationManagers/ServersRelationManager.php +++ b/app/Filament/Admin/Resources/EggResource/RelationManagers/ServersRelationManager.php @@ -22,7 +22,7 @@ class ServersRelationManager extends RelationManager ->heading(trans('admin/egg.servers')) ->columns([ TextColumn::make('user.username') - ->label('Owner') + ->label(trans('admin/server.owner')) ->icon('tabler-user') ->url(fn (Server $server): string => route('filament.admin.resources.users.edit', ['record' => $server->user])) ->sortable(), diff --git a/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php b/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php index cebae0731..023196f47 100644 --- a/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php +++ b/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php @@ -64,7 +64,7 @@ class EditNode extends EditRecord ->persistTabInQueryString() ->columnSpanFull() ->tabs([ - Tab::make('') + Tab::make('overview') ->label(trans('admin/node.tabs.overview')) ->icon('tabler-chart-area-line-filled') ->columns([ @@ -80,7 +80,7 @@ class EditNode extends EditRecord ->schema([ Placeholder::make('') ->label(trans('admin/node.wings_version')) - ->content(fn (Node $node, SoftwareVersionService $versionService) => ($node->systemInformation()['version'] ?? trans('admin/node.unknown')) . ' (' . trans('admin/node.latest') . ': ' . $versionService->latestWingsVersion() . ')'), + ->content(fn (Node $node, SoftwareVersionService $versionService) => ($node->systemInformation()['version'] ?? trans('admin/node.unknown')) . ' ' . trans('admin/node.latest', ['version' => $versionService->latestWingsVersion()])), Placeholder::make('') ->label(trans('admin/node.cpu_threads')) ->content(fn (Node $node) => $node->systemInformation()['cpu_count'] ?? 0), @@ -108,7 +108,8 @@ class EditNode extends EditRecord View::make('filament.components.node-storage-chart') ->columnSpanFull(), ]), - Tab::make(trans('admin/node.tabs.basic_settings')) + Tab::make('basic_settings') + ->label(trans('admin/node.tabs.basic_settings')) ->icon('tabler-server') ->schema([ TextInput::make('fqdn') @@ -257,7 +258,7 @@ class EditNode extends EditRecord ->integer() ->visible(fn (Get $get) => $get('connection') === 'https_proxy'), ]), - Tab::make('adv') + Tab::make('advanced_settings') ->label(trans('admin/node.tabs.advanced_settings')) ->columns([ 'default' => 1, @@ -525,7 +526,7 @@ class EditNode extends EditRecord ->suffix('%'), ]), ]), - Tab::make('Config') + Tab::make('config_file') ->label(trans('admin/node.tabs.config_file')) ->icon('tabler-code') ->schema([ @@ -553,7 +554,7 @@ class EditNode extends EditRecord ->modalFooterActionsAlignment(Alignment::Center) ->form([ ToggleButtons::make('docker') - ->label('Type') + ->label(trans('admin/node.auto_label')) ->live() ->helperText(trans('admin/node.auto_question')) ->inline() diff --git a/app/Filament/Admin/Resources/RoleResource.php b/app/Filament/Admin/Resources/RoleResource.php index c63ddfecf..09ebbba60 100644 --- a/app/Filament/Admin/Resources/RoleResource.php +++ b/app/Filament/Admin/Resources/RoleResource.php @@ -129,7 +129,6 @@ class RoleResource extends Resource ->required() ->disabled(fn (Get $get) => $get('name') === Role::ROOT_ADMIN), TextInput::make('guard_name') - ->label('Guard Name') ->default(Role::DEFAULT_GUARD_NAME) ->nullable() ->hidden(), diff --git a/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php b/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php index 32555083f..d0e36bee7 100644 --- a/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php +++ b/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php @@ -264,7 +264,7 @@ class CreateServer extends CreateRecord ->preload() ->disableOptionsWhenSelectedInSiblingRepeaterItems() ->prefixIcon('tabler-network') - ->label('Additional Allocations') + ->label(trans('admin/server.additional_allocations')) ->columnSpan(2) ->disabled(fn (Get $get) => $get('../../allocation_id') === null || $get('../../node_id') === null) ->searchable(['ip', 'port', 'ip_alias']) @@ -761,7 +761,7 @@ class CreateServer extends CreateRecord KeyValue::make('docker_labels') ->live() - ->label('Container Labels') + ->label(trans('admin/server.container_labels')) ->keyLabel(trans('admin/server.title')) ->valueLabel(trans('admin/server.description')) ->columnSpanFull(), diff --git a/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php b/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php index 857b47614..b41272c12 100644 --- a/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php +++ b/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php @@ -87,7 +87,8 @@ class EditServer extends EditRecord ]) ->columnSpanFull() ->tabs([ - Tab::make(trans('admin/server.tabs.information')) + Tab::make('information') + ->label(trans('admin/server.tabs.information')) ->icon('tabler-info-circle') ->schema([ TextInput::make('name') @@ -219,7 +220,8 @@ class EditServer extends EditRecord ]) ->disabled(), ]), - Tab::make(trans('admin/server.tabs.environment_configuration')) + Tab::make('environment_configuration') + ->label(trans('admin/server.tabs.environment_configuration')) ->icon('tabler-brand-docker') ->schema([ Fieldset::make(trans('admin/server.resource_limits')) @@ -526,7 +528,8 @@ class EditServer extends EditRecord ->columnSpanFull(), ]), ]), - Tab::make(trans('admin/server.egg')) + Tab::make('egg') + ->label(trans('admin/server.egg')) ->icon('tabler-egg') ->columns([ 'default' => 1, @@ -644,12 +647,14 @@ class EditServer extends EditRecord ]) ->columnSpan(6), ]), - Tab::make(trans('admin/server.mounts')) + Tab::make('mounts') + ->label(trans('admin/server.mounts')) ->icon('tabler-layers-linked') ->schema(fn (Get $get) => [ ServerResource::getMountCheckboxList($get), ]), - Tab::make(trans('admin/server.databases')) + Tab::make('databases') + ->label(trans('admin/server.databases')) ->hidden(fn () => !auth()->user()->can('viewAny', Database::class)) ->icon('tabler-database') ->columns(4) @@ -779,7 +784,8 @@ class EditServer extends EditRecord ]), ])->alignCenter()->columnSpanFull(), ]), - Tab::make(trans('admin/server.actions')) + Tab::make('actions') + ->label(trans('admin/server.actions')) ->icon('tabler-settings') ->schema([ Fieldset::make(trans('admin/server.actions')) @@ -912,12 +918,12 @@ class EditServer extends EditRecord $transfer->handle($server, Arr::get($data, 'node_id'), Arr::get($data, 'allocation_id'), Arr::get($data, 'allocation_additional', [])); Notification::make() - ->title('Transfer started') + ->title(trans('admin/server.notifications.transfer_started')) ->success() ->send(); } catch (Exception $exception) { Notification::make() - ->title('Transfer failed') + ->title(trans('admin/server.notifications.transfer_failed')) ->body($exception->getMessage()) ->danger() ->send(); diff --git a/app/Filament/Admin/Resources/UserResource.php b/app/Filament/Admin/Resources/UserResource.php index 52087987f..c1da146f4 100644 --- a/app/Filament/Admin/Resources/UserResource.php +++ b/app/Filament/Admin/Resources/UserResource.php @@ -80,7 +80,7 @@ class UserResource extends Resource ->label(trans('admin/user.email')) ->icon('tabler-mail'), IconColumn::make('use_totp') - ->label('2FA') + ->label(trans('profile.tabs.2fa')) ->visibleFrom('lg') ->icon(fn (User $user) => $user->use_totp ? 'tabler-lock' : 'tabler-lock-open-off') ->boolean(), diff --git a/app/Filament/Admin/Resources/WebhookResource.php b/app/Filament/Admin/Resources/WebhookResource.php index f11a854ba..2865e2062 100644 --- a/app/Filament/Admin/Resources/WebhookResource.php +++ b/app/Filament/Admin/Resources/WebhookResource.php @@ -211,7 +211,7 @@ class WebhookResource extends Resource TextInput::make('thread_name') ->label(trans('admin/webhook.discord_message.forum_thread')), CheckboxList::make('flags') - ->label('Flags') + ->label(trans('admin/webhook.discord_embed.flags')) ->options([ (1 << 2) => trans('admin/webhook.discord_message.supress_embeds'), (1 << 12) => trans('admin/webhook.discord_message.supress_notifications'), diff --git a/app/Filament/App/Resources/ServerResource/Pages/ListServers.php b/app/Filament/App/Resources/ServerResource/Pages/ListServers.php index e5c736c77..484bc8823 100644 --- a/app/Filament/App/Resources/ServerResource/Pages/ListServers.php +++ b/app/Filament/App/Resources/ServerResource/Pages/ListServers.php @@ -61,13 +61,13 @@ class ListServers extends ListRecords { return [ TextColumn::make('condition') - ->label('Status') + ->label(trans('server/dashboard.status')) ->badge() ->tooltip(fn (Server $server) => $server->formatResource(ServerResourceType::Uptime)) ->icon(fn (Server $server) => $server->condition->getIcon()) ->color(fn (Server $server) => $server->condition->getColor()), TextColumn::make('name') - ->label('Server') + ->label(trans('server/dashboard.title')) ->description(fn (Server $server) => $server->description) ->grow() ->searchable(), @@ -142,15 +142,18 @@ class ListServers extends ListRecords $other = (clone $all)->whereNot('owner_id', auth()->user()->id); return [ - 'my' => Tab::make('My Servers') + 'my' => Tab::make('my') + ->label(trans('server/dashboard.tabs.my')) ->badge(fn () => $my->count()) ->modifyQueryUsing(fn () => $my), - 'other' => Tab::make('Others\' Servers') + 'other' => Tab::make('other') + ->label(trans('server/dashboard.tabs.other')) ->badge(fn () => $other->count()) ->modifyQueryUsing(fn () => $other), - 'all' => Tab::make('All Servers') + 'all' => Tab::make('all') + ->label(trans('server/dashboard.tabs.all')) ->badge($all->count()), ]; } @@ -204,8 +207,8 @@ class ListServers extends ListRecords $this->daemonPowerRepository->setServer($server)->send($action); Notification::make() - ->title('Power Action') - ->body($action . ' sent to ' . $server->name) + ->title(trans('server/dashboard.power_actions')) + ->body(trans('server/dashboard.power_action_sent', ['action' => $action, 'name' => $server->name])) ->success() ->send(); diff --git a/app/Filament/Components/Actions/ExportEggAction.php b/app/Filament/Components/Actions/ExportEggAction.php index acdf20624..31e9a526a 100644 --- a/app/Filament/Components/Actions/ExportEggAction.php +++ b/app/Filament/Components/Actions/ExportEggAction.php @@ -37,13 +37,13 @@ class ExportEggAction extends Action $this->modalFooterActions([ Action::make('json') - ->label(trans('admin/egg.export.as') . ' .json') + ->label(trans('admin/egg.export.as', ['format' => 'json'])) ->action(fn (EggExporterService $service, Egg $egg) => response()->streamDownload(function () use ($service, $egg) { echo $service->handle($egg->id, EggFormat::JSON); }, 'egg-' . $egg->getKebabName() . '.json')) ->close(), Action::make('yaml') - ->label(trans('admin/egg.export.as') . ' .yaml') + ->label(trans('admin/egg.export.as', ['format' => 'yaml'])) ->action(fn (EggExporterService $service, Egg $egg) => response()->streamDownload(function () use ($service, $egg) { echo $service->handle($egg->id, EggFormat::YAML); }, 'egg-' . $egg->getKebabName() . '.yaml')) diff --git a/app/Filament/Components/Actions/ImportEggAction.php b/app/Filament/Components/Actions/ImportEggAction.php index 58448fab2..147f5875c 100644 --- a/app/Filament/Components/Actions/ImportEggAction.php +++ b/app/Filament/Components/Actions/ImportEggAction.php @@ -106,7 +106,8 @@ class ImportEggAction extends Action Tabs::make('Tabs') ->contained(false) ->tabs([ - Tab::make(trans('admin/egg.import.file')) + Tab::make('file') + ->label(trans('admin/egg.import.file')) ->icon('tabler-file-upload') ->schema([ FileUpload::make('files') @@ -118,7 +119,8 @@ class ImportEggAction extends Action ->storeFiles(false) ->multiple($isMultiple), ]), - Tab::make(trans('admin/egg.import.url')) + Tab::make('url') + ->label(trans('admin/egg.import.url')) ->icon('tabler-world-upload') ->schema([ Select::make('github') diff --git a/app/Filament/Components/Actions/ImportScheduleAction.php b/app/Filament/Components/Actions/ImportScheduleAction.php index 27824c90b..8bfd5e040 100644 --- a/app/Filament/Components/Actions/ImportScheduleAction.php +++ b/app/Filament/Components/Actions/ImportScheduleAction.php @@ -39,7 +39,8 @@ class ImportScheduleAction extends Action Tabs::make('Tabs') ->contained(false) ->tabs([ - Tab::make(trans('server/schedule.import_action.file')) + Tab::make('file') + ->label(trans('server/schedule.import_action.file')) ->icon('tabler-file-upload') ->schema([ FileUpload::make('files') @@ -51,7 +52,8 @@ class ImportScheduleAction extends Action ->storeFiles(false) ->multiple(true), ]), - Tab::make(trans('server/schedule.import_action.url')) + Tab::make('url') + ->label(trans('server/schedule.import_action.url')) ->icon('tabler-world-upload') ->schema([ Repeater::make('urls') diff --git a/app/Filament/Components/Tables/Actions/ExportEggAction.php b/app/Filament/Components/Tables/Actions/ExportEggAction.php index 978bb0f86..b13f63c4c 100644 --- a/app/Filament/Components/Tables/Actions/ExportEggAction.php +++ b/app/Filament/Components/Tables/Actions/ExportEggAction.php @@ -39,13 +39,13 @@ class ExportEggAction extends Action $this->modalFooterActions([ Action::make('json') - ->label(trans('admin/egg.export.as') . ' .json') + ->label(trans('admin/egg.export.as', ['format' => 'json'])) ->action(fn (EggExporterService $service, Egg $egg) => response()->streamDownload(function () use ($service, $egg) { echo $service->handle($egg->id, EggFormat::JSON); }, 'egg-' . $egg->getKebabName() . '.json')) ->close(), Action::make('yaml') - ->label(trans('admin/egg.export.as') . ' .yaml') + ->label(trans('admin/egg.export.as', ['format' => 'yaml'])) ->action(fn (EggExporterService $service, Egg $egg) => response()->streamDownload(function () use ($service, $egg) { echo $service->handle($egg->id, EggFormat::YAML); }, 'egg-' . $egg->getKebabName() . '.yaml')) diff --git a/app/Filament/Components/Tables/Actions/ImportEggAction.php b/app/Filament/Components/Tables/Actions/ImportEggAction.php index 848d41f82..d40e0ec8a 100644 --- a/app/Filament/Components/Tables/Actions/ImportEggAction.php +++ b/app/Filament/Components/Tables/Actions/ImportEggAction.php @@ -86,7 +86,8 @@ class ImportEggAction extends Action Tabs::make('Tabs') ->contained(false) ->tabs([ - Tab::make(trans('admin/egg.import.file')) + Tab::make('file') + ->label(trans('admin/egg.import.file')) ->icon('tabler-file-upload') ->schema([ FileUpload::make('files') @@ -98,7 +99,8 @@ class ImportEggAction extends Action ->storeFiles(false) ->multiple($isMultiple), ]), - Tab::make(trans('admin/egg.import.url')) + Tab::make('url') + ->label(trans('admin/egg.import.url')) ->icon('tabler-world-upload') ->schema([ Select::make('github') diff --git a/app/Filament/Pages/Auth/EditProfile.php b/app/Filament/Pages/Auth/EditProfile.php index 0ad423ad9..e94c932b9 100644 --- a/app/Filament/Pages/Auth/EditProfile.php +++ b/app/Filament/Pages/Auth/EditProfile.php @@ -86,7 +86,8 @@ class EditProfile extends BaseEditProfile ->schema([ Tabs::make()->persistTabInQueryString() ->schema([ - Tab::make(trans('profile.tabs.account')) + Tab::make('account') + ->label(trans('profile.tabs.account')) ->icon('tabler-user') ->schema([ TextInput::make('username') @@ -160,7 +161,8 @@ class EditProfile extends BaseEditProfile }), ]), - Tab::make(trans('profile.tabs.oauth')) + Tab::make('oauth') + ->label(trans('profile.tabs.oauth')) ->icon('tabler-brand-oauth') ->visible(count($oauthSchemas) > 0) ->schema(function () use ($oauthSchemas) { @@ -199,7 +201,8 @@ class EditProfile extends BaseEditProfile return [Actions::make($actions)]; }), - Tab::make(trans('profile.tabs.2fa')) + Tab::make('2fa') + ->label(trans('profile.tabs.2fa')) ->icon('tabler-shield-lock') ->schema(function (TwoFactorSetupService $setupService) { if ($this->getUser()->use_totp) { @@ -263,7 +266,7 @@ class EditProfile extends BaseEditProfile ->content(fn () => new HtmlString("
' . basename($this->path) . '
is too large!')
- ->body('Max is ' . convert_bytes_to_readable(config('panel.files.max_edit_size')))
+ ->title(trans('server/file.alerts.file_too_large.title', ['name' => basename($this->path)]))
+ ->body(trans('server/file.alerts.file_too_large.body', ['max' => convert_bytes_to_readable(config('panel.files.max_edit_size'))]))
->danger()
->closable()
->send();
@@ -143,7 +143,7 @@ class EditFiles extends Page
$this->redirect(ListFiles::getUrl(['path' => dirname($this->path)]));
} catch (FileNotFoundException) {
AlertBanner::make('file_not_found')
- ->title('' . basename($this->path) . '
not found!')
+ ->title(trans('server/file.alerts.file_not_found.title', ['name' => basename($this->path)]))
->danger()
->closable()
->send();
@@ -151,7 +151,7 @@ class EditFiles extends Page
$this->redirect(ListFiles::getUrl(['path' => dirname($this->path)]));
} catch (FileNotEditableException) {
AlertBanner::make('file_is_directory')
- ->title('' . basename($this->path) . '
is a directory')
+ ->title(trans('server/file.alerts.file_not_found.title', ['name' => basename($this->path)]))
->danger()
->closable()
->send();
@@ -179,8 +179,8 @@ class EditFiles extends Page
if (str($path)->endsWith('.pelicanignore')) {
AlertBanner::make('.pelicanignore_info')
- ->title('You\'re editing a .pelicanignore
file!')
- ->body('Any files or directories listed in here will be excluded from backups. Wildcards are supported by using an asterisk (*
).!
).')
+ ->title(trans('server/file.alerts.pelicanignore.title'))
+ ->body(trans('server/file.alerts.pelicanignore.body'))
->info()
->closable()
->send();
diff --git a/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php b/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php
index 419112f6e..2a25b94d4 100644
--- a/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php
+++ b/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php
@@ -135,7 +135,7 @@ class ListFiles extends ListRecords
->icon('tabler-forms')
->form([
TextInput::make('name')
- ->label(trans('server/file.actions.rename.name'))
+ ->label(trans('server/file.actions.rename.file_name'))
->default(fn (File $file) => $file->name)
->required(),
])
@@ -440,7 +440,7 @@ class ListFiles extends ListRecords
->log();
} catch (FileExistsException) {
AlertBanner::make('file_already_exists')
- ->title('' . $path . '
already exists!')
+ ->title(trans('server/file.alerts.file_already_exists.title', ['name' => $path]))
->danger()
->closable()
->send();
@@ -481,7 +481,7 @@ class ListFiles extends ListRecords
} catch (FileExistsException) {
$path = join_paths($this->path, $data['name']);
AlertBanner::make('folder_already_exists')
- ->title('' . $path . '
already exists!')
+ ->title(trans('server/file.alerts.file_already_exists.title', ['name' => $path]))
->danger()
->closable()
->send();
@@ -525,7 +525,8 @@ class ListFiles extends ListRecords
Tabs::make()
->contained(false)
->schema([
- Tab::make(trans('server/file.actions.upload.from_files'))
+ Tab::make('from_files')
+ ->label(trans('server/file.actions.upload.from_files'))
->live()
->schema([
FileUpload::make('files')
@@ -535,7 +536,8 @@ class ListFiles extends ListRecords
->maxSize((int) round($server->node->upload_size * (config('panel.use_binary_prefix') ? 1.048576 * 1024 : 1000)))
->multiple(),
]),
- Tab::make(trans('server/file.actions.upload.url'))
+ Tab::make('url')
+ ->label(trans('server/file.actions.upload.url'))
->live()
->disabled(fn (Get $get) => count($get('files')) > 0)
->schema([
diff --git a/app/Filament/Server/Resources/FileResource/Pages/SearchFiles.php b/app/Filament/Server/Resources/FileResource/Pages/SearchFiles.php
index 2bb97c1b6..9211417c9 100644
--- a/app/Filament/Server/Resources/FileResource/Pages/SearchFiles.php
+++ b/app/Filament/Server/Resources/FileResource/Pages/SearchFiles.php
@@ -36,7 +36,7 @@ class SearchFiles extends ListRecords
return [
$resource::getUrl() => $resource::getBreadcrumb(),
- self::getUrl(['searchTerm' => $this->searchTerm]) => trans('server/file.actions.global_search.search') . ' "' . $this->searchTerm . '"',
+ self::getUrl(['searchTerm' => $this->searchTerm]) => trans('server/file.actions.global_search.search_for_term', ['term' => ' "' . $this->searchTerm . '"']),
];
}
diff --git a/app/Filament/Server/Resources/UserResource.php b/app/Filament/Server/Resources/UserResource.php
index 1aceb74a4..8d79c7c72 100644
--- a/app/Filament/Server/Resources/UserResource.php
+++ b/app/Filament/Server/Resources/UserResource.php
@@ -95,7 +95,8 @@ class UserResource extends Resource
$permissionsArray[$data['name']][] = $permission;
}
- $tabs[] = Tab::make(str($data['name'])->headline())
+ $tabs[] = Tab::make($data['name'])
+ ->label(str($data['name'])->headline())
->schema([
Section::make()
->description(trans('server/user.permissions.' . $data['name'] . '_desc'))
diff --git a/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php b/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php
index 313afb41b..9aa8d9e93 100644
--- a/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php
+++ b/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php
@@ -53,7 +53,8 @@ class ListUsers extends ListRecords
$permissionsArray[$data['name']][] = $permission;
}
- $tabs[] = Tab::make(str($data['name'])->headline())
+ $tabs[] = Tab::make($data['name'])
+ ->label(str($data['name'])->headline())
->schema([
Section::make()
->description(trans('server/user.permissions.' . $data['name'] . '_desc'))
diff --git a/app/Filament/Server/Widgets/ServerConsole.php b/app/Filament/Server/Widgets/ServerConsole.php
index 20d17e719..c40137aae 100644
--- a/app/Filament/Server/Widgets/ServerConsole.php
+++ b/app/Filament/Server/Widgets/ServerConsole.php
@@ -133,8 +133,8 @@ class ServerConsole extends Widget
public function websocketError(): void
{
AlertBanner::make('websocket_error')
- ->title('Could not connect to websocket!')
- ->body('Check your browser console for more details.')
+ ->title(trans('server/console.websocket_error.title'))
+ ->body(trans('server/console.websocket_error.body'))
->danger()
->send();
}
diff --git a/app/Filament/Server/Widgets/ServerOverview.php b/app/Filament/Server/Widgets/ServerOverview.php
index 69b812fcd..9b798c61e 100644
--- a/app/Filament/Server/Widgets/ServerOverview.php
+++ b/app/Filament/Server/Widgets/ServerOverview.php
@@ -97,7 +97,7 @@ class ServerOverview extends StatsOverviewWidget
$this->js("window.navigator.clipboard.writeText('{$value}');");
Notification::make()
- ->title('Copied to clipboard')
+ ->title(trans('server/dashboard.copied'))
->body($value)
->success()
->send();
diff --git a/app/Listeners/Server/ServerInstalledListener.php b/app/Listeners/Server/ServerInstalledListener.php
index b5ea1a8de..f14d5cd9f 100644
--- a/app/Listeners/Server/ServerInstalledListener.php
+++ b/app/Listeners/Server/ServerInstalledListener.php
@@ -16,12 +16,12 @@ class ServerInstalledListener
Notification::make()
->status($event->successful ? 'success' : 'danger')
- ->title('Server ' . ($event->initialInstall ? 'Installation' : 'Reinstallation') . ' ' . ($event->successful ? 'completed' : 'failed'))
- ->body('Server Name: ' . $event->server->name)
+ ->title(trans('notifications.' . ($event->initialInstall ? 'installation' : 'reinstallation') . '_' . ($event->successful ? 'completed' : 'failed')))
+ ->body(trans('server/setting.server_info.server_name', ['name' => $event->server->name]))
->actions([
Action::make('view')
->button()
- ->label('Open Server')
+ ->label(trans('notifications.open_server'))
->markAsRead()
->url(fn () => Console::getUrl(panel: 'server', tenant: $event->server)),
])
diff --git a/app/Listeners/Server/SubUserAddedListener.php b/app/Listeners/Server/SubUserAddedListener.php
index 4efc72e46..98b09c927 100644
--- a/app/Listeners/Server/SubUserAddedListener.php
+++ b/app/Listeners/Server/SubUserAddedListener.php
@@ -16,12 +16,12 @@ class SubUserAddedListener
$event->subuser->loadMissing('user');
Notification::make()
- ->title('Added to Server')
- ->body('You have been added as a subuser to ' . $event->subuser->server->name . '.')
+ ->title(trans('notifications.user_added.title'))
+ ->body(trans('notifications.user_added.body', ['server' => $event->subuser->server->name]))
->actions([
Action::make('view')
->button()
- ->label('Open Server')
+ ->label(trans('notifications.open_server'))
->markAsRead()
->url(fn () => Console::getUrl(panel: 'server', tenant: $event->subuser->server)),
])
diff --git a/app/Listeners/Server/SubUserRemovedListener.php b/app/Listeners/Server/SubUserRemovedListener.php
index 9897a422b..473a8ea6b 100644
--- a/app/Listeners/Server/SubUserRemovedListener.php
+++ b/app/Listeners/Server/SubUserRemovedListener.php
@@ -11,8 +11,8 @@ class SubUserRemovedListener
public function handle(SubUserRemoved $event): void
{
Notification::make()
- ->title('Removed from Server')
- ->body('You have been removed as a subuser from ' . $event->server->name . '.')
+ ->title(trans('notifications.user_removed.title'))
+ ->body(trans('notifications.user_removed.body', ['server' => $event->server->name]))
->sendToDatabase($event->user);
$event->user->notify(new RemovedFromServer($event->server));
diff --git a/app/Livewire/Installer/PanelInstaller.php b/app/Livewire/Installer/PanelInstaller.php
index 3cd71c012..14902776c 100644
--- a/app/Livewire/Installer/PanelInstaller.php
+++ b/app/Livewire/Installer/PanelInstaller.php
@@ -9,12 +9,16 @@ use App\Livewire\Installer\Steps\QueueStep;
use App\Livewire\Installer\Steps\RequirementsStep;
use App\Livewire\Installer\Steps\SessionStep;
use App\Models\User;
+use App\Services\Helpers\LanguageService;
use App\Services\Users\UserCreationService;
use App\Traits\CheckMigrationsTrait;
use App\Traits\EnvironmentWriterTrait;
use Exception;
use Filament\Facades\Filament;
use Filament\Forms\Components\Actions\Action;
+use Filament\Forms\Components\Component;
+use Filament\Forms\Components\Grid;
+use Filament\Forms\Components\Select;
use Filament\Forms\Components\Wizard;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
@@ -23,6 +27,7 @@ use Filament\Notifications\Notification;
use Filament\Pages\SimplePage;
use Filament\Support\Enums\MaxWidth;
use Filament\Support\Exceptions\Halt;
+use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\HtmlString;
@@ -61,6 +66,10 @@ class PanelInstaller extends SimplePage implements HasForms
protected function getFormSchema(): array
{
return [
+ Grid::make()
+ ->schema([
+ $this->getLanguageComponent(),
+ ]),
Wizard::make([
RequirementsStep::make(),
EnvironmentStep::make($this),
@@ -77,13 +86,29 @@ class PanelInstaller extends SimplePage implements HasForms
size="sm"
wire:loading.attr="disabled"
>
- Finish
+ trans('installer.finish')
www-data
is your webserver user. On some systems this username might be different!'))
+ ->label(new HtmlString(trans('installer.queue.fields.crontab')))
->disabled()
->hintAction(fn () => request()->isSecure() ? CopyAction::make() : null)
->default('(crontab -l -u www-data 2>/dev/null; echo "* * * * * php ' . base_path() . '/artisan schedule:run >> /dev/null 2>&1") | crontab -u www-data -')
->hidden(fn () => @file_exists('/.dockerenv'))
->columnSpanFull(),
TextInput::make('queueService')
- ->label(new HtmlString('To setup the queue worker service you simply have to run the following command.'))
+ ->label(new HtmlString(trans('installer.queue.fields.service')))
->disabled()
->hintAction(fn () => request()->isSecure() ? CopyAction::make() : null)
->default('sudo php ' . base_path() . '/artisan p:environment:queue-service')
diff --git a/app/Livewire/Installer/Steps/RequirementsStep.php b/app/Livewire/Installer/Steps/RequirementsStep.php
index 0ba9bc518..1713f17a1 100644
--- a/app/Livewire/Installer/Steps/RequirementsStep.php
+++ b/app/Livewire/Installer/Steps/RequirementsStep.php
@@ -18,13 +18,13 @@ class RequirementsStep
$correctPhpVersion = $compare >= 0;
$fields = [
- Section::make('PHP Version')
- ->description(self::MIN_PHP_VERSION . ' or newer')
+ Section::make(trans('installer.requirements.sections.version.title'))
+ ->description(trans('installer.requirements.sections.version.or_newer', ['version' => self::MIN_PHP_VERSION]))
->icon($correctPhpVersion ? 'tabler-check' : 'tabler-x')
->iconColor($correctPhpVersion ? 'success' : 'danger')
->schema([
Placeholder::make('')
- ->content('Your PHP Version is ' . PHP_VERSION . '.'),
+ ->content(trans('installer.requirements.sections.version.content', ['version' => PHP_VERSION])),
]),
];
@@ -41,16 +41,16 @@ class RequirementsStep
];
$allExtensionsInstalled = !in_array(false, $phpExtensions);
- $fields[] = Section::make('PHP Extensions')
+ $fields[] = Section::make(trans('installer.requirements.sections.extensions.title'))
->description(implode(', ', array_keys($phpExtensions)))
->icon($allExtensionsInstalled ? 'tabler-check' : 'tabler-x')
->iconColor($allExtensionsInstalled ? 'success' : 'danger')
->schema([
Placeholder::make('')
- ->content('All needed PHP Extensions are installed.')
+ ->content(trans('installer.requirements.sections.extensions.good'))
->visible($allExtensionsInstalled),
Placeholder::make('')
- ->content('The following PHP Extensions are missing: ' . implode(', ', array_keys($phpExtensions, false)))
+ ->content(trans('installer.requirements.sections.extensions.bad', ['extensions' => implode(', ', array_keys($phpExtensions, false))]))
->visible(!$allExtensionsInstalled),
]);
@@ -60,30 +60,30 @@ class RequirementsStep
];
$correctFolderPermissions = !in_array(false, $folderPermissions);
- $fields[] = Section::make('Folder Permissions')
+ $fields[] = Section::make(trans('installer.requirements.sections.permissions.title'))
->description(implode(', ', array_keys($folderPermissions)))
->icon($correctFolderPermissions ? 'tabler-check' : 'tabler-x')
->iconColor($correctFolderPermissions ? 'success' : 'danger')
->schema([
Placeholder::make('')
- ->content('All Folders have the correct permissions.')
+ ->content(trans('installer.requirements.sections.permissions.good'))
->visible($correctFolderPermissions),
Placeholder::make('')
- ->content('The following Folders have wrong permissions: ' . implode(', ', array_keys($folderPermissions, false)))
+ ->content(trans('installer.requirements.sections.permissions.bad', ['folders' => implode(', ', array_keys($folderPermissions, false))]))
->visible(!$correctFolderPermissions),
]);
return Step::make('requirements')
- ->label('Server Requirements')
+ ->label(trans('installer.requirements.title'))
->schema($fields)
->afterValidation(function () use ($correctPhpVersion, $allExtensionsInstalled, $correctFolderPermissions) {
if (!$correctPhpVersion || !$allExtensionsInstalled || !$correctFolderPermissions) {
Notification::make()
- ->title('Some requirements are missing!')
+ ->title(trans('installer.requirements.exception'))
->danger()
->send();
- throw new Halt('Some requirements are missing');
+ throw new Halt(trans('installer.requirements.title'));
}
});
}
diff --git a/app/Livewire/Installer/Steps/SessionStep.php b/app/Livewire/Installer/Steps/SessionStep.php
index 0d2293c4c..e7e95adc5 100644
--- a/app/Livewire/Installer/Steps/SessionStep.php
+++ b/app/Livewire/Installer/Steps/SessionStep.php
@@ -19,12 +19,12 @@ class SessionStep
public static function make(): Step
{
return Step::make('session')
- ->label('Session')
+ ->label(trans('installer.session.title'))
->schema([
ToggleButtons::make('env_session.SESSION_DRIVER')
- ->label('Session Driver')
+ ->label(trans('installer.session.driver'))
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The driver used for storing sessions. We recommend "Filesystem" or "Database".')
+ ->hintIconTooltip(trans('installer.session.driver_help'))
->required()
->inline()
->options(self::SESSION_DRIVERS)
diff --git a/app/Models/File.php b/app/Models/File.php
index 759f5e15b..3574588c6 100644
--- a/app/Models/File.php
+++ b/app/Models/File.php
@@ -195,7 +195,7 @@ class File extends Model
}
AlertBanner::make('files_node_error')
- ->title('Could not load files!')
+ ->title(trans('server/file.alerts.files_node_error.title'))
->body($message->toString())
->danger()
->send();
diff --git a/app/Providers/Filament/ServerPanelProvider.php b/app/Providers/Filament/ServerPanelProvider.php
index 9c2901ad6..a04b2fa5d 100644
--- a/app/Providers/Filament/ServerPanelProvider.php
+++ b/app/Providers/Filament/ServerPanelProvider.php
@@ -26,7 +26,7 @@ class ServerPanelProvider extends PanelProvider
->label(fn () => trans('filament-panels::pages/auth/edit-profile.label'))
->url(fn () => EditProfile::getUrl(panel: 'app')),
MenuItem::make()
- ->label('Server List')
+ ->label(trans('server/dashboard.list'))
->icon('tabler-brand-docker')
->url(fn () => ListServers::getUrl(panel: 'app'))
->sort(6),
diff --git a/app/Repositories/Daemon/DaemonServerRepository.php b/app/Repositories/Daemon/DaemonServerRepository.php
index ae88ceadd..552c55e32 100644
--- a/app/Repositories/Daemon/DaemonServerRepository.php
+++ b/app/Repositories/Daemon/DaemonServerRepository.php
@@ -31,8 +31,8 @@ class DaemonServerRepository extends DaemonRepository
if ($requestBadGateway && $requestFromCloudflare && !$requestCachedFromCloudflare) {
Notification::make()
- ->title('Cloudflare Issue')
- ->body('Your Node is not accessible by Cloudflare')
+ ->title(trans('admin/node.cloudflare_issue.title'))
+ ->body(trans('admin/node.cloudflare_issue.body'))
->danger()
->send();
}
diff --git a/app/Services/Eggs/Variables/VariableUpdateService.php b/app/Services/Eggs/Variables/VariableUpdateService.php
index 782451e74..ddba27c3f 100644
--- a/app/Services/Eggs/Variables/VariableUpdateService.php
+++ b/app/Services/Eggs/Variables/VariableUpdateService.php
@@ -46,7 +46,7 @@ class VariableUpdateService
{
if (!is_null(array_get($data, 'env_variable'))) {
if (in_array(strtoupper(array_get($data, 'env_variable')), EggVariable::RESERVED_ENV_NAMES)) {
- throw new ReservedVariableNameException(trans('exceptions.service.variables.reserved_name', ['name' => array_get($data, 'env_variable')]));
+ throw new ReservedVariableNameException(trans('exceptions.variables.reserved_name', ['name' => array_get($data, 'env_variable')]));
}
$search = EggVariable::query()
@@ -56,7 +56,7 @@ class VariableUpdateService
->count();
if ($search > 0) {
- throw new DisplayException(trans('exceptions.service.variables.env_not_unique', ['name' => array_get($data, 'env_variable')]));
+ throw new DisplayException(trans('exceptions.variables.env_not_unique', ['name' => array_get($data, 'env_variable')]));
}
}
diff --git a/app/Services/Servers/SuspensionService.php b/app/Services/Servers/SuspensionService.php
index d2e17e09f..f2b85d182 100644
--- a/app/Services/Servers/SuspensionService.php
+++ b/app/Services/Servers/SuspensionService.php
@@ -30,14 +30,14 @@ class SuspensionService
// suspended in the database. Additionally, nothing needs to happen if the server
// is not suspended, and we try to un-suspend the instance.
if ($isSuspending === $server->isSuspended()) {
- Notification::make()->danger()->title('Failed!')->body('Server is already suspended!')->send();
+ Notification::make()->danger()->title(trans('notifications.failed'))->body(trans('admin/server.notifications.server_already_suspended'))->send();
return;
}
// Check if the server is currently being transferred.
if (!is_null($server->transfer)) {
- Notification::make()->danger()->title('Failed!')->body('Server is currently being transferred.')->send();
+ Notification::make()->danger()->title(trans('notifications.failed'))->body(trans('admin/server.notifications.already_transfering'))->send();
throw new ConflictHttpException('Cannot toggle suspension status on a server that is currently being transferred.');
}
diff --git a/lang/en/admin/apikey.php b/lang/en/admin/apikey.php
index c71e0d24b..5c288c725 100644
--- a/lang/en/admin/apikey.php
+++ b/lang/en/admin/apikey.php
@@ -2,7 +2,7 @@
return [
'title' => 'Application API Keys',
- 'empty_table' => 'No API keys',
+ 'empty' => 'No API keys',
'whitelist' => 'Whitelisted IPv4 Addresses',
'whitelist_help' => 'API keys can be restricted to only work from specific IPv4 addresses. Enter each address on a new line.',
'whitelist_placeholder' => 'Example: 127.0.0.1 or 192.168.1.1',
diff --git a/lang/en/admin/egg.php b/lang/en/admin/egg.php
index 7a3c19a45..600c9cb4b 100644
--- a/lang/en/admin/egg.php
+++ b/lang/en/admin/egg.php
@@ -23,7 +23,7 @@ return [
],
'export' => [
'modal' => 'How would you like to export :egg ?',
- 'as' => 'As',
+ 'as' => 'As .:format',
],
'in_use' => 'In Use',
'servers' => 'Servers',
diff --git a/lang/en/admin/health.php b/lang/en/admin/health.php
index 8ee19a4da..03272d211 100644
--- a/lang/en/admin/health.php
+++ b/lang/en/admin/health.php
@@ -55,6 +55,6 @@ return [
],
'checks' => [
'successful' => 'Successful',
- 'failed' => 'Failed',
+ 'failed' => 'Failed :checks',
],
];
diff --git a/lang/en/admin/node.php b/lang/en/admin/node.php
index 7587101df..e94b03648 100644
--- a/lang/en/admin/node.php
+++ b/lang/en/admin/node.php
@@ -29,7 +29,7 @@ return [
'architecture' => 'Architecture',
'kernel' => 'Kernel',
'unknown' => 'Unknown',
- 'latest' => 'Latest',
+ 'latest' => '(Latest: :version)',
'node_uuid' => 'Node UUID',
'node_id' => 'Node ID',
@@ -88,6 +88,7 @@ return [
'auto_deploy' => 'Auto Deploy Command',
'auto_question' => 'Choose between Standalone and Docker install.',
+ 'auto_label' => 'Type',
'standalone' => 'Standalone',
'docker' => 'Docker',
'auto_command' => 'To auto-configure your node run the following command:',
@@ -112,4 +113,9 @@ return [
'error_connecting' => 'Error connecting to :node',
'error_connecting_description' => 'The configuration could not be automatically updated on Wings, you will need to manually update the configuration file.',
'allocation' => 'Allocation',
+
+ 'cloudflare_issue' => [
+ 'title' => 'Cloudflare Issue',
+ 'body' => 'Your Node is not accessible by Cloudflare',
+ ],
];
diff --git a/lang/en/admin/server.php b/lang/en/admin/server.php
index 3fac2ef1e..8ed03f386 100644
--- a/lang/en/admin/server.php
+++ b/lang/en/admin/server.php
@@ -111,6 +111,7 @@ return [
'notifications' => [
'server_suspension' => 'Server Suspension',
'server_suspended' => 'Server has been suspended',
+ 'server_already_suspended' => 'Server is already suspended!',
'server_suspend_help' => 'This will suspend the Server, stop any running processes, and immediately block the user from being able to access their files or otherwise manage the Server through the panel or API.',
'server_unsuspend_help' => 'This will unsuspend the Server and restore normal user access.',
'server_unsuspended' => 'Server has been unsuspended',
@@ -132,6 +133,9 @@ return [
'reinstall_started' => 'Reinstall started',
'reinstall_failed' => 'Could not start reinstall',
'log_failed' => 'Could not connect to Wings to retrieve server install log.',
+ 'transfer_started' => 'Transfer started',
+ 'transfer_failed' => 'Transfer failed',
+ 'already_transfering' => 'Server is currently being transferred.',
],
'notes' => 'Notes',
'no_notes' => 'No Notes',
diff --git a/lang/en/admin/setting.php b/lang/en/admin/setting.php
index 97bafa4ab..ca4598b03 100644
--- a/lang/en/admin/setting.php
+++ b/lang/en/admin/setting.php
@@ -89,6 +89,7 @@ return [
],
'oauth' => [
'enable' => 'Enable',
+ 'enable_schema' => 'Enable :schema',
'disable' => 'Disable',
'client_id' => 'Client ID',
'client_secret' => 'Client Secret',
diff --git a/lang/en/command/messages.php b/lang/en/command/messages.php
index ba4b62454..f245099d7 100644
--- a/lang/en/command/messages.php
+++ b/lang/en/command/messages.php
@@ -14,10 +14,7 @@ return [
'ask_password' => 'Password',
'ask_password_tip' => 'If you would like to create an account with a random password emailed to the user, re-run this command (CTRL+C) and pass the `--no-password` flag.',
'ask_password_help' => 'Passwords must be at least 8 characters in length and contain at least one capital letter and number.',
- '2fa_help_text' => [
- 'This command will disable 2-factor authentication for a user\'s account if it is enabled. This should only be used as an account recovery command if the user is locked out of their account.',
- 'If this is not what you wanted to do, press CTRL+C to exit this process.',
- ],
+ '2fa_help_text' => 'This command will disable 2-factor authentication for a user\'s account if it is enabled. This should only be used as an account recovery command if the user is locked out of their account. If this is not what you wanted to do, press CTRL+C to exit this process.',
'2fa_disabled' => '2-Factor authentication has been disabled for :email.',
],
'schedule' => [
diff --git a/lang/en/commands.php b/lang/en/commands.php
index 659a7aa9b..7390103f2 100644
--- a/lang/en/commands.php
+++ b/lang/en/commands.php
@@ -54,13 +54,13 @@ return [
'schedule' => [
'process' => [
'no_tasks' => 'There are no scheduled tasks for servers that need to be run.',
- 'error_message' => 'An error was encountered while processing Schedule: ',
+ 'error_message' => 'An error was encountered while processing Schedule: :schedules',
],
],
'upgrade' => [
'integrity' => 'This command does not verify the integrity of downloaded assets. Please ensure that you trust the download source before continuing. If you do not wish to download an archive, please indicate that using the --skip-download flag, or answering "no" to the question below.',
'source_url' => 'Download Source (set with --url=):',
- 'php_version' => 'Cannot execute self-upgrade process. The minimum required PHP version required is 7.4.0, you have',
+ 'php_version' => 'Cannot execute self-upgrade process. The minimum required PHP version required is 7.4.0, you have :current',
'skipDownload' => 'Would you like to download and unpack the archive files for the latest version?',
'webserver_user' => 'Your webserver user has been detected as www-data
is your webserver user. On some systems this username might be different!',
+ 'service' => 'To setup the queue worker service you simply have to run the following command.',
+ ],
+ ],
+ 'exceptions' => [
+ 'write_env' => 'Could not write to .env file',
+ 'migration' => 'Could not run migrations',
+ 'create_user' => 'Could not create admin user',
+ ],
+ 'finish' => 'Finish',
+];
diff --git a/lang/en/notifications.php b/lang/en/notifications.php
new file mode 100644
index 000000000..5005259f2
--- /dev/null
+++ b/lang/en/notifications.php
@@ -0,0 +1,18 @@
+ 'Open Server',
+ 'installation_completed' => 'Server Installation Completed',
+ 'installation_failed' => 'Server Installation Failed',
+ 'reinstallation_completed' => 'Server Reinstallation Completed',
+ 'reinstallation_failed' => 'Server Reinstallation Failed',
+ 'failed' => 'Failed',
+ 'user_added' => [
+ 'title' => 'Added to Server',
+ 'body' => 'You have been added as a subuser to :server.',
+ ],
+ 'user_removed' => [
+ 'title' => 'Removed from Server',
+ 'body' => 'You have been removed as a subuser from :server.',
+ ],
+];
diff --git a/lang/en/profile.php b/lang/en/profile.php
index 662f84df1..a9ced28f6 100644
--- a/lang/en/profile.php
+++ b/lang/en/profile.php
@@ -26,7 +26,7 @@ return [
'unlinked' => ':name unlinked',
'scan_qr' => 'Scan QR Code',
'code' => 'Code',
- 'setup_key' => 'Setup Key',
+ 'setup_key' => 'Setup Key: :secret',
'invalid_code' => 'Invalid 2FA Code',
'code_help' => 'Scan the QR code above using your two-step authentication app, then enter the code generated.',
'2fa_enabled' => 'Two Factor Authentication is currently enabled!',
diff --git a/lang/en/server/backup.php b/lang/en/server/backup.php
index 71276b638..8ba5b8514 100644
--- a/lang/en/server/backup.php
+++ b/lang/en/server/backup.php
@@ -29,6 +29,11 @@ return [
'unlock' => 'Unlock',
],
'download' => 'Download',
+ 'rename' => [
+ 'title' => 'Rename',
+ 'new_name' => 'Backup Name',
+ 'notification_success' => 'Backup Renamed Successfully',
+ ],
'restore' => [
'title' => 'Restore',
'helper' => 'Your server will be stopped. You will not be able to control the power state, access the file manager, or create additional backups until this process is completed.',
diff --git a/lang/en/server/console.php b/lang/en/server/console.php
index 8a00cdd00..4cdd9906b 100644
--- a/lang/en/server/console.php
+++ b/lang/en/server/console.php
@@ -36,4 +36,8 @@ return [
'offline' => 'Offline',
'missing' => 'Missing',
],
+ 'websocket_error' => [
+ 'title' => 'Could not connect to websocket!',
+ 'body' => 'Check your browser console for more details.',
+ ],
];
diff --git a/lang/en/server/dashboard.php b/lang/en/server/dashboard.php
index bf527ae09..4023b36ed 100644
--- a/lang/en/server/dashboard.php
+++ b/lang/en/server/dashboard.php
@@ -3,9 +3,11 @@
return [
'title' => 'Servers',
'list' => 'Server List',
- 'my_servers' => 'My Servers',
- 'other_servers' => 'Others\' Servers',
- 'all_servers' => 'All Servers',
+ 'tabs' => [
+ 'my' => 'My Servers',
+ 'other' => 'Others\' Servers',
+ 'all' => 'All Servers',
+ ],
'empty_own' => 'You don\'t own any servers!',
'empty_other' => 'You don\'t have access to any servers!',
@@ -22,4 +24,7 @@ return [
'loading' => 'Loading...',
'power_actions' => 'Power Actions',
+ 'power_action_sent' => ':action sent to :name',
+
+ 'copied' => 'Copied to clipboard',
];
diff --git a/lang/en/server/database.php b/lang/en/server/database.php
index 72a3ddd04..219e24809 100644
--- a/lang/en/server/database.php
+++ b/lang/en/server/database.php
@@ -2,6 +2,7 @@
return [
'title' => 'Databases',
+ 'empty' => 'No Databases',
'create_database' => 'Create Database',
'limit' => 'Database limit reached',
'viewing' => 'Viewing: :database',
diff --git a/lang/en/server/file.php b/lang/en/server/file.php
index 8e4bee67b..e0723271c 100644
--- a/lang/en/server/file.php
+++ b/lang/en/server/file.php
@@ -66,6 +66,7 @@ return [
'search_term' => 'Search term',
'search_term_placeholder' => 'Enter a search term, ex. *.txt',
'search' => 'Search',
+ 'search_for_term' => 'Search :term',
],
'delete' => [
'notification' => 'File Deleted',
@@ -79,4 +80,26 @@ return [
'notification' => 'File Saved',
],
],
+ 'alerts' => [
+ 'file_too_large' => [
+ 'title' => ':name
is too large!',
+ 'body' => 'Max is :max',
+ ],
+ 'file_not_found' => [
+ 'title' => ':name
not found!',
+ ],
+ 'file_not_editable' => [
+ 'title' => ':name
is a directory',
+ ],
+ 'file_already_exists' => [
+ 'title' => ':name
already exists!',
+ ],
+ 'files_node_error' => [
+ 'title' => 'Could not load files!',
+ ],
+ 'pelicanignore' => [
+ 'title' => 'You are editing a .pelicanignore
file!',
+ 'body' => 'Any files or directories listed in here will be excluded from backups. Wildcards are supported by using an asterisk (*
).!
).',
+ ],
+ ],
];
diff --git a/lang/en/server/setting.php b/lang/en/server/setting.php
index 677ab41c4..33236faaa 100644
--- a/lang/en/server/setting.php
+++ b/lang/en/server/setting.php
@@ -6,6 +6,7 @@ return [
'title' => 'Server Information',
'information' => 'Information',
'name' => 'Server Name',
+ 'server_name' => 'Server Name: :name',
'notification_name' => 'Updated Server Name',
'description' => 'Server Description',
'notification_description' => 'Updated Server Description',
@@ -15,7 +16,7 @@ return [
'limits' => [
'title' => 'Limits',
'unlimited' => 'Unlimited',
- 'of' => 'of',
+ 'of' => 'of :max',
'cpu' => 'CPU',
'memory' => 'Memory',
'disk' => 'Disk Space',
diff --git a/lang/en/server/user.php b/lang/en/server/user.php
index e8e21d12a..a56c71961 100644
--- a/lang/en/server/user.php
+++ b/lang/en/server/user.php
@@ -34,7 +34,7 @@ return [
'settings_rename' => 'Allows a user to rename this server.',
'settings_description' => 'Allows a user to change the description of this server.',
'activity_read' => 'Allows a user to view the activity logs for the server.',
- 'websocket_*' => 'Allows a user access to the websocket for this server.',
+ 'websocket_connect' => 'Allows a user access to the websocket for this server.',
'control_console' => 'Allows a user to send data to the server console.',
'control_start' => 'Allows a user to start the server instance.',
'control_stop' => 'Allows a user to stop the server instance.',