diff --git a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js index 4e9d68a739..507468f5e4 100644 --- a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js +++ b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js @@ -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; diff --git a/products/ASC.Files/Client/src/components/pages/Home/locales/en/translation.json b/products/ASC.Files/Client/src/components/pages/Home/locales/en/translation.json index 001bc594ee..80cc1343db 100644 --- a/products/ASC.Files/Client/src/components/pages/Home/locales/en/translation.json +++ b/products/ASC.Files/Client/src/components/pages/Home/locales/en/translation.json @@ -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", diff --git a/products/ASC.Files/Client/src/components/pages/Home/locales/ru/translation.json b/products/ASC.Files/Client/src/components/pages/Home/locales/ru/translation.json index bec5581f41..a1cbe12d93 100644 --- a/products/ASC.Files/Client/src/components/pages/Home/locales/ru/translation.json +++ b/products/ASC.Files/Client/src/components/pages/Home/locales/ru/translation.json @@ -9,7 +9,9 @@ "LinkForPortalUsers": "Ссылка для пользователей портала", "LinkCopySuccess": "Ссылка скопирована в буфер обмена", "MarkAsFavorite": "Добавить в избранное", + "MarkedAsFavorite": "Добавлено в избранное", "RemoveFromFavorites": "Удалить из избранного", + "RemovedFromFavorites": "Удалено из избранного", "Edit": "Редактировать", "Preview": "Просмотр", "View": "Просмотр",