-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Add support for language preferences for trending statuses and links #18288
Conversation
726ee08
to
a12834d
Compare
541e6d1
to
38fbbb8
Compare
38fbbb8
to
8b77b74
Compare
8b77b74
to
2982d72
Compare
else | ||
scope.not_excluded_by_account(@account).not_domain_blocked_by_account(@account) | ||
@locale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the @locale
thing override chosen_languages
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per #19291 the preference takes precedence and allows seeing multiple languages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it makes sense if @locale
isn't something the user has direct/easy control on, but it's weird to have an API parameter ignored like that, it makes more sense to me that it would be an override than the opposite (e.g. if apps want to implement a language switch for popular posts).
2982d72
to
d4b207c
Compare
Instead of storing trends in a separate sorted Redis set for each language, store them all in a single table in the database. This allows querying by preferred languages but also including other languages.
When multiple languages are chosen in preferences, these are displayed at the top, otherwise, current content locale.
Instead asking moderators to review a trend only when it reaches a global threshold, which most languages can never do, it is now done for each language separately.
There is one regression, and that is that multiple posts by the same author can once again appear among trending statuses. Unfortunately I could not figure out how to best implement that.