Skip to content

resolves #5201 : 日志的i18n#5688

Open
united-pooh wants to merge 43 commits intoAstrBotDevs:masterfrom
united-pooh:feat/i18n
Open

resolves #5201 : 日志的i18n#5688
united-pooh wants to merge 43 commits intoAstrBotDevs:masterfrom
united-pooh:feat/i18n

Conversation

@united-pooh
Copy link

本次 PR 旨在完善 AstrBot 的国际化(i18n)系统。

Modifications / 改动点

  • 核心代码国际化改造:
    • 实现了 Lang 类 (astrbot/core/lang.py) 负责多命名空间、多区域的翻译加载。
  • 前端与路由支持:
    • dashboard/src/views/ConsolePage.vue: 在控制台页面增加了语言切换下拉框,并与后端 API 联动。
  • i18n 资源文件:
    • astrbot/i18n/locales/: 新增并完善了 zh-cn 和 en-us 的全量 Fluent 翻译文件(各
      3000+ 行),涵盖了系统所有的日志和提示。
  • 自动化测试 (tests/test_i18n.py):
    • 开发了完整的 i18n 校验工具,支持:
      1. 跨语言 FTL 条目一致性检查。
      2. Python 代码 t() 调用参数与 FTL 定义的静态分析匹配。
      3. 自动兼容 Fluent 非标准变量名解析。
  • This is NOT a breaking change. / 这不是一个破坏性变更。

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

image

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.

united_pooh and others added 30 commits February 27, 2026 15:30
- Add `fluent.runtime` to `pyproject.toml` and `requirements.txt`
- Update `astrbot/core/agent/handoff.py` to remove an unnecessary line
- Reorganize imports and add missing imports in `astrbot/core/utils/t2i/local_strategy.py`
- Add new files for i18n: `astrbot/i18n/ftl_translate.py`, `astrbot/i18n/automatic_i18n.py`, and `astrbot/i18n/locales/zh-cn/i18n_messages.ftl`
- Add GitHub workflow for i18n usage check
- Add `axios` to `dashboard/src/i18n/composables.ts` and implement language setting API
- Add `astrbot/dashboard/routes/lang_route.py` for handling language setting requests
- Updated logging messages in http_ssl_common.py to use translation function.
- Refactored error messages in main.py to utilize translation for better localization.
- Enhanced logging in generate_changelog.py with translation for user-facing messages.
… improve formatting in various modules

- Updated logging and error messages in multiple files to use the translation function.
- Added new i18n messages for process and plugin management.
- Improved formatting and consistency in error messages.
# Conflicts:
#	astrbot/core/event_bus.py
#	astrbot/core/pipeline/process_stage/method/agent_sub_stages/third_party.py
…third_party, deerflow, and config_number modules

- Updated logging and error messages in `third_party.py`, `deerflow_agent_runner.py`, `config_number.py`, and related files to use the translation function.
- Added new i18n messages for DeerFlow and third-party runner logs.
- Improved formatting and consistency in error and warning messages.
# Conflicts:
#	astrbot/builtin_stars/builtin_commands/commands/provider.py
#	astrbot/builtin_stars/web_searcher/main.py
#	astrbot/core/backup/importer.py
#	astrbot/core/computer/computer_client.py
#	astrbot/core/skills/skill_manager.py
#	astrbot/dashboard/routes/config.py
- Removed unused `automatic_i18n.py`, `ftl_translate.py`, and `test.ipynb` files.
- Updated FTL messages in `i18n_messages.ftl` for both `en-us` and `zh-cn` locales.
# Conflicts:
#	astrbot/builtin_stars/builtin_commands/commands/provider.py
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Mar 2, 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.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 20000 lines

@dosubot dosubot bot added area:core The bug / feature is about astrbot's core, backend area:webui The bug / feature is about webui(dashboard) of astrbot. labels Mar 2, 2026
@dosubot
Copy link

dosubot bot commented Mar 2, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

本次 PR 旨在完善 AstrBot 的国际化(i18n)系统,提供更友好的用户体验和全球可访问性。它包括核心代码修改、前端支持、全面的翻译文件和自动化测试,以确保跨语言的一致性和可靠性。

Highlights

  • 国际化 (i18n) 实现: 本次 PR 旨在完善 AstrBot 的国际化(i18n)系统,为日志和用户界面启用多语言支持。
  • 新的 Lang 类: 实现了一个新的 Lang 类,负责多命名空间、多区域的翻译加载。
  • 前端与路由支持: 管理面板现在包含一个语言切换下拉框,可以与后端 API 联动,更改显示的语言。
  • i18n 资源文件: 新增并完善了 zh-cn 和 en-us 的全量 Fluent 翻译文件,涵盖了系统所有的日志和提示。
  • 自动化测试: 开发了完整的 i18n 校验工具,支持跨语言 FTL 条目一致性检查以及 Python 代码 t() 调用参数与 FTL 定义的静态分析匹配。
Changelog
  • astrbot/builtin_stars/astrbot/long_term_memory.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/astrbot/main.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/admin.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/alter_cmd.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/conversation.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/help.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/llm.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/persona.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/plugin.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/provider.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/setunset.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/sid.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/t2i.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/builtin_commands/commands/tts.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/session_controller/main.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/web_searcher/engines/bing.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/builtin_stars/web_searcher/main.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/cli/main.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/cli/commands/cmd_conf.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/cli/commands/cmd_init.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/cli/commands/cmd_plug.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/cli/commands/cmd_run.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/cli/utils/basic.py
  • astrbot/cli/utils/plugin.py
  • astrbot/core/agent/context/compressor.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/core/agent/context/manager.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/core/agent/mcp_client.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/core/agent/message.py
    • 用 i18n t() 调用替换了硬编码的字符串,以支持国际化。
  • astrbot/core/agent/runners/base.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/agent/runners/coze/coze_agent_runner.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/agent/runners/deerflow/deerflow_agent_runner.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/astr_agent_run_util.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/astrbot_config_mgr.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/computer/booters/boxlite.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/computer/booters/local.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/computer/booters/shipyard.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/computer/computer_client.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/computer/tools/fs.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/core_lifecycle.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/cron/manager.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/db/migration/helper.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/db/migration/migra_3_to_4.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/db/migration/migra_token_usage.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/db/migration/migra_webchat_session.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/db/vec_db/faiss_impl/document_storage.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/db/vec_db/faiss_impl/embedding_storage.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/db/vec_db/faiss_impl/vec_db.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/event_bus.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/file_token_service.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/initial_loader.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/knowledge_base/chunking/recursive.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/knowledge_base/kb_db_sqlite.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/knowledge_base/kb_helper.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/knowledge_base/parsers/text_parser.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/knowledge_base/parsers/url_parser.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/knowledge_base/retrieval/manager.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/lang.py
  • astrbot/core/log.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/message/components.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/astr_message_event.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/manager.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/platform.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/register.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/dingtalk/dingtalk_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/lark/lark_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/lark/lark_event.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/lark/server.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/misskey/misskey_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/qqofficial/qqofficial_platform_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/satori/satori_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/slack/client.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/slack/slack_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/telegram/tg_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/telegram/tg_event.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/webchat/message_parts_helper.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/webchat/webchat_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/platform/sources/weixin_official_account/weixin_offacc_adapter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/entities.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/func_tool_manager.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/manager.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/provider.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/anthropic_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/azure_tts_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/bailian_rerank_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/dashscope_tts.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/deerflow_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/dify_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/gemini_embedding_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/gemini_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/genie_tts.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/minimax_tts_api_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/openai_embedding_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/openai_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/openai_tts_api_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/sensevoice_selfhosted_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/silicon_llm.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/vllm_rerank_source.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/provider/sources/volcengine_tts.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/skills/skill_manager.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/base.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/command_management.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/config.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/context.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/filter/command.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/filter/custom_filter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/register/star.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/register/star_handler.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/session_llm_manager.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/session_plugin_manager.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/star/star_manager.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/tts_middleware.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/umop_config_router.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/updator.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/astrbot_path.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/basic.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/error_redaction.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/history_saver.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/io.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/llm_metadata.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/media_utils.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/metrics.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/migra_helper.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/network_utils.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/plugin.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/process_utils.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/prompt_template.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/quoted_message/extractor.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/quoted_message/image_resolver.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/quoted_message/onebot_client.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/core/utils/session_waiter.py
    • Replaced hardcoded strings with i18n t() calls for internationalization.
  • astrbot/dashboard/routes/api_key.py
  • astrbot/dashboard/routes/auth.py
  • astrbot/dashboard/routes/backup.py
  • astrbot/dashboard/routes/chat.py
  • astrbot/dashboard/routes/chatui_project.py
  • astrbot/dashboard/routes/command.py
  • astrbot/dashboard/routes/config.py
  • astrbot/dashboard/routes/cron.py
  • astrbot/dashboard/routes/file.py
  • astrbot/dashboard/routes/knowledge_base.py
  • astrbot/dashboard/routes/lang_route.py
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/i18n-check.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a9d9e5301

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

本次 PR 实现了国际化(i18n)支持,这是一个非常重要的功能。代码整体改动较大,主要是将硬编码的字符串替换为 t() 函数调用,方向是正确的。但在一些实现细节上存在问题,主要体现在部分字符串仍然是硬编码的,或者是以不正确的方式传递给翻译函数,导致国际化不完整。此外,lang.py 的实现存在循环依赖问题,可能在特定场景下导致程序崩溃。请参考具体的审查意见进行修改。

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@united-pooh united-pooh changed the title feat: 日志的i18n resolves #5201 : 日志的i18n Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core The bug / feature is about astrbot's core, backend area:webui The bug / feature is about webui(dashboard) of astrbot. size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants