diff --git a/app/Enums/WebhookScope.php b/app/Enums/WebhookScope.php index 4e84b5eb16..f0c939a52f 100644 --- a/app/Enums/WebhookScope.php +++ b/app/Enums/WebhookScope.php @@ -10,8 +10,8 @@ enum WebhookScope: string public function getLabel(): string { return match ($this) { - self::Global => 'Global', - self::Server => 'Server', + self::Global => trans('admin/webhook.scope.global'), + self::Server => trans('admin/webhook.scope.server'), }; } } diff --git a/app/Extensions/Captcha/Schemas/BaseSchema.php b/app/Extensions/Captcha/Schemas/BaseSchema.php index 155aba1ef1..0ff4cd07e0 100644 --- a/app/Extensions/Captcha/Schemas/BaseSchema.php +++ b/app/Extensions/Captcha/Schemas/BaseSchema.php @@ -37,8 +37,8 @@ public function getSettingsForm(): array return [ TextInput::make("CAPTCHA_{$id}_SITE_KEY") - ->label('Site Key') - ->placeholder('Site Key') + ->label(trans('admin/setting.captcha.site_key')) + ->placeholder(trans('admin/setting.captcha.site_key')) ->columnSpan(2) ->required() ->password() @@ -46,8 +46,8 @@ public function getSettingsForm(): array ->autocomplete(false) ->default(env("CAPTCHA_{$id}_SITE_KEY")), TextInput::make("CAPTCHA_{$id}_SECRET_KEY") - ->label('Secret Key') - ->placeholder('Secret Key') + ->label(trans('admin/setting.captcha.secret_key')) + ->placeholder(trans('admin/setting.captcha.secret_key')) ->columnSpan(2) ->required() ->password() diff --git a/app/Extensions/OAuth/Schemas/DiscordSchema.php b/app/Extensions/OAuth/Schemas/DiscordSchema.php index 0b43dd4c12..f6ae3a5d93 100644 --- a/app/Extensions/OAuth/Schemas/DiscordSchema.php +++ b/app/Extensions/OAuth/Schemas/DiscordSchema.php @@ -35,7 +35,7 @@ public function getSetupSteps(): array ->hiddenLabel() ->state(new HtmlString('
Under Redirects add the below URL.
')), TextInput::make('_noenv_callback') - ->label('Redirect URL') + ->label(trans('admin/setting.oauth.redirect')) ->dehydrated() ->disabled() ->hintCopy() diff --git a/app/Extensions/OAuth/Schemas/GithubSchema.php b/app/Extensions/OAuth/Schemas/GithubSchema.php index 089aa185d4..3649870869 100644 --- a/app/Extensions/OAuth/Schemas/GithubSchema.php +++ b/app/Extensions/OAuth/Schemas/GithubSchema.php @@ -26,7 +26,7 @@ public function getSetupSteps(): array ->hiddenLabel() ->state(new HtmlString(Blade::render('Visit the
Enter an Application name (e.g. your panel name), set Homepage URL to your panel url and enter the below url as Authorization callback URL.
'))), TextInput::make('_noenv_callback') - ->label('Authorization callback URL') + ->label(trans('admin/setting.oauth.auth_url')) ->dehydrated() ->disabled() ->hintCopy() diff --git a/app/Extensions/OAuth/Schemas/OAuthSchema.php b/app/Extensions/OAuth/Schemas/OAuthSchema.php index 0051c02107..09272a0065 100644 --- a/app/Extensions/OAuth/Schemas/OAuthSchema.php +++ b/app/Extensions/OAuth/Schemas/OAuthSchema.php @@ -42,8 +42,8 @@ public function getSettingsForm(): array return [ TextInput::make("OAUTH_{$id}_CLIENT_ID") - ->label('Client ID') - ->placeholder('Client ID') + ->label(trans('admin/setting.oauth.client_id')) + ->placeholder(trans('admin/setting.oauth.client_id')) ->columnSpan(2) ->required() ->password() @@ -51,8 +51,8 @@ public function getSettingsForm(): array ->autocomplete(false) ->default(env("OAUTH_{$id}_CLIENT_ID")), TextInput::make("OAUTH_{$id}_CLIENT_SECRET") - ->label('Client Secret') - ->placeholder('Client Secret') + ->label(trans('admin/setting.oauth.client_secret')) + ->placeholder(trans('admin/setting.oauth.client_secret')) ->columnSpan(2) ->required() ->password() diff --git a/app/Extensions/OAuth/Schemas/SteamSchema.php b/app/Extensions/OAuth/Schemas/SteamSchema.php index 29b179a1b2..fd1dd96bea 100644 --- a/app/Extensions/OAuth/Schemas/SteamSchema.php +++ b/app/Extensions/OAuth/Schemas/SteamSchema.php @@ -38,8 +38,8 @@ public function getSettingsForm(): array { return [ TextInput::make('OAUTH_STEAM_CLIENT_SECRET') - ->label('Web API Key') - ->placeholder('Web API Key') + ->label(trans('admin/setting.oauth.web_api_key')) + ->placeholder(trans('admin/setting.oauth.web_api_key')) ->columnSpan(4) ->required() ->password() diff --git a/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php b/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php index cf78faa5c7..7d1232946d 100644 --- a/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php +++ b/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php @@ -137,7 +137,7 @@ protected function getDefaultTabs(): array ->label(trans('admin/egg.features')) ->columnSpan(['default' => 2, 'sm' => 2, 'md' => 2, 'lg' => 3]), Hidden::make('script_is_privileged') - ->helperText('The docker images available to servers using this egg.'), + ->helperText(trans('admin/egg.docker_help')), TagsInput::make('tags') ->label(trans('admin/egg.tags')) ->columnSpan(['default' => 2, 'sm' => 2, 'md' => 2, 'lg' => 3]), diff --git a/app/Filament/Admin/Resources/Nodes/Pages/ListNodes.php b/app/Filament/Admin/Resources/Nodes/Pages/ListNodes.php index 16bc2842da..a1fbfcccde 100644 --- a/app/Filament/Admin/Resources/Nodes/Pages/ListNodes.php +++ b/app/Filament/Admin/Resources/Nodes/Pages/ListNodes.php @@ -30,7 +30,7 @@ public function table(Table $table): Table ->checkIfRecordIsSelectableUsing(fn (Node $node) => $node->servers_count <= 0) ->columns([ TextColumn::make('uuid') - ->label('UUID') + ->label(trans('admin/node.table.uuid')) ->searchable() ->hidden(), NodeHealthColumn::make('health'), @@ -46,7 +46,7 @@ public function table(Table $table): Table ->searchable(), IconColumn::make('scheme') ->visibleFrom('xl') - ->label('SSL') + ->label(trans('admin/node.table.ssl')) ->trueIcon(TablerIcon::Lock) ->falseIcon(TablerIcon::LockOpenOff) ->state(fn (Node $node) => $node->scheme === 'https'), diff --git a/app/Filament/Admin/Resources/Nodes/RelationManagers/AllocationsRelationManager.php b/app/Filament/Admin/Resources/Nodes/RelationManagers/AllocationsRelationManager.php index 5a12c134a6..73fae77b57 100644 --- a/app/Filament/Admin/Resources/Nodes/RelationManagers/AllocationsRelationManager.php +++ b/app/Filament/Admin/Resources/Nodes/RelationManagers/AllocationsRelationManager.php @@ -53,7 +53,7 @@ public function table(Table $table): Table ->selectCurrentPageOnly() //Prevent people from trying to nuke 30,000 ports at once.... -,- ->columns([ TextColumn::make('id') - ->label('ID') + ->label(trans('admin/node.table.id')) ->sortable() ->toggleable() ->toggledHiddenByDefault(), diff --git a/app/Filament/Admin/Resources/Plugins/PluginResource.php b/app/Filament/Admin/Resources/Plugins/PluginResource.php index d521f344de..7f43b429f5 100644 --- a/app/Filament/Admin/Resources/Plugins/PluginResource.php +++ b/app/Filament/Admin/Resources/Plugins/PluginResource.php @@ -93,7 +93,7 @@ public static function table(Table $table): Table ->visible(fn (Plugin $plugin) => $plugin->getReadme() || $plugin->url) ->url(fn (Plugin $plugin) => !$plugin->getReadme() ? $plugin->url : null, true) ->slideOver(true) - ->modalHeading('Readme') + ->modalHeading(trans('admin/plugin.readme')) ->modalSubmitAction(fn (Plugin $plugin) => Action::make('exclude_visit_website') ->label(trans('admin/plugin.visit_website')) ->visible(!is_null($plugin->url)) diff --git a/app/Filament/Admin/Resources/Servers/Pages/CreateServer.php b/app/Filament/Admin/Resources/Servers/Pages/CreateServer.php index b2cea61145..da390d6fa0 100644 --- a/app/Filament/Admin/Resources/Servers/Pages/CreateServer.php +++ b/app/Filament/Admin/Resources/Servers/Pages/CreateServer.php @@ -108,7 +108,7 @@ protected function getDefaultSteps(): array ->prefixIcon(TablerIcon::Server) ->label(trans('admin/server.name')) ->suffixAction(Action::make('hint_random') - ->tooltip('Random') + ->tooltip(trans('admin/server.random')) ->icon('tabler-dice-' . random_int(1, 6)) ->action(function (Set $set, Get $get) { $egg = Egg::find($get('egg_id')); @@ -651,8 +651,8 @@ protected function getDefaultSteps(): array ]) ->schema([ Hidden::make('io') - ->helperText('The IO performance relative to other running containers') - ->label('Block IO Proportion') + ->helperText(trans('admin/server.block_io_helper')) + ->label(trans('admin/server.block_io')) ->default(500), Grid::make() diff --git a/app/Filament/Admin/Resources/Servers/Pages/EditServer.php b/app/Filament/Admin/Resources/Servers/Pages/EditServer.php index 97fe01d331..cc52b33608 100644 --- a/app/Filament/Admin/Resources/Servers/Pages/EditServer.php +++ b/app/Filament/Admin/Resources/Servers/Pages/EditServer.php @@ -136,7 +136,7 @@ protected function getDefaultTabs(): array ->prefixIcon(TablerIcon::Server) ->label(trans('admin/server.name')) ->suffixAction(Action::make('hint_random') - ->tooltip('Random') + ->tooltip(trans('admin/server.random')) ->icon('tabler-dice-' . random_int(1, 6)) ->action(function (Set $set, Get $get) { $egg = Egg::find($get('egg_id')); @@ -462,8 +462,8 @@ protected function getDefaultTabs(): array ]), Hidden::make('io') - ->helperText('The IO performance relative to other running containers') - ->label('Block IO Proportion'), + ->helperText(trans('admin/server.block_io_helper')) + ->label(trans('admin/server.block_io')), Grid::make() ->columns(4) diff --git a/app/Filament/Admin/Resources/Servers/Pages/ListServers.php b/app/Filament/Admin/Resources/Servers/Pages/ListServers.php index 140bc1a6ab..ce9918c925 100644 --- a/app/Filament/Admin/Resources/Servers/Pages/ListServers.php +++ b/app/Filament/Admin/Resources/Servers/Pages/ListServers.php @@ -45,7 +45,7 @@ public function table(Table $table): Table ->color(fn (Server $server) => $server->condition->getColor()), TextColumn::make('uuid') ->hidden() - ->label('UUID') + ->label(trans('admin/server.uuid')) ->searchable(), TextColumn::make('name') ->label(trans('admin/server.name')) diff --git a/app/Filament/Admin/Resources/Users/UserResource.php b/app/Filament/Admin/Resources/Users/UserResource.php index a57b66c75a..835bf53b75 100644 --- a/app/Filament/Admin/Resources/Users/UserResource.php +++ b/app/Filament/Admin/Resources/Users/UserResource.php @@ -128,7 +128,7 @@ public static function defaultTable(Table $table): Table ->label(trans('profile.tabs.2fa')) ->visibleFrom('lg') ->icon(fn (User $user) => filled($user->mfa_app_secret) ? TablerIcon::Qrcode : ($user->mfa_email_enabled ? TablerIcon::Mail : TablerIcon::LockOpenOff)) - ->tooltip(fn (User $user) => filled($user->mfa_app_secret) ? 'App' : ($user->mfa_email_enabled ? 'E-Mail' : 'None')), + ->tooltip(fn (User $user) => filled($user->mfa_app_secret) ? trans('profile.mfa.app') : ($user->mfa_email_enabled ? trans('profile.mfa.email') : trans('profile.mfa.none'))), TextColumn::make('roles.name') ->label(trans('admin/user.roles')) ->badge() diff --git a/app/Filament/Admin/Resources/Webhooks/Pages/ListWebhookConfigurations.php b/app/Filament/Admin/Resources/Webhooks/Pages/ListWebhookConfigurations.php index ef8cfb459f..0661e4728f 100644 --- a/app/Filament/Admin/Resources/Webhooks/Pages/ListWebhookConfigurations.php +++ b/app/Filament/Admin/Resources/Webhooks/Pages/ListWebhookConfigurations.php @@ -33,7 +33,7 @@ public function getTabs(): array { return collect(WebhookScope::cases()) ->mapWithKeys(fn (WebhookScope $scope) => [ - $scope->value . '-webhooks' => Tab::make($scope->getLabel() . ' Webhooks') + $scope->value . '-webhooks' => Tab::make(trans('admin/webhook.tabs.' . $scope->value)) ->modifyQueryUsing(fn (Builder $query) => $query->where('scope', $scope)) ->badge(WebhookConfiguration::where('scope', $scope)->count()), ]) diff --git a/app/Filament/Admin/Resources/Webhooks/WebhookResource.php b/app/Filament/Admin/Resources/Webhooks/WebhookResource.php index 54c407a3d7..d1b72bf35b 100644 --- a/app/Filament/Admin/Resources/Webhooks/WebhookResource.php +++ b/app/Filament/Admin/Resources/Webhooks/WebhookResource.php @@ -103,7 +103,7 @@ public static function defaultTable(Table $table): Table IconColumn::make('type') ->label(trans('admin/webhook.type')), TextColumn::make('server.name') - ->label('Server') + ->label(trans('admin/webhook.server')) ->placeholder('—') ->icon('tabler-server') ->iconColor('info'), @@ -140,7 +140,7 @@ public static function defaultTable(Table $table): Table ->options(WebhookType::class) ->attribute('type'), SelectFilter::make('server_id') - ->label('Server') + ->label(trans('admin/webhook.server')) ->options(Server::query()->pluck('name', 'id')->toArray()), ]); } diff --git a/app/Filament/Server/Pages/Console.php b/app/Filament/Server/Pages/Console.php index 137d2e2678..b724138108 100644 --- a/app/Filament/Server/Pages/Console.php +++ b/app/Filament/Server/Pages/Console.php @@ -54,7 +54,7 @@ public function mount(): void $server->validateCurrentState(); } catch (ServerStateConflictException $exception) { AlertBanner::make('server_conflict') - ->title('Warning') + ->title(trans('admin/log.warning')) ->body($exception->getMessage()) ->warning() ->send(); diff --git a/app/Livewire/NodeClientConnectivity.php b/app/Livewire/NodeClientConnectivity.php index a04bb4e585..2041b1625c 100644 --- a/app/Livewire/NodeClientConnectivity.php +++ b/app/Livewire/NodeClientConnectivity.php @@ -64,22 +64,24 @@ public function render(): View 'httpUrl' => $httpUrl, 'wsUrl' => $wsUrl, 'wsToken' => $wsToken, - 'loadingIcon' => $this->makeIcon(TablerIcon::WorldQuestion, 'warning', 'Checking...'), - 'offlineIcon' => $this->makeIcon(TablerIcon::WorldX, 'danger', 'Node is not reachable from your browser'), - 'onlineIcon' => $this->makeIcon(TablerIcon::WorldCheck, 'success', 'Node is reachable'), - 'warningIcon' => $this->makeIcon(TablerIcon::WorldExclamation, 'warning', 'Node is reachable, but WebSocket failed. Check reverse proxy config.'), - 'onlineNoWsIcon' => $this->makeIcon(TablerIcon::WorldCheck, 'success', 'Node is reachable (WebSocket not tested — no servers)'), + 'loadingIcon' => $this->makeIcon(TablerIcon::WorldQuestion, 'warning', trans('admin/node.connectivity.checking')), + 'offlineIcon' => $this->makeIcon(TablerIcon::WorldX, 'danger', trans('admin/node.connectivity.offline')), + 'onlineIcon' => $this->makeIcon(TablerIcon::WorldCheck, 'success', trans('admin/node.connectivity.online')), + 'warningIcon' => $this->makeIcon(TablerIcon::WorldExclamation, 'warning', trans('admin/node.connectivity.websocket_failed')), + 'onlineNoWsIcon' => $this->makeIcon(TablerIcon::WorldCheck, 'success', trans('admin/node.connectivity.websocket_not_tested')), ]); } private function makeIcon(TablerIcon $icon, string $color, string $tooltip): string { + $tooltip = json_encode($tooltip, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_THROW_ON_ERROR); + return generate_icon_html($icon, attributes: (new ComponentAttributeBag()) ->merge([ 'x-tooltip' => '{ - content: "' . $tooltip . '", + content: ' . $tooltip . ', theme: $store.theme, - allowHTML: true, + allowHTML: false, placement: "bottom", }', 'style' => 'color: var(--dark-text, var(--text))', diff --git a/lang/en/admin/node.php b/lang/en/admin/node.php index 261a7f1337..45944c4d53 100644 --- a/lang/en/admin/node.php +++ b/lang/en/admin/node.php @@ -13,6 +13,9 @@ 'diagnostics' => 'Diagnostics', ], 'table' => [ + 'id' => 'ID', + 'uuid' => 'UUID', + 'ssl' => 'SSL', 'health' => 'Health', 'reachable' => 'Reachable', 'name' => 'Name', @@ -28,6 +31,13 @@ 'no_server' => 'No server', 'no_alias' => 'No alias', ], + 'connectivity' => [ + 'checking' => 'Checking...', + 'offline' => 'Node is not reachable from your browser', + 'online' => 'Node is reachable', + 'websocket_failed' => 'Node is reachable, but WebSocket failed. Check reverse proxy config.', + 'websocket_not_tested' => 'Node is reachable (WebSocket not tested — no servers)', + ], 'node_info' => 'Node Information', 'wings_version' => 'Wings Version', 'cpu_threads' => 'CPU Threads', diff --git a/lang/en/admin/plugin.php b/lang/en/admin/plugin.php index 9d196043fa..397bdc63c2 100644 --- a/lang/en/admin/plugin.php +++ b/lang/en/admin/plugin.php @@ -13,6 +13,7 @@ 'status' => 'Status', 'visit_website' => 'Visit Website', 'settings' => 'Settings', + 'readme' => 'Readme', 'install' => 'Install', 'uninstall' => 'Uninstall', 'update' => 'Update', diff --git a/lang/en/admin/server.php b/lang/en/admin/server.php index f6b0b0fabb..a3e34b417f 100644 --- a/lang/en/admin/server.php +++ b/lang/en/admin/server.php @@ -21,6 +21,7 @@ 'lock' => 'Lock', 'unlock' => 'Unlock', 'name' => 'Name', + 'random' => 'Random', 'external_id' => 'External ID', 'owner' => 'Owner', 'description' => 'Description', @@ -51,6 +52,8 @@ 'disk' => 'Disk Space', 'disk_limit' => 'Disk Space Limit', 'advanced_limits' => 'Advanced Limits', + 'block_io' => 'Block IO Proportion', + 'block_io_helper' => 'The IO performance relative to other running containers', 'cpu_pin' => 'CPU Pinning', 'threads' => 'Pinned Threads', 'pin_help' => 'Add pinned thread, e.g. 0 or 2-4', diff --git a/lang/en/admin/webhook.php b/lang/en/admin/webhook.php index 00f32b1172..a705145192 100644 --- a/lang/en/admin/webhook.php +++ b/lang/en/admin/webhook.php @@ -9,6 +9,14 @@ 'name' => 'Name', 'type' => 'Type', 'server' => 'Server', + 'scope' => [ + 'global' => 'Global', + 'server' => 'Server', + ], + 'tabs' => [ + 'global' => 'Global Webhooks', + 'server' => 'Server Webhooks', + ], 'information' => 'Information', 'payload' => 'Payload', 'events' => 'Events', diff --git a/lang/en/profile.php b/lang/en/profile.php index 20bb6c2cf1..dad4794e81 100644 --- a/lang/en/profile.php +++ b/lang/en/profile.php @@ -33,6 +33,11 @@ '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!', + 'mfa' => [ + 'app' => 'App', + 'email' => 'E-Mail', + 'none' => 'None', + ], 'backup_help' => 'These will not be shown again!', 'backup_codes' => 'Backup Codes', 'disable_2fa' => 'Disable 2FA',