Merge pull request #1036 from LemmyNet/language-tag-changes

Changes to language tag
This commit is contained in:
SleeplessOne1917 2023-05-28 23:01:43 +00:00 committed by GitHub
commit 2b67e9419f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 29 deletions

@ -1 +1 @@
Subproject commit a1fff8b481f4b02327e4ee04088606af627628f2 Subproject commit 007e53683768aeba63e9e4c179c1d240217bcee2

View file

@ -240,23 +240,23 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
{cv.comment.distinguished && ( {cv.comment.distinguished && (
<Icon icon="shield" inline classes={`text-danger mr-2`} /> <Icon icon="shield" inline classes={`text-danger mr-2`} />
)} )}
{isMod_ && (
<div className="badge badge-light d-none d-sm-inline mr-2">
{i18n.t("mod")}
</div>
)}
{isAdmin_ && (
<div className="badge badge-light d-none d-sm-inline mr-2">
{i18n.t("admin")}
</div>
)}
{this.isPostCreator && ( {this.isPostCreator && (
<div className="badge badge-light d-none d-sm-inline mr-2"> <div className="badge badge-light d-none d-sm-inline mr-2">
{i18n.t("creator")} {i18n.t("creator")}
</div> </div>
)} )}
{isMod_ && (
<div className="badge d-none d-sm-inline mr-2">
{i18n.t("mod")}
</div>
)}
{isAdmin_ && (
<div className="badge d-none d-sm-inline mr-2">
{i18n.t("admin")}
</div>
)}
{cv.creator.bot_account && ( {cv.creator.bot_account && (
<div className="badge badge-light d-none d-sm-inline mr-2"> <div className="badge d-none d-sm-inline mr-2">
{i18n.t("bot_account").toLowerCase()} {i18n.t("bot_account").toLowerCase()}
</div> </div>
)} )}
@ -283,13 +283,15 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
)} )}
</button> </button>
{this.linkBtn(true)} {this.linkBtn(true)}
<span className="mx-1 badge badge-secondary"> {cv.comment.language_id !== 0 && (
<span className="badge d-none d-sm-inline mr-2">
{ {
this.props.allLanguages.find( this.props.allLanguages.find(
lang => lang.id === cv.comment.language_id lang => lang.id === cv.comment.language_id
)?.name )?.name
} }
</span> </span>
)}
{/* This is an expanding spacer for mobile */} {/* This is an expanding spacer for mobile */}
<div className="mr-lg-5 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2" /> <div className="mr-lg-5 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2" />
{showScores() && ( {showScores() && (

View file

@ -327,13 +327,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<PersonListing person={post_view.creator} /> <PersonListing person={post_view.creator} />
{this.creatorIsMod_ && ( {this.creatorIsMod_ && (
<span className="mx-1 badge badge-light">{i18n.t("mod")}</span> <span className="mx-1 badge">{i18n.t("mod")}</span>
)} )}
{this.creatorIsAdmin_ && ( {this.creatorIsAdmin_ && (
<span className="mx-1 badge badge-light">{i18n.t("admin")}</span> <span className="mx-1 badge">{i18n.t("admin")}</span>
)} )}
{post_view.creator.bot_account && ( {post_view.creator.bot_account && (
<span className="mx-1 badge badge-light"> <span className="mx-1 badge">
{i18n.t("bot_account").toLowerCase()} {i18n.t("bot_account").toLowerCase()}
</span> </span>
)} )}
@ -344,13 +344,15 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</span> </span>
)} )}
</li> </li>
<span className="mx-1 badge badge-secondary"> {post_view.post.language_id !== 0 && (
<span className="mx-1 badge">
{ {
this.props.allLanguages.find( this.props.allLanguages.find(
lang => lang.id === post_view.post.language_id lang => lang.id === post_view.post.language_id
)?.name )?.name
} }
</span> </span>
)}
<li className="list-inline-item"></li> <li className="list-inline-item"></li>
{url && !(hostname(url) === getExternalHost()) && ( {url && !(hostname(url) === getExternalHost()) && (
<> <>