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:
@@ -170,6 +170,12 @@ class UserResource extends Resource
|
|||||||
->toggleable(isToggledHiddenByDefault: true),
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
Tables\Columns\TextColumn::make('status')
|
Tables\Columns\TextColumn::make('status')
|
||||||
->badge()
|
->badge()
|
||||||
|
->formatStateUsing(fn ($state) => match ($state) {
|
||||||
|
'active' => __('Activ'),
|
||||||
|
'inactive' => __('Inactiv'),
|
||||||
|
'blocked' => __('Blocat'),
|
||||||
|
default => $state,
|
||||||
|
})
|
||||||
->colors([
|
->colors([
|
||||||
'success' => ['active'],
|
'success' => ['active'],
|
||||||
'warning' => ['inactive'],
|
'warning' => ['inactive'],
|
||||||
|
|||||||
+1
-1
@@ -967,7 +967,7 @@
|
|||||||
"Loading": "Loading...",
|
"Loading": "Loading...",
|
||||||
"Loc.": "Loc.",
|
"Loc.": "Loc.",
|
||||||
"Local": "Local",
|
"Local": "Local",
|
||||||
"Locale": "Locale",
|
"Locale": "Language",
|
||||||
"Localizare & monedă": "Localization & currency",
|
"Localizare & monedă": "Localization & currency",
|
||||||
"Location": "Location",
|
"Location": "Location",
|
||||||
"Locație": "Location",
|
"Locație": "Location",
|
||||||
|
|||||||
+1
-1
@@ -967,7 +967,7 @@
|
|||||||
"Loading": "Загрузка...",
|
"Loading": "Загрузка...",
|
||||||
"Loc.": "Loc.",
|
"Loc.": "Loc.",
|
||||||
"Local": "Локально",
|
"Local": "Локально",
|
||||||
"Locale": "Локаль",
|
"Locale": "Язык",
|
||||||
"Localizare & monedă": "Локализация и валюта",
|
"Localizare & monedă": "Локализация и валюта",
|
||||||
"Location": "Локация",
|
"Location": "Локация",
|
||||||
"Locație": "Локация",
|
"Locație": "Локация",
|
||||||
|
|||||||
Reference in New Issue
Block a user