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

Translating the auto-generated sidebar labels for categories. #10707

Open
2 of 7 tasks
Rigel772 opened this issue Nov 21, 2024 · 0 comments
Open
2 of 7 tasks

Translating the auto-generated sidebar labels for categories. #10707

Rigel772 opened this issue Nov 21, 2024 · 0 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@Rigel772
Copy link

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

The labels for documents work fine - the problem is with labels for catgories (folders)
Not sure how to tag this. It is either "Bug", "Feature request" or "Documentation"
In documentation I am not able to find how to translate the labels for auto-generated sidebar documentation menu.

Reproducible demo

No response

Steps to reproduce

  1. configure i18n as per documentation
  2. copy docs to i18n folder
  3. translate documents
  4. translate category labels in _category_.yml files
position: 3
label: "translated label"
  1. run npm run start -- --locale fr

Expected behavior

Expect in sidebar to see the translated labels from category.yml files from i18n folder

Actual behavior

The displayed category labels are from original (not translated) docs folder

Searching through the Discord conversations I have found advice to run
npm run write-translations -- --locale
and place the translations in generated json file but searching through a file with thousands of lines seems to bit crazy, hard to believe that it is the recommended way

Your environment

  • Docusaurus version used: 3.6.2

Self-service

  • I'd be willing to fix this bug myself.
@Rigel772 Rigel772 added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Nov 21, 2024
@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

No branches or pull requests

2 participants