Use I18n.translate everywhere instead of I18n.t

This commit is contained in:
Andreas Nedbal 2022-01-03 04:36:45 +01:00 committed by Andreas Nedbal
parent 2e5f500d24
commit 3ef2c15267
3 changed files with 14 additions and 14 deletions

View file

@ -30,13 +30,13 @@ export function deleteAllQuestionsHandler(event: Event): void {
const count = button.getAttribute('data-ib-count');
swal({
title: I18n.t('frontend.inbox.confirm_all.title', { count: count }),
text: I18n.t('frontend.inbox.confirm_all.text'),
title: I18n.translate('frontend.inbox.confirm_all.title', { count: count }),
text: I18n.translate('frontend.inbox.confirm_all.text'),
icon: 'warning',
dangerMode: true,
buttons: [
I18n.t('views.actions.cancel'),
I18n.t('views.actions.delete')
I18n.translate('views.actions.cancel'),
I18n.translate('views.actions.delete')
]
}, (returnValue) => {
if (returnValue === null) return false;
@ -53,7 +53,7 @@ export function deleteAllQuestionsHandler(event: Event): void {
},
error: (data, status, xhr) => {
console.log(data, status, xhr);
showErrorNotification(I18n.t('frontend.error.message'));
showErrorNotification(I18n.translate('frontend.error.message'));
}
});
});
@ -64,13 +64,13 @@ export function deleteAllAuthorQuestionsHandler(event: Event): void {
const count = button.getAttribute('data-ib-count');
swal({
title: I18n.t('frontend.inbox.confirm_all.title', { count: count }),
text: I18n.t('frontend.inbox.confirm_all.text'),
title: I18n.translate('frontend.inbox.confirm_all.title', { count: count }),
text: I18n.translate('frontend.inbox.confirm_all.text'),
icon: 'warning',
dangerMode: true,
buttons: [
I18n.t('views.actions.cancel'),
I18n.t('views.actions.delete')
I18n.translate('views.actions.cancel'),
I18n.translate('views.actions.delete')
]
}, (returnValue) => {
if (returnValue === null) return false;
@ -87,7 +87,7 @@ export function deleteAllAuthorQuestionsHandler(event: Event): void {
},
error: (data, status, xhr) => {
console.log(data, status, xhr);
showErrorNotification(I18n.t('frontend.error.message'));
showErrorNotification(I18n.translate('frontend.error.message'));
}
});
});

View file

@ -13,8 +13,8 @@ export function deleteEntryHandler(event: Event): void {
};
swal({
title: I18n.t('frontend.inbox.confirm.title'),
text: I18n.t('frontend.inbox.confirm.text'),
title: I18n.translate('frontend.inbox.confirm.title'),
text: I18n.translate('frontend.inbox.confirm.text'),
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
@ -39,7 +39,7 @@ export function deleteEntryHandler(event: Event): void {
},
error: (data, status, xhr) => {
console.log(data, status, xhr);
showErrorNotification(I18n.t('frontend.error.message'));
showErrorNotification(I18n.translate('frontend.error.message'));
}
});
})

View file

@ -17,7 +17,7 @@ export function generateQuestionHandler(): void {
},
error: (data, status, xhr) => {
console.log(data, status, xhr);
showErrorNotification(I18n.t('frontend.error.message'));
showErrorNotification(I18n.translate('frontend.error.message'));
}
});
}