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
fix(docs): generated-index link translations use category.label instead of category.key for lookup #11738
I have read the console error message carefully (if applicable).
Description
getSidebarTranslationFileContent in packages/docusaurus-plugin-content-docs/src/translations.ts
generates translation keys for category generated-index links using category.key ?? category.label
(lines 96, 109, 118).
But transformSidebarCategoryLink in the same file looks up those translations using only category.label (lines 182, 186), ignoring the key attribute entirely.
Line 200 in the same translateSidebar function already correctly uses item.key ?? item.label for
category label lookups. Same for links (line 210) and docs (line 219). Only transformSidebarCategoryLink was missed.
Create a sidebar category with a custom key attribute in _category_.json
Give that category a generated-index link with a title and description
Run docusaurus write-translations to generate the translation file
Translate the generated-index title and description entries in the translation file
Build the site with the target locale
Expected behavior
The generated-index page title and description resolve from the translation file using the key sidebar <name>.category.<key>.link.generated-index.title.
Actual behavior
The generated-index page title and description remain untranslated because transformSidebarCategoryLink looks up sidebar.<name>.category.<label>.link.generated-index.title while the translation file contains sidebar.<name>.category.<key>.link.generated-index.title.
Your environment
Public source code:
Public site URL:
Docusaurus version used:
Environment name and version (e.g. Chrome 89, Node.js 16.4):
Operating system and version (e.g. Ubuntu 20.04.2 LTS):
Activity
akshatsinha0 commentedon Feb 13, 2026
@slorber here
akshatsinha0 commentedon Feb 14, 2026
@Solix45456767 , May I ask you to rethink what you are asking?
fix(content-docs): use category key for generated-index translation l…
fix(content-docs): use category key for generated-index translation l…