This repository aims to align the translation version with the latest changes in the origin version.
比对指定分支当前指定文件在git上与某分支下,某次提交的文件区别
- 读取git指定分支的文件
- 确定已翻译文本的信息记录规范
- 对比文件计算diff,生成diff文本
- 生成一个issue任务
- 如何快速部署到一个新的项目中
目标语言文件的路径
源语言文件的路径
翻译时对应的git链接
翻译时对应的git hash
- 填写
translate_diff_config.yml
文件check_list: - 源语言文件: 翻译前的文件地址(例如:chapters/en/chapter0/1.mdx) 目标语言文件: 翻译后的文件地址(例如:chapters/zh-CN/chapter0/1.mdx) 翻译版本的git hash: 在上一次翻译版本的 git hash(例如:c4a44e43fa3169bbfa8c4c8b1466a59c4e334be4) git_branch: git hash所在分支(例如:main) git_url:本项目git的url(例如:https://github.com/huggingface/course) relavate_path:transleate_diff.py相对于工作路径的相对路径(例如:./translate_diff/ 或者'./')
- 运行
translate_diff.py
/translate_diff
文件夹里面生成的是diff的HTML
translate_diff_report.md
是diff文件的差异