From: Felix Ableitner Date: Tue, 23 May 2023 20:16:54 +0000 (+0200) Subject: Changes to language tag X-Git-Url: http://these/git/%22https:/www.exeterceilidhs.net/%22%7B%7D/%7Bthis.captchaPngSrc%28%29%7D?a=commitdiff_plain;h=90a9f728177f9fac27a38892a26159d7cd391fbe;p=lemmy-ui.git Changes to language tag - Dont use bright white color because its not that important - Hide tag in case of undetermined (doesnt add any information) --- diff --git a/lemmy-translations b/lemmy-translations index a1fff8b..007e536 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit a1fff8b481f4b02327e4ee04088606af627628f2 +Subproject commit 007e53683768aeba63e9e4c179c1d240217bcee2 diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index d2dee1e..8347786 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -283,13 +283,15 @@ export class CommentNode extends Component { )} {this.linkBtn(true)} - - { - this.props.allLanguages.find( - lang => lang.id === cv.comment.language_id - )?.name - } - + {cv.comment.language_id != 0 && ( + + { + this.props.allLanguages.find( + lang => lang.id === cv.comment.language_id + )?.name + } + + )} {/* This is an expanding spacer for mobile */}
{showScores() && ( diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index fd9b883..916c8c9 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -344,13 +344,15 @@ export class PostListing extends Component { )} - - { - this.props.allLanguages.find( - lang => lang.id === post_view.post.language_id - )?.name - } - + {post_view.post.language_id != 0 && ( + + { + this.props.allLanguages.find( + lang => lang.id === post_view.post.language_id + )?.name + } + + )}
  • •
  • {url && !(hostname(url) === getExternalHost()) && ( <>