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

Force enable undetermined language #2851

Merged
merged 3 commits into from
May 18, 2023
Merged

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented May 10, 2023

This enables undetermined language for all existing users, and also enables it whenever the user language is updated. This is necessary because many posts don't have a language tag (e.g. those from other federated platforms), so Lemmy users won't see them if undetermined language is disabled. This hack can be removed once a majority of posts have language tags, or when it is clearer for new users that they need to enable undetermined language.

I think we should include this in 0.17.3

By the way I noticed that the user language selection in lemmy-ui at /settings seems to be broken in latest dev version (Firefox). The x button does nothing so its not possible to clear the selection and select other languages. Also "undetermined" is not shown in enabled languages even when it is returned by Lemmy API.

@Nutomic Nutomic requested a review from dessalines as a code owner May 10, 2023 19:19

// No need to update if languages are unchanged
let current = LocalUserLanguage::read(pool, for_local_user_id).await?;
if current == lang_ids {
return Ok(());
}

// HACK: Force enable undetermined language for all users. This is necessary because many posts
Copy link
Member

Choose a reason for hiding this comment

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

Add TODO, that makes it easier to grep, since we already have a lot of those.

@Nutomic Nutomic force-pushed the force-enable-undetermined-lang branch from cb360c4 to 716e4de Compare May 18, 2023 11:34
@Nutomic Nutomic merged commit 8410a96 into main May 18, 2023
Nutomic added a commit that referenced this pull request May 19, 2023
* Force enable undetermined language

* update

* fix tests
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