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

Broken links when changing language #3746

Open
1 task
sirinoks opened this issue Oct 31, 2022 · 3 comments
Open
1 task

Broken links when changing language #3746

sirinoks opened this issue Oct 31, 2022 · 3 comments
Labels
area: docusaurus Anything related to Docusaurus type: bug Something isn't working type: documentation (docs) Improvements or additions to documentation

Comments

@sirinoks
Copy link
Contributor

When changing language to a different one in Overview page, it says "page not found". It used to work at some point, but likely, when we added more translations, something broke.

image

Location

In \src\web\docusaurus

URL:
/docs/overview

To run Docusaurus:

  • cd src\web\docusaurus
  • npm install
  • npm run start
  • Click 'Docs' button top left corner

And try different locale options, such as

  • npm run start -- --locale uk

You can find different language options in src\web\docusaurus\docusaurus.config.js.
Specifically - locales: ['en', 'vi', 'uk', 'zh', 'bg'],

To reproduce

Click around in
image
And change the

  • npm run start -- --locale
    languages and see how these links don't lead to each others' appropriate page.

image

Possible fixes

Look into placement of languages src\web\docusaurus\docusaurus.config.js, it might be broken because of positioning mismatch.
Also look into each of src\web\docusaurus\i18n folders for each language.

---
sidebar_position: X
---

mismatch could have also caused this.

@sirinoks sirinoks added type: bug Something isn't working type: documentation (docs) Improvements or additions to documentation area: docusaurus Anything related to Docusaurus labels Oct 31, 2022
@manekenpix
Copy link
Member

manekenpix commented Oct 31, 2022

More information:

This issue only affects one of the multiple ways docusaurus can be used.
To be more specific:

  • ✔️ working

    • Using nginx to serve docusaurus. (this is what we do for staging and production).
    • Running pnpm build and then pnpm serve. Using these scripts, the overview page can be accessed in any language.
  • ✖️ not working

    • Running pnpm start. Overview pages cannot be accessed this way.

So the fix should only address this specific case, and make sure all the others are not affected.

@sirinoks
Copy link
Contributor Author

@manekenpix Do we even care then if it doesn't work when you launch it differently?

@manekenpix
Copy link
Member

manekenpix commented Nov 1, 2022

@sirinoks I'm not sure. I'm not very familiar with "our" docusaurus, so my guess was that pnpm start is used for local development (rerunning nginx or pnpm build && pnpm serve every time you make a change would probably be a huge pain in the neck), so fixing this seemed like a good idea to me.

Maybe contributors who already worked on our docs can give a better answer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docusaurus Anything related to Docusaurus type: bug Something isn't working type: documentation (docs) Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants