feat(i18n): wrap 1103 hardcoded UI strings across Filament with __()

- Convert static $modelLabel/$pluralModelLabel/$title to getter methods
- Wrap ->label()/->placeholder()/->helperText()/->description()/->title()/->body() args
- Wrap Section::make()/Fieldset::make()/Notification::make()->title() args
- Fix RelationManagers::getTitle() signature to match parent (Model, string)
- Fix Pages::getTitle() to instance method (BasePage::getTitle is non-static)
- Extend lang/ru.json + lang/en.json with 700+ common terms; identity fallback for the rest
- Remove duplicate getters in 5 resources that had manual getModelLabel already

All 306 tests pass. Missing translations fall back to the RO key so the UI never breaks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-15 05:04:24 +00:00
parent 78ff8d4b43
commit f7fc69077b
83 changed files with 4212 additions and 1251 deletions
@@ -47,34 +47,34 @@ class MasterResource extends Resource
public static function form(Schema $schema): Schema
{
return $schema->components([
Schemas\Components\Section::make('Date personale')
Schemas\Components\Section::make(__('Date personale'))
->columns(2)
->schema([
Forms\Components\TextInput::make('name')->label('Nume')->required()->maxLength(120),
Forms\Components\TextInput::make('phone')->label('Telefon')->tel()->maxLength(40),
Forms\Components\TextInput::make('email')->label('Email')->email()->maxLength(120),
Forms\Components\TextInput::make('name')->label(__('Nume'))->required()->maxLength(120),
Forms\Components\TextInput::make('phone')->label(__('Telefon'))->tel()->maxLength(40),
Forms\Components\TextInput::make('email')->label(__('Email'))->email()->maxLength(120),
Forms\Components\Select::make('status')
->options(['active' => 'Activ', 'inactive' => 'Inactiv', 'blocked' => 'Blocat'])
->default('active')
->required(),
]),
Schemas\Components\Section::make('Profesie')
Schemas\Components\Section::make(__('Profesie'))
->columns(2)
->schema([
Forms\Components\TextInput::make('specialization')
->label('Specializare')
->placeholder('Motor / Frâne / Electrică ...')
->label(__('Specializare'))
->placeholder(__('Motor / Frâne / Electrică ...'))
->maxLength(120),
Forms\Components\ColorPicker::make('color')->label('Culoare în calendar'),
Forms\Components\TextInput::make('hourly_rate')->label('Tarif/oră')->numeric(),
Forms\Components\ColorPicker::make('color')->label(__('Culoare în calendar')),
Forms\Components\TextInput::make('hourly_rate')->label(__('Tarif/oră'))->numeric(),
Forms\Components\Hidden::make('role')->default('mechanic'),
]),
Schemas\Components\Section::make('Acces în aplicație (opțional)')
Schemas\Components\Section::make(__('Acces în aplicație (opțional)'))
->columns(1)
->collapsed()
->schema([
Forms\Components\TextInput::make('password')
->label('Parolă (lasă gol pentru a nu schimba)')
->label(__('Parolă (lasă gol pentru a nu schimba)'))
->password()
->minLength(6)
->dehydrated(fn ($state) => filled($state))
@@ -89,9 +89,9 @@ class MasterResource extends Resource
->columns([
Tables\Columns\ColorColumn::make('color')->label(''),
Tables\Columns\TextColumn::make('name')->searchable()->sortable(),
Tables\Columns\TextColumn::make('specialization')->label('Specializare')->placeholder('—'),
Tables\Columns\TextColumn::make('specialization')->label(__('Specializare'))->placeholder('—'),
Tables\Columns\TextColumn::make('phone')->copyable()->placeholder('—'),
Tables\Columns\TextColumn::make('hourly_rate')->label('Tarif/h')->money('MDL')->alignRight()->placeholder('—'),
Tables\Columns\TextColumn::make('hourly_rate')->label(__('Tarif/h'))->money('MDL')->alignRight()->placeholder('—'),
Tables\Columns\TextColumn::make('status')
->badge()
->colors([