fix(i18n): add unique keys to duplicate sidebar categories - #4621
Open
thetaPC wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ShaneK
approved these changes
Aug 6, 2026
thetaPC
enabled auto-merge (squash)
August 6, 2026 22:03
2 tasks
gnbm
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue URL: N/A
What is the current behavior?
The production build fails on main.
docusaurus buildcompletesenand then throws onja:Three sidebar categories, one per framework, all use the label "Build Your First App". Docusaurus derives a category's translation id as
sidebar.docs.category.${category.key ?? category.label}, so all three collapse onto a single id.What is the new behavior?
Each of those categories gets a unique
key, so each gets its own translation id and thejabuild succeeds:Six additions in two files:
sidebars.js(current/v8) andversioned_sidebars/version-v7-sidebars.json. Labels are untouched, so the sidebar looks identical.Does this introduce a breaking change?
Other information
Why the React 19 upgrade surfaced this
React 19 did not introduce the duplicate labels, which have been there for years. It forced the Docusaurus bump that turned them into an error.
@docusaurus/plugin-debug@3.7.0pinnedreact-json-view-lite: ^1.2.0, and no 1.x release of that package supports React 19, so clearing the last peer warning required moving the Docusaurus family to 3.10.2. Somewhere in that range Docusaurus added theensureNoSidebarDuplicateEntriesvalidation: it appears 0 times inplugin-content-docs@3.7.0and twice in3.10.2. What was previously tolerated, three categories silently sharing one translation string, is now fatal.Why it was not caught before merging
Two things hid it, and both are worth fixing separately. First,
build:previewisdocusaurus build --locale enwhile onlybuild:productionbuilds all locales, so no PR preview has ever exercisedja. Second, even buildingjalocally passes, because Docusaurus infers whether to translate from whetheri18n/<locale>exists, and that directory is only created on CI byscripts/i18n.shduring prebuild. Creating an emptyi18n/jalocally reproduces the failure exactly, which is how this fix was verified: failing before, passing after.