- 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
102 lines
3.6 KiB
JavaScript
102 lines
3.6 KiB
JavaScript
// Belarusian [be]
|
||
import dayjs from '../index';
|
||
var monthFormat = 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_');
|
||
var monthStandalone = 'студзень_лютый_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_');
|
||
var monthShortFormat = 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж.'.split('_');
|
||
var monthShortStandalone = 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_');
|
||
var MONTHS_IN_FORMAT = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
|
||
|
||
function plural(word, num) {
|
||
var forms = word.split('_');
|
||
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]; // eslint-disable-line
|
||
}
|
||
|
||
function relativeTimeWithPlural(number, withoutSuffix, key) {
|
||
var format = {
|
||
ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
|
||
mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
|
||
hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
|
||
dd: 'дзень_дні_дзён',
|
||
MM: 'месяц_месяцы_месяцаў',
|
||
yy: 'год_гады_гадоў'
|
||
};
|
||
|
||
if (key === 'm') {
|
||
return withoutSuffix ? 'хвіліна' : 'хвіліну';
|
||
} else if (key === 'h') {
|
||
return withoutSuffix ? 'гадзіна' : 'гадзіну';
|
||
}
|
||
|
||
return number + " " + plural(format[key], +number);
|
||
}
|
||
|
||
var months = function months(dayjsInstance, format) {
|
||
if (MONTHS_IN_FORMAT.test(format)) {
|
||
return monthFormat[dayjsInstance.month()];
|
||
}
|
||
|
||
return monthStandalone[dayjsInstance.month()];
|
||
};
|
||
|
||
months.s = monthStandalone;
|
||
months.f = monthFormat;
|
||
|
||
var monthsShort = function monthsShort(dayjsInstance, format) {
|
||
if (MONTHS_IN_FORMAT.test(format)) {
|
||
return monthShortFormat[dayjsInstance.month()];
|
||
}
|
||
|
||
return monthShortStandalone[dayjsInstance.month()];
|
||
};
|
||
|
||
monthsShort.s = monthShortStandalone;
|
||
monthsShort.f = monthShortFormat;
|
||
var locale = {
|
||
name: 'be',
|
||
weekdays: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),
|
||
weekdaysShort: 'няд_пнд_аўт_сер_чцв_пят_суб'.split('_'),
|
||
weekdaysMin: 'нд_пн_аў_ср_чц_пт_сб'.split('_'),
|
||
months: months,
|
||
monthsShort: monthsShort,
|
||
weekStart: 1,
|
||
yearStart: 4,
|
||
formats: {
|
||
LT: 'HH:mm',
|
||
LTS: 'HH:mm:ss',
|
||
L: 'DD.MM.YYYY',
|
||
LL: 'D MMMM YYYY г.',
|
||
LLL: 'D MMMM YYYY г., HH:mm',
|
||
LLLL: 'dddd, D MMMM YYYY г., HH:mm'
|
||
},
|
||
relativeTime: {
|
||
future: 'праз %s',
|
||
past: '%s таму',
|
||
s: 'некалькі секунд',
|
||
m: relativeTimeWithPlural,
|
||
mm: relativeTimeWithPlural,
|
||
h: relativeTimeWithPlural,
|
||
hh: relativeTimeWithPlural,
|
||
d: 'дзень',
|
||
dd: relativeTimeWithPlural,
|
||
M: 'месяц',
|
||
MM: relativeTimeWithPlural,
|
||
y: 'год',
|
||
yy: relativeTimeWithPlural
|
||
},
|
||
ordinal: function ordinal(n) {
|
||
return n;
|
||
},
|
||
meridiem: function meridiem(hour) {
|
||
if (hour < 4) {
|
||
return 'ночы';
|
||
} else if (hour < 12) {
|
||
return 'раніцы';
|
||
} else if (hour < 17) {
|
||
return 'дня';
|
||
}
|
||
|
||
return 'вечара';
|
||
}
|
||
};
|
||
dayjs.locale(locale, null, true);
|
||
export default locale; |