translate base

This commit is contained in:
Mekan1206
2026-07-31 18:08:08 +05:00
parent a794dacd39
commit 581cb8241c
413 changed files with 9087 additions and 428 deletions

View File

@@ -13,9 +13,9 @@ enum ApprovalStatus: string
public function label(): string
{
return match ($this) {
self::Pending => 'Pending',
self::Approved => 'Approved',
self::Rejected => 'Rejected',
self::Pending => __('enums.approval_status.pending'),
self::Approved => __('enums.approval_status.approved'),
self::Rejected => __('enums.approval_status.rejected'),
};
}

View File

@@ -14,10 +14,10 @@ enum BonusType: string
public function label(): string
{
return match ($this) {
self::Performance => 'Performance',
self::Holiday => 'Holiday',
self::Retention => 'Retention',
self::Other => 'Other',
self::Performance => __('enums.bonus_type.performance'),
self::Holiday => __('enums.bonus_type.holiday'),
self::Retention => __('enums.bonus_type.retention'),
self::Other => __('enums.bonus_type.other'),
};
}

View File

@@ -13,9 +13,9 @@ enum DisciplinarySeverity: string
public function label(): string
{
return match ($this) {
self::Low => 'Low',
self::Medium => 'Medium',
self::High => 'High',
self::Low => __('enums.disciplinary_severity.low'),
self::Medium => __('enums.disciplinary_severity.medium'),
self::High => __('enums.disciplinary_severity.high'),
};
}

View File

@@ -15,11 +15,11 @@ enum DocumentType: string
public function label(): string
{
return match ($this) {
self::Passport => 'Passport',
self::Contract => 'Contract',
self::MedicalCertificate => 'Medical Certificate',
self::EducationCertificate => 'Education Certificate',
self::Other => 'Other',
self::Passport => __('enums.document_type.passport'),
self::Contract => __('enums.document_type.contract'),
self::MedicalCertificate => __('enums.document_type.medical_certificate'),
self::EducationCertificate => __('enums.document_type.education_certificate'),
self::Other => __('enums.document_type.other'),
};
}

View File

@@ -14,10 +14,10 @@ enum EmploymentStatus: string
public function label(): string
{
return match ($this) {
self::Active => 'Active',
self::Inactive => 'Inactive',
self::Terminated => 'Terminated',
self::OnLeave => 'On Leave',
self::Active => __('enums.employment_status.active'),
self::Inactive => __('enums.employment_status.inactive'),
self::Terminated => __('enums.employment_status.terminated'),
self::OnLeave => __('enums.employment_status.on_leave'),
};
}

View File

@@ -13,9 +13,9 @@ enum Gender: string
public function label(): string
{
return match ($this) {
self::Male => 'Male',
self::Female => 'Female',
self::Other => 'Other',
self::Male => __('enums.gender.male'),
self::Female => __('enums.gender.female'),
self::Other => __('enums.gender.other'),
};
}

View File

@@ -14,10 +14,10 @@ enum ImportType: string
public function label(): string
{
return match ($this) {
self::Employees => 'Employees',
self::Vacations => 'Vacations',
self::Bonuses => 'Bonuses',
self::Reports => 'Disciplinary Reports',
self::Employees => __('enums.import_type.employees'),
self::Vacations => __('enums.import_type.vacations'),
self::Bonuses => __('enums.import_type.bonuses'),
self::Reports => __('enums.import_type.reports'),
};
}
@@ -28,43 +28,43 @@ enum ImportType: string
{
return match ($this) {
self::Employees => [
'employee_number' => 'Employee Number',
'full_name' => 'Full Name',
'national_id' => 'National ID',
'gender' => 'Gender',
'birth_date' => 'Birth Date',
'phone' => 'Phone',
'address' => 'Address',
'department' => 'Department',
'position' => 'Position',
'shift' => 'Shift',
'employment_status' => 'Employment Status',
'hire_date' => 'Hire Date',
'notes' => 'Notes',
'employee_number' => __('hr.fields.employee_number'),
'full_name' => __('hr.fields.full_name'),
'national_id' => __('hr.fields.national_id'),
'gender' => __('hr.fields.gender'),
'birth_date' => __('hr.fields.birth_date'),
'phone' => __('hr.fields.phone'),
'address' => __('hr.fields.address'),
'department' => __('hr.fields.department'),
'position' => __('hr.fields.position'),
'shift' => __('hr.fields.shift'),
'employment_status' => __('hr.fields.employment_status'),
'hire_date' => __('hr.fields.hire_date'),
'notes' => __('hr.fields.notes'),
],
self::Vacations => [
'employee_number' => 'Employee Number',
'type' => 'Type',
'start_date' => 'Start Date',
'end_date' => 'End Date',
'return_date' => 'Return Date',
'days' => 'Days',
'status' => 'Status',
'reason' => 'Reason',
'employee_number' => __('hr.fields.employee_number'),
'type' => __('hr.fields.type'),
'start_date' => __('hr.fields.start_date'),
'end_date' => __('hr.fields.end_date'),
'return_date' => __('hr.fields.return_date'),
'days' => __('hr.fields.days'),
'status' => __('hr.fields.status'),
'reason' => __('hr.fields.reason'),
],
self::Bonuses => [
'employee_number' => 'Employee Number',
'bonus_date' => 'Bonus Date',
'bonus_type' => 'Bonus Type',
'amount' => 'Amount',
'reason' => 'Reason',
'employee_number' => __('hr.fields.employee_number'),
'bonus_date' => __('hr.fields.bonus_date'),
'bonus_type' => __('hr.fields.bonus_type'),
'amount' => __('hr.fields.amount'),
'reason' => __('hr.fields.reason'),
],
self::Reports => [
'employee_number' => 'Employee Number',
'report_date' => 'Report Date',
'title' => 'Title',
'description' => 'Description',
'severity' => 'Severity',
'employee_number' => __('hr.fields.employee_number'),
'report_date' => __('hr.fields.report_date'),
'title' => __('hr.fields.title'),
'description' => __('hr.fields.description'),
'severity' => __('hr.fields.severity'),
],
};
}

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace App\Enums;
use Filament\Support\Contracts\HasLabel;
enum NavigationGroup: string implements HasLabel
{
case Organization = 'organization';
case Employees = 'employees';
case LeaveManagement = 'leave_management';
case Records = 'records';
case System = 'system';
public function getLabel(): ?string
{
return __('hr.navigation.' . $this->value);
}
}

View File

@@ -14,10 +14,10 @@ enum VacationType: string
public function label(): string
{
return match ($this) {
self::Annual => 'Annual',
self::Marriage => 'Marriage',
self::Study => 'Study',
self::Other => 'Other',
self::Annual => __('enums.vacation_type.annual'),
self::Marriage => __('enums.vacation_type.marriage'),
self::Study => __('enums.vacation_type.study'),
self::Other => __('enums.vacation_type.other'),
};
}