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

Homepage for new users displays all projects in all languages #1578

Closed
matejcik opened this issue Jul 27, 2017 · 1 comment
Closed

Homepage for new users displays all projects in all languages #1578

matejcik opened this issue Jul 27, 2017 · 1 comment
Assignees
Labels
enhancement Adding or requesting a new feature.
Milestone

Comments

@matejcik
Copy link

in trans/views/basic.py, function get_user_translations for unauthenticated users filters list of translation by session language. Unless that language is english.

This means that browsers that prefer english will load all translations for all languages.

Unfortunately, this query is the base for all the homepage queries. In conjunction with component list feature, this can mean that unauthenticated user is loading a page listing potentially all languages for all components that are in some component list -- initially hidden from view behind the component list switches.

On l10n.opensuse.org, this results in a 23MB homepage that actually times out on the outbound proxy.

A quick fix we're using is removing the and session_lang != "en" part of the filter.
Part of the proper solution would be on-demand loading of component lists. Another part would be reviewing the get_user_translations function and its usages for sanity, because the logic it uses now is a little weird ;) and not appropriate as a base query for the other queries in home().

@nijel nijel added the enhancement Adding or requesting a new feature. label Aug 2, 2017
@nijel nijel self-assigned this Aug 22, 2017
@nijel nijel added this to the 2.17 milestone Aug 22, 2017
@nijel nijel closed this as completed in eee7323 Aug 22, 2017
@nijel
Copy link
Member

nijel commented Aug 22, 2017

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see problem with the fix, please comment on this issue.
  • In case you see similar problem, please open separate issue.
  • If you are happy with the outcome, consider supporting Weblate by donating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants