Skip to content

Commit 88bc9a4

Browse files
authored
Merge pull request #255 from lara-zeus/translation
Translation
2 parents 18370cb + 79428a4 commit 88bc9a4

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

resources/lang/en/cms.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
'name' => 'Tag Name',
105105
'type' => 'type',
106106
'label' => 'Tag',
107+
'slug' => 'slug',
108+
'items_count' => 'Count',
107109
'plural_label' => 'Tags',
108110
'navigation_label' => 'Tags',
109111
],

src/Filament/Resources/TagResource.php

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ public static function form(Schema $schema): Schema
5151
$set('slug', Str::slug($state));
5252
}),
5353
TextInput::make('slug')
54+
->label(__('zeus-sky::cms.tags.slug'))
5455
->rules(function ($record) {
5556
return [new UniqueTranslationRule(Tag::class, $record)];
5657
})
5758
->required()
5859
->maxLength(255),
5960
Select::make('type')
61+
->label(__('zeus-sky::cms.tags.type'))
6062
->columnSpan(2)
6163
->options(SkyPlugin::get()->getTagTypes()),
6264
]),
@@ -67,10 +69,23 @@ public static function table(Table $table): Table
6769
{
6870
return $table
6971
->columns([
70-
TextColumn::make('name')->toggleable()->searchable()->sortable(),
71-
TextColumn::make('type')->toggleable()->searchable()->sortable(),
72-
TextColumn::make('slug')->toggleable()->searchable()->sortable(),
72+
TextColumn::make('name')
73+
->label(__('zeus-sky::cms.tags.name'))
74+
->toggleable()
75+
->searchable()
76+
->sortable(),
77+
TextColumn::make('type')
78+
->label(__('zeus-sky::cms.tags.type'))
79+
->toggleable()
80+
->searchable()
81+
->sortable(),
82+
TextColumn::make('slug')
83+
->label(__('zeus-sky::cms.tags.slug'))
84+
->toggleable()
85+
->searchable()
86+
->sortable(),
7387
TextColumn::make('items_count')
88+
->label(__('zeus-sky::cms.tags.items_count'))
7489
->toggleable()
7590
->getStateUsing(
7691
fn (Tag $record): int => method_exists($record, $record->type)

0 commit comments

Comments
 (0)