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

issue with uk site #2069

Closed
ColinMoulds opened this issue Feb 13, 2019 · 8 comments
Closed

issue with uk site #2069

ColinMoulds opened this issue Feb 13, 2019 · 8 comments

Comments

@ColinMoulds
Copy link

i wasn't sure what nodejs/ to use but https://nodejs.org/uk/ is in russian for no apparent reason!

@fhemberger
Copy link
Contributor

@ColinMoulds 'uk' = Ukranian 😂

@ColinMoulds
Copy link
Author

@fhemberger its the site i get redirected to both here and in sweden lol

@fhemberger
Copy link
Contributor

fhemberger commented Feb 13, 2019

Strange, what browser are your using and what are your language settings?
British English should be en_GB, so I don't know why it would redirect to uk.

(In the meantime, https://nodejs.org/en/ should help 😉)

/cc @nodejs/build

@ghost
Copy link

ghost commented Feb 14, 2019

@ColinMoulds:You can use Google chrome to have a play, and everything seems fine with me :)

@refack
Copy link
Contributor

refack commented Feb 14, 2019

IIUC this is the magic souse:

    location / {
        rewrite ^/$ /en/ redirect;

        try_files $uri $uri/ @english_fallback;

        location ~ \.json$ {
            add_header access-control-allow-origin *;
        }
    }

    # instead of serving a 404 page when a page hasn't been translated
    location @english_fallback {
        if ($uri ~* ^/(ar|ca|de|es|fa|fr|gl|it|ja|ko|pt-br|uk|zh-cn|zh-tw)/) {
            set $lang $1;
        }
        rewrite ^/(ar|ca|de|es|fa|fr|gl|it|ja|ko|pt-br|uk|zh-cn|zh-tw)/(.*)$ /en/$2;
    }

tl;dr default to /en/ and fall back to /en/ in case translated file does not exist 🤷‍♂️

@ColinMoulds
Copy link
Author

I was using Mozilla Firefox Nightly

@ghost
Copy link

ghost commented Apr 13, 2019

@ColinMoulds:What about using the latest stable version of FF?Is it still happening?

@alexandrtovmach
Copy link
Contributor

Should be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants