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

Falling back to english when page hasn't been translated locally #490

Merged
merged 1 commit into from
Jun 28, 2016

Conversation

phillipj
Copy link
Member

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?

@stevemao
Copy link
Contributor

roll it out in production +1

@ghost
Copy link

ghost commented Jan 28, 2016

yup, agree with @stevemao here

@Knighton910
Copy link
Contributor

LGTM

@phillipj
Copy link
Member Author

phillipj commented Feb 1, 2016

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.

@phillipj
Copy link
Member Author

phillipj commented Mar 2, 2016

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.
@fhemberger
Copy link
Contributor

Waiting for nodejs/build#316 to land.

@ghost
Copy link

ghost commented May 19, 2016

this would be really nice to have now that we have a mostly unfinished chinese translation

@phillipj
Copy link
Member Author

@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.

@Fishrock123
Copy link
Contributor

nodejs/build#316 has been deployed live now and seems to be going fine, I think this can be merged/reconsidered

@Fishrock123
Copy link
Contributor

cc @fhemberger

@fhemberger
Copy link
Contributor

@Fishrock123 Great, thanks for letting me know. Merging now!

@fhemberger fhemberger merged commit d6cdd94 into master Jun 28, 2016
@fhemberger fhemberger deleted the en-fallback-missing-translation branch June 28, 2016 10:19
@Fishrock123 Fishrock123 mentioned this pull request Jun 28, 2016
@Fishrock123 Fishrock123 mentioned this pull request Jul 4, 2016
jbergstroem pushed a commit to nodejs/build that referenced this pull request Jul 28, 2016
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants