Git Product home page Git Product logo

translate_diff's Introduction

translate_diff

This repository aims to align the translation version with the latest changes in the origin version.

功能分析

比对指定分支当前指定文件在git上与某分支下,某次提交的文件区别

功能分解

  • 读取git指定分支的文件
  • 确定已翻译文本的信息记录规范
  • 对比文件计算diff,生成diff文本
  • 生成一个issue任务
  • 如何快速部署到一个新的项目中

翻译信息记录规范

翻译配置文件

目标语言文件的路径

源语言文件的路径

翻译时对应的git链接

翻译时对应的git hash

使用方法

  1. 填写 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/ 或者'./')
    
  2. 运行 translate_diff.py

/translate_diff 文件夹里面生成的是diff的HTML

translate_diff_report.md 是diff文件的差异

translate_diff's People

Contributors

yaoqih avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.