mirror of
https://github.com/tradecatlabs/vibe-coding-cn.git
synced 2026-08-16 04:18:04 +00:00
refactor(i18n): 重构中文文档结构并同步更新链接
主要变更:
1. **目录重命名**:
* 将 下的 , , 重命名为中文的 , , 。
2. **新增新手入门**:
* 创建 目录,为新用户提供入门指南。
3. **文件迁移与清理**:
* 将原有文档迁移到新的中文目录结构下。
* 删除了部分过时或重复的中文文档。
4. **链接与脚本同步**:
* 更新了根 , 以及 中所有指向旧路径的链接。
* 修改了 下的英文文档,以反映中文文档的结构变化。
* 更新了 翻译脚本,使其能够处理新的中文路径。
此次重构统一了中文文档的目录命名,使其更符合中文用户的习惯,并优化了整体文档的组织结构,提升了可维护性。
This commit is contained in:
+16
-15
@@ -1,21 +1,20 @@
|
||||
TRANSLATED CONTENT:
|
||||
# telegram Markdown 代码块格式修复记录 2025-12-15
|
||||
# Telegram Markdown Code Block Format Fix Log 2025-12-15
|
||||
|
||||
## 问题
|
||||
## Problem
|
||||
|
||||
排盘完成后发送消息报错:
|
||||
After completing the astrological chart generation, sending a message reports an error:
|
||||
```
|
||||
❌ 排盘失败: Can't parse entities: can't find end of the entity starting at byte offset 168
|
||||
❌ Chart generation failed: Can't parse entities: can't find end of the entity starting at byte offset 168
|
||||
```
|
||||
|
||||
## 原因
|
||||
## Cause
|
||||
|
||||
`bot.py` 中 `header` 消息的 Markdown 代码块格式错误。
|
||||
The Markdown code block format for the `header` message in `bot.py` is incorrect.
|
||||
|
||||
原代码使用字符串拼接,在 ``` 后面加了 `\n`,导致 Telegram Markdown 解析器无法正确识别代码块边界:
|
||||
The original code used string concatenation, adding `\n` after ```, which caused the Telegram Markdown parser to incorrectly identify the code block boundary:
|
||||
|
||||
```python
|
||||
# 错误写法
|
||||
# Incorrect way
|
||||
header = (
|
||||
"```\n"
|
||||
f"{filename}\n"
|
||||
@@ -23,13 +22,13 @@ header = (
|
||||
)
|
||||
```
|
||||
|
||||
## 修复
|
||||
## Fix
|
||||
|
||||
改用三引号字符串,确保 ``` 单独成行:
|
||||
Changed to a triple-quoted string to ensure ``` is on a separate line:
|
||||
|
||||
```python
|
||||
# 正确写法
|
||||
header = f"""报告见附件
|
||||
# Correct way
|
||||
header = f"""Report attached
|
||||
```
|
||||
{filename}
|
||||
{ai_filename}
|
||||
@@ -37,6 +36,8 @@ header = f"""报告见附件
|
||||
"""
|
||||
```
|
||||
|
||||
## 修改文件
|
||||
## Modified File
|
||||
|
||||
- `services/telegram-service/src/bot.py` 第 293-308 行
|
||||
- `services/telegram-service/src/bot.py` lines 293-308
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user