Add Dutch translations for all missing translation keys and fix hardcoded English labels

This commit is contained in:
root
2026-06-08 21:16:03 +02:00
parent a7bd30fd34
commit 5d58e12fc7
6 changed files with 1730 additions and 319 deletions
@@ -42,13 +42,13 @@ class StaffApplicationResource extends Resource
->searchable(),
Select::make('rank_id')
->label('Rank')
->label(__('Rank'))
->relationship('rank', 'rank_name')
->searchable()
->nullable(),
Select::make('team_id')
->label('Team')
->label(__('Team'))
->relationship('team', 'rank_name')
->searchable()
->nullable(),
@@ -65,12 +65,12 @@ class StaffApplicationResource extends Resource
return $table
->columns([
TextColumn::make('user.username')
->label('User')
->label(__('User'))
->sortable()
->searchable(),
TextColumn::make('applied_for')
->label('Applied For')
->label(__('Applied For'))
->state(fn (WebsiteStaffApplications $record) => $record->team_id
? ($record->team->rank_name ?? '-')
: ($record->rank->rank_name ?? '-'))
@@ -82,7 +82,7 @@ class StaffApplicationResource extends Resource
->sortable(),
TextColumn::make('status')
->label('Status')
->label(__('Status'))
->badge()
->formatStateUsing(fn (?string $state) => ucfirst($state ?? 'pending'))
->color(fn (?string $state) => [
@@ -98,22 +98,22 @@ class StaffApplicationResource extends Resource
])
->recordActions([
Action::make('approveTeam')
->label('Approve to Team')
->label(__('Approve to Team'))
->icon('heroicon-o-check-circle')
->color('success')
->visible(fn (WebsiteStaffApplications $r) => filled($r->team_id) && ($r->status === 'pending' || is_null($r->status)))
->requiresConfirmation()
->modalHeading('Approve to Team')
->modalHeading(__('Approve to Team'))
->modalDescription(function (WebsiteStaffApplications $r): string {
$user = $r->user;
$targetTeam = optional($r->team)->rank_name ?? '—';
$currentTeam = optional($user?->team)->rank_name;
if ($currentTeam && $user?->team_id !== $r->team_id) {
return "This user is currently in '{$currentTeam}'. Approving will move them to '{$targetTeam}'. Continue?";
return __('This user is currently in :team. Approving will move them to :target. Continue?', ['team' => $currentTeam, 'target' => $targetTeam]);
}
return "Approve this application and assign the user to '{$targetTeam}'?";
return __('Approve this application and assign the user to :team?', ['team' => $targetTeam]);
})
->action(function (WebsiteStaffApplications $r) {
$user = $r->user;
@@ -121,8 +121,8 @@ class StaffApplicationResource extends Resource
if (! $user || ! $team) {
Notification::make()
->danger()->title('Unable to approve')
->body('Missing user or team on this application.')
->danger()->title(__('Unable to approve'))
->body(__('Missing user or team on this application.'))
->send();
return;
@@ -141,27 +141,27 @@ class StaffApplicationResource extends Resource
]);
Notification::make()
->success()->title('Approved')
->body("{$user->username} has been added to '{$team->rank_name}'.")
->success()->title(__('Approved'))
->body(__(':username has been added to :team.', ['username' => $user->username, 'team' => $team->rank_name]))
->send();
}),
Action::make('rejectTeam')
->label('Reject')
->label(__('Reject'))
->icon('heroicon-o-x-circle')
->color('danger')
->visible(fn (WebsiteStaffApplications $r) => filled($r->team_id) && in_array($r->status, ['pending', 'approved', null], true))
->requiresConfirmation()
->modalHeading('Reject Application')
->modalHeading(__('Reject Application'))
->modalDescription(function (WebsiteStaffApplications $r): string {
$user = $r->user;
$teamName = optional($r->team)->rank_name ?? '—';
if ($r->status === 'approved') {
return "This will mark the application as rejected and remove {$user->username} from '{$teamName}' (if still on it). Continue?";
return __('This will mark the application as rejected and remove :username from :team. Continue?', ['username' => $user->username, 'team' => $teamName]);
}
return 'This will mark the application as rejected. Continue?';
return __('This will mark the application as rejected. Continue?');
})
->action(function (WebsiteStaffApplications $r) {
$user = $r->user;
@@ -169,8 +169,8 @@ class StaffApplicationResource extends Resource
if (! $user || ! $team) {
Notification::make()
->danger()->title('Unable to reject')
->body('Missing user or team on this application.')
->danger()->title(__('Unable to reject'))
->body(__('Missing user or team on this application.'))
->send();
return;
@@ -187,21 +187,21 @@ class StaffApplicationResource extends Resource
]);
Notification::make()
->success()->title('Rejected')
->success()->title(__('Rejected'))
->body($r->status === 'approved'
? "{$user->username} has been removed from '{$team->rank_name}' and the application marked as rejected."
: 'Application has been marked as rejected.')
? __(':username has been removed from :team and the application marked as rejected.', ['username' => $user->username, 'team' => $team->rank_name])
: __('Application has been marked as rejected.'))
->send();
}),
Action::make('reopen')
->label('Re-open')
->label(__('Re-open'))
->icon('heroicon-o-arrow-path')
->color('warning')
->visible(fn (WebsiteStaffApplications $r) => $r->status === 'rejected')
->requiresConfirmation()
->modalHeading('Re-open Application')
->modalDescription('This will set the application status back to pending.')
->modalHeading(__('Re-open Application'))
->modalDescription(__('This will set the application status back to pending.'))
->action(function (WebsiteStaffApplications $r) {
$r->update([
'status' => 'pending',
@@ -210,8 +210,8 @@ class StaffApplicationResource extends Resource
]);
Notification::make()
->success()->title('Re-opened')
->body('Application status set to pending.')
->success()->title(__('Re-opened'))
->body(__('Application status set to pending.'))
->send();
}),