Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat my sql ai rules ce #2900

Merged
merged 14 commits into from
Jan 24, 2025
Next Next commit
chore: move locale tips to readme
BugsGuru committed Jan 24, 2025
commit 6bf702962fe6d5de4114f0fe7738b30857690d5e
11 changes: 11 additions & 0 deletions sqle/driver/mysql/plocale/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
在文件`message_zh.go`中新增、修改 `i18n.Message` 后需更新对应语言文件(active.*.toml),更新的脚本写在项目Makefile中了,使用步骤如下:
1. 安装需要的工具,已安装则跳过: \
`make install_i18n_tool`
2. 根据i18n.Message生成中文语言包文件(active.zh.toml): \
`make extract_i18n`
3. 如果只需要支持中文,后续就不需要执行了
4. 生成待翻译的临时文件(translate.en.toml): \
`make start_trans_i18n`
5. 人工介入将 translate.en.toml 文件中的文本翻译替换
6. 根据翻译好的文本生成英文语言包文件(active.en.toml): \
`make end_trans_i18n`
11 changes: 0 additions & 11 deletions sqle/driver/mysql/plocale/message_zh.go
Original file line number Diff line number Diff line change
@@ -2,17 +2,6 @@ package plocale

import "github.com/nicksnyder/go-i18n/v2/i18n"

// 在该文件中添加 i18n.Message 后还需生成对应语言文件(active.*.toml),脚本写在Makefile中了,使用步骤如下:
// 1. 安装需要的工具,已安装则跳过:
// make install_i18n_tool
// 2. 将新增的i18n.Message提取到语言文件(active.*.toml)中:
// make extract_i18n
// 3. 生成待翻译的临时文件(translate.en.toml):
// make start_trans_i18n
// 4. 人工介入将 translate.en.toml 文件中的文本翻译替换
// 5. 根据翻译好的文本更新英文文件(active.en.toml):
// make end_trans_i18n

// advisor
var (
ThreeStarIndexAdviceFormat = &i18n.Message{ID: "ThreeStarIndexAdviceFormat", Other: "索引建议 | 根据三星索引设计规范,建议对表%s添加%s索引:【%s】"}
11 changes: 11 additions & 0 deletions sqle/locale/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
在文件`message_zh.go`中新增、修改 `i18n.Message` 后需更新对应语言文件(active.*.toml),更新的脚本写在项目Makefile中了,使用步骤如下:
1. 安装需要的工具,已安装则跳过: \
`make install_i18n_tool`
2. 根据i18n.Message生成中文语言包文件(active.zh.toml): \
`make extract_i18n`
3. 如果只需要支持中文,后续就不需要执行了
4. 生成待翻译的临时文件(translate.en.toml): \
`make start_trans_i18n`
5. 人工介入将 translate.en.toml 文件中的文本翻译替换
6. 根据翻译好的文本生成英文语言包文件(active.en.toml): \
`make end_trans_i18n`
11 changes: 0 additions & 11 deletions sqle/locale/message_zh.go
Original file line number Diff line number Diff line change
@@ -4,17 +4,6 @@ import (
"github.com/nicksnyder/go-i18n/v2/i18n"
)

// 在该文件中添加 i18n.Message 后还需生成对应语言文件(active.*.toml),脚本写在Makefile中了,使用步骤如下:
// 1. 安装需要的工具,已安装则跳过:
// make install_i18n_tool
// 2. 将新增的i18n.Message提取到语言文件(active.*.toml)中:
// make extract_i18n
// 3. 生成待翻译的临时文件(translate.en.toml):
// make start_trans_i18n
// 4. 人工介入将 translate.en.toml 文件中的文本翻译替换
// 5. 根据翻译好的文本更新英文文件(active.en.toml):
// make end_trans_i18n

// rule template
var (
DefaultRuleTemplatesDesc = &i18n.Message{ID: "DefaultRuleTemplatesDesc", Other: "默认规则模板"}