mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
feat(GlobalErrors): localize the global errors.
This commit is contained in:
@@ -43,7 +43,7 @@ function GlobalErrors({
|
|||||||
if (globalErrors.access_denied) {
|
if (globalErrors.access_denied) {
|
||||||
toastKeySomethingWrong = AppToaster.show(
|
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,
|
intent: Intent.DANGER,
|
||||||
onDismiss: () => {
|
onDismiss: () => {
|
||||||
globalErrorsSet({ access_denied: false });
|
globalErrorsSet({ access_denied: false });
|
||||||
@@ -53,11 +53,10 @@ function GlobalErrors({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (globalErrors.transactionsLocked) {
|
if (globalErrors.transactionsLocked) {
|
||||||
const lockedToDate =
|
|
||||||
globalErrors.transactionsLocked.formatted_locked_to_date;
|
|
||||||
|
|
||||||
AppToaster.show({
|
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,
|
intent: Intent.DANGER,
|
||||||
onDismiss: () => {
|
onDismiss: () => {
|
||||||
globalErrorsSet({ transactionsLocked: false });
|
globalErrorsSet({ transactionsLocked: false });
|
||||||
@@ -66,7 +65,7 @@ function GlobalErrors({
|
|||||||
}
|
}
|
||||||
if (globalErrors.userInactive) {
|
if (globalErrors.userInactive) {
|
||||||
AppToaster.show({
|
AppToaster.show({
|
||||||
message: 'The authorized user is inactive.',
|
message: intl.get('global_error.authorized_user_inactive'),
|
||||||
intent: Intent.DANGER,
|
intent: Intent.DANGER,
|
||||||
onDismiss: () => {
|
onDismiss: () => {
|
||||||
globalErrorsSet({ userInactive: false });
|
globalErrorsSet({ userInactive: false });
|
||||||
|
|||||||
@@ -1753,5 +1753,9 @@
|
|||||||
"payment_receive.drawer.title": "تفاصيل سند الزبون ({number})",
|
"payment_receive.drawer.title": "تفاصيل سند الزبون ({number})",
|
||||||
"payment_made.drawer.title": "تفاصيل سند المورد {number}",
|
"payment_made.drawer.title": "تفاصيل سند المورد {number}",
|
||||||
"manual_journal.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_receive.drawer.title": "Payment receive details ({number})",
|
||||||
"payment_made.drawer.title": "Payment made details {number}",
|
"payment_made.drawer.title": "Payment made details {number}",
|
||||||
"manual_journal.drawer.title": "Manual journal 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