Skip to content

Commit

Permalink
Merge pull request #250 from lara-zeus/trans
Browse files Browse the repository at this point in the history
add more translation
  • Loading branch information
atmonshi authored Feb 6, 2024
2 parents b3dda0b + 87f2c9a commit 3df74c4
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 9 deletions.
17 changes: 16 additions & 1 deletion resources/lang/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,20 @@
"List Entries": "عرض السجلات",
"notes": "ملاحظات",
"Open": "عرض",
"Preset": "القوالب"
"Preset": "القوالب",
"start date": "تاريخ البداية",
"end date": "تاريخ النهاية",
"Edit Form": "تعديل",
"Responses Entries": "الإدخالات",
"section options": "خيارات القسم",
"more section options": "خيارات",
"Visual Options": "خيارات العرض",
"compact section": "compact",
"Enable Conditional Visibility": "تفعيل",
"General Options": "خيارات عامة",
"Hint Options": "خيارات التلميح",
"advanced fields settings": "خيارات القسم المتقدمة",
"Extensions": "الملحقات",
"Design": "التصميم",
"View Form": "عرض"
}
17 changes: 16 additions & 1 deletion resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,20 @@
"Hint Color" :"Hint Color",
"Textarea": "Textarea",
"Paragraph": "Paragraph",
"Color Picker": "Color Picker"
"Color Picker": "Color Picker",
"start date": "start date",
"end date": "end date",
"Edit Form": "edit form",
"Responses Entries": "Responses Entries",
"section options": "section options",
"more section options": "more section options",
"Visual Options": "Visual Options",
"compact section": "compact section",
"Enable Conditional Visibility": "Enable Conditional Visibility",
"General Options": "General Options",
"Hint Options": "Hint Options",
"advanced fields settings": "advanced fields settings",
"Extensions": "Extensions",
"Design": "Design",
"View Form": "View Form"
}
2 changes: 1 addition & 1 deletion src/Concerns/HasOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static function visibility(?array $getFields = []): Accordion
}

return Accordion::make('visibility-options')
->label('Conditional Visibility')
->label(__('Conditional Visibility'))
->icon('iconpark-eyes')
->schema([
Toggle::make('options.visibility.active')
Expand Down
3 changes: 2 additions & 1 deletion src/Concerns/Schemata.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ public static function getMainFormSchema(): array
->minItems(1)
->extraItemActions([
Action::make('options')
->label(__('section options'))
->slideOver()
->color('warning')
->tooltip('more section options')
->tooltip(__('more section options'))
->icon('heroicon-m-cog')
->fillForm(fn (
array $arguments,
Expand Down
18 changes: 13 additions & 5 deletions src/Filament/Resources/FormResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public static function infolist(Infolist $infolist): Infolist
return $infolist
->schema([
Section::make()->schema([
TextEntry::make('name'),
TextEntry::make('name')
->label(__('name')),

/*SimpleListEntry::make('links')
->inline(true)
Expand All @@ -108,13 +109,16 @@ public static function infolist(Infolist $infolist): Infolist
->label(__('Form Links')),*/

TextEntry::make('slug')
->label(__('slug'))
->url(fn (ZeusForm $record) => route('bolt.form.show', ['slug' => $record->slug]))
->visible(fn (ZeusForm $record) => $record->extensions === null)
->icon('heroicon-o-arrow-top-right-on-square')
->openUrlInNewTab(),

TextEntry::make('description'),
TextEntry::make('description')
->label(__('description')),
IconEntry::make('is_active')
->label(__('is active'))
->icon(fn (string $state): string => match ($state) {
'0' => 'clarity-times-circle-solid',
default => 'clarity-check-circle-line',
Expand All @@ -125,10 +129,14 @@ public static function infolist(Infolist $infolist): Infolist
default => 'gray',
}),

TextEntry::make('start_date')->dateTime(),
TextEntry::make('end_date')->dateTime(),
TextEntry::make('start_date')
->label(__('start date'))
->dateTime(),
TextEntry::make('end_date')
->label(__('end date'))
->dateTime(),
])
->columns(2),
->columns(),
]);
}

Expand Down
11 changes: 11 additions & 0 deletions src/Filament/Resources/FormResource/Pages/EditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Filament\Actions\Action;
use Filament\Actions\LocaleSwitcher;
use Filament\Resources\Pages\EditRecord;
use Illuminate\Contracts\Support\Htmlable;
use LaraZeus\Bolt\Filament\Resources\FormResource;
use LaraZeus\Bolt\Models\Form;

Expand All @@ -17,6 +18,16 @@ class EditForm extends EditRecord

protected static string $resource = FormResource::class;

public function getTitle(): string | Htmlable
{
return __('Edit Form');
}

public static function getNavigationLabel(): string
{
return __('Edit Form');
}

protected function getHeaderActions(): array
{
return [
Expand Down
11 changes: 11 additions & 0 deletions src/Filament/Resources/FormResource/Pages/ViewForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Filament\Actions\Action;
use Filament\Actions\LocaleSwitcher;
use Filament\Resources\Pages\ViewRecord;
use Illuminate\Contracts\Support\Htmlable;
use LaraZeus\Bolt\Filament\Resources\FormResource;
use LaraZeus\Bolt\Models\Form;

Expand All @@ -17,6 +18,16 @@ class ViewForm extends ViewRecord

protected static string $resource = FormResource::class;

public function getTitle(): string | Htmlable
{
return __('View Form');
}

public static function getNavigationLabel(): string
{
return __('View Form');
}

protected function getHeaderActions(): array
{
return [
Expand Down

0 comments on commit 3df74c4

Please sign in to comment.