You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Translated sidebar no longer translated once versioned #2266
bugAn error in the Docusaurus core causing instability or issues with its executiondifficulty: intermediateIssues that are medium difficulty level, e.g. moderate refactoring with a clear test plan.v1This issue is for Docusaurus 1
Sidebar is properly translated through i18n folder json files. But a versioned sidebar does not show its existing translations, despites version ids are added to both json files and versioned markdown files.
This fix transform version-18.0/AFolder/version-18.0-myPage to AFolder/version-18.0-myPage
The page id is version-18.0-myPage in versionned_docs/..18.0/AFolder/myPage.md
but the versionned sidebars need version-18.0-AFolder/myPage not AFolder/version-18.0-myPage
EDIT:
a solution that edit the id to match with side bar ones by passing the version to translateDoc
There is another issue. If the page is not modified in the version then the markdown do not exist.
The is present in sidebar definition version-VERSION_NAME-PAGE_ORIGINAL_ID do not exists in translations files en.json (so not also in fr. jso, de.json, etc...)
The Docusaurus team is actively working on Docusaurus v2.
After a very long alpha, Docusaurus v2 is now in beta.
We believe that the v2 beta is already better than v1, and v2 is ready for maintstream adoption.
Apart from critical issues and security fixes, we don't plan to invest much time on Docusaurus v1 anymore.
We are all closing v1 issues.
Maybe the current issue is already fixed in Docusaurus v2.
Please try to upgrade, and if the issue is still there on Docusaurus v2, open a new issue.
I’ve recently started moving from docfx to Docusaurus. During my testing today, I have run into this same issue. If I provide the repo, can the team check it out or should I open a new issue?
@brianlagunas this is an old Docusaurus v1 issue, and you are likely using Docusaurus 2.0, so what you encounter is likely a different thing. Please create a v2 small repro and open a new issue is you think something doesn't work as expected.
bugAn error in the Docusaurus core causing instability or issues with its executiondifficulty: intermediateIssues that are medium difficulty level, e.g. moderate refactoring with a clear test plan.v1This issue is for Docusaurus 1
Activity
phimage commentedon Feb 5, 2020
Maybe the passed reference directory is not correct here
https://github.com/facebook/docusaurus/blob/a5996829efe759083be1689c349e13ef04f6806b/packages/docusaurus-1.x/lib/write-translations.js#L106
and must be replaced by something like that
but not sufficient
This fix transform
version-18.0/AFolder/version-18.0-myPagetoAFolder/version-18.0-myPageThe page id is
version-18.0-myPageinversionned_docs/..18.0/AFolder/myPage.mdbut the versionned sidebars need
version-18.0-AFolder/myPagenotAFolder/version-18.0-myPageEDIT:
a solution that edit the id to match with side bar ones by passing the version to translateDoc
phimage commentedon Feb 10, 2020
There is another issue. If the page is not modified in the version then the markdown do not exist.
The is present in sidebar definition version-VERSION_NAME-PAGE_ORIGINAL_ID do not exists in translations files en.json (so not also in fr. jso, de.json, etc...)
In SideNav.js getLocalizedString we try to get localized string using this unknown id
https://github.com/facebook/docusaurus/blob/ef1af0a5be649aa630d913bdf212c620ec082156/packages/docusaurus-1.x/lib/core/nav/SideNav.js#L29
we fallback into english version
a dirt fix, try with original_id also (I think we want previous version translation instead of this one but it could work if no change)
tochi-y commentedon Mar 3, 2020
I got this problem too, and wish it would be resolved.
I did a workaround referring @phimage 's comments.
version-0.0.1/ADirectory/version-0.0.1-doc1ini18n/{locale}.jsonwithversion-0.0.1-ADirectory/doc1It properly worked. But this is just a workaround.
slorber commentedon Jun 10, 2021
The Docusaurus team is actively working on Docusaurus v2.
After a very long alpha, Docusaurus v2 is now in beta.
We believe that the v2 beta is already better than v1, and v2 is ready for maintstream adoption.
Apart from critical issues and security fixes, we don't plan to invest much time on Docusaurus v1 anymore.
We are all closing v1 issues.
Maybe the current issue is already fixed in Docusaurus v2.
Please try to upgrade, and if the issue is still there on Docusaurus v2, open a new issue.
brianlagunas commentedon Dec 4, 2022
I’ve recently started moving from docfx to Docusaurus. During my testing today, I have run into this same issue. If I provide the repo, can the team check it out or should I open a new issue?
slorber commentedon Dec 8, 2022
@brianlagunas this is an old Docusaurus v1 issue, and you are likely using Docusaurus 2.0, so what you encounter is likely a different thing. Please create a v2 small repro and open a new issue is you think something doesn't work as expected.
FYI sidebar items translations work for our own website with versioning enabled, see https://docusaurus.io/fr/docs/2.0.1
Take also a look at the current limitations of i18n, some things are not yet translatable:
#4542