mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat(GlobalErrors): localize the global errors.
This commit is contained in:
@@ -43,7 +43,7 @@ function GlobalErrors({
|
||||
if (globalErrors.access_denied) {
|
||||
toastKeySomethingWrong = AppToaster.show(
|
||||
{
|
||||
message: 'You do not have permissions to access this page.',
|
||||
message: intl.get('global_error.you_dont_have_permissions'),
|
||||
intent: Intent.DANGER,
|
||||
onDismiss: () => {
|
||||
globalErrorsSet({ access_denied: false });
|
||||
@@ -53,11 +53,10 @@ function GlobalErrors({
|
||||
);
|
||||
}
|
||||
if (globalErrors.transactionsLocked) {
|
||||
const lockedToDate =
|
||||
globalErrors.transactionsLocked.formatted_locked_to_date;
|
||||
|
||||
AppToaster.show({
|
||||
message: `Transactions before ${lockedToDate} has been locked. Hence action cannot be performed.`,
|
||||
message: intl.get('global_error.transactions_locked', {
|
||||
lockedToDate: globalErrors.transactionsLocked.formatted_locked_to_date,
|
||||
}),
|
||||
intent: Intent.DANGER,
|
||||
onDismiss: () => {
|
||||
globalErrorsSet({ transactionsLocked: false });
|
||||
@@ -66,7 +65,7 @@ function GlobalErrors({
|
||||
}
|
||||
if (globalErrors.userInactive) {
|
||||
AppToaster.show({
|
||||
message: 'The authorized user is inactive.',
|
||||
message: intl.get('global_error.authorized_user_inactive'),
|
||||
intent: Intent.DANGER,
|
||||
onDismiss: () => {
|
||||
globalErrorsSet({ userInactive: false });
|
||||
|
||||
@@ -1753,5 +1753,9 @@
|
||||
"payment_receive.drawer.title": "تفاصيل سند الزبون ({number})",
|
||||
"payment_made.drawer.title": "تفاصيل سند المورد {number}",
|
||||
"manual_journal.drawer.title": "تفاصيل قيد يدوي ({number})",
|
||||
"expense.drawer.title": " تفاصيل المصروف"
|
||||
"expense.drawer.title": " تفاصيل المصروف",
|
||||
|
||||
"global_error.you_dont_have_permissions": "ليس لديك صلاحية الوصول إلى هذه الصفحة.",
|
||||
"global_error.transactions_locked": "تم قفل المعاملات التي تمت قبل {lockedToDate}. ومن ثم لا يمكن القيام بأي عمل.",
|
||||
"global_error.authorized_user_inactive": "المستخدم المصرح له تم تعطيلة."
|
||||
}
|
||||
@@ -1733,5 +1733,9 @@
|
||||
"payment_receive.drawer.title": "Payment receive details ({number})",
|
||||
"payment_made.drawer.title": "Payment made details {number}",
|
||||
"manual_journal.drawer.title": "Manual journal details ({number})",
|
||||
"expense.drawer.title": "Expense details"
|
||||
"expense.drawer.title": "Expense details",
|
||||
|
||||
"global_error.you_dont_have_permissions": "You do not have permissions to access this page.",
|
||||
"global_error.transactions_locked": "Transactions before {lockedToDate} has been locked. Hence action cannot be performed.",
|
||||
"global_error.authorized_user_inactive": "The authorized user is inactive."
|
||||
}
|
||||
Reference in New Issue
Block a user