[Glitch] Fix showing translate button when status has no language in web UI
Port 6090e6e067
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
377b2ce8d3
commit
a933af3805
1 changed files with 1 additions and 1 deletions
|
@ -278,7 +278,7 @@ class StatusContent extends React.PureComponent {
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const hidden = this.props.onExpandedToggle ? !this.props.expanded : this.state.hidden;
|
const hidden = this.props.onExpandedToggle ? !this.props.expanded : this.state.hidden;
|
||||||
const renderTranslate = this.context.identity.signedIn && this.props.onTranslate && ['public', 'unlisted'].includes(status.get('visibility')) && status.get('contentHtml').length > 0 && intl.locale !== status.get('language');
|
const renderTranslate = this.context.identity.signedIn && this.props.onTranslate && ['public', 'unlisted'].includes(status.get('visibility')) && status.get('contentHtml').length > 0 && status.get('language') !== null && intl.locale !== status.get('language');
|
||||||
const language = preloadedLanguages.find(lang => lang[0] === status.get('language'));
|
const language = preloadedLanguages.find(lang => lang[0] === status.get('language'));
|
||||||
const languageName = language ? language[2] : status.get('language');
|
const languageName = language ? language[2] : status.get('language');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue