Skip to content

Conversation

@advent259141
Copy link
Member

@advent259141 advent259141 commented Jan 9, 2026

Motivation / 动机

修复了 Dashboard 配置页面中的两个错误:

  1. 配置页面底部帮助信息显示 Translation key not found: features.config-metadata.help.helpSuffix 错误
  2. 插件列表排序时出现 TypeError: Cannot read properties of null (reading 'localeCompare') 错误

这些错误导致:

  • 配置页面底部的帮助链接无法正确显示
  • 当插件的 name 属性为 null 时,插件选择器崩溃

Modifications / 改动点

核心文件修改:

  1. dashboard/src/i18n/locales/zh-CN/features/config-metadata.json

    • 添加缺失的 help 翻译对象,包含所有必需的键:documentationsupporthelpTexthelpPrefixhelpMiddlehelpSuffix
  2. dashboard/src/i18n/locales/en-US/features/config-metadata.json

    • 添加英文版本的 help 翻译对象
  3. dashboard/src/components/shared/PluginSetSelector.vue

    • 在插件列表排序逻辑中添加空值检查
    • 使用空字符串作为 null/undefined name 的默认值,避免 localeCompare 调用失败
  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果

image imageimage 后 ---

Checklist / 检查清单

  • 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
  • 👀 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。/ My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
  • 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 requirements.txtpyproject.toml 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
  • 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.

Summary by Sourcery

修复仪表盘配置页面上与缺失翻译以及插件列表排序错误相关的问题。

错误修复:

  • 防止在插件名称为 nullundefined 时,插件列表排序抛出错误。
  • 为配置帮助文本补充缺失的 i18n 条目,以避免在配置页面出现未翻译键的警告。
Original summary in English

Summary by Sourcery

Fix issues on the dashboard configuration page related to missing translations and plugin list sorting errors.

Bug Fixes:

  • Prevent plugin list sorting from throwing errors when a plugin name is null or undefined.
  • Add missing i18n entries for configuration help text to avoid untranslated key warnings on the configuration page.

@auto-assign auto-assign bot requested review from LIghtJUNction and Soulter January 9, 2026 13:44
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 9, 2026
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗨,我已经审阅了你的修改,看起来很棒!


Sourcery 对开源项目完全免费——如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进之后的评审。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dosubot dosubot bot added the area:webui The bug / feature is about webui(dashboard) of astrbot. label Jan 9, 2026
Copy link
Member

@Dt8333 Dt8333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 10, 2026
@Soulter Soulter changed the title fix: 修复配置页面翻译键缺失和插件排序空值错误 fix: add null check for plugin list in config to fix empty list issue Jan 11, 2026
@Soulter Soulter merged commit 8dfe43f into AstrBotDevs:master Jan 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webui The bug / feature is about webui(dashboard) of astrbot. lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants