Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post form community name using title instead of name #469

Merged
merged 3 commits into from
Oct 29, 2021

Conversation

theowenyoung
Copy link
Contributor

Hi, I deployed an instance in another language and found that when posting , the form comminity displays the community ID instead of its display name, but it's a bit inconvenient for non-native English instances, so I submitted the PR.

I can close this PR if you don't think you need it, and it will only work for my instance.

Thanks!

@@ -1462,7 +1462,7 @@ export const choicesConfig = {

export function communitySelectName(cv: CommunityView): string {
return cv.community.local
? cv.community.name
? cv.community.title
: `${hostname(cv.community.actor_id)}/${cv.community.name}`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The community title should also be used on this line too then.

I'm not sure if person select names should use the display name too if they have one set, but it makes sense to me that it should. Line 1471.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that makes sense, I also changed that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet another reason to hate typescript over rust. display_name unlike the community title is an optional field, so you need to check that it exists before you use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@dessalines dessalines merged commit ed37b30 into LemmyNet:main Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants