diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-09-23 23:00:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-23 23:00:12 +0200 |
commit | 0d6b878808a02aa4a544e894f06419c0f612c163 (patch) | |
tree | 119723ea46dd8525c370fee1235c3c9d42e55937 /app/javascript/mastodon/containers/status_container.js | |
parent | d2f7e30a283a1dca1f7974884ac0c237b93903ad (diff) |
Add user content translations with configurable backends (#19218)
Diffstat (limited to 'app/javascript/mastodon/containers/status_container.js')
-rw-r--r-- | app/javascript/mastodon/containers/status_container.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/javascript/mastodon/containers/status_container.js b/app/javascript/mastodon/containers/status_container.js index 28698b082..9280a6ee3 100644 --- a/app/javascript/mastodon/containers/status_container.js +++ b/app/javascript/mastodon/containers/status_container.js @@ -25,6 +25,8 @@ import { revealStatus, toggleStatusCollapse, editStatus, + translateStatus, + undoStatusTranslation, } from '../actions/statuses'; import { unmuteAccount, @@ -150,6 +152,14 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({ dispatch(editStatus(status.get('id'), history)); }, + onTranslate (status) { + if (status.get('translation')) { + dispatch(undoStatusTranslation(status.get('id'))); + } else { + dispatch(translateStatus(status.get('id'))); + } + }, + onDirect (account, router) { dispatch(directCompose(account, router)); }, |