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'],
+1 -1
View File
@@ -967,7 +967,7 @@
"Loading": "Loading...",
"Loc.": "Loc.",
"Local": "Local",
"Locale": "Locale",
"Locale": "Language",
"Localizare & monedă": "Localization & currency",
"Location": "Location",
"Locație": "Location",
+1 -1
View File
@@ -967,7 +967,7 @@
"Loading": "Загрузка...",
"Loc.": "Loc.",
"Local": "Локально",
"Locale": "Локаль",
"Locale": "Язык",
"Localizare & monedă": "Локализация и валюта",
"Location": "Локация",
"Locație": "Локация",