chore: translate core logs to English#9318
Conversation
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
call_handler(core/pipeline/context_utils.py), the new TypeError log message no longer includes which handler failed; consider logging the handler’s full name (or module + function) alongside the message to make mismatched-argument debugging easier.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `call_handler` (core/pipeline/context_utils.py), the new TypeError log message no longer includes which handler failed; consider logging the handler’s full name (or module + function) alongside the message to make mismatched-argument debugging easier.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Code Review
This pull request performs a comprehensive localization of the codebase, translating user-facing messages, logs, error exceptions, and code comments from Chinese to English across various core components, services, and tests. The review feedback highlights opportunities to improve exception logging in astrbot/core/pipeline/result_decorate/stage.py by replacing manual traceback formatting with the more idiomatic exc_info=True parameter.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| logger.error( | ||
| f"分段回复正则表达式错误,使用默认分段方式: {traceback.format_exc()}", | ||
| "Invalid segmented-reply regular expression; " | ||
| "using the default segmentation method: " | ||
| f"{traceback.format_exc()}", | ||
| ) |
There was a problem hiding this comment.
Instead of manually formatting the traceback into the log message using traceback.format_exc(), it is more idiomatic and robust to use exc_info=True in the logger call. This keeps the log message clean and allows logging frameworks to handle the exception traceback properly.
| logger.error( | |
| f"分段回复正则表达式错误,使用默认分段方式: {traceback.format_exc()}", | |
| "Invalid segmented-reply regular expression; " | |
| "using the default segmentation method: " | |
| f"{traceback.format_exc()}", | |
| ) | |
| logger.error( | |
| "Invalid segmented-reply regular expression; " | |
| "using the default segmentation method.", | |
| exc_info=True, | |
| ) |
| logger.error( | ||
| f"分段回复过滤表达式失败,无法成功过滤:{traceback.format_exc()}" | ||
| "The segmented-reply filter expression " | ||
| "failed, so the text could not be filtered: " | ||
| f"{traceback.format_exc()}" | ||
| ) |
There was a problem hiding this comment.
Instead of manually formatting the traceback into the log message using traceback.format_exc(), it is more idiomatic and robust to use exc_info=True in the logger call. This keeps the log message clean and allows logging frameworks to handle the exception traceback properly.
| logger.error( | |
| f"分段回复过滤表达式失败,无法成功过滤:{traceback.format_exc()}" | |
| "The segmented-reply filter expression " | |
| "failed, so the text could not be filtered: " | |
| f"{traceback.format_exc()}" | |
| ) | |
| logger.error( | |
| "The segmented-reply filter expression " | |
| "failed, so the text could not be filtered.", | |
| exc_info=True, | |
| ) |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
astrbot-docs | f586314 | Commit Preview URL Branch Preview URL |
Jul 18 2026, 12:31 PM |
* chore: bump version to 4.26.7 * chore: translate core logs to English (#9318) * chore
Summary
Why
Core operational logs mixed Chinese and English, which made diagnostics and support workflows inconsistent. This change standardizes the affected core and plugin-management paths on English without changing their control flow.
Validation
uv run ruff format .uv run ruff check .Summary by Sourcery
Standardize core logs, runtime errors, and content-safety messages on English while keeping behavior unchanged.
Enhancements:
Tests: