Skip to content

Commit

Permalink
Merge pull request #15 from fsamapoor/main
Browse files Browse the repository at this point in the history
Adds translation keys for labels in relation tables.
  • Loading branch information
tharindarodrigo authored Jul 31, 2022
2 parents b92bd62 + d74d353 commit 5612ccb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ class RoleRelationManager extends BelongsToManyRelationManager

protected static ?string $recordTitleAttribute = 'name';

protected static function getModelLabel(): string
{
return __('filament-spatie-roles-permissions::filament-spatie.section.role');
}

protected static function getPluralModelLabel(): string
{
return __('filament-spatie-roles-permissions::filament-spatie.section.roles');
}

public static function form(Form $form): Form
{
return $form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ class PermissionRelationManager extends BelongsToManyRelationManager

protected static ?string $recordTitleAttribute = 'name';

protected static function getModelLabel(): string
{
return __('filament-spatie-roles-permissions::filament-spatie.section.permission');
}

protected static function getPluralModelLabel(): string
{
return __('filament-spatie-roles-permissions::filament-spatie.section.permissions');
}

public static function form(Form $form): Form
{
return $form
Expand Down

0 comments on commit 5612ccb

Please sign in to comment.