fix: 分类/友链资源字段全部中文化(语言包 lang/zh_CN.json + __() 引用),支付过滤补 label,消除后台表格/表单英文

This commit is contained in:
ak
2026-08-11 23:31:50 +08:00
parent d9a6ca2959
commit 3ff766d980
16 changed files with 65 additions and 14 deletions
@@ -2,7 +2,6 @@
declare(strict_types=1);
namespace App\Filament\Resources\Categories\Schemas;
use Filament\Forms\Components\TextInput;
@@ -15,16 +14,22 @@ class CategoryForm
return $schema
->components([
TextInput::make('name')
->label(__('category.name'))
->required(),
TextInput::make('slug'),
TextInput::make('slug')
->label(__('category.slug'))
->helperText('留空自动生成'),
TextInput::make('display_order')
->label(__('category.display_order'))
->required()
->numeric()
->default(0),
TextInput::make('post_count')
->label(__('category.post_count'))
->required()
->numeric()
->default(0),
->default(0)
->disabled(),
]);
}
}
@@ -2,7 +2,6 @@
declare(strict_types=1);
namespace App\Filament\Resources\Categories\Tables;
use Filament\Actions\BulkActionGroup;
@@ -18,21 +17,27 @@ class CategoriesTable
return $table
->columns([
TextColumn::make('name')
->label(__('category.name'))
->searchable(),
TextColumn::make('slug')
->label(__('category.slug'))
->searchable(),
TextColumn::make('display_order')
->label(__('category.display_order'))
->numeric()
->sortable(),
TextColumn::make('post_count')
->label(__('category.post_count'))
->numeric()
->sortable(),
TextColumn::make('created_at')
->dateTime()
->label(__('category.created_at'))
->dateTime('Y-m-d')
->sortable()
->toggleable(isToggledHiddenByDefault: true),
TextColumn::make('updated_at')
->dateTime()
->label(__('category.updated_at'))
->dateTime('Y-m-d')
->sortable()
->toggleable(isToggledHiddenByDefault: true),
])