translate update
This commit is contained in:
parent
8a346582bb
commit
fc077ec23a
@ -106,6 +106,10 @@ class LocalAIApi
|
||||
$cfg = self::config();
|
||||
|
||||
$projectUuid = $cfg['project_uuid'];
|
||||
|
||||
// DEBUG LOGGING
|
||||
file_put_contents(__DIR__ . '/../debug.log', date('Y-m-d H:i:s') . " - Requesting AI. UUID: [" . ($projectUuid ?? 'NULL') . "] CFG: " . json_encode($cfg) . "\n", FILE_APPEND);
|
||||
|
||||
if (empty($projectUuid)) {
|
||||
return [
|
||||
'success' => false,
|
||||
|
||||
@ -64,7 +64,7 @@ return [
|
||||
'responses_path' => $responsesPath,
|
||||
'project_id' => $projectId,
|
||||
'project_uuid' => $projectUuid,
|
||||
'project_header' => 'project-uuid',
|
||||
'project_header' => 'Project-UUID',
|
||||
'default_model' => 'gpt-4o-mini',
|
||||
'timeout' => 30,
|
||||
'verify_tls' => true,
|
||||
|
||||
1
ai_debug.log
Normal file
1
ai_debug.log
Normal file
@ -0,0 +1 @@
|
||||
2026-02-21 18:35:57 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"project-uuid","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
|
||||
@ -2,3 +2,10 @@
|
||||
2026-02-21 17:52:37 - Items case hit
|
||||
2026-02-21 17:53:18 - Items case hit
|
||||
2026-02-21 18:10:28 - Items case hit
|
||||
2026-02-21 18:21:01 - Items case hit
|
||||
2026-02-21 18:23:51 - Items case hit
|
||||
2026-02-21 18:36:35 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"project-uuid","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
|
||||
2026-02-21 18:37:30 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"project-uuid","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
|
||||
2026-02-21 18:42:10 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"project-uuid","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
|
||||
2026-02-21 18:43:51 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
|
||||
2026-02-21 18:44:10 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
|
||||
|
||||
21
index.php
21
index.php
@ -35,6 +35,16 @@ if ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') || (isset($_SERVER[
|
||||
}
|
||||
|
||||
session_start();
|
||||
if (isset($_GET['action']) && $_GET['action'] === 'download_items_template') {
|
||||
header('Content-Type: text/csv; charset=utf-8');
|
||||
header('Content-Disposition: attachment; filename=items_import_template.csv');
|
||||
$output = fopen('php://output', 'w');
|
||||
// Add BOM for Excel UTF-8 compatibility
|
||||
fprintf($output, chr(0xEF).chr(0xBB).chr(0xBF));
|
||||
fputcsv($output, ['SKU', 'English Name', 'Arabic Name', 'Sale Price', 'Cost Price']);
|
||||
fclose($output);
|
||||
exit;
|
||||
}
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
file_put_contents('post_debug.log', date('Y-m-d H:i:s') . " - POST: " . json_encode($_POST) . "\n", FILE_APPEND);
|
||||
}
|
||||
@ -9901,9 +9911,14 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System';
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-info py-2">
|
||||
<small data-en="Please upload a CSV file with the following columns: SKU, English Name, Arabic Name, Sale Price, Cost Price." data-ar="يرجى رفع ملف CSV بالأعمدة التالية: الباركود، الاسم الإنجليزي، الاسم العربي، سعر البيع، سعر التكلفة.">
|
||||
Please upload a CSV file with the following columns: SKU, English Name, Arabic Name, Sale Price, Cost Price.
|
||||
</small>
|
||||
<div class="mb-2">
|
||||
<small data-en="Please upload a CSV file with the following columns: SKU, English Name, Arabic Name, Sale Price, Cost Price." data-ar="يرجى رفع ملف CSV بالأعمدة التالية: الباركود، الاسم الإنجليزي، الاسم العربي، سعر البيع، سعر التكلفة.">
|
||||
Please upload a CSV file with the following columns: SKU, English Name, Arabic Name, Sale Price, Cost Price.
|
||||
</small>
|
||||
</div>
|
||||
<a href="index.php?action=download_items_template" class="btn btn-sm btn-primary">
|
||||
<i class="bi bi-download"></i> <span data-en="Download Template" data-ar="تحميل القالب">Download Template</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" data-en="Choose CSV File" data-ar="اختر ملف CSV">Choose CSV File</label>
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
2026-02-21 13:22:08 - POST: {"action":"translate","text":"Apple"}
|
||||
2026-02-21 17:33:35 - POST: {"name":"Counter 1","add_cash_register":""}
|
||||
2026-02-21 17:33:52 - POST: {"open_register":"1","register_id":"3","opening_balance":"2"}
|
||||
2026-02-21 17:34:02 - POST: {"action":"save_pos_transaction","customer_id":"","payments":"[{\"method\":\"cash\",\"amount\":15.45}]","total_amount":"15.45","tax_amount":"0","discount_code_id":"","discount_amount":"0","loyalty_redeemed":"0","items":"[{\"id\":1,\"qty\":1,\"price\":0.45,\"vat_rate\":0,\"vat_amount\":0},{\"id\":8,\"qty\":1,\"price\":15,\"vat_rate\":0,\"vat_amount\":0}]"}
|
||||
2026-02-21 17:34:26 - POST: {"action":"save_pos_transaction","customer_id":"","payments":"[{\"method\":\"cash\",\"amount\":15.45}]","total_amount":"15.45","tax_amount":"0","discount_code_id":"","discount_amount":"0","loyalty_redeemed":"0","items":"[{\"id\":1,\"qty\":1,\"price\":0.45,\"vat_rate\":0,\"vat_amount\":0},{\"id\":8,\"qty\":1,\"price\":15,\"vat_rate\":0,\"vat_amount\":0}]"}
|
||||
2026-02-21 17:37:40 - POST: {"action":"save_pos_transaction","customer_id":"","payments":"[{\"method\":\"cash\",\"amount\":15.45}]","total_amount":"15.45","tax_amount":"0","discount_code_id":"","discount_amount":"0","loyalty_redeemed":"0","items":"[{\"id\":1,\"qty\":1,\"price\":0.45,\"vat_rate\":0,\"vat_amount\":0},{\"id\":8,\"qty\":1,\"price\":15,\"vat_rate\":0,\"vat_amount\":0}]"}
|
||||
2026-02-21 18:11:19 - POST: {"action":"translate","text":"Tomato","target":"ar"}
|
||||
Loading…
x
Reference in New Issue
Block a user