Skip to content

Commit

Permalink
add ar phrases
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed May 28, 2023
1 parent 7319aff commit 542b164
Show file tree
Hide file tree
Showing 12 changed files with 246 additions and 25 deletions.
111 changes: 110 additions & 1 deletion resources/lang/ar.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,112 @@
{

"view file": "عرض الملف",
"By": "بواسطة",
"Visitor": "زائر",
"created at": "أنشئ بتاريخ",
"Available from": "متاح من",
"to": "إلى",
"Forms": "النماذج",
"Save": "حفظ",
"browse your forms": "استعراض النماذج",
"List All Forms": "عرض كافة النماذج",
"Logo": "الشعار",
"Show Entry Details": "عرض تفاصيل السجل",
"My Entries": "سجلاتي",
"Show entry": "عرض السجل",
"Entry Details": "تفاصيل السجل",
"User Details": "تفاصيل المستخدم",
"status": "الحالة",
"form submitted successfully": "تم إرسال النموذج بنجاح",
"the form": "تم ارسال النموذج",
"submitted successfully": "بنجاح",
"Checkbox List": "اختيار متعدد",
"Data Source": "مصدر البيانات",
"Is Required": "اجباري؟",
"Date Picker": "اختيار التاريخ",
"Date Time Picker": "اختيار الوقت والتاريخ",
"File Upload": "رفع ملفات",
"Allow Multiple": "السماح ياختيارات متعددة",
"Multi Select Menu": "قائمة اختيارات متعددة",
"Radio": "اختيار",
"Is inline": "داخلي",
"Rich Editor": "محرر نصوص",
"Select Menu": "قائمة اختيار",
"Text Input": "حقل نصي",
"Time Picker": "اختيار الوقت",
"Toggle": "Toggle",
"Name": "الإسم",
"slug": "الرابط المختصر",
"ordering": "الترتيب",
"Is Active": "مفعل؟",
"Description": "الوصف",
"logo": "الشعار",
"Category": "التصنيف",
"Categories": "التصنيفات",
"Collection": "بيان",
"Collections": "البيانات",
"Collections Name": "الإسم",
"Collections Values": "القيم",
"Key": "المفتاح",
"Value": "القيمة",
"what store in the form": "مايتخزن في النموذج",
"what the user will see": "مايراه المستخدم",
"selected by default": "محدد بشكل افتراضي",
"Form": "نموذج",
"Start Date": "تاريخ البداية",
"Form Name": "اسم النموذج",
"End Date": "تاريخ النهاية",
"Responses Exists": "توجد سجلات",
"Responses Count": "عدد السجلات",
"Entries": "السجلات",
"view all entries": "عرض كافة السجلات",
"View": "عرض",
"view form": "عرض النموذج",
"User avatar": "صورة المستخدم",
"User Name": "اسم المستخدم",
"User Email": "بريد المستخدم",
"form": "نموذج",
"Status": "الحالة",
"Notes": "الملاحظات",
"Created Date": "تاريخ الإنشاء",
"view all forms": "عرض كافة النماذج",
"Sections": "الأقسام",
"sections are here to group the fields, and you can display it as pages from the Form options. if you have one section, it wont show in the form": "الأقسام تساعدك على تنظيم الحقول في النموذج، كما يمكنك عرضها كمعالج متعدد الخطوات من خيارات النموذج، في حالة وجود قسم واحد فقط في النموذج لن يتم عرضه",
"Add Section": "اضف قسم",
"Title & Slug": "العنوان والرابط",
"Translatable": "قابل للترجمة",
"Form Slug": "الرابط المميز",
"Text & Details": "النصوص والتفاصيل",
"Form Description": "وصف النموذج",
"shown under the title of the form and used in SEO": "يظهر تحت عنوان النموذج ويستخدم لتحسين النموذج لمحركات البحث",
"Form Details": "تفاصيل النموذج",
"a highlighted section above the form, to show some instructions or more details": "لعرض بيانات اضافية اعلى النموذج كتعليمات او ماشابه",
"Confirmation Message": "رسالة التأكيد",
"optional, show a massage whenever any one submit a new entry": "اختياري، عرض رسالة بعد ارسال المستخدم للنموذج",
"Display & Access": "العرض والصلاحيات",
"Activate the form and let users start submissions": "تفعيل النموذج والسماح بارسال الإدخالات",
"Show As Wizard": "عرض كمعالج",
"instead of showing all section in one page, separate them in multiple steps": "بدلا من عرض كافة الأقسام بشكلل متتالي، يمكنك عرض النموذج كخطوات متعددة",
"require Login": "يتطلب تسيجل الدخول",
"User must be logged in or create an account before can submit a new entry": "يتوجب على المستخدمين الدخول أو انشاء حساب جديد قبل استخدام النموذج",
"One Entry Per User": "ادخال واحد فقط لكل مستخدم",
"to check if the user already submitted an entry in this form": "السماح فقط بإدخال واحد للنموذج من كل مستخدم",
"Advanced": "متقدم",
"optional, organize your forms into categories": "ترتيب النماذج في تصنيفات لتظهر في الموقع",
"optional, specify when the form will be active and receiving new entries": "يمكنك تحديد فترة السماح باستقبال ارساليات للنموذج",
"Emails Notifications": "تنبيهات البريد",
"optional, enter the emails you want to receive notification when ever you got a new entry": "اختياري، يمكنك ارسال تنبيهات للبريد الإلكتروني عند وجود ادخالات جديدة",
"enter webHook URL": "رابط استدعاء خارجي",
"Send the form data to a webHook": "ارسال النموذج إلى رابط خارجي",
"Section Name": "اسم التصنيف",
"Section Fields": "حقول التصنيف",
"Add field": "اضافة حقل",
"Field Name": "اسم الحقل",
"Field Description": "وصف الحقل",
"Field Type": "النوع",
"Field Options": "خيارات الحقل",
"Brows Entries": "عرض السجلات",
"New": "جديد",
"closed": "مغلق",
"Inactive": "غير مفعل",
"Active": "مفعل"
}
111 changes: 110 additions & 1 deletion resources/lang/en.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,112 @@
{

"view file": "view file",
"By": "By",
"Visitor": "Visitor",
"created at": "created at",
"Available from": "Available from",
"to": "to",
"Forms": "Forms",
"Save": "Save",
"browse your forms": "browse your forms",
"List All Forms": "List All Forms",
"Logo": "Logo",
"Show Entry Details": "Show Entry Details",
"My Entries": "My Entries",
"Show entry": "Show entry",
"Entry Details": "Entry Details",
"User Details": "User Details",
"status": "status",
"form submitted successfully": "form submitted successfully",
"the form": "the form",
"submitted successfully": "submitted successfully",
"Checkbox List": "Checkbox List",
"Data Source": "Data Source",
"Is Required": "Is Required",
"Date Picker": "Date Picker",
"Date Time Picker": "Date Time Picker",
"File Upload": "File Upload",
"Allow Multiple": "Allow Multiple",
"Multi Select Menu": "Multi Select Menu",
"Radio": "Radio",
"Is inline": "Is inline",
"Rich Editor": "Rich Editor",
"Select Menu": "Select Menu",
"Text Input": "Text Input",
"Time Picker": "Time Picker",
"Toggle": "Toggle",
"Name": "name",
"slug": "slug",
"ordering": "ordering",
"Is Active": "Is Active",
"Description": "Description",
"logo": "logo",
"Category": "Category",
"Categories": "Categories",
"Collection": "Collection",
"Collections": "Collections",
"Collections Name": "Collections Name",
"Collections Values": "Collections Values",
"Key": "Key",
"Value": "Value",
"what store in the form": "what store in the form",
"what the user will see": "what the user will see",
"selected by default": "selected by default",
"Form": "Form",
"Start Date": "Start Date",
"Form Name": "Form Name",
"End Date": "End Date",
"Responses Exists": "Responses Exists",
"Responses Count": "Responses Count",
"Entries": "Entries",
"view all entries": "view all entries",
"View": "View",
"view form": "view form",
"User avatar": "User avatar",
"User Name": "User Name",
"User Email": "User Email",
"form": "form",
"Status": "Status",
"Notes": "Notes",
"Created Date": "Created Date",
"view all forms": "view all forms",
"Sections": "Sections",
"sections are here to group the fields, and you can display it as pages from the Form options. if you have one section, it wont show in the form": "sections are here to group the fields, and you can display it as pages from the Form options. if you have one section, it wont show in the form",
"Add Section": "Add Section",
"Title & Slug": "Title & Slug",
"Translatable": "Translatable",
"Form Slug": "Form Slug",
"Text & Details": "Text & Details",
"Form Description": "Form Description",
"shown under the title of the form and used in SEO": "shown under the title of the form and used in SEO",
"Form Details": "Form Details",
"a highlighted section above the form, to show some instructions or more details": "a highlighted section above the form, to show some instructions or more details",
"Confirmation Message": "Confirmation Message",
"optional, show a massage whenever any one submit a new entry": "optional, show a massage whenever any one submit a new entry",
"Display & Access": "Display & Access",
"Activate the form and let users start submissions": "Activate the form and let users start submissions",
"Show As Wizard": "Show As Wizard",
"instead of showing all section in one page, separate them in multiple steps": "instead of showing all section in one page, separate them in multiple steps",
"require Login": "require Login",
"User must be logged in or create an account before can submit a new entry": "User must be logged in or create an account before can submit a new entry",
"One Entry Per User": "One Entry Per User",
"to check if the user already submitted an entry in this form": "to check if the user already submitted an entry in this form",
"Advanced": "Advanced",
"optional, organize your forms into categories": "optional, organize your forms into categories",
"optional, specify when the form will be active and receiving new entries": "optional, specify when the form will be active and receiving new entries",
"Emails Notifications": "Emails Notifications",
"optional, enter the emails you want to receive notification when ever you got a new entry": "optional, enter the emails you want to receive notification when ever you got a new entry",
"enter webHook URL": "enter webHook URL",
"Send the form data to a webHook": "Send the form data to a webHook",
"Section Name": "Section Name",
"Section Fields": "Section Fields",
"Add field": "Add field",
"Field Name": "Field Name",
"Field Description": "Field Description",
"Field Type": "Field Type",
"Field Options": "Field Options",
"Brows Entries": "Brows Entries",
"New": "New",
"closed": "closed",
"Inactive": "Inactive",
"Active": "Active"
}
2 changes: 1 addition & 1 deletion resources/views/filament/fields/file-upload.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<a target="_blank" href="{{ Storage::disk(config('zeus-bolt.uploads.disk'))->url($resp->response) }}">
view file
{{ __('view file') }}
</a>
4 changes: 2 additions & 2 deletions resources/views/themes/zeus/fill-forms.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
</svg>
<span>{{ __('Available from') }}:</span>
<span>{{ optional($zeusForm->start_date)->format('Y/m/d') }}</span>,
<span>{{ trans('to') }}:</span>
<span>{{ __('to') }}:</span>
<span>{{ optional($zeusForm->end_date)->format('Y/m/d') }}</span>
</div>
@endif
</x-slot>

<x-slot name="breadcrumps">
<li class="flex items-center">
<a href="{{ route('bolt.user.forms.list') }}">Forms</a>
<a href="{{ route('bolt.user.forms.list') }}">{{ __('Forms') }}</a>
<x-iconpark-rightsmall-o class="fill-current w-4 h-4 mx-3" />
</li>

Expand Down
2 changes: 1 addition & 1 deletion resources/views/themes/zeus/list-entries.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="mx-4">
<x-slot name="header">
<h2>{{ __('browse your tickets') }}</h2>
<h2>{{ __('browse your forms') }}</h2>
</x-slot>

<x-slot name="breadcrumb"></x-slot>
Expand Down
18 changes: 11 additions & 7 deletions resources/views/themes/zeus/show-entry.blade.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<div x-data class="space-y-4 my-6 mx-4 ">

<x-slot name="header">
<h2>Show entry details</h2>
<h2>{{ __('Show Entry Details') }}</h2>
</x-slot>

<x-slot name="breadcrumps">
<li class="flex items-center">
<a href="{{ route('bolt.user.entries.list') }}">My Entries</a>
<a href="{{ route('bolt.user.entries.list') }}">{{ __('My Entries') }}</a>
<x-iconpark-rightsmall-o class="fill-current w-4 h-4 mx-3" />
</li>

<li class="flex items-center">
Show entry # {{ $response->id }}
{{ __('Show entry') }} # {{ $response->id }}
</li>
</x-slot>

<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="md:col-span-2 space-y-4">
<x-filament::card>
<x-filament::card.heading>Entry Details</x-filament::card.heading>
<x-filament::card.heading>
{{ __('Entry Details') }}
</x-filament::card.heading>
<div class="grid grid-cols-1">
@foreach($response->fieldsResponses as $resp)
<div class="py-2 text-ellipsis overflow-auto">
Expand All @@ -32,7 +34,9 @@
</div>
<div class="md:col-span-1 space-y-4">
<x-filament::card class="w-full">
<x-filament::card.heading>User Details</x-filament::card.heading>
<x-filament::card.heading>
{{ __('User Details') }}
</x-filament::card.heading>
<p>
<span class="text-base font-light">{{ __('By') }}</span>:
@if($response->user_id === null)
Expand All @@ -47,10 +51,10 @@
</p>
</x-filament::card>
<div>
<p class="my-3 mx-1 text-secondary-600 font-semibold">Entry Details</p>
<p class="my-3 mx-1 text-secondary-600 font-semibold">{{ __('Entry Details') }}</p>
<div class="space-y-2">
<x-filament::card>
<span class="text-gray-600">Form:</span>
<span class="text-gray-600">{{ __('Form') }}:</span>
<x-filament::card.heading class="text-primary-600">{{ $response->form->name ?? '' }}</x-filament::card.heading>
</x-filament::card>

Expand Down
4 changes: 2 additions & 2 deletions resources/views/themes/zeus/submitted.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
{!! $form->options['confirmationMessage'] !!}
@else
<span class="text-xs text-gray-400">
the form {{ $form->name ?? '' }} submitted successfully.
</span>
{{ __('the form') }} {{ $form->name ?? '' }} {{ __('submitted successfully') }}.
</span>
<br>
@endif
</x-filament::card>
Expand Down
4 changes: 2 additions & 2 deletions src/Facades/Bolt.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ public static function prepareFieldsAndSectionToRender($zeusForm, $item): array

$fields[] = static::renderHook('zeus-form-section.before');

if ($item !== null && $countSections === 1) {
/*if ($item !== null && $countSections === 1) {
// todo adding title comment if there is an extension, extensions should define their own fields somehow
$fields[] = TextInput::make('itemData.title')->label(__('Ticket Title'))->required();
}
}*/

foreach ($section->fields()->orderBy('ordering')->get() as $zeusField) {
$fields[] = static::renderHook('zeus-form-field.before');
Expand Down
4 changes: 2 additions & 2 deletions src/Filament/Resources/CategoryResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static function form(Form $form): Form
->required()
->maxLength(255)
->reactive()
->label(__('name'))
->label(__('Name'))
->afterStateUpdated(function (Closure $set, $state, $context) {
if ($context === 'edit') {
return;
Expand All @@ -60,7 +60,7 @@ public static function form(Form $form): Form
}),
TextInput::make('slug')->required()->maxLength(255)->label(__('slug')),
TextInput::make('ordering')->required()->numeric()->label(__('ordering')),
Toggle::make('is_active')->label(__('is_active'))->default(1),
Toggle::make('is_active')->label(__('Is Active'))->default(1),
Textarea::make('desc')->maxLength(65535)->columnSpan(['sm' => 2])->label(__('Description')),
FileUpload::make('logo')
->disk(config('zeus-bolt.uploads.disk', 'public'))
Expand Down
5 changes: 2 additions & 3 deletions src/Filament/Resources/FormResource/Schemata.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ public static function getTabsSchema(): array
->helperText(__('a highlighted section above the form, to show some instructions or more details')),
RichEditor::make('options.confirmation-message')
->label(__('Confirmation Message'))
->helperText(__('optional, show a massage whenever any one submit a new entery')),
->helperText(__('optional, show a massage whenever any one submit a new entry')),
]),
Tabs\Tab::make('display-access')
->label(__('Display & Access'))
->columns(2)
->schema([
Toggle::make('is_active')
->label(__('is_active'))
->label(__('Is Active'))
->default(1)
->helperText(__('Activate the form and let users start submissions')),
Toggle::make('options.show-as-wizard')
Expand Down Expand Up @@ -177,7 +177,6 @@ public static function getSectionsSchema(): array
public static function getFieldsSchema(): array
{
return [

Tabs::make('fields')
->tabs([
Tabs\Tab::make('type-text')
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Livewire/ListEntries.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function render()
->twitter();

return view(app('bolt-theme') . '.list-entries')
->with('tickets', config('zeus-bolt.models.Response')::where('user_id', auth()->user()->id)->get())
//->with('tickets', config('zeus-bolt.models.Response')::where('user_id', auth()->user()->id)->get())
->layout(config('zeus-bolt.layout'));
}
}
Loading

0 comments on commit 542b164

Please sign in to comment.