From 0ebb8e142e9803fe16fcb039e4ffc435225823f0 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Fri, 13 Mar 2026 10:55:45 +0000 Subject: [PATCH] arabic translation --- admin_dashboard.php | 44 ++--- admin_reports_shippers.php | 62 +++---- admin_reports_summary.php | 134 +++++++++----- admin_reports_truck_owners.php | 64 +++---- admin_shipment_edit.php | 84 ++++----- admin_shipments.php | 96 +++++----- admin_shippers.php | 64 +++---- admin_truck_owners.php | 82 ++++---- assets/css/custom.css | 126 +++++++++++++ includes/app.php | 329 ++++++++++++++++----------------- includes/layout.php | 12 +- shipment_detail.php | 8 +- 12 files changed, 633 insertions(+), 472 deletions(-) diff --git a/admin_dashboard.php b/admin_dashboard.php index 7620bb7..6f2753a 100644 --- a/admin_dashboard.php +++ b/admin_dashboard.php @@ -43,7 +43,7 @@ render_header(t('admin_dashboard'), 'admin', true);

-

Overview of your platform's performance and recent activity.

+

@@ -53,7 +53,7 @@ render_header(t('admin_dashboard'), 'admin', true);

-

Total Shipments

+

@@ -61,7 +61,7 @@ render_header(t('admin_dashboard'), 'admin', true);

-

Active Shipments

+

@@ -69,7 +69,7 @@ render_header(t('admin_dashboard'), 'admin', true);

-

Total Shippers

+

@@ -77,7 +77,7 @@ render_header(t('admin_dashboard'), 'admin', true);

-

Truck Owners

+

@@ -87,8 +87,8 @@ render_header(t('admin_dashboard'), 'admin', true);
-

Recent Shipments

- shown +

+
@@ -107,10 +107,10 @@ render_header(t('admin_dashboard'), 'admin', true); - - + + - + @@ -129,7 +129,7 @@ render_header(t('admin_dashboard'), 'admin', true); @@ -147,47 +147,47 @@ render_header(t('admin_dashboard'), 'admin', true);
-

Quick Links

+

-
Manage Countries
- Add or remove supported countries +
+
-
Manage Cities
- Configure cities for routing +
+
-
Register User
- Manually onboard a new user +
+
-
Company Profile
- Update platform branding +
+
-
Landing Pages
- Edit homepage content and sections +
+
diff --git a/admin_reports_shippers.php b/admin_reports_shippers.php index 6d53fa0..f5c0836 100644 --- a/admin_reports_shippers.php +++ b/admin_reports_shippers.php @@ -5,7 +5,7 @@ require_once __DIR__ . '/includes/layout.php'; // Check permission if (!has_permission('view_reports') && !has_permission('manage_shippers')) { - render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippers'); + render_header(t('shippers_statements'), 'reports_shippers'); echo '
Access Denied. You do not have permission to view reports.
'; render_footer(); exit; @@ -72,7 +72,7 @@ if ($shipperId) { } } -render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippers', true); +render_header(t('shippers_statements'), 'reports_shippers', true); ?> @@ -132,12 +132,12 @@ render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippe
-

Shipper Statements

-

View and print financial statements for shippers.

+

+

@@ -146,9 +146,9 @@ render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippe
- +
- +
- +
- +
-
Shipper not found.
+
@@ -181,7 +181,7 @@ render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippe

@@ -189,7 +189,7 @@ render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippe
-
Billed To / إلى السيد
+
/ إلى السيد


@@ -199,17 +199,17 @@ render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippe
-
Summary / ملخص
+
/ ملخص
Date:
-
Period: to
+
: to
-
Period: All Time
+
:
-
Count:
+
:
- OMR +
@@ -218,18 +218,18 @@ render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippe
ShipmentRoute Action
- +
- + - - - + + + - + @@ -240,10 +240,10 @@ render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippe
@@ -251,8 +251,8 @@ render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippe - - + +
Date
التاريخ
Ref #
رقم الشحنة
Route
المسار
Status
الحالة
Amount (OMR)
المبلغ

المسار

الحالة

المبلغ
No completed shipments found for this period.
- + - +
Total Balance / الإجمالي OMR / الإجمالي
@@ -262,12 +262,12 @@ render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippe @@ -283,7 +283,7 @@ render_header(t('shippers_statements') ?: 'Shippers Statements', 'reports_shippe $(document).ready(function() { $('#shipperSelect').select2({ width: '100%', - placeholder: '-- Choose a Shipper --', + placeholder: '', allowClear: true }); }); diff --git a/admin_reports_summary.php b/admin_reports_summary.php index 6b597af..dc0cb39 100644 --- a/admin_reports_summary.php +++ b/admin_reports_summary.php @@ -26,13 +26,15 @@ $selectName = ''; $join = ''; $orderBy = 'total_amount DESC'; +$pageTitle = t('shipments_by_origin_country'); + switch ($reportType) { case 'countries_origin': $selectName = "COALESCE(co.name_en, 'Unknown') as name"; $join = "LEFT JOIN cities c ON s.origin_city = c.name_en LEFT JOIN countries co ON c.country_id = co.id"; $groupBy = "co.name_en"; - $pageTitle = "Shipments by Origin Country"; + $pageTitle = t('shipments_by_origin_country'); break; case 'countries_dest': @@ -40,25 +42,25 @@ switch ($reportType) { $join = "LEFT JOIN cities c ON s.destination_city = c.name_en LEFT JOIN countries co ON c.country_id = co.id"; $groupBy = "co.name_en"; - $pageTitle = "Shipments by Destination Country"; + $pageTitle = t('shipments_by_dest_country'); break; case 'cities_origin': $selectName = "s.origin_city as name"; $groupBy = "s.origin_city"; - $pageTitle = "Shipments by Origin City"; + $pageTitle = t('shipments_by_origin_city'); break; case 'cities_dest': $selectName = "s.destination_city as name"; $groupBy = "s.destination_city"; - $pageTitle = "Shipments by Destination City"; + $pageTitle = t('shipments_by_dest_city'); break; case 'shippers': $selectName = "s.shipper_name as name"; // simplified, could join users table $groupBy = "s.shipper_name"; - $pageTitle = "Shipments by Shipper"; + $pageTitle = t('shipments_by_shipper'); break; default: @@ -67,7 +69,7 @@ switch ($reportType) { $join = "LEFT JOIN cities c ON s.origin_city = c.name_en LEFT JOIN countries co ON c.country_id = co.id"; $groupBy = "co.name_en"; - $pageTitle = "Shipments by Origin Country"; + $pageTitle = t('shipments_by_origin_country'); break; } @@ -104,54 +106,96 @@ foreach ($results as $row) { $grandTotalProfit += $row['total_profit']; } -render_header('Reports Summary', 'reports_summary', true); +render_header(t('summary_report'), 'reports_summary', true); ?>
-
+
-
+ + +
+
+
+ + Company Logo + +

+ +
+
+

+

+
+ | +

+

+ : +

+
+
+
+
+
+
+
+ + +
+
+ + +
+
+
+
+
+
+ +
-

Summary Reports

-

Analyze shipment performance, revenue, and profits.

+

+

-
+
- +
- +
- +
- +
-
-
+
- - \ No newline at end of file diff --git a/admin_reports_truck_owners.php b/admin_reports_truck_owners.php index ec37d93..0e975f6 100644 --- a/admin_reports_truck_owners.php +++ b/admin_reports_truck_owners.php @@ -5,7 +5,7 @@ require_once __DIR__ . '/includes/layout.php'; // Check permission if (!has_permission('view_reports') && !has_permission('manage_truck_owners')) { - render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports_truck_owners'); + render_header(t('truck_owners_statements'), 'reports_truck_owners'); echo '
Access Denied. You do not have permission to view reports.
'; render_footer(); exit; @@ -72,7 +72,7 @@ if ($ownerId) { } } -render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports_truck_owners', true); +render_header(t('truck_owners_statements'), 'reports_truck_owners', true); ?> @@ -132,12 +132,12 @@ render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports
-

Truck Owner Statements

-

View and print financial statements for truck owners.

+

+

@@ -146,9 +146,9 @@ render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports
- +
- +
- +
- +
-
Truck Owner not found.
+
@@ -181,7 +181,7 @@ render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports

@@ -189,9 +189,9 @@ render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports
-
Pay To / إلى السيد
+
/ إلى السيد

-
Truck Plate:
+
:

,
@@ -199,17 +199,17 @@ render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports
-
Summary / ملخص
+
/ ملخص
Date:
-
Period: to
+
: to
-
Period: All Time
+
:
-
Total Trips:
+
:
- OMR +
@@ -218,18 +218,18 @@ render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports
- + - - - + + + - + @@ -240,10 +240,10 @@ render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports
@@ -251,8 +251,8 @@ render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports - - + +
Date
التاريخ
Ref #
رقم الشحنة
Route
المسار
Status
الحالة
Earnings (OMR)
المبلغ

المسار

الحالة

المبلغ
No completed shipments found for this period.
- + - +
Total Earnings / الإجمالي OMR / الإجمالي
@@ -262,12 +262,12 @@ render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports @@ -283,7 +283,7 @@ render_header(t('truck_owners_statements') ?: 'Truck Owner Statements', 'reports $(document).ready(function() { $('#ownerSelect').select2({ width: '100%', - placeholder: '-- Choose a Truck Owner --', + placeholder: '', allowClear: true }); }); diff --git a/admin_shipment_edit.php b/admin_shipment_edit.php index 55abe59..0b94fae 100644 --- a/admin_shipment_edit.php +++ b/admin_shipment_edit.php @@ -8,7 +8,7 @@ $isAjax = isset($_GET['ajax']) && $_GET['ajax'] === '1'; if (!$id) { if ($isAjax) { - echo json_encode(['success' => false, 'message' => 'Invalid ID']); + echo json_encode(['success' => false, 'message' => t('invalid_id')]); exit; } header('Location: admin_shipments.php'); exit; @@ -23,7 +23,7 @@ $shipment = $stmt->fetch(); if (!$shipment) { if ($isAjax) { - echo json_encode(['success' => false, 'message' => 'Shipment not found']); + echo json_encode(['success' => false, 'message' => t('shipment_not_found')]); exit; } header('Location: admin_shipments.php'); exit; @@ -76,9 +76,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $payment_method = trim($_POST['payment_method'] ?? 'thawani'); $status = trim($_POST['status'] ?? 'posted'); - if ($shipper_name === '') $errors[] = "Shipper name is required."; - if ($origin_city === '') $errors[] = "Origin city is required."; - if ($destination_city === '') $errors[] = "Destination city is required."; + if ($shipper_name === '') $errors[] = t('error_required'); + if ($origin_city === '') $errors[] = t('error_required'); + if ($destination_city === '') $errors[] = t('error_required'); if (empty($errors)) { $updateSql = " @@ -93,7 +93,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $cargo_description, $weight_tons, $pickup_date, $delivery_date, $payment_method, $status, $id ]); - $flash = "Shipment updated successfully."; + $flash = t('shipment_updated_success'); if ($isAjax) { header('Content-Type: application/json'); @@ -133,7 +133,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { // -- OUTPUT START -- if (!$isAjax): - render_header('Edit Shipment', 'admin', true); + render_header(t('edit_shipment_tooltip'), 'admin', true); ?>
@@ -142,14 +142,14 @@ if (!$isAjax):
- +
-

Edit Shipment #

-

Update shipment details and status.

+

+

@@ -168,14 +168,14 @@ if (!$isAjax):
-
Shipment Details
+
- +
@@ -317,14 +317,14 @@ if (!$isAjax): countrySelect.addEventListener('change', function() { const countryId = this.value; - citySelect.innerHTML = ''; + citySelect.innerHTML = ''; citySelect.disabled = true; if (countryId) { fetch('api/get_cities.php?country_id=' + countryId) .then(response => response.json()) .then(data => { - citySelect.innerHTML = ''; + citySelect.innerHTML = ''; data.forEach(city => { const option = document.createElement('option'); option.value = city.name_en; // Using name as value for DB compatibility @@ -335,10 +335,10 @@ if (!$isAjax): }) .catch(error => { console.error('Error fetching cities:', error); - citySelect.innerHTML = ''; + citySelect.innerHTML = ''; }); } else { - citySelect.innerHTML = ''; + citySelect.innerHTML = ''; citySelect.disabled = true; } }); diff --git a/admin_shipments.php b/admin_shipments.php index d09831c..5b6d066 100644 --- a/admin_shipments.php +++ b/admin_shipments.php @@ -13,7 +13,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'], $_POST['shi if ($action === 'delete') { db()->prepare("DELETE FROM shipments WHERE id = ?")->execute([$shipmentId]); - $flash = 'Shipment deleted successfully.'; + $flash = t('flash_shipment_deleted'); } } @@ -66,7 +66,7 @@ $stmt = db()->prepare($sql); $stmt->execute($params); $shipments = $stmt->fetchAll(); -render_header('Manage Shipments', 'admin', true); +render_header(t('manage_shipments'), 'admin', true); ?>
@@ -76,8 +76,8 @@ render_header('Manage Shipments', 'admin', true);
-

Shipments

-

Manage all shipments across the platform.

+

+

@@ -88,51 +88,51 @@ render_header('Manage Shipments', 'admin', true);
- - + +
- +
- +
- +
-

No shipments found matching your criteria.

+

-

No shipments found on the platform yet.

+

- + - - - - - - + + + + + + @@ -144,12 +144,12 @@ render_header('Manage Shipments', 'admin', true);
IDShipperRouteDatesStatusAction
-
From:
-
To:
+
+
-
Pick:
-
Drop:
+
+
- +
- + + title="">
-
@@ -190,10 +190,10 @@ render_header('Manage Shipments', 'admin', true); 1): ?>
- Showing of shipments +
  • - Previous +
  • @@ -201,7 +201,7 @@ render_header('Manage Shipments', 'admin', true);
  • - Next +
@@ -216,12 +216,12 @@ render_header('Manage Shipments', 'admin', true);