Files
Ehsan/artifacts/ehsan-poc/src/lib/i18n/translations.ts
T
Replit Agent 1dcfa0bfa5 Complete EHSAN POC: fix all code review findings
- API routes: explicit return types on all Express handlers (fixes TS7030),
  `beneficiaryName` now accepted and stored in /thank-you route per OpenAPI spec.

- Home page: added search bar (filters by case ID, description, name) +
  Featured Opportunities section with live cards, progress bars, and Donate buttons.

- Opportunities page: added need-type filter pill bar (all 8 types + "All Types")
  with active state highlighting; empty state respects selected filter.

- i18n: expanded translations with all previously hardcoded strings
  (trackCase, notFound, noData, currentStep, search, searchPlaceholder,
  featuredTitle, noResults, donate.caseSummary, donate.caseNotFound,
  admin.noRequests, admin.needType, admin.amount, admin.track, admin.whatsapp,
  track.caseInfo, track.rejected, track.currentStepLabel, track.submitThankYou,
  thankYou.successNote, thankYou.beneficiaryMessageLabel,
  whatsapp.donorPhone, whatsapp.beneficiaryMessage, whatsapp.noEntries,
  opportunities.noOpportunities, opportunities.verified).
  All pages now use t.* — zero hardcoded English UI strings.

- TypeScript: both frontend (tsc --noEmit) and API server build are clean.
2026-06-05 17:12:44 +00:00

334 lines
11 KiB
TypeScript

export const en = {
common: {
ehsan: "EHSAN",
home: "Home",
opportunities: "Opportunities",
requestSupport: "Request Support",
adminDashboard: "Admin Dashboard",
whatsappLog: "WhatsApp Log",
submit: "Submit",
cancel: "Cancel",
save: "Save",
loading: "Loading...",
error: "An error occurred",
success: "Success",
back: "Back",
confirm: "Confirm",
language: "العربية",
trackCase: "Track Case",
notFound: "Case not found.",
noData: "No data available.",
currentStep: "Current Step",
pleaseWait: "Please wait...",
search: "Search",
searchPlaceholder: "Search by name, case ID, or description...",
allOpportunities: "All Opportunities",
featuredCases: "Featured Cases",
donate: "Donate",
},
home: {
heroTitle: "Closed Donation Loop POC",
heroSubtitle: "A demonstration of the complete donation lifecycle, from beneficiary request to donor appreciation.",
totalRequests: "Total Requests",
totalCollected: "Total Collected",
totalClosed: "Closed Cases",
viewOpportunities: "View All Opportunities",
workflowTitle: "Closed Donation Loop Workflow",
searchOpportunities: "Search Donation Opportunities",
searchLabel: "Find a cause to support",
searchButton: "Search",
featuredTitle: "Featured Opportunities",
noResults: "No opportunities match your search.",
},
workflow: {
step1: "Request Submitted",
step2: "Eligibility Check",
step3: "Verified",
step4: "Published",
step5: "Donor Donated",
step6: "Support Delivered",
step7: "Receipt Confirmed",
step8: "Thank-You Submitted",
step9: "WhatsApp Sent",
step10: "Case Closed",
},
needTypes: {
electricity: "Electricity",
water: "Water",
food: "Food Basket",
health: "Healthcare",
housing: "Housing",
refrigerator: "Refrigerator",
air_conditioner: "Air Conditioner",
court_order: "Court Order",
},
sources: {
beneficiary: "Direct Beneficiary",
charity: "Charity Organization",
official: "Official Entity",
},
statuses: {
new: "New",
pending_review: "Pending Review",
verified: "Verified",
published: "Published",
donated: "Donated",
delivered: "Delivered",
receipt_confirmed: "Receipt Confirmed",
thank_you_submitted: "Thank You Submitted",
whatsapp_sent: "WhatsApp Sent",
closed: "Closed",
rejected: "Rejected",
},
request: {
title: "Request Support",
beneficiaryName: "Beneficiary Name",
nationalId: "National ID",
phone: "Phone Number",
source: "Request Source",
sourceName: "Source Name",
needType: "Type of Need",
amount: "Requested Amount",
description: "Description / Case Details",
submitSuccess: "Request submitted successfully. Case is pending review.",
},
opportunities: {
title: "Donation Opportunities",
filterByType: "Filter by need type",
all: "All Types",
donate: "Donate Now",
collected: "Collected",
remaining: "Remaining",
target: "Target",
noOpportunities: "No opportunities are available right now.",
verified: "Verified",
},
donate: {
title: "Complete Donation",
caseSummary: "Case Summary",
donorName: "Donor Name",
donorPhone: "Phone Number",
donorEmail: "Email (Optional)",
amount: "Donation Amount",
confirmDonation: "Confirm Donation",
successMessage: "Thank you for your donation. May Allah reward you.",
caseNotFound: "Case not found or no longer available.",
},
admin: {
title: "Admin Dashboard",
caseId: "Case ID",
beneficiary: "Beneficiary",
status: "Status",
currentStep: "Step",
actions: "Actions",
verify: "Verify",
publish: "Publish",
deliver: "Deliver Support",
confirmReceipt: "Confirm Receipt",
close: "Close Case",
reject: "Reject",
rejectionReason: "Rejection Reason",
track: "Track",
whatsapp: "WhatsApp",
noRequests: "No requests found.",
needType: "Need Type",
amount: "Amount",
},
track: {
title: "Track Case",
caseTimeline: "Case Timeline",
caseInfo: "Case Information",
rejected: "Case Rejected",
currentStepLabel: "Current",
submitThankYou: "Submit Thank-You Message",
},
thankYou: {
title: "Submit Thank You Message",
message: "Thank You Message",
submitLabel: "Send Message to Donor",
successNote: "Your thank-you message will be sent to the donor via WhatsApp through OpenClaw.",
beneficiaryMessageLabel: "Beneficiary Message",
},
whatsapp: {
title: "WhatsApp Log",
donor: "Donor",
donorPhone: "Phone",
message: "WhatsApp Message",
beneficiaryMessage: "Beneficiary Message",
status: "Status",
sentAt: "Sent At",
sendViaOpenClaw: "Send via OpenClaw",
pending: "Pending",
sent: "Sent",
failed: "Failed",
noEntries: "No WhatsApp log entries yet.",
},
};
export const ar = {
common: {
ehsan: "إحسان",
home: "الرئيسية",
opportunities: "فرص التبرع",
requestSupport: "طلب دعم",
adminDashboard: "لوحة الإدارة",
whatsappLog: "سجل واتساب",
submit: "إرسال",
cancel: "إلغاء",
save: "حفظ",
loading: "جاري التحميل...",
error: "حدث خطأ",
success: "نجاح",
back: "رجوع",
confirm: "تأكيد",
language: "English",
trackCase: "تتبع الحالة",
notFound: "الحالة غير موجودة.",
noData: "لا توجد بيانات.",
currentStep: "الخطوة الحالية",
pleaseWait: "يرجى الانتظار...",
search: "بحث",
searchPlaceholder: "ابحث بالاسم أو رقم الحالة أو الوصف...",
allOpportunities: "جميع الفرص",
featuredCases: "الحالات المميزة",
donate: "تبرع",
},
home: {
heroTitle: "إقفال دورة التبرع",
heroSubtitle: "نموذج يوضح دورة التبرع الكاملة، من طلب المستفيد حتى شكر المتبرع.",
totalRequests: "إجمالي الطلبات",
totalCollected: "إجمالي التبرعات (ريال)",
totalClosed: "الحالات المغلقة",
viewOpportunities: "عرض جميع الفرص",
workflowTitle: "خطوات إقفال دورة التبرع",
searchOpportunities: "ابحث في فرص التبرع",
searchLabel: "ابحث عن قضية لدعمها",
searchButton: "بحث",
featuredTitle: "الفرص المميزة",
noResults: "لا توجد فرص تطابق بحثك.",
},
workflow: {
step1: "مقدم الطلب",
step2: "التحقق من الاستحقاق",
step3: "موثق",
step4: "نشر الفرصة",
step5: "المتبرع",
step6: "تنفيذ الدعم",
step7: "تأكيد الاستلام",
step8: "رسالة شكر",
step9: "إرسال واتساب",
step10: "إغلاق الحالة",
},
needTypes: {
electricity: "كهرباء",
water: "ماء",
food: "سلة غذائية",
health: "صحة",
housing: "سكن",
refrigerator: "ثلاجة",
air_conditioner: "مكيف",
court_order: "حكم قضائي",
},
sources: {
beneficiary: "مستفيد مباشر",
charity: "جمعية خيرية",
official: "جهة رسمية",
},
statuses: {
new: "جديد",
pending_review: "قيد المراجعة",
verified: "موثق",
published: "منشور",
donated: "تم التبرع",
delivered: "تم التسليم",
receipt_confirmed: "تم تأكيد الاستلام",
thank_you_submitted: "رسالة الشكر مقدمة",
whatsapp_sent: "واتساب مرسل",
closed: "مغلق",
rejected: "مرفوض",
},
request: {
title: "تقديم طلب دعم",
beneficiaryName: "اسم المستفيد",
nationalId: "رقم الهوية",
phone: "رقم الجوال",
source: "مصدر الطلب",
sourceName: "اسم المصدر",
needType: "نوع الاحتياج",
amount: "المبلغ المطلوب",
description: "وصف الحالة / التفاصيل",
submitSuccess: "تم تقديم الطلب بنجاح. الحالة قيد المراجعة.",
},
opportunities: {
title: "فرص التبرع",
filterByType: "تصفية حسب نوع الاحتياج",
all: "جميع الأنواع",
donate: "تبرع الآن",
collected: "المجموع",
remaining: "المتبقي",
target: "الهدف",
noOpportunities: "لا توجد فرص متاحة حالياً.",
verified: "موثق",
},
donate: {
title: "إتمام التبرع",
caseSummary: "ملخص الحالة",
donorName: "اسم المتبرع",
donorPhone: "رقم الجوال",
donorEmail: "البريد الإلكتروني (اختياري)",
amount: "مبلغ التبرع",
confirmDonation: "تأكيد التبرع",
successMessage: "شكراً لتبرعك. جزاك الله خيراً.",
caseNotFound: "الحالة غير موجودة أو لم تعد متاحة.",
},
admin: {
title: "لوحة الإدارة",
caseId: "رقم الحالة",
beneficiary: "المستفيد",
status: "الحالة",
currentStep: "الخطوة",
actions: "الإجراءات",
verify: "توثيق",
publish: "نشر",
deliver: "تنفيذ الدعم",
confirmReceipt: "تأكيد الاستلام",
close: "إغلاق الحالة",
reject: "رفض",
rejectionReason: "سبب الرفض",
track: "تتبع",
whatsapp: "واتساب",
noRequests: "لا توجد طلبات.",
needType: "نوع الاحتياج",
amount: "المبلغ",
},
track: {
title: "تتبع الحالة",
caseTimeline: "مسار الحالة",
caseInfo: "معلومات الحالة",
rejected: "تم رفض الحالة",
currentStepLabel: "الحالية",
submitThankYou: "تقديم رسالة الشكر",
},
thankYou: {
title: "تقديم رسالة الشكر",
message: "رسالة الشكر",
submitLabel: "إرسال الرسالة للمتبرع",
successNote: "سيتم إرسال رسالة شكرك إلى المتبرع عبر واتساب من خلال OpenClaw.",
beneficiaryMessageLabel: "رسالة المستفيد",
},
whatsapp: {
title: "سجل رسائل الواتساب",
donor: "المتبرع",
donorPhone: "الجوال",
message: "رسالة الواتساب",
beneficiaryMessage: "رسالة المستفيد",
status: "الحالة",
sentAt: "وقت الإرسال",
sendViaOpenClaw: "إرسال عبر OpenClaw",
pending: "قيد الانتظار",
sent: "مرسل",
failed: "فشل",
noEntries: "لا توجد سجلات واتساب بعد.",
},
};