-
Notifications
You must be signed in to change notification settings - Fork 919
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
Language picker on VPN resource center index page lists unreachable locales for that page #15521
Closed
Tracked by
#14225
Labels
Bug 🐛
Something's not working the way it should
Comments
stevejalim
changed the title
Language picker on VPN resource center index page lists inactive locales
Language picker on VPN resource center index page lists unreachable locales for that page
Nov 19, 2024
stevejalim
added a commit
that referenced
this issue
Nov 19, 2024
… to justify an index page Back when the entire VPN RC was powered by Contentful, we added logic that would only allow the index page of the VPN RC to be displayed in a particular locale if there were 'enough' articles translated into that locale. 'Enough' was defined not as a specific threshold but as a percentage of the overall number of documents available in en-US. Initially, this was fine, but as the number of documents in en-US grew the threshold failed to be reached, meaning the index pages for non-en-US locales would redirect to en-US instead, because they didn't have "enough". This bad decision will become irrelevant as soon as we start publishing localized versions of the VPN content via the CMS, and then deleting the code for the non-CMS page versions. However, we need a fix now, so that if someone selects a locale from the footer of the en-US VPN RC index page, they don't get redirected back to that same page. The simplest fix is just to drop the threshold to 10%, down from 60%. This basicallly makes that content redundant, but still supports the idea of hiding the index if there are just one or two articles there (there are 25 in en-US, so 10% would be hit if there are 3 or more available in the other locale -- and _all_ of the other locales seem to have at least 5 articles localized to them, so this is fine as a threshold.) Resolves #15521
alexgibson
pushed a commit
that referenced
this issue
Nov 19, 2024
… to justify an index page Back when the entire VPN RC was powered by Contentful, we added logic that would only allow the index page of the VPN RC to be displayed in a particular locale if there were 'enough' articles translated into that locale. 'Enough' was defined not as a specific threshold but as a percentage of the overall number of documents available in en-US. Initially, this was fine, but as the number of documents in en-US grew the threshold failed to be reached, meaning the index pages for non-en-US locales would redirect to en-US instead, because they didn't have "enough". This bad decision will become irrelevant as soon as we start publishing localized versions of the VPN content via the CMS, and then deleting the code for the non-CMS page versions. However, we need a fix now, so that if someone selects a locale from the footer of the en-US VPN RC index page, they don't get redirected back to that same page. The simplest fix is just to drop the threshold to 10%, down from 60%. This basicallly makes that content redundant, but still supports the idea of hiding the index if there are just one or two articles there (there are 25 in en-US, so 10% would be hit if there are 3 or more available in the other locale -- and _all_ of the other locales seem to have at least 5 articles localized to them, so this is fine as a threshold.) Resolves #15521
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The language picker at the bottom of this page does not work: https://www.mozilla.org/en-US/products/vpn/resource-center/
This might be an issue with
prefer_cms
and how it infers which Contentful locales are enabled.The text was updated successfully, but these errors were encountered: