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
@@ -30,10 +30,16 @@ class BadgeTextEditorResource extends Resource
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-pencil-square';
#[\Override]
protected static ?string $navigationLabel = 'Badge Editor';
public static function getNavigationLabel(): string
{
return __('Badge Editor');
}
#[\Override]
protected static ?string $modelLabel = 'Badge Text';
public static function getModelLabel(): string
{
return __('Badge Text');
}
#[\Override]
protected static ?string $slug = 'hotel/badge-text-editor';
@@ -45,16 +51,16 @@ class BadgeTextEditorResource extends Resource
->components([
TextInput::make('badge_key')
->required()
->label('Badge Key - Expl. ATOM101')
->placeholder('This is the badge code'),
->label(__('Badge Key - Expl. ATOM101'))
->placeholder(__('This is the badge code')),
TextInput::make('badge_name')
->required()
->label('Badge Name')
->placeholder('This is the name of the badge: Expl. The ATOM Badge'),
->label(__('Badge Name'))
->placeholder(__('This is the name of the badge: Expl. The ATOM Badge')),
Textarea::make('badge_description')
->required()
->label('Badge Description')
->placeholder('Please add a description for the badge.'),
->label(__('Badge Description'))
->placeholder(__('Please add a description for the badge.')),
]);
}
@@ -67,7 +73,7 @@ class BadgeTextEditorResource extends Resource
return $table
->columns([
ImageColumn::make('badge_key')
->label('Badge Image')
->label(__('Badge Image'))
->getStateUsing(function ($record) use ($badgesPath) {
$badgeName = str_replace('badge_desc_', '', $record->badge_key);
@@ -76,7 +82,7 @@ class BadgeTextEditorResource extends Resource
->width(50)
->height(50),
TextColumn::make('badge_name')
->label('Badge Code & Name')
->label(__('Badge Code & Name'))
->formatStateUsing(fn ($record) => $record->badge_key . ' : ' . $record->badge_name)
->searchable(query: function ($query, $search) {
$query->where('badge_key', 'like', "%{$search}%")
@@ -84,7 +90,7 @@ class BadgeTextEditorResource extends Resource
})
->sortable(),
TextColumn::make('badge_description')
->label('Badge Description')
->label(__('Badge Description'))
->getStateUsing(fn ($record) => Str::limit($record->badge_description, 65))
->searchable(),
])