Use `I18n.translate` everywhere instead of `I18n.t`
This commit is contained in:
parent
2e5f500d24
commit
3ef2c15267
|
@ -30,13 +30,13 @@ export function deleteAllQuestionsHandler(event: Event): void {
|
||||||
const count = button.getAttribute('data-ib-count');
|
const count = button.getAttribute('data-ib-count');
|
||||||
|
|
||||||
swal({
|
swal({
|
||||||
title: I18n.t('frontend.inbox.confirm_all.title', { count: count }),
|
title: I18n.translate('frontend.inbox.confirm_all.title', { count: count }),
|
||||||
text: I18n.t('frontend.inbox.confirm_all.text'),
|
text: I18n.translate('frontend.inbox.confirm_all.text'),
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
dangerMode: true,
|
dangerMode: true,
|
||||||
buttons: [
|
buttons: [
|
||||||
I18n.t('views.actions.cancel'),
|
I18n.translate('views.actions.cancel'),
|
||||||
I18n.t('views.actions.delete')
|
I18n.translate('views.actions.delete')
|
||||||
]
|
]
|
||||||
}, (returnValue) => {
|
}, (returnValue) => {
|
||||||
if (returnValue === null) return false;
|
if (returnValue === null) return false;
|
||||||
|
@ -53,7 +53,7 @@ export function deleteAllQuestionsHandler(event: Event): void {
|
||||||
},
|
},
|
||||||
error: (data, status, xhr) => {
|
error: (data, status, xhr) => {
|
||||||
console.log(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');
|
const count = button.getAttribute('data-ib-count');
|
||||||
|
|
||||||
swal({
|
swal({
|
||||||
title: I18n.t('frontend.inbox.confirm_all.title', { count: count }),
|
title: I18n.translate('frontend.inbox.confirm_all.title', { count: count }),
|
||||||
text: I18n.t('frontend.inbox.confirm_all.text'),
|
text: I18n.translate('frontend.inbox.confirm_all.text'),
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
dangerMode: true,
|
dangerMode: true,
|
||||||
buttons: [
|
buttons: [
|
||||||
I18n.t('views.actions.cancel'),
|
I18n.translate('views.actions.cancel'),
|
||||||
I18n.t('views.actions.delete')
|
I18n.translate('views.actions.delete')
|
||||||
]
|
]
|
||||||
}, (returnValue) => {
|
}, (returnValue) => {
|
||||||
if (returnValue === null) return false;
|
if (returnValue === null) return false;
|
||||||
|
@ -87,7 +87,7 @@ export function deleteAllAuthorQuestionsHandler(event: Event): void {
|
||||||
},
|
},
|
||||||
error: (data, status, xhr) => {
|
error: (data, status, xhr) => {
|
||||||
console.log(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({
|
swal({
|
||||||
title: I18n.t('frontend.inbox.confirm.title'),
|
title: I18n.translate('frontend.inbox.confirm.title'),
|
||||||
text: I18n.t('frontend.inbox.confirm.text'),
|
text: I18n.translate('frontend.inbox.confirm.text'),
|
||||||
type: "warning",
|
type: "warning",
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
confirmButtonColor: "#DD6B55",
|
confirmButtonColor: "#DD6B55",
|
||||||
|
@ -39,7 +39,7 @@ export function deleteEntryHandler(event: Event): void {
|
||||||
},
|
},
|
||||||
error: (data, status, xhr) => {
|
error: (data, status, xhr) => {
|
||||||
console.log(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) => {
|
error: (data, status, xhr) => {
|
||||||
console.log(data, status, xhr);
|
console.log(data, status, xhr);
|
||||||
showErrorNotification(I18n.t('frontend.error.message'));
|
showErrorNotification(I18n.translate('frontend.error.message'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in New Issue