bazaar 用 map 替代 i18n struct - #16960
Merged
Merged
Conversation
- package.go:DisplayName/Description/Readme 改为 map[string]string,统一 getPreferredLocaleString - bazzar.go:搜索匹配适配 LocaleStrings,抽出 packageContainsKeyword - bazaar.ts:keyword 仅在有值时传入 API - appearance:主题「默认主题」与 displayName 改为多语言 key 与 map 取值
88250
approved these changes
Feb 3, 2026
Member
|
v3.5.5 |
Contributor
Author
|
@Vanessa219 前端传空 keyword 的话接口会有不必要的开销,会慢一些 |
Contributor
Author
|
要不我再看看后端能不能针对性优化一下 |
Member
|
这个应该不会有太大差别吧 |
Contributor
Author
|
确实没啥差别,筛选空字符串只多花 1000 微秒,不过我已经改好了 #16973 |
Contributor
Author
|
我改完后端之后发现这个实际上不是前端的问题,后端没有接受到 keyword 参数的时候也是一样当做空字符串处理的,之前测试以为有很大的开销估计是别的地方的代码导致的,反正现在是解决了。 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
原来的方式拓展性比较差,添加语种的时候还容易漏改。
之后还要优化 https://github.com/siyuan-note/bazaar ,目前 json 里有大量的空值字段。→ siyuan-note/bazaar@a191200