Repository navigation
fix(desktop): localize knowledge-base document display - #324
Merged
Merged
Conversation
- File types show localized names (e.g., "Markdown 文档") instead of
raw extensions ("MD")
- File sizes use i18n keys with proper Chinese formatting ("9 字节"
instead of "9 B")
- Version timestamps formatted as locale-aware strings (e.g.,
"2026-08-02 08:58") instead of raw ISO
- File names displayed without extensions in list and detail views
- Added docs.fileType.* and docs.size* i18n keys for zh-CN and en
Closes: #64
waterbro-8
approved these changes
Sep 18, 2026
waterbro-8
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed current head.
- File type / size strings now go through i18n (
docs.fileType.*,docs.size*) instead of raw extensions andB. - List and viewer hide the filename extension while keeping the full name on
title. - Viewer timestamp uses a stable
YYYY-MM-DD HH:mmstyle viatoLocaleString. - Diff is limited to the knowledge-base panel/viewer plus locale catalogs.
Residual (non-blocking):
stripExtensionis duplicated inDocsPanelandDocViewer.toLocaleString(undefined, …)follows the runtime/OS locale, not the in-appzh/encatalog. Fine for this slice if the desktop shell already matches the UI language.- PR is still BEHIND
main; needs an update-branch before merge.
Approve the localization slice.
Collaborator
|
Approved. Kicked update-branch onto current |
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.
Summary
docs.fileType.*anddocs.size*i18n keys for zh-CN and enContext
This fixes the localization issues described in the knowledge-base document panel (记忆与协作 → 岗位文档 → 知识资料):
MDMarkdown 文档9 B9 字节版本 2026-08T08:58:50.178Z更新于 2026-08-02 08:58knowledge/1.md1(withknowledge/as parent)Scope
This PR focuses on localization fixes only. Document lifecycle operations (edit, rename, archive, delete) require server-side route additions and are tracked separately.
Test plan
docs-panel.test.tsx— all 7 tests passdoc-viewer.test.tsx— all 12 tests passCloses: bytefolk/doc#64