mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 22:14:45 +02:00
Fix Admin Area
translations
(#991)
* Fix button * Replace array with index * Fix Server ToggleInstallService * FiNodeVersionsCheck * Fix CreateWebhookConfiguration * Fixdatabasehost post_help > port_help * Fix User CreateServer * Fix Profile language_help * Fix Role permission UserResource * Remove debug & Pint
This commit is contained in:
parent
96c09acc52
commit
cba4cf11aa
@ -19,7 +19,7 @@ class NodeVersionsCheck extends Check
|
||||
if ($all === 0) {
|
||||
$result = Result::make()
|
||||
->notificationMessage(trans('admin/health.results.nodeversions.no_nodes_created'))
|
||||
->shortSummary(trans('admin/health.results.node_version.no_nodes'));
|
||||
->shortSummary(trans('admin/health.results.nodeversions.no_nodes'));
|
||||
$result->status = Status::skipped();
|
||||
|
||||
return $result;
|
||||
|
@ -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'));
|
||||
$this->output->warning(trans('command/messages.user.2fa_help_text.0') . trans('command/messages.user.2fa_help_text.1'));
|
||||
}
|
||||
|
||||
$email = $this->option('email') ?? $this->ask(trans('command/messages.user.ask_email'));
|
||||
|
@ -73,7 +73,7 @@ class AllocationsRelationManager extends RelationManager
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\Action::make('create new allocation')
|
||||
->label(trans('admin/node.create_allocations'))
|
||||
->label(trans('admin/node.create_allocation'))
|
||||
->form(fn () => [
|
||||
Select::make('allocation_ip')
|
||||
->options(collect($this->getOwnerRecord()->ipAddresses())->mapWithKeys(fn (string $ip) => [$ip => $ip]))
|
||||
|
@ -139,21 +139,21 @@ class CreateServer extends CreateRecord
|
||||
->getOptionLabelFromRecordUsing(fn (User $user) => "$user->email | $user->username " . (blank($user->roles) ? '' : '(' . $user->roles->first()->name . ')'))
|
||||
->createOptionForm([
|
||||
TextInput::make('username')
|
||||
->label(trans('admin/user.edit.username'))
|
||||
->label(trans('admin/user.username'))
|
||||
->alphaNum()
|
||||
->required()
|
||||
->minLength(3)
|
||||
->maxLength(255),
|
||||
|
||||
TextInput::make('email')
|
||||
->label(trans('admin/user.edit.email'))
|
||||
->label(trans('admin/user.email'))
|
||||
->email()
|
||||
->required()
|
||||
->unique()
|
||||
->maxLength(255),
|
||||
|
||||
TextInput::make('password')
|
||||
->label(trans('admin/user.edit.password'))
|
||||
->label(trans('admin/user.password'))
|
||||
->hintIcon('tabler-question-mark')
|
||||
->hintIconTooltip(trans('admin/user.password_help'))
|
||||
->password(),
|
||||
|
@ -60,7 +60,7 @@ class AllocationsRelationManager extends RelationManager
|
||||
->label(fn (Allocation $allocation) => $allocation->id === $this->getOwnerRecord()->allocation_id ? '' : trans('admin/server.make_primary')),
|
||||
])
|
||||
->headerActions([
|
||||
CreateAction::make()->label(trans('admin/node.create_allocations'))
|
||||
CreateAction::make()->label(trans('admin/server.create_allocation'))
|
||||
->createAnother(false)
|
||||
->form(fn () => [
|
||||
Select::make('allocation_ip')
|
||||
@ -94,7 +94,7 @@ class AllocationsRelationManager extends RelationManager
|
||||
->preloadRecordSelect()
|
||||
->recordSelectOptionsQuery(fn ($query) => $query->whereBelongsTo($this->getOwnerRecord()->node)->whereNull('server_id'))
|
||||
->recordSelectSearchColumns(['ip', 'port'])
|
||||
->label(trans('admin/server.add_allocations')),
|
||||
->label(trans('admin/server.add_allocation')),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
|
@ -32,14 +32,14 @@ class CreateWebhookConfiguration extends CreateRecord
|
||||
return $form
|
||||
->schema([
|
||||
TextInput::make('endpoint')
|
||||
->label(trans('admin/webhooks.endpoint'))
|
||||
->label(trans('admin/webhook.endpoint'))
|
||||
->activeUrl()
|
||||
->required(),
|
||||
TextInput::make('description')
|
||||
->label(trans('admin/webhooks.description'))
|
||||
->label(trans('admin/webhook.description'))
|
||||
->required(),
|
||||
CheckboxList::make('events')
|
||||
->label(trans('admin/webhooks.events'))
|
||||
->label(trans('admin/webhook.events'))
|
||||
->lazy()
|
||||
->options(fn () => WebhookConfiguration::filamentCheckboxList())
|
||||
->searchable()
|
||||
|
@ -116,7 +116,7 @@ class EditProfile extends BaseEditProfile
|
||||
->prefixIcon('tabler-flag')
|
||||
->live()
|
||||
->default('en')
|
||||
->helperText(fn ($state, LanguageService $languageService) => new HtmlString($languageService->isLanguageTranslated($state) ? '' : trans('profile.language_helper', ['state' => $state])))
|
||||
->helperText(fn ($state, LanguageService $languageService) => new HtmlString($languageService->isLanguageTranslated($state) ? '' : trans('profile.language_help', ['state' => $state])))
|
||||
->options(fn (LanguageService $languageService) => $languageService->getAvailableLanguages()),
|
||||
]),
|
||||
|
||||
|
@ -458,7 +458,7 @@ class UserResource extends Resource
|
||||
->descriptions([
|
||||
'rename' => trans('server/users.permissions.setting_rename'),
|
||||
'reinstall' => trans('server/users.permissions.setting_reinstall'),
|
||||
'activity' => trans('server/users.permissions.setting_activity'),
|
||||
'activity' => trans('server/users.permissions.activity_desc'),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
|
@ -355,7 +355,7 @@ class ListUsers extends ListRecords
|
||||
->descriptions([
|
||||
'rename' => trans('server/users.permissions.setting_rename'),
|
||||
'reinstall' => trans('server/users.permissions.setting_reinstall'),
|
||||
'activity' => trans('server/users.permissions.setting_activity'),
|
||||
'activity' => trans('server/users.permissions.activity_desc'),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
|
@ -10,7 +10,7 @@ class ToggleInstallService
|
||||
public function handle(Server $server): void
|
||||
{
|
||||
if ($server->status === ServerState::InstallFailed) {
|
||||
abort(500, trans('admin/server.exceptions.marked_as_failed'));
|
||||
abort(500, trans('exceptions.server.marked_as_failed'));
|
||||
}
|
||||
|
||||
$server->status = $server->isInstalled() ? ServerState::Installing : null;
|
||||
|
@ -22,7 +22,7 @@ return [
|
||||
'host' => 'Host',
|
||||
'host_help' => 'The IP address or Domain name that should be used when attempting to connect to this MySQL host from this Panel to create new databases.',
|
||||
'port' => 'Port',
|
||||
'post_help' => 'The port that MySQL is running on for this host.',
|
||||
'port_help' => 'The port that MySQL is running on for this host.',
|
||||
'max_database' => 'Max Databases',
|
||||
'max_databases_help' => 'The maximum number of databases that can be created on this host. If the limit is reached, no new databases can be created on this host. Blank is unlimited.',
|
||||
'display_name' => 'Display Name',
|
||||
|
@ -95,7 +95,7 @@ return [
|
||||
|
||||
'next_step' => 'Next Step',
|
||||
'node_has_servers' => 'Node Has Servers',
|
||||
'create_allocations' => 'Create Allocations',
|
||||
'create_allocation' => 'Create Allocation',
|
||||
'primary_allocation' => 'Primary Allocation',
|
||||
'databases' => 'Databases',
|
||||
'backups' => 'Backups',
|
||||
|
@ -95,6 +95,7 @@ return [
|
||||
'change_egg' => 'Change Egg',
|
||||
'new_egg' => 'New Egg',
|
||||
'keep_old_variables' => 'Keep old variables if possible?',
|
||||
'create_allocation' => 'Create Allocation',
|
||||
'add_allocation' => 'Add Allocation',
|
||||
'view' => 'View',
|
||||
'tabs' => [
|
||||
|
@ -55,4 +55,7 @@ return [
|
||||
'mount' => [
|
||||
'servers_attached' => 'A mount must have no servers attached to it in order to be deleted.',
|
||||
],
|
||||
'server' => [
|
||||
'marked_as_failed' => 'This server has not yet completed its installation process, please try again later.',
|
||||
],
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user