Skip to content

Improve zh-CN docs, sidebar grouping and icons - #1316

Draft
dockfries wants to merge 8 commits into
openmultiplayer:masterfrom
dockfries:zh
Draft

dockfries wants to merge 8 commits into
openmultiplayer:masterfrom
dockfries:zh

Conversation

@dockfries

@dockfries dockfries commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor
  • Use react-icons for the docs sidebar search and clear icons, and remove the hand-drawn SVGs
  • Align frontmatter tags with the English docs so entries group correctly in the redesigned sidebar
  • Add missing zh-CN docs and fix existing translations
  • Add zh-CN translations for the five resource browsers, following the skin browser (animations, interiors, map icons, pickups, weapons)
  • Improve overall zh-CN translation accuracy and realign with recent changes in the English source
  • Use shared <VersionWarn> <NoteNPCCallbacks> components for zh-CN docs like Improvements, fixes and pt-BR docs #1252
    • Remove unused pt-BR and bs template wrappers, for other locales, recommended delete it in the future?

Related PRs: #1313, #1314

This PR is still a work in progress. It will be updated again after #1315 is merged.


BTW, it seems weapon IDs don't actually have models available for preview, so disable the preview clickable(model viewer) in the <WeaponBrowser>, or upload the missing models?

Fill in the footer, ID browser, server join and docs intro strings that the redesign added without zh-CN translations, rename the playground and package-index labels to their Chinese names, and use the viewer wording on the animations page so it matches the model viewer.
Translate the FAQ, the formatting examples guide and the OnPickupStreamOut
and PlayerGangZoneHide reference pages, with the FAQ help card strings they
use. Restore the sidebar label on the per-player variable tutorial and
finish the model viewer wording in the FAQ.
Tags are the sidebar grouping key: src/lib/resourceGroups.ts groups the
functions and callbacks folders by tags[0] and matches it against a fixed
list of English tags, falling back to the "Other" group when nothing
matches.

zh-CN carried translated tags from earlier translation batches, so 897 of
the 1112 functions and callbacks pages landed in that fallback group and
the sidebar no longer matched the English one.

Only the tags line is rewritten to the exact English value: 1075 replaced,
107 added, 51 already equal. Descriptions, labels, prose and formatting are
untouched.
Replace the hand-drawn search and clear SVGs with react-icons, like the rest of the site, and drop the unused icons file.
The five browsers render English names, notes and descriptions straight from
src/data, so the Chinese resource pages showed English data. Add per-locale
translation maps next to the data they translate, following the
SKIN_TRANSLATIONS pattern in skins.ts, and let each browser pick them with
useDocusaurusContext, falling back to the English entries.

Then replace the weapon, pickup, animation, map icon and interior tables in
the zh-CN pages with the same browser components the English pages use.
@github-actions github-actions Bot added the area:translation english english > american english label Dec 2, 2026
Replace VersionWarnZH_CN and NoteNPCCallbacksZH_CN with the shared VersionWarn and NoteNPCCallbacks components. Their translations already come from the versionWarn and npcCallbacksNote IDs in zh-CN/code.json, so the locale-specific wrappers are redundant. Remove the two wrappers and their exports.
Both locales now use the shared VersionWarn and NoteNPCCallbacks components, whose strings come from code.json. No docs reference the locale-specific wrappers, so drop them and their exports.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:translation english english > american english

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant