52 lines
3.6 KiB
TypeScript
52 lines
3.6 KiB
TypeScript
/**
|
|
* نصوص الإشعارات لكل لغة. المفتاح يُشتق من نوع الحدث (راجع docs/17 — A2).
|
|
* كل مدخل: عنوان + نص. المتغيّرات بصيغة {name}.
|
|
*/
|
|
export type Lang = 'ar' | 'en';
|
|
|
|
export const DEFAULT_LANG: Lang = 'ar';
|
|
export const SUPPORTED_LANGS: Lang[] = ['ar', 'en'];
|
|
|
|
export interface Message {
|
|
title: string;
|
|
body: string;
|
|
}
|
|
|
|
type Catalog = Record<string, Message>;
|
|
|
|
const ar: Catalog = {
|
|
'trip.assigned': { title: 'تم قبول رحلتك', body: 'سائقك {driverName} في الطريق إليك' },
|
|
'trip.driver_arriving': { title: 'السائق في الطريق', body: 'سائقك متوجّه إلى نقطة الانطلاق' },
|
|
'trip.driver_arrived': { title: 'وصل السائق', body: 'سائقك ينتظرك في نقطة الانطلاق' },
|
|
'trip.in_progress': { title: 'بدأت الرحلة', body: 'رحلتك جارية الآن — رحلة موفقة' },
|
|
'trip.completed': { title: 'انتهت الرحلة', body: 'وصلت إلى وجهتك. الأجرة {fare} {currency}' },
|
|
'trip.paid': { title: 'تم الدفع', body: 'تم استلام مبلغ {fare} {currency}' },
|
|
'trip.cancelled': { title: 'أُلغيت الرحلة', body: 'تم إلغاء الرحلة' },
|
|
'trip.cancelled_fee': { title: 'أُلغيت الرحلة', body: 'تم إلغاء الرحلة ورسم الإلغاء {fee} {currency}' },
|
|
'trip.no_drivers': { title: 'لا يوجد سائقون', body: 'لم نجد سائقاً متاحاً قريباً منك. حاول مجدداً' },
|
|
'trip.expired': { title: 'انتهت مهلة الطلب', body: 'انتهت مهلة طلب الرحلة دون قبول' },
|
|
'trip.offer': { title: 'طلب رحلة جديد', body: 'راكب على بعد {distanceKm} كم — الأجرة {fare} {currency}' },
|
|
'trip.offer_taken': { title: 'الرحلة لم تعد متاحة', body: 'قبِل الطلبَ سائق آخر' },
|
|
'trip.audio_recording_started': { title: 'بدء التسجيل', body: 'تم بدء تسجيل الرحلة صوتياً لضمان سلامتكما' },
|
|
'chat.message': { title: 'رسالة جديدة', body: '{preview}' },
|
|
};
|
|
|
|
const en: Catalog = {
|
|
'trip.assigned': { title: 'Your ride is accepted', body: 'Your driver {driverName} is on the way' },
|
|
'trip.driver_arriving': { title: 'Driver on the way', body: 'Your driver is heading to the pickup point' },
|
|
'trip.driver_arrived': { title: 'Driver has arrived', body: 'Your driver is waiting at the pickup point' },
|
|
'trip.in_progress': { title: 'Trip started', body: 'Your trip is now in progress — have a good ride' },
|
|
'trip.completed': { title: 'Trip finished', body: 'You have arrived. Fare {fare} {currency}' },
|
|
'trip.paid': { title: 'Payment received', body: 'Payment of {fare} {currency} received' },
|
|
'trip.cancelled': { title: 'Trip cancelled', body: 'The trip was cancelled' },
|
|
'trip.cancelled_fee': { title: 'Trip cancelled', body: 'The trip was cancelled with a {fee} {currency} cancellation fee' },
|
|
'trip.no_drivers': { title: 'No drivers', body: 'No driver available nearby. Please try again' },
|
|
'trip.expired': { title: 'Request expired', body: 'The ride request expired without being accepted' },
|
|
'trip.offer': { title: 'New ride request', body: 'Rider {distanceKm} km away — fare {fare} {currency}' },
|
|
'trip.offer_taken': { title: 'Ride no longer available', body: 'Another driver accepted the request' },
|
|
'trip.audio_recording_started': { title: 'Recording started', body: 'Trip audio recording has started for your safety' },
|
|
'chat.message': { title: 'New message', body: '{preview}' },
|
|
};
|
|
|
|
export const CATALOGS: Record<Lang, Catalog> = { ar, en };
|