Conversation
- 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
…g in automatic_i18n.py
- 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
…ction in WebChatAdapter and PluginManager
… 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
Set PYTHONPATH environment variable for I18n check.
Summary of ChangesHello, 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
Changelog
Ignored Files
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
💡 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".
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
本次 PR 旨在完善 AstrBot 的国际化(i18n)系统。
Modifications / 改动点
dashboard/src/views/ConsolePage.vue: 在控制台页面增加了语言切换下拉框,并与后端 API 联动。astrbot/i18n/locales/: 新增并完善了 zh-cn 和 en-us 的全量 Fluent 翻译文件(各3000+ 行),涵盖了系统所有的日志和提示。
tests/test_i18n.py):1. 跨语言 FTL 条目一致性检查。
2. Python 代码 t() 调用参数与 FTL 定义的静态分析匹配。
3. 自动兼容 Fluent 非标准变量名解析。
Screenshots or Test Results / 运行截图或测试结果
Checklist / 检查清单
requirements.txt和pyproject.toml文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations inrequirements.txtandpyproject.toml.