-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Falling back to english when page hasn't been translated locally #490
Conversation
roll it out in production +1 |
yup, agree with @stevemao here |
LGTM |
913d53f
to
537a46b
Compare
Thanks for reviewing 👍 I've opened nodejs/build#316 to fix this in production aswell, not much point in merging this before that PR gets some positive feedback and lands. Did a minor refactor to get more inline with what nginx will end up doing. Rather than serving the fallback file from disk, it now responds with a 302 redirect to the equivalent english URL. FYI I'm going on one week vacation in a couple of days 🏊🌴Will follow this up when I'm back on the keyboard again. |
If anyone's up for some nginx exercise, feel free to join the discussion in nodejs/build#316 :) |
Previously translation working groups would have to translate *all* pages to their respective language, if not most pages would end in displaying a (english) 404 page. That's a massive requirement on translation groups, and keeping up with future changes are probably near impossible. Lowering the barrier and letting translation groups start on the frontpage and work their way down a couple of page depths, should be alot simpler and more rewarding. NB! This only affects local development as nodejs.org runs nginx serving strictly static content. Getting the same behaviour in production requires changes to the nginx config.
537a46b
to
fdc6ae8
Compare
Waiting for nodejs/build#316 to land. |
this would be really nice to have now that we have a mostly unfinished chinese translation |
@tentakel thought we had nginx solved, but obviously not; nodejs/build#316 (comment). Hopefully I'll get an ansible setup of nodejs.org soon, too debug what's wrong with the suggested changes. |
nodejs/build#316 has been deployed live now and seems to be going fine, I think this can be merged/reconsidered |
cc @fhemberger |
@Fishrock123 Great, thanks for letting me know. Merging now! |
Fall back to english if a page hasn't been translated. Refs: nodejs/nodejs.org#490 PR-URL: #316 Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Rod Vagg <rod@vagg.org>
Currently translation working groups will have to translate all pages to their respective
language, if not most pages would end in displaying a (english) 404 page. That's a massive
requirement on translation groups, and keeping up with future changes are probably near impossible.
Lowering the barrier and letting translation groups start on the frontpage and work their way
down a couple of page depths, should be alot simpler and more rewarding.
NB! This only affects local development as nodejs.org runs nginx serving strictly static content.
Getting the same behaviour in production requires changes to the nginx config.
Example of the current 404 issue; navigate any of the headers links in the current Korean translation: https://nodejs.org/ko/. I haven't done my dues when it comes to translating (yet), this is one of the main reasons I've decided not to.
Any thoughts? Should we do this, and roll it out in production aswell?