- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
81 lines
2.0 KiB
JavaScript
81 lines
2.0 KiB
JavaScript
// Arabic [ar]
|
||
import dayjs from '../index';
|
||
var months = 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_');
|
||
var symbolMap = {
|
||
1: '١',
|
||
2: '٢',
|
||
3: '٣',
|
||
4: '٤',
|
||
5: '٥',
|
||
6: '٦',
|
||
7: '٧',
|
||
8: '٨',
|
||
9: '٩',
|
||
0: '٠'
|
||
};
|
||
var numberMap = {
|
||
'١': '1',
|
||
'٢': '2',
|
||
'٣': '3',
|
||
'٤': '4',
|
||
'٥': '5',
|
||
'٦': '6',
|
||
'٧': '7',
|
||
'٨': '8',
|
||
'٩': '9',
|
||
'٠': '0'
|
||
};
|
||
var fromArabNumeralsRegex = /[١٢٣٤٥٦٧٨٩٠]/g;
|
||
var fromArabComaRegex = /،/g;
|
||
var toArabNumeralsRegex = /\d/g;
|
||
var toArabComaRegex = /,/g;
|
||
var locale = {
|
||
name: 'ar',
|
||
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
||
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
|
||
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
||
months: months,
|
||
monthsShort: months,
|
||
weekStart: 6,
|
||
meridiem: function meridiem(hour) {
|
||
return hour > 12 ? 'م' : 'ص';
|
||
},
|
||
relativeTime: {
|
||
future: 'بعد %s',
|
||
past: 'منذ %s',
|
||
s: 'ثانية واحدة',
|
||
m: 'دقيقة واحدة',
|
||
mm: '%d دقائق',
|
||
h: 'ساعة واحدة',
|
||
hh: '%d ساعات',
|
||
d: 'يوم واحد',
|
||
dd: '%d أيام',
|
||
M: 'شهر واحد',
|
||
MM: '%d أشهر',
|
||
y: 'عام واحد',
|
||
yy: '%d أعوام'
|
||
},
|
||
preparse: function preparse(string) {
|
||
return string.replace(fromArabNumeralsRegex, function (match) {
|
||
return numberMap[match];
|
||
}).replace(fromArabComaRegex, ',');
|
||
},
|
||
postformat: function postformat(string) {
|
||
return string.replace(toArabNumeralsRegex, function (match) {
|
||
return symbolMap[match];
|
||
}).replace(toArabComaRegex, '،');
|
||
},
|
||
ordinal: function ordinal(n) {
|
||
return n;
|
||
},
|
||
formats: {
|
||
LT: 'HH:mm',
|
||
LTS: 'HH:mm:ss',
|
||
L: 'D/M/YYYY',
|
||
LL: 'D MMMM YYYY',
|
||
LLL: 'D MMMM YYYY HH:mm',
|
||
LLLL: 'dddd D MMMM YYYY HH:mm'
|
||
}
|
||
};
|
||
dayjs.locale(locale, null, true);
|
||
export default locale; |