Add translate
This commit is contained in:
parent
7d6d7d2bc8
commit
6a6efd1109
@ -237,21 +237,20 @@ class SectionBodyContent extends React.Component {
|
||||
removeItemFromFavorite,
|
||||
getFileInfo,
|
||||
fetchFavoritesFolder,
|
||||
isFavorites } = this.props;
|
||||
const { action,
|
||||
id,
|
||||
title } = e.currentTarget.dataset;
|
||||
isFavorites,
|
||||
t } = this.props;
|
||||
const { action, id } = e.currentTarget.dataset;
|
||||
|
||||
switch (action) {
|
||||
case "mark":
|
||||
return markItemAsFavorite(+id)
|
||||
.then(() => getFileInfo(id))
|
||||
.then(() => toastr.success("Added to favorites"))
|
||||
.then(() => toastr.success(t("MarkedAsFavorite")))
|
||||
.catch(e => toastr.error(e));
|
||||
case "remove":
|
||||
return removeItemFromFavorite(+id)
|
||||
.then(() => (isFavorites ? fetchFavoritesFolder() : getFileInfo(id)))
|
||||
.then(() => toastr.success("Removed from favorites"))
|
||||
.then(() => toastr.success(t("RemovedFromFavorites")))
|
||||
.catch(e => toastr.error(e));
|
||||
default:
|
||||
return;
|
||||
|
@ -9,7 +9,9 @@
|
||||
"LinkForPortalUsers": "Link for portal users",
|
||||
"LinkCopySuccess": "Link has been copied to the clipboard",
|
||||
"MarkAsFavorite": "Mark as favorite",
|
||||
"MarkedAsFavorite": "Added to favorites",
|
||||
"RemoveFromFavorites": "Remove from favorites",
|
||||
"RemovedFromFavorites": "Removed from favorites",
|
||||
"Edit": "Edit",
|
||||
"Preview": "Preview",
|
||||
"View": "View",
|
||||
|
@ -9,7 +9,9 @@
|
||||
"LinkForPortalUsers": "Ссылка для пользователей портала",
|
||||
"LinkCopySuccess": "Ссылка скопирована в буфер обмена",
|
||||
"MarkAsFavorite": "Добавить в избранное",
|
||||
"MarkedAsFavorite": "Добавлено в избранное",
|
||||
"RemoveFromFavorites": "Удалить из избранного",
|
||||
"RemovedFromFavorites": "Удалено из избранного",
|
||||
"Edit": "Редактировать",
|
||||
"Preview": "Просмотр",
|
||||
"View": "Просмотр",
|
||||
|
Loading…
Reference in New Issue
Block a user