mirror of
https://github.com/pelican-dev/panel.git
synced 2025-09-08 23:08:37 +02:00
Fix Translations
This commit is contained in:
parent
9c3142d131
commit
948ea1aa04
@ -40,7 +40,7 @@ class ServersRelationManager extends RelationManager
|
||||
->label(trans('admin/server.primary_allocation'))
|
||||
->disabled()
|
||||
->options(fn (Server $server) => $server->allocations->take(1)->mapWithKeys(fn ($allocation) => [$allocation->id => $allocation->address]))
|
||||
->placeholder('None')
|
||||
->placeholder(trans('admin/server.none'))
|
||||
->sortable(),
|
||||
]);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class NodesRelationManager extends RelationManager
|
||||
->disabled(fn (Server $server) => $server->allocations->count() <= 1)
|
||||
->options(fn (Server $server) => $server->allocations->take(1)->mapWithKeys(fn ($allocation) => [$allocation->id => $allocation->address]))
|
||||
->selectablePlaceholder(fn (SelectColumn $select) => !$select->isDisabled())
|
||||
->placeholder('None')
|
||||
->placeholder(trans('admin/node.none'))
|
||||
->sortable(),
|
||||
TextColumn::make('memory')->label(trans('admin/node.memory'))->icon('tabler-device-desktop-analytics'),
|
||||
TextColumn::make('cpu')->label(trans('admin/node.cpu'))->icon('tabler-cpu'),
|
||||
|
@ -77,7 +77,7 @@ class ListServers extends ListRecords
|
||||
->disabled(fn (Server $server) => $server->allocations->count() <= 1)
|
||||
->options(fn (Server $server) => $server->allocations->mapWithKeys(fn ($allocation) => [$allocation->id => $allocation->address]))
|
||||
->selectablePlaceholder(fn (Server $server) => $server->allocations->count() <= 1)
|
||||
->placeholder('None')
|
||||
->placeholder(trans('admin/server.none'))
|
||||
->sortable(),
|
||||
TextColumn::make('allocation_id_readonly')
|
||||
->label(trans('admin/server.primary_allocation'))
|
||||
|
@ -117,7 +117,7 @@ class DatabasesRelationManager extends RelationManager
|
||||
Select::make('database_host_id')
|
||||
->label(trans('admin/databasehost.model_label'))
|
||||
->required()
|
||||
->placeholder('Select Database Host')
|
||||
->placeholder(trans('admin/databasehost.table.select_placeholder'))
|
||||
->options(fn () => DatabaseHost::query()
|
||||
->whereHas('nodes', fn ($query) => $query->where('nodes.id', $this->getOwnerRecord()->node_id))
|
||||
->pluck('name', 'id')
|
||||
|
@ -72,7 +72,7 @@ class ServersRelationManager extends RelationManager
|
||||
->label(trans('admin/server.primary_allocation'))
|
||||
->disabled()
|
||||
->options(fn (Server $server) => $server->allocations->take(1)->mapWithKeys(fn ($allocation) => [$allocation->id => $allocation->address]))
|
||||
->placeholder('None')
|
||||
->placeholder(trans('admin/server.none'))
|
||||
->sortable(),
|
||||
TextColumn::make('image')->hidden(),
|
||||
TextColumn::make('databases_count')
|
||||
|
@ -260,7 +260,7 @@ class BackupResource extends Resource
|
||||
CreateAction::make()
|
||||
->authorize(fn () => auth()->user()->can(Permission::ACTION_BACKUP_CREATE, $server))
|
||||
->icon('tabler-file-zip')
|
||||
->tooltip(fn () => $server->backups()->count() >= $server->backup_limit ? 'Backup Limit Reached' : 'Create Backup')
|
||||
->tooltip(fn () => $server->backups()->count() >= $server->backup_limit ? trans('server/backup.actions.create.limit') : trans('server/backup.actions.create.title'))
|
||||
->disabled(fn () => $server->backups()->count() >= $server->backup_limit)
|
||||
->color(fn () => $server->backups()->count() >= $server->backup_limit ? 'danger' : 'primary')
|
||||
->createAnother(false)
|
||||
@ -281,14 +281,14 @@ class BackupResource extends Resource
|
||||
->log();
|
||||
|
||||
return Notification::make()
|
||||
->title('Backup Created')
|
||||
->body($backup->name . ' created.')
|
||||
->title(trans('server/backup.actions.create.notification_success'))
|
||||
->body(fn () => trans('server/backup.actions.create.created', ['name' => $backup->name]))
|
||||
->success()
|
||||
->send();
|
||||
} catch (HttpException $e) {
|
||||
return Notification::make()
|
||||
->danger()
|
||||
->title('Backup Failed')
|
||||
->title(trans('server/backup.actions.create.notification_fail'))
|
||||
->body($e->getMessage() . ' Try again' . ($e->getHeaders()['Retry-After'] ? ' in ' . $e->getHeaders()['Retry-After'] . ' seconds.' : ''))
|
||||
->send();
|
||||
}
|
||||
|
@ -377,12 +377,12 @@ class ScheduleResource extends Resource
|
||||
->hiddenLabel()->iconButton()->iconSize(IconSize::ExtraLarge)
|
||||
->icon('tabler-calendar-plus')
|
||||
->color('primary')
|
||||
->tooltip('New Schedule'),
|
||||
->tooltip(trans('server/schedule.new')),
|
||||
ImportScheduleAction::make()
|
||||
->hiddenLabel()->iconButton()->iconSize(IconSize::ExtraLarge)
|
||||
->icon('tabler-file-import')
|
||||
->color('success')
|
||||
->tooltip('Import Schedule'),
|
||||
->tooltip(trans('server/schedule.import')),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ class UserResource extends Resource
|
||||
CreateAction::make('invite')
|
||||
->hiddenLabel()->iconButton()->iconSize(IconSize::ExtraLarge)
|
||||
->icon('tabler-user-plus')
|
||||
->tooltip('Invite User')
|
||||
->tooltip(trans('server/user.invite_user'))
|
||||
->createAnother(false)
|
||||
->authorize(fn () => auth()->user()->can(Permission::ACTION_USER_CREATE, $server))
|
||||
->schema([
|
||||
@ -260,7 +260,7 @@ class UserResource extends Resource
|
||||
->required(),
|
||||
Actions::make([
|
||||
Action::make('assignAll')
|
||||
->label('Assign All')
|
||||
->label(trans('server/user.assign_all'))
|
||||
->action(function (Set $set, Get $get) use ($permissionsArray) {
|
||||
$permissions = $permissionsArray;
|
||||
foreach ($permissions as $key => $value) {
|
||||
@ -280,9 +280,9 @@ class UserResource extends Resource
|
||||
->schema($tabs),
|
||||
]),
|
||||
])
|
||||
->modalHeading('Invite User')
|
||||
->modalHeading(trans('server/user.invite_user'))
|
||||
->modalIcon('tabler-user-plus')
|
||||
->modalSubmitActionLabel('Invite')
|
||||
->modalSubmitActionLabel(trans('server/user.action'))
|
||||
->successNotificationTitle(null)
|
||||
->failureNotificationTitle(null)
|
||||
->action(function (Action $action, array $data, SubuserCreationService $service) use ($server) {
|
||||
@ -306,12 +306,12 @@ class UserResource extends Resource
|
||||
]);
|
||||
|
||||
Notification::make()
|
||||
->title('User Invited!')
|
||||
->title(trans('server/user.notification_add'))
|
||||
->success()
|
||||
->send();
|
||||
} catch (Exception $exception) {
|
||||
Notification::make()
|
||||
->title('Failed')
|
||||
->title(trans('server/user.notification_failed'))
|
||||
->body($exception->getMessage())
|
||||
->danger()
|
||||
->send();
|
||||
|
@ -5,6 +5,7 @@ return [
|
||||
'model_label' => 'Database Host',
|
||||
'model_label_plural' => 'Database Hosts',
|
||||
'table' => [
|
||||
'select_placeholder' => 'Select Database Host',
|
||||
'database' => 'Database',
|
||||
'name' => 'Name',
|
||||
'host' => 'Host',
|
||||
|
@ -98,6 +98,7 @@ return [
|
||||
'reset_help' => 'Resetting the daemon token will void any request coming from the old token. This token is used for all sensitive operations on the daemon including server creation and deletion. We suggest changing this token regularly for security.',
|
||||
|
||||
'no_nodes' => 'No Nodes',
|
||||
'none' => 'None',
|
||||
'cpu_chart' => 'CPU - :cpu% of :max%',
|
||||
'memory_chart' => 'Memory - :used of :total',
|
||||
'disk_chart' => 'Storage - :used of :total',
|
||||
|
@ -140,4 +140,5 @@ return [
|
||||
],
|
||||
'notes' => 'Notes',
|
||||
'no_notes' => 'No Notes',
|
||||
'none' => 'None',
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user