add translate
This commit is contained in:
@@ -378,7 +378,7 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
|||||||
|
|
||||||
const handleDownload = async (file: FileItem) => {
|
const handleDownload = async (file: FileItem) => {
|
||||||
setIsFileLoading(true);
|
setIsFileLoading(true);
|
||||||
console.log(`download: ${file.id}`);
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`/api/download/${file.id}`);
|
const response = await fetch(`/api/download/${file.id}`);
|
||||||
|
|
||||||
@@ -395,9 +395,9 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
|||||||
a.click();
|
a.click();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
|
toast.success(`${t('file-is-downloading')} - ${file.fileName}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
toast.error('Не удалось скачать файл')
|
toast.error(t('failed-to-download-file'))
|
||||||
} finally {
|
} finally {
|
||||||
setIsFileLoading(false);
|
setIsFileLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,9 @@
|
|||||||
"you-sure-you-want-to-delete": "Are you sure you want to delete?",
|
"you-sure-you-want-to-delete": "Are you sure you want to delete?",
|
||||||
"reports-and-analytics": "Reports and analytics",
|
"reports-and-analytics": "Reports and analytics",
|
||||||
"file-has-been-deleted": "The file has been deleted",
|
"file-has-been-deleted": "The file has been deleted",
|
||||||
"error": "Error"
|
"error": "Error",
|
||||||
|
"failed-to-download-file": "Failed to download file",
|
||||||
|
"file-is-downloading": "The file is downloading"
|
||||||
},
|
},
|
||||||
"Login-register-form": {
|
"Login-register-form": {
|
||||||
"and": "and",
|
"and": "and",
|
||||||
|
|||||||
@@ -150,7 +150,9 @@
|
|||||||
"you-sure-you-want-to-delete": "Уверены, что хотите удалить?",
|
"you-sure-you-want-to-delete": "Уверены, что хотите удалить?",
|
||||||
"reports-and-analytics": "Отчёты и аналитика",
|
"reports-and-analytics": "Отчёты и аналитика",
|
||||||
"file-has-been-deleted": "Файл удален",
|
"file-has-been-deleted": "Файл удален",
|
||||||
"error": "Ошбка"
|
"error": "Ошбка",
|
||||||
|
"failed-to-download-file": "Не удалось скачать файл",
|
||||||
|
"file-is-downloading": "Скачивается файл"
|
||||||
},
|
},
|
||||||
"Login-register-form": {
|
"Login-register-form": {
|
||||||
"and": "и",
|
"and": "и",
|
||||||
|
|||||||
Reference in New Issue
Block a user