i18n(users): translate 'status' badge column + relabel Locale → Язык / Language

Status column showed raw DB enum values (active/inactive/blocked) with
no formatStateUsing → readers saw 'active' instead of the translated
'Активный / Активно' visible in the Select. Added formatStateUsing with
a match() that returns the appropriate __() key.

Locale header re-translated to 'Язык' (RU) / 'Language' (EN) since
'Локаль' is unusual for end users.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-18 11:08:46 +00:00
parent 58f168dd97
commit 3d60e1d368
3 changed files with 8 additions and 2 deletions
@@ -170,6 +170,12 @@ class UserResource extends Resource
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('status')
->badge()
->formatStateUsing(fn ($state) => match ($state) {
'active' => __('Activ'),
'inactive' => __('Inactiv'),
'blocked' => __('Blocat'),
default => $state,
})
->colors([
'success' => ['active'],
'warning' => ['inactive'],