mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:29:52 +01:00
Use I18n.translate
everywhere instead of I18n.t
This commit is contained in:
parent
2e5f500d24
commit
3ef2c15267
3 changed files with 14 additions and 14 deletions
|
@ -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'));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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'));
|
||||
}
|
||||
});
|
||||
})
|
||||
|
|
|
@ -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'));
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue