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 437058d9c..20e959f6a 100644
--- a/app/Console/Commands/User/DisableTwoFactorCommand.php
+++ b/app/Console/Commands/User/DisableTwoFactorCommand.php
@@ -20,7 +20,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 7aa5e41de..7a08cec49 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 34e676f8b..3c20c6af2 100644
--- a/app/Filament/Admin/Pages/Settings.php
+++ b/app/Filament/Admin/Pages/Settings.php
@@ -125,7 +125,7 @@ class Settings extends Page implements HasSchemas
->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())
@@ -570,7 +570,7 @@ class Settings extends Page implements HasSchemas
->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/ApiKeys/ApiKeyResource.php b/app/Filament/Admin/Resources/ApiKeys/ApiKeyResource.php
index 5020b055b..e949b92d1 100644
--- a/app/Filament/Admin/Resources/ApiKeys/ApiKeyResource.php
+++ b/app/Filament/Admin/Resources/ApiKeys/ApiKeyResource.php
@@ -101,7 +101,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/Eggs/Pages/CreateEgg.php b/app/Filament/Admin/Resources/Eggs/Pages/CreateEgg.php
index 134396c09..fc2420b0a 100644
--- a/app/Filament/Admin/Resources/Eggs/Pages/CreateEgg.php
+++ b/app/Filament/Admin/Resources/Eggs/Pages/CreateEgg.php
@@ -61,7 +61,8 @@ class CreateEgg extends CreateRecord
return $schema
->components([
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')
@@ -127,7 +128,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')
@@ -150,7 +152,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')
@@ -242,7 +245,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/Eggs/Pages/EditEgg.php b/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php
index aec8055e5..52712e4ce 100644
--- a/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php
+++ b/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php
@@ -48,7 +48,8 @@ class EditEgg extends EditRecord
return $schema
->components([
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([
@@ -119,7 +120,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([
@@ -139,7 +141,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([
@@ -231,7 +234,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/Eggs/RelationManagers/ServersRelationManager.php b/app/Filament/Admin/Resources/Eggs/RelationManagers/ServersRelationManager.php
index c216b21ce..829710b8a 100644
--- a/app/Filament/Admin/Resources/Eggs/RelationManagers/ServersRelationManager.php
+++ b/app/Filament/Admin/Resources/Eggs/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/Nodes/Pages/CreateNode.php b/app/Filament/Admin/Resources/Nodes/Pages/CreateNode.php
index 21ea0f70e..80d6aa919 100644
--- a/app/Filament/Admin/Resources/Nodes/Pages/CreateNode.php
+++ b/app/Filament/Admin/Resources/Nodes/Pages/CreateNode.php
@@ -408,7 +408,7 @@ class CreateNode extends CreateRecord
type="submit"
size="sm"
>
- Create Node
+ {{ trans('admin/node.create') }}
BLADE))),
]);
diff --git a/app/Filament/Admin/Resources/Nodes/Pages/EditNode.php b/app/Filament/Admin/Resources/Nodes/Pages/EditNode.php
index 9d25d0448..32c888871 100644
--- a/app/Filament/Admin/Resources/Nodes/Pages/EditNode.php
+++ b/app/Filament/Admin/Resources/Nodes/Pages/EditNode.php
@@ -86,7 +86,7 @@ class EditNode extends EditRecord
->schema([
TextEntry::make('wings_version')
->label(trans('admin/node.wings_version'))
- ->state(fn (Node $node, SoftwareVersionService $versionService) => ($node->systemInformation()['version'] ?? trans('admin/node.unknown')) . ' (' . trans('admin/node.latest') . ': ' . $versionService->latestWingsVersion() . ')'),
+ ->state(fn (Node $node, SoftwareVersionService $versionService) => ($node->systemInformation()['version'] ?? trans('admin/node.unknown')) . ' ' . trans('admin/node.latest', ['version' => $versionService->latestWingsVersion()])),
TextEntry::make('cpu_threads')
->label(trans('admin/node.cpu_threads'))
->state(fn (Node $node) => $node->systemInformation()['cpu_count'] ?? 0),
@@ -114,7 +114,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')
@@ -264,7 +265,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,
@@ -540,7 +541,7 @@ class EditNode extends EditRecord
->suffix('%'),
]),
]),
- Tab::make('Config')
+ Tab::make('config_file')
->label(trans('admin/node.tabs.config_file'))
->icon('tabler-code')
->schema([
@@ -569,7 +570,7 @@ class EditNode extends EditRecord
->modalFooterActionsAlignment(Alignment::Center)
->schema([
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/Roles/RoleResource.php b/app/Filament/Admin/Resources/Roles/RoleResource.php
index 76ba6638c..db43b7129 100644
--- a/app/Filament/Admin/Resources/Roles/RoleResource.php
+++ b/app/Filament/Admin/Resources/Roles/RoleResource.php
@@ -139,7 +139,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/Servers/Pages/CreateServer.php b/app/Filament/Admin/Resources/Servers/Pages/CreateServer.php
index 190282f7a..5c05649db 100644
--- a/app/Filament/Admin/Resources/Servers/Pages/CreateServer.php
+++ b/app/Filament/Admin/Resources/Servers/Pages/CreateServer.php
@@ -268,7 +268,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'])
@@ -763,7 +763,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(),
@@ -779,7 +779,7 @@ class CreateServer extends CreateRecord
type="submit"
size="sm"
>
- Create Server
+ {{ trans('admin/server.create') }}
BLADE))),
]);
diff --git a/app/Filament/Admin/Resources/Servers/Pages/EditServer.php b/app/Filament/Admin/Resources/Servers/Pages/EditServer.php
index 421b27fff..0770c050c 100644
--- a/app/Filament/Admin/Resources/Servers/Pages/EditServer.php
+++ b/app/Filament/Admin/Resources/Servers/Pages/EditServer.php
@@ -90,7 +90,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')
@@ -217,7 +218,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'))
@@ -537,7 +539,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,
@@ -657,12 +660,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.actions'))
+ Tab::make('actions')
+ ->label(trans('admin/server.actions'))
->icon('tabler-settings')
->schema([
Fieldset::make(trans('admin/server.actions'))
@@ -795,12 +800,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/Users/UserResource.php b/app/Filament/Admin/Resources/Users/UserResource.php
index 2506e5490..04818755d 100644
--- a/app/Filament/Admin/Resources/Users/UserResource.php
+++ b/app/Filament/Admin/Resources/Users/UserResource.php
@@ -89,7 +89,7 @@ class UserResource extends Resource
->icon('tabler-mail')
->searchable(),
IconColumn::make('mfa_email_enabled')
- ->label('2FA')
+ ->label(trans('profile.tabs.2fa'))
->visibleFrom('lg')
->icon(fn (User $user) => filled($user->mfa_app_secret) ? 'tabler-qrcode' : ($user->mfa_email_enabled ? 'tabler-mail' : 'tabler-lock-open-off'))
->tooltip(fn (User $user) => filled($user->mfa_app_secret) ? 'App' : ($user->mfa_email_enabled ? 'E-Mail' : 'None')),
diff --git a/app/Filament/Admin/Resources/Webhooks/WebhookResource.php b/app/Filament/Admin/Resources/Webhooks/WebhookResource.php
index 4f3237f5a..a8385a3a6 100644
--- a/app/Filament/Admin/Resources/Webhooks/WebhookResource.php
+++ b/app/Filament/Admin/Resources/Webhooks/WebhookResource.php
@@ -219,7 +219,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/Servers/Pages/ListServers.php b/app/Filament/App/Resources/Servers/Pages/ListServers.php
index 0a10b982f..05ba247e9 100644
--- a/app/Filament/App/Resources/Servers/Pages/ListServers.php
+++ b/app/Filament/App/Resources/Servers/Pages/ListServers.php
@@ -62,13 +62,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(),
@@ -143,15 +143,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()),
];
}
@@ -205,8 +208,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 4c81cf441..ad3d8a81b 100644
--- a/app/Filament/Components/Actions/ExportEggAction.php
+++ b/app/Filament/Components/Actions/ExportEggAction.php
@@ -40,12 +40,12 @@ class ExportEggAction extends Action
$this->modalFooterActions([ //TODO: Close modal after clicking ->close() does not allow action to preform before closing modal
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')),
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 16208eda5..5662f1047 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 3850d4a72..45e0b5ca5 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/Pages/Auth/EditProfile.php b/app/Filament/Pages/Auth/EditProfile.php
index cb6b09629..547f71785 100644
--- a/app/Filament/Pages/Auth/EditProfile.php
+++ b/app/Filament/Pages/Auth/EditProfile.php
@@ -86,7 +86,8 @@ class EditProfile extends BaseEditProfile
->components([
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')
@@ -159,7 +160,8 @@ class EditProfile extends BaseEditProfile
->action(fn () => $fileUpload->getDisk()->delete($path));
}),
]),
- 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) {
@@ -197,7 +199,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')
->visible(fn () => Filament::hasMultiFactorAuthentication())
->schema(collect(Filament::getMultiFactorAuthenticationProviders())
@@ -205,7 +208,8 @@ class EditProfile extends BaseEditProfile
->map(fn (MultiFactorAuthenticationProvider $multiFactorAuthenticationProvider) => Group::make($multiFactorAuthenticationProvider->getManagementSchemaComponents())
->statePath($multiFactorAuthenticationProvider->getId()))
->all()),
- Tab::make(trans('profile.tabs.api_keys'))
+ Tab::make('api_keys')
+ ->label(trans('profile.tabs.api_keys'))
->icon('tabler-key')
->schema([
Grid::make(5)
@@ -291,7 +295,8 @@ class EditProfile extends BaseEditProfile
]),
]),
]),
- Tab::make(trans('profile.tabs.ssh_keys'))
+ Tab::make('ssh_keys')
+ ->label(trans('profile.tabs.ssh_keys'))
->icon('tabler-lock-code')
->schema([
Grid::make(5)->schema([
@@ -379,7 +384,8 @@ class EditProfile extends BaseEditProfile
]),
]),
]),
- Tab::make(trans('profile.tabs.activity'))
+ Tab::make('activity')
+ ->label(trans('profile.tabs.activity'))
->icon('tabler-history')
->schema([
Repeater::make('activity')
@@ -396,7 +402,8 @@ class EditProfile extends BaseEditProfile
->state(fn (ActivityLog $log) => new HtmlString($log->htmlable())),
]),
]),
- Tab::make(trans('profile.tabs.customization'))
+ Tab::make('customization')
+ ->label(trans('profile.tabs.customization'))
->icon('tabler-adjustments')
->schema([
Section::make(trans('profile.dashboard'))
diff --git a/app/Filament/Pages/Auth/Login.php b/app/Filament/Pages/Auth/Login.php
index 1cd243c8b..ec6e09d15 100644
--- a/app/Filament/Pages/Auth/Login.php
+++ b/app/Filament/Pages/Auth/Login.php
@@ -58,7 +58,7 @@ class Login extends BaseLogin
protected function getLoginFormComponent(): Component
{
return TextInput::make('login')
- ->label('Login')
+ ->label(trans('filament-panels::pages/auth/login.title'))
->required()
->autocomplete()
->autofocus()
diff --git a/app/Filament/Server/Pages/Settings.php b/app/Filament/Server/Pages/Settings.php
index 6c69f76de..1da968058 100644
--- a/app/Filament/Server/Pages/Settings.php
+++ b/app/Filament/Server/Pages/Settings.php
@@ -135,21 +135,21 @@ class Settings extends ServerFormPage
->prefixIcon('tabler-file-zip')
->columnSpan(1)
->disabled()
- ->formatStateUsing(fn ($state, Server $server) => !$state ? 'No Backups' : $server->backups->count() . ' ' .trans('server/setting.server_info.limits.of') . ' ' . $state),
+ ->formatStateUsing(fn ($state, Server $server) => !$state ? trans('server/backup.empty') : $server->backups->count() . ' ' .trans('server/setting.server_info.limits.of', ['max' => $state])),
TextInput::make('database_limit')
->label('')
->prefix(trans('server/setting.server_info.limits.databases'))
->prefixIcon('tabler-database')
->columnSpan(1)
->disabled()
- ->formatStateUsing(fn ($state, Server $server) => !$state ? 'No Databases' : $server->databases->count() . ' ' . trans('server/setting.server_info.limits.of') . ' ' .$state),
+ ->formatStateUsing(fn ($state, Server $server) => !$state ? trans('server/database.empty') : $server->databases->count() . ' ' . trans('server/setting.server_info.limits.of', ['max' => $state])),
TextInput::make('allocation_limit')
->label('')
->prefix(trans('server/setting.server_info.limits.allocations'))
->prefixIcon('tabler-network')
->columnSpan(1)
->disabled()
- ->formatStateUsing(fn ($state, Server $server) => !$state ? trans('server/setting.server_info.limits.no_allocations') : $server->allocations->count() . ' ' .trans('server/setting.server_info.limits.of') . ' ' . $state),
+ ->formatStateUsing(fn ($state, Server $server) => !$state ? trans('server/setting.server_info.limits.no_allocations') : $server->allocations->count() . ' ' .trans('server/setting.server_info.limits.of', ['max' => $state])),
]),
Fieldset::make(trans('server/setting.server_info.sftp.title'))
->columnSpanFull()
@@ -262,13 +262,13 @@ class Settings extends ServerFormPage
}
Notification::make()
- ->title(trans('server/setting.notification_name'))
+ ->title(trans('server/setting.server_info.notification_name'))
->body(fn () => $original . ' -> ' . $name)
->success()
->send();
} catch (Exception $exception) {
Notification::make()
- ->title(trans('server/setting.failed'))
+ ->title(trans('server/setting.server_info.failed'))
->body($exception->getMessage())
->danger()
->send();
@@ -293,13 +293,13 @@ class Settings extends ServerFormPage
}
Notification::make()
- ->title(trans('server/setting.notification_description'))
+ ->title(trans('server/setting.server_info.notification_description'))
->body(fn () => $original . ' -> ' . $description)
->success()
->send();
} catch (Exception $exception) {
Notification::make()
- ->title(trans('server/setting.failed'))
+ ->title(trans('server/setting.server_info.failed'))
->body($exception->getMessage())
->danger()
->send();
diff --git a/app/Filament/Server/Resources/Backups/BackupResource.php b/app/Filament/Server/Resources/Backups/BackupResource.php
index 136b47a29..f40553c51 100644
--- a/app/Filament/Server/Resources/Backups/BackupResource.php
+++ b/app/Filament/Server/Resources/Backups/BackupResource.php
@@ -130,10 +130,10 @@ class BackupResource extends Resource
Action::make('rename')
->icon('tabler-pencil')
->authorize(fn () => auth()->user()->can(Permission::ACTION_BACKUP_DELETE, $server))
- ->label('Rename')
+ ->label(trans('server/backup.actions.rename.title'))
->schema([
TextInput::make('name')
- ->label('Backup Name')
+ ->label(trans('server/backup.actions.rename.new_name'))
->required()
->maxLength(255)
->default(fn (Backup $backup) => $backup->name),
@@ -152,8 +152,7 @@ class BackupResource extends Resource
}
Notification::make()
- ->title('Backup Renamed')
- ->body('The backup has been successfully renamed.')
+ ->title(trans('server/backup.actions.rename.notification_success'))
->success()
->send();
})
diff --git a/app/Filament/Server/Resources/Databases/DatabaseResource.php b/app/Filament/Server/Resources/Databases/DatabaseResource.php
index ce8e22c13..5c6835478 100644
--- a/app/Filament/Server/Resources/Databases/DatabaseResource.php
+++ b/app/Filament/Server/Resources/Databases/DatabaseResource.php
@@ -134,7 +134,7 @@ class DatabaseResource extends Resource
])
->recordActions([
ViewAction::make()
- ->modalHeading(fn (Database $database) => 'Viewing ' . $database->database),
+ ->modalHeading(fn (Database $database) => trans('server/database.viewing', ['database' => $database->database])),
DeleteAction::make()
->using(fn (Database $database, DatabaseManagementService $service) => $service->delete($database)),
])
diff --git a/app/Filament/Server/Resources/Files/Pages/EditFiles.php b/app/Filament/Server/Resources/Files/Pages/EditFiles.php
index b463adda6..315f36158 100644
--- a/app/Filament/Server/Resources/Files/Pages/EditFiles.php
+++ b/app/Filament/Server/Resources/Files/Pages/EditFiles.php
@@ -160,8 +160,8 @@ class EditFiles extends Page
return $this->getDaemonFileRepository()->getContent($this->path, config('panel.files.max_edit_size'));
} catch (FileSizeTooLargeException) {
AlertBanner::make('file_too_large')
- ->title('' . 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();
@@ -169,7 +169,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();
@@ -177,7 +177,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();
@@ -204,8 +204,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 (*
).
You can negate a prior rule by prepending an exclamation point (!
).')
+ ->title(trans('server/file.alerts.pelicanignore.title'))
+ ->body(trans('server/file.alerts.pelicanignore.body'))
->info()
->closable()
->send();
diff --git a/app/Filament/Server/Resources/Files/Pages/ListFiles.php b/app/Filament/Server/Resources/Files/Pages/ListFiles.php
index 90c4c20ba..7bb3c65c5 100644
--- a/app/Filament/Server/Resources/Files/Pages/ListFiles.php
+++ b/app/Filament/Server/Resources/Files/Pages/ListFiles.php
@@ -111,14 +111,14 @@ class ListFiles extends ListRecords
])
->recordUrl(function (File $file) use ($server) {
if ($file->is_directory) {
- return self::getUrl(['path' => join_paths($this->path, $file->name)]);
+ return self::getUrl(['path' => encode_path(join_paths($this->path, $file->name))]);
}
if (!auth()->user()->can(Permission::ACTION_FILE_READ_CONTENT, $server)) {
return null;
}
- return $file->canEdit() ? EditFiles::getUrl(['path' => join_paths($this->path, $file->name)]) : null;
+ return $file->canEdit() ? EditFiles::getUrl(['path' => encode_path(join_paths($this->path, $file->name))]) : null;
})
->recordActions([
Action::make('view')
@@ -126,12 +126,12 @@ class ListFiles extends ListRecords
->label(trans('server/file.actions.open'))
->icon('tabler-eye')->iconSize(IconSize::Large)
->visible(fn (File $file) => $file->is_directory)
- ->url(fn (File $file) => self::getUrl(['path' => join_paths($this->path, $file->name)])),
+ ->url(fn (File $file) => self::getUrl(['path' => encode_path(join_paths($this->path, $file->name))])),
EditAction::make('edit')
->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_READ_CONTENT, $server))
->icon('tabler-edit')
->visible(fn (File $file) => $file->canEdit())
- ->url(fn (File $file) => EditFiles::getUrl(['path' => join_paths($this->path, $file->name)])),
+ ->url(fn (File $file) => EditFiles::getUrl(['path' => encode_path(join_paths($this->path, $file->name))])),
ActionGroup::make([
Action::make('rename')
->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server))
@@ -139,7 +139,7 @@ class ListFiles extends ListRecords
->icon('tabler-forms')->iconSize(IconSize::Large)
->schema([
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(),
])
@@ -185,7 +185,7 @@ class ListFiles extends ListRecords
->label(trans('server/file.actions.download'))
->icon('tabler-download')->iconSize(IconSize::Large)
->visible(fn (File $file) => $file->is_file)
- ->url(fn (File $file) => DownloadFiles::getUrl(['path' => join_paths($this->path, $file->name)]), true),
+ ->url(fn (File $file) => DownloadFiles::getUrl(['path' => encode_path(join_paths($this->path, $file->name))]), true),
Action::make('move')
->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server))
->label(trans('server/file.actions.move.title'))
@@ -437,7 +437,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();
@@ -467,7 +467,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();
@@ -505,53 +505,55 @@ class ListFiles extends ListRecords
->log();
}
- return redirect(ListFiles::getUrl(['path' => $this->path]));
- })
- ->schema([
- Tabs::make()
- ->contained(false)
- ->schema([
- Tab::make(trans('server/file.actions.upload.from_files'))
- ->live()
- ->schema([
- FileUpload::make('files')
- ->storeFiles(false)
- ->previewable(false)
- ->preserveFilenames()
- ->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'))
- ->live()
- ->disabled(fn (Get $get) => count($get('files')) > 0)
- ->schema([
- TextInput::make('url')
- ->label(trans('server/file.actions.upload.url'))
- ->url(),
- ]),
- ]),
- ]),
- Action::make('search')
- ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_READ, $server))
- ->hiddenLabel()->iconButton()->iconSize(IconSize::ExtraLarge)
- ->tooltip(trans('server/file.actions.global_search.title'))
- ->color('primary')
- ->icon('tabler-world-search')
- ->modalHeading(trans('server/file.actions.global_search.title'))
- ->modalSubmitActionLabel(trans('server/file.actions.global_search.search'))
- ->schema([
- TextInput::make('searchTerm')
- ->label(trans('server/file.actions.global_search.search_term'))
- ->placeholder(trans('server/file.actions.global_search.search_term_placeholder'))
- ->required()
- ->regex('/^[^*]*\*?[^*]*$/')
- ->minValue(3),
- ])
- ->action(fn ($data) => redirect(SearchFiles::getUrl([
- 'searchTerm' => $data['searchTerm'],
- 'path' => $this->path,
- ]))),
- ]);
+ return redirect(ListFiles::getUrl(['path' => $this->path]));
+ })
+ ->form([
+ Tabs::make()
+ ->contained(false)
+ ->schema([
+ Tab::make('from_files')
+ ->label(trans('server/file.actions.upload.from_files'))
+ ->live()
+ ->schema([
+ FileUpload::make('files')
+ ->storeFiles(false)
+ ->previewable(false)
+ ->preserveFilenames()
+ ->maxSize((int) round($server->node->upload_size * (config('panel.use_binary_prefix') ? 1.048576 * 1024 : 1000)))
+ ->multiple(),
+ ]),
+ Tab::make('url')
+ ->label(trans('server/file.actions.upload.url'))
+ ->live()
+ ->disabled(fn (Get $get) => count($get('files')) > 0)
+ ->schema([
+ TextInput::make('url')
+ ->label(trans('server/file.actions.upload.url'))
+ ->url(),
+ ]),
+ ]),
+ ]),
+ HeaderAction::make('search')
+ ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_READ, $server))
+ ->hiddenLabel()->iconButton()->iconSize(IconSize::Large)
+ ->tooltip(trans('server/file.actions.global_search.title'))
+ ->color('primary')
+ ->icon('tabler-world-search')
+ ->modalHeading(trans('server/file.actions.global_search.title'))
+ ->modalSubmitActionLabel(trans('server/file.actions.global_search.search'))
+ ->form([
+ TextInput::make('searchTerm')
+ ->label(trans('server/file.actions.global_search.search_term'))
+ ->placeholder(trans('server/file.actions.global_search.search_term_placeholder'))
+ ->required()
+ ->regex('/^[^*]*\*?[^*]*$/')
+ ->minValue(3),
+ ])
+ ->action(fn ($data) => redirect(SearchFiles::getUrl([
+ 'searchTerm' => $data['searchTerm'],
+ 'path' => $this->path,
+ ]))),
+ ];
}
/**
diff --git a/app/Filament/Server/Resources/Files/Pages/SearchFiles.php b/app/Filament/Server/Resources/Files/Pages/SearchFiles.php
index bcc01c4d7..0d557387a 100644
--- a/app/Filament/Server/Resources/Files/Pages/SearchFiles.php
+++ b/app/Filament/Server/Resources/Files/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/Users/UserResource.php b/app/Filament/Server/Resources/Users/UserResource.php
index 807e9dc33..f67afe8d1 100644
--- a/app/Filament/Server/Resources/Users/UserResource.php
+++ b/app/Filament/Server/Resources/Users/UserResource.php
@@ -101,7 +101,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/Widgets/ServerConsole.php b/app/Filament/Server/Widgets/ServerConsole.php
index 9b940696f..e5a195a13 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 07698f58e..1c505aa94 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 1d566fb09..155389556 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 27733914c..38d250382 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 6a6cce1c7..0dcbc24b8 100644
--- a/app/Livewire/Installer/PanelInstaller.php
+++ b/app/Livewire/Installer/PanelInstaller.php
@@ -9,21 +9,25 @@ 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\Actions\Action;
use Filament\Facades\Filament;
+use Filament\Forms\Components\Select;
use Filament\Forms\Contracts\HasForms;
use Filament\Schemas\Components\Wizard;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Notifications\Notification;
use Filament\Pages\SimplePage;
use Filament\Schemas\Components\Component;
+use Filament\Schemas\Components\Grid;
use Filament\Schemas\Schema;
use Filament\Support\Enums\Width;
use Filament\Support\Exceptions\Halt;
+use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\HtmlString;
@@ -42,6 +46,11 @@ class PanelInstaller extends SimplePage implements HasForms
protected string $view = 'filament.pages.installer';
+ public function getTitle(): string
+ {
+ return trans('installer.title');
+ }
+
public function getMaxContentWidth(): Width|string
{
return Width::SevenExtraLarge;
@@ -65,6 +74,10 @@ class PanelInstaller extends SimplePage implements HasForms
protected function getFormSchema(): array
{
return [
+ Grid::make()
+ ->schema([
+ $this->getLanguageComponent(),
+ ]),
Wizard::make([
RequirementsStep::make(),
EnvironmentStep::make($this),
@@ -74,20 +87,40 @@ class PanelInstaller extends SimplePage implements HasForms
SessionStep::make(),
])
->persistStepInQueryString()
- ->nextAction(fn (Action $action) => $action->keyBindings('enter'))
+ ->nextAction(function (Action $action) {
+ $action
+ ->label(trans('installer.next_step'))
+ ->keyBindings('enter');
+ })
->submitAction(new HtmlString(Blade::render(<<<'BLADE'
- Finish
+ {{ trans('installer.finish') }}
BLADE))),
];
}
+ protected function getLanguageComponent(): Component
+ {
+ return Select::make('language')
+ ->hiddenLabel()
+ ->prefix(trans('profile.language'))
+ ->prefixIcon('tabler-flag')
+ ->required()
+ ->live()
+ ->default('en')
+ ->selectablePlaceholder(false)
+ ->options(fn (LanguageService $languageService) => $languageService->getAvailableLanguages())
+ ->afterStateUpdated(fn ($state, Application $app) => $app->setLocale($state ?? config('app.locale')))
+ ->native(false)
+ ->columnStart(4);
+ }
+
protected function getFormStatePath(): ?string
{
return 'data';
@@ -125,13 +158,13 @@ class PanelInstaller extends SimplePage implements HasForms
report($exception);
Notification::make()
- ->title('Could not write to .env file')
+ ->title(trans('installer.exceptions.write_env'))
->body($exception->getMessage())
->danger()
->persistent()
->send();
- throw new Halt('Error while writing .env file');
+ throw new Halt(trans('installer.exceptions.write_env'));
}
Artisan::call('config:clear');
@@ -148,23 +181,23 @@ class PanelInstaller extends SimplePage implements HasForms
report($exception);
Notification::make()
- ->title('Migrations failed')
+ ->title(trans('installer.database.exceptions.migration'))
->body($exception->getMessage())
->danger()
->persistent()
->send();
- throw new Halt('Error while running migrations');
+ throw new Halt(trans('installer.exceptions.migration'));
}
if (!$this->hasCompletedMigrations()) {
Notification::make()
- ->title('Migrations failed')
+ ->title(trans('installer.database.exceptions.migration'))
->danger()
->persistent()
->send();
- throw new Halt('Migrations failed');
+ throw new Halt(trans('installer.database.exceptions.migration'));
}
}
@@ -179,13 +212,13 @@ class PanelInstaller extends SimplePage implements HasForms
report($exception);
Notification::make()
- ->title('Could not create admin user')
+ ->title(trans('installer.exceptions.create_user'))
->body($exception->getMessage())
->danger()
->persistent()
->send();
- throw new Halt('Error while creating admin user');
+ throw new Halt(trans('installer.exceptions.create_user'));
}
}
}
diff --git a/app/Livewire/Installer/Steps/CacheStep.php b/app/Livewire/Installer/Steps/CacheStep.php
index b2ab76ea6..959d5332e 100644
--- a/app/Livewire/Installer/Steps/CacheStep.php
+++ b/app/Livewire/Installer/Steps/CacheStep.php
@@ -24,13 +24,13 @@ class CacheStep
public static function make(PanelInstaller $installer): Step
{
return Step::make('cache')
- ->label('Cache')
+ ->label(trans('installer.cache.title'))
->columns()
->schema([
ToggleButtons::make('env_cache.CACHE_STORE')
- ->label('Cache Driver')
+ ->label(trans('installer.cache.driver'))
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The driver used for caching. We recommend "Filesystem".')
+ ->hintIconTooltip(trans('installer.cache.driver_help'))
->required()
->inline()
->options(self::CACHE_DRIVERS)
@@ -50,31 +50,31 @@ class CacheStep
}
}),
TextInput::make('env_cache.REDIS_HOST')
- ->label('Redis Host')
+ ->label(trans('installer.cache.fields.host'))
->placeholder('127.0.0.1')
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The host of your redis server. Make sure it is reachable.')
+ ->hintIconTooltip(trans('installer.cache.fields.host_help'))
->required(fn (Get $get) => $get('env_cache.CACHE_STORE') === 'redis')
->default(fn (Get $get) => $get('env_cache.CACHE_STORE') === 'redis' ? config('database.redis.default.host') : null)
->visible(fn (Get $get) => $get('env_cache.CACHE_STORE') === 'redis'),
TextInput::make('env_cache.REDIS_PORT')
- ->label('Redis Port')
+ ->label(trans('installer.cache.fields.port'))
->placeholder('6379')
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The port of your redis server.')
+ ->hintIconTooltip(trans('installer.cache.fields.port_help'))
->required(fn (Get $get) => $get('env_cache.CACHE_STORE') === 'redis')
->default(fn (Get $get) => $get('env_cache.CACHE_STORE') === 'redis' ? config('database.redis.default.port') : null)
->visible(fn (Get $get) => $get('env_cache.CACHE_STORE') === 'redis'),
TextInput::make('env_cache.REDIS_USERNAME')
- ->label('Redis Username')
+ ->label(trans('installer.cache.fields.username'))
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The name of your redis user. Can be empty')
+ ->hintIconTooltip(trans('installer.cache.fields.username_help'))
->default(fn (Get $get) => $get('env_cache.CACHE_STORE') === 'redis' ? config('database.redis.default.username') : null)
->visible(fn (Get $get) => $get('env_cache.CACHE_STORE') === 'redis'),
TextInput::make('env_cache.REDIS_PASSWORD')
- ->label('Redis Password')
+ ->label(trans('installer.cache.fields.password'))
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The password for your redis user. Can be empty.')
+ ->hintIconTooltip(trans('installer.cache.fields.password_help'))
->password()
->revealable()
->default(fn (Get $get) => $get('env_cache.CACHE_STORE') === 'redis' ? config('database.redis.default.password') : null)
@@ -110,7 +110,7 @@ class CacheStep
$redis->connection()->command('ping');
} catch (Exception $exception) {
Notification::make()
- ->title('Redis connection failed')
+ ->title(trans('installer.cache.exception'))
->body($exception->getMessage())
->danger()
->send();
diff --git a/app/Livewire/Installer/Steps/DatabaseStep.php b/app/Livewire/Installer/Steps/DatabaseStep.php
index 41596f2f7..b5e781836 100644
--- a/app/Livewire/Installer/Steps/DatabaseStep.php
+++ b/app/Livewire/Installer/Steps/DatabaseStep.php
@@ -25,13 +25,13 @@ class DatabaseStep
public static function make(PanelInstaller $installer): Step
{
return Step::make('database')
- ->label('Database')
+ ->label(trans('installer.database.title'))
->columns()
->schema([
ToggleButtons::make('env_database.DB_CONNECTION')
- ->label('Database Driver')
+ ->label(trans('installer.database.driver'))
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The driver used for the panel database. We recommend "SQLite".')
+ ->hintIconTooltip(trans('installer.database.driver_help'))
->required()
->inline()
->options(self::DATABASE_DRIVERS)
@@ -61,40 +61,40 @@ class DatabaseStep
}
}),
TextInput::make('env_database.DB_DATABASE')
- ->label(fn (Get $get) => $get('env_database.DB_CONNECTION') === 'sqlite' ? 'Database Path' : 'Database Name')
+ ->label(fn (Get $get) => $get('env_database.DB_CONNECTION') === 'sqlite' ? trans('installer.database.fields.path') : trans('installer.database.fields.name'))
->placeholder(fn (Get $get) => $get('env_database.DB_CONNECTION') === 'sqlite' ? 'database.sqlite' : 'panel')
->hintIcon('tabler-question-mark')
- ->hintIconTooltip(fn (Get $get) => $get('env_database.DB_CONNECTION') === 'sqlite' ? 'The path of your .sqlite file relative to the database folder.' : 'The name of the panel database.')
+ ->hintIconTooltip(fn (Get $get) => $get('env_database.DB_CONNECTION') === 'sqlite' ? trans('installer.database.fields.path_help') : trans('installer.database.fields.name_help'))
->required()
->default('database.sqlite'),
TextInput::make('env_database.DB_HOST')
- ->label('Database Host')
+ ->label(trans('installer.database.fields.host'))
->placeholder('127.0.0.1')
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The host of your database. Make sure it is reachable.')
+ ->hintIconTooltip(trans('installer.database.fields.host_help'))
->required(fn (Get $get) => $get('env_database.DB_CONNECTION') !== 'sqlite')
->hidden(fn (Get $get) => $get('env_database.DB_CONNECTION') === 'sqlite'),
TextInput::make('env_database.DB_PORT')
- ->label('Database Port')
+ ->label(trans('installer.database.fields.port'))
->placeholder('3306')
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The port of your database.')
+ ->hintIconTooltip(trans('installer.database.fields.port_help'))
->numeric()
->minValue(1)
->maxValue(65535)
->required(fn (Get $get) => $get('env_database.DB_CONNECTION') !== 'sqlite')
->hidden(fn (Get $get) => $get('env_database.DB_CONNECTION') === 'sqlite'),
TextInput::make('env_database.DB_USERNAME')
- ->label('Database Username')
+ ->label(trans('installer.database.fields.username'))
->placeholder('pelican')
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The name of your database user.')
+ ->hintIconTooltip(trans('installer.database.fields.username_help'))
->required(fn (Get $get) => $get('env_database.DB_CONNECTION') !== 'sqlite')
->hidden(fn (Get $get) => $get('env_database.DB_CONNECTION') === 'sqlite'),
TextInput::make('env_database.DB_PASSWORD')
- ->label('Database Password')
+ ->label(trans('installer.database.fields.password'))
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The password of your database user. Can be empty.')
+ ->hintIconTooltip(trans('installer.database.fields.password_help'))
->password()
->revealable()
->hidden(fn (Get $get) => $get('env_database.DB_CONNECTION') === 'sqlite'),
@@ -103,7 +103,7 @@ class DatabaseStep
$driver = $get('env_database.DB_CONNECTION');
if (!self::testConnection($driver, $get('env_database.DB_HOST'), $get('env_database.DB_PORT'), $get('env_database.DB_DATABASE'), $get('env_database.DB_USERNAME'), $get('env_database.DB_PASSWORD'))) {
- throw new Halt('Database connection failed');
+ throw new Halt(trans('installer.database.exceptions.connection'));
}
$installer->writeToEnv('env_database');
@@ -133,7 +133,7 @@ class DatabaseStep
DB::disconnect('_panel_install_test');
Notification::make()
- ->title('Database connection failed')
+ ->title(trans('installer.database.exceptions.connection'))
->body($exception->getMessage())
->danger()
->send();
diff --git a/app/Livewire/Installer/Steps/EnvironmentStep.php b/app/Livewire/Installer/Steps/EnvironmentStep.php
index d84061426..cafbfc42b 100644
--- a/app/Livewire/Installer/Steps/EnvironmentStep.php
+++ b/app/Livewire/Installer/Steps/EnvironmentStep.php
@@ -12,37 +12,37 @@ class EnvironmentStep
public static function make(PanelInstaller $installer): Step
{
return Step::make('environment')
- ->label('Environment')
+ ->label(trans('installer.environment.title'))
->columns()
->schema([
TextInput::make('env_general.APP_NAME')
- ->label('App Name')
+ ->label(trans('installer.environment.fields.app_name'))
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('This will be the Name of your Panel.')
+ ->hintIconTooltip(trans('installer.environment.fields.app_name_help'))
->required()
->default(config('app.name')),
TextInput::make('env_general.APP_URL')
- ->label('App URL')
+ ->label(trans('installer.environment.fields.app_url'))
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('This will be the URL you access your Panel from.')
+ ->hintIconTooltip(trans('installer.environment.fields.app_url_help'))
->required()
->default(url('')),
- Fieldset::make('adminuser')
- ->label('Admin User')
+ Fieldset::make('admin_user')
+ ->label(trans('installer.environment.fields.account.section'))
->columns(3)
->columnSpanFull()
->schema([
TextInput::make('user.email')
- ->label('E-Mail')
+ ->label(trans('installer.environment.fields.account.email'))
->required()
->email()
->placeholder('admin@example.com'),
TextInput::make('user.username')
- ->label('Username')
+ ->label(trans('installer.environment.fields.account.username'))
->required()
->placeholder('admin'),
TextInput::make('user.password')
- ->label('Password')
+ ->label(trans('installer.environment.fields.account.password'))
->required()
->password()
->revealable(),
diff --git a/app/Livewire/Installer/Steps/QueueStep.php b/app/Livewire/Installer/Steps/QueueStep.php
index 48afcc32b..3d6a72f66 100644
--- a/app/Livewire/Installer/Steps/QueueStep.php
+++ b/app/Livewire/Installer/Steps/QueueStep.php
@@ -25,35 +25,35 @@ class QueueStep
public static function make(PanelInstaller $installer): Step
{
return Step::make('queue')
- ->label('Queue')
+ ->label(trans('installer.queue.title'))
->columns()
->schema([
ToggleButtons::make('env_queue.QUEUE_CONNECTION')
- ->label('Queue Driver')
+ ->label(trans('installer.queue.driver'))
->hintIcon('tabler-question-mark')
- ->hintIconTooltip('The driver used for handling queues. We recommend "Database".')
+ ->hintIconTooltip(trans('installer.queue.driver_help'))
->required()
->inline()
->options(self::QUEUE_DRIVERS)
->disableOptionWhen(fn ($value, Get $get) => $value === 'redis' && $get('env_cache.CACHE_STORE') !== 'redis')
->default(config('queue.default')),
Toggle::make('done')
- ->label('I have done both steps below.')
+ ->label(trans('installer.queue.fields.done'))
->accepted(fn () => !@file_exists('/.dockerenv'))
->inline(false)
->validationMessages([
- 'accepted' => 'You need to do both steps before continuing!',
+ 'accepted' => trans('installer.queue.fields.done_validation'),
])
->hidden(fn () => @file_exists('/.dockerenv')),
TextInput::make('crontab')
- ->label(new HtmlString('Run the following command to set up your crontab. Note that www-data
is your webserver user. On some systems this username might be different!'))
+ ->label(new HtmlString(trans('installer.queue.fields.crontab')))
->disabled()
->hintCopy()
->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()
->hintCopy()
->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 ddfa16190..c661e4038 100644
--- a/app/Livewire/Installer/Steps/RequirementsStep.php
+++ b/app/Livewire/Installer/Steps/RequirementsStep.php
@@ -18,14 +18,14 @@ 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([
TextEntry::make('php_version')
->hiddenLabel()
- ->state('Your PHP Version is ' . PHP_VERSION . '.'),
+ ->state(trans('installer.requirements.sections.version.content', ['version' => PHP_VERSION])),
]),
];
@@ -42,18 +42,18 @@ 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([
TextEntry::make('all_extensions_installed')
->hiddenLabel()
- ->state('All needed PHP Extensions are installed.')
+ ->state(trans('installer.requirements.sections.extensions.good'))
->visible($allExtensionsInstalled),
TextEntry::make('extensions_missing')
->hiddenLabel()
- ->state('The following PHP Extensions are missing: ' . implode(', ', array_keys($phpExtensions, false)))
+ ->state(trans('installer.requirements.sections.extensions.bad', ['extensions' => implode(', ', array_keys($phpExtensions, false))]))
->visible(!$allExtensionsInstalled),
]);
@@ -63,32 +63,32 @@ 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([
TextEntry::make('correct_folder_permissions')
->hiddenLabel()
- ->state('All Folders have the correct permissions.')
+ ->state(trans('installer.requirements.sections.permissions.good'))
->visible($correctFolderPermissions),
TextEntry::make('wrong_folder_permissions')
->hiddenLabel()
- ->state('The following Folders have wrong permissions: ' . implode(', ', array_keys($folderPermissions, false)))
+ ->state(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 b92e3d2df..aa4de2b57 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 021df579a..26ddd10cb 100644
--- a/app/Models/File.php
+++ b/app/Models/File.php
@@ -199,7 +199,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/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 a17bd66b8..9fe0020a8 100644
--- a/app/Services/Eggs/Variables/VariableUpdateService.php
+++ b/app/Services/Eggs/Variables/VariableUpdateService.php
@@ -47,7 +47,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()
@@ -57,7 +57,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 b126a6fe1..294bc0865 100644
--- a/app/Services/Servers/SuspensionService.php
+++ b/app/Services/Servers/SuspensionService.php
@@ -31,14 +31,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/app/helpers.php b/app/helpers.php
index 9f958a6e6..88e309f78 100644
--- a/app/helpers.php
+++ b/app/helpers.php
@@ -110,3 +110,10 @@ if (!function_exists('format_number')) {
}
}
}
+
+if (!function_exists('encode_path')) {
+ function encode_path(string $path): string
+ {
+ return implode('/', array_map('rawurlencode', explode('/', $path)));
+ }
+}
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..3ca38fbfc 100644
--- a/lang/en/admin/node.php
+++ b/lang/en/admin/node.php
@@ -4,6 +4,7 @@ return [
'nav_title' => 'Nodes',
'model_label' => 'Node',
'model_label_plural' => 'Nodes',
+ 'create' => 'Create Node',
'tabs' => [
'overview' => 'Overview',
'basic_settings' => 'Basic Settings',
@@ -29,7 +30,7 @@ return [
'architecture' => 'Architecture',
'kernel' => 'Kernel',
'unknown' => 'Unknown',
- 'latest' => 'Latest',
+ 'latest' => '(Latest: :version)',
'node_uuid' => 'Node UUID',
'node_id' => 'Node ID',
@@ -88,6 +89,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 +114,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..2a8708b54 100644
--- a/lang/en/admin/server.php
+++ b/lang/en/admin/server.php
@@ -5,6 +5,7 @@ return [
'model_label' => 'Server',
'model_label_plural' => 'Servers',
'no_servers' => 'No Servers',
+ 'create' => 'Create Server',
'next_step' => 'Next Step',
'ip_address' => 'IP Address',
'ip_address_helper' => 'Usually your machine\'s public IP unless you are port forwarding.',
@@ -111,6 +112,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 +134,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 [{:user}]:> is this correct?',
'name_webserver' => 'Please enter the name of the user running your webserver process. This varies from system to system, but is generally "www-data", "nginx", or "apache".',
diff --git a/lang/en/installer.php b/lang/en/installer.php
new file mode 100644
index 000000000..51094872a
--- /dev/null
+++ b/lang/en/installer.php
@@ -0,0 +1,103 @@
+ 'Panel Installer',
+ 'requirements' => [
+ 'title' => 'Server Requirements',
+ 'sections' => [
+ 'version' => [
+ 'title' => 'PHP Version',
+ 'or_newer' => ':version or newer',
+ 'content' => 'Your PHP Version is :version.',
+ ],
+ 'extensions' => [
+ 'title' => 'PHP Extensions',
+ 'good' => 'All needed PHP Extensions are installed.',
+ 'bad' => 'The following PHP Extensions are missing: :extensions',
+ ],
+ 'permissions' => [
+ 'title' => 'Folder Permissions',
+ 'good' => 'All Folders have the correct permissions.',
+ 'bad' => 'The following Folders have wrong permissions: :folders',
+ ],
+ ],
+ 'exception' => 'Some requirements are missing',
+ ],
+ 'environment' => [
+ 'title' => 'Environment',
+ 'fields' => [
+ 'app_name' => 'App Name',
+ 'app_name_help' => 'This will be the Name of your Panel.',
+ 'app_url' => 'App URL',
+ 'app_url_help' => 'This will be the URL you access your Panel from.',
+ 'account' => [
+ 'section' => 'Admin User',
+ 'email' => 'E-Mail',
+ 'username' => 'Username',
+ 'password' => 'Password',
+ ],
+ ],
+ ],
+ 'database' => [
+ 'title' => 'Database',
+ 'driver' => 'Database Driver',
+ 'driver_help' => 'The driver used for the panel database. We recommend "SQLite".',
+ 'fields' => [
+ 'host' => 'Database Host',
+ 'host_help' => 'The host of your database. Make sure it is reachable.',
+ 'port' => 'Database Port',
+ 'port_help' => 'The port of your database.',
+ 'path' => 'Database Path',
+ 'path_help' => 'The path of your .sqlite file relative to the database folder.',
+ 'name' => 'Database Name',
+ 'name_help' => 'The name of the panel database.',
+ 'username' => 'Database Username',
+ 'username_help' => 'The name of your database user.',
+ 'password' => 'Database Password',
+ 'password_help' => 'The password of your database user. Can be empty.',
+ ],
+ 'exceptions' => [
+ 'connection' => 'Database connection failed',
+ 'migration' => 'Migrations failed',
+ ],
+ ],
+ 'session' => [
+ 'title' => 'Session',
+ 'driver' => 'Session Driver',
+ 'driver_help' => 'The driver used for storing sessions. We recommend "Filesystem" or "Database".',
+ ],
+ 'cache' => [
+ 'title' => 'Cache',
+ 'driver' => 'Cache Driver',
+ 'driver_help' => 'The driver used for caching. We recommend "Filesystem".',
+ 'fields' => [
+ 'host' => 'Redis Host',
+ 'host_help' => 'The host of your redis server. Make sure it is reachable.',
+ 'port' => 'Redis Port',
+ 'port_help' => 'The port of your redis server.',
+ 'username' => 'Redis Username',
+ 'username_help' => 'The name of your redis user. Can be empty',
+ 'password' => 'Redis Password',
+ 'password_help' => 'The password for your redis user. Can be empty.',
+ ],
+ 'exception' => 'Redis connection failed',
+ ],
+ 'queue' => [
+ 'title' => 'Queue',
+ 'driver' => 'Queue Driver',
+ 'driver_help' => 'The driver used for handling queues. We recommend "Database".',
+ 'fields' => [
+ 'done' => 'I have done both steps below.',
+ 'done_validation' => 'You need to do both steps before continuing!',
+ 'crontab' => 'Run the following command to set up your crontab. Note that 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',
+ ],
+ 'next_step' => 'Next Step',
+ '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 639b9b917..208e2845e 100644
--- a/lang/en/profile.php
+++ b/lang/en/profile.php
@@ -27,7 +27,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 (*
).
You can negate a prior rule by prepending an exclamation point (!
).',
+ ],
+ ],
];
diff --git a/lang/en/server/setting.php b/lang/en/server/setting.php
index 26f870ee7..19d1796fd 100644
--- a/lang/en/server/setting.php
+++ b/lang/en/server/setting.php
@@ -5,7 +5,8 @@ return [
'server_info' => [
'title' => 'Server Information',
'information' => 'Information',
- 'server_name' => 'Server Name',
+ 'name' => 'Server Name',
+ 'server_name' => 'Server Name: :name',
'notification_name' => 'Updated Server Name',
'description' => 'Server Description',
'notification_description' => 'Updated Server Description',
@@ -16,7 +17,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.',