|
| 1 | +replace_contents = [ |
| 2 | + ('Text Processing', '文本处理'), |
| 3 | + ('Binary Data', '二进制数据'), |
| 4 | + ('Data Type', '数据类型'), |
| 5 | + ('Mathematical Modules', '数学模块'), |
| 6 | + ('Functional Programming', '函数式编程'), |
| 7 | + ('Directory Access', '目录访问'), |
| 8 | + ('Data Persistence', '数据持久化'), |
| 9 | + ('Data Compression', '数据压缩'), |
| 10 | + ('File Formats', '文件格式'), |
| 11 | + ('Cryptographic Services', '加密服务'), |
| 12 | + ('Operating System', '操作系统'), |
| 13 | + ('Networking Communication', '网络通信'), |
| 14 | + ('Internet Data', '互联网数据'), |
| 15 | + ('Structured Markup', '结构化标记'), |
| 16 | + ('Internet Protocols', '互联网协议'), |
| 17 | + ('Multimedia Services', '多媒体服务'), |
| 18 | + ('Program Frameworks', '程序框架'), |
| 19 | + ('Graphical Interfaces', '图形化用户界面'), |
| 20 | + ('Development Tools', '开发工具'), |
| 21 | + ('Debugging Profiling', '调试和分析'), |
| 22 | + ('Software Packaging', '软件打包与分发'), |
| 23 | + ('Runtime Services', '运行时服务'), |
| 24 | + ('Importing Modules', '导入模块'), |
| 25 | + ('Language Services', 'Python 语言服务'), |
| 26 | + ('Bonus Scene', '彩蛋') |
| 27 | +] |
| 28 | + |
| 29 | +if __name__ == "__main__": |
| 30 | + with open("../README.md", "r", encoding="utf-8") as f: |
| 31 | + text = f.read() |
| 32 | + |
| 33 | + with open("README_S.md", "r", encoding="utf-8") as en_us_s: |
| 34 | + readme_s = en_us_s.read() |
| 35 | + with open("README_zh_cn_S.md", "r", encoding="utf-8") as zh_cn_s: |
| 36 | + readme_zh_cn_s = zh_cn_s.read() |
| 37 | + |
| 38 | + text = text.replace(readme_s, readme_zh_cn_s) |
| 39 | + for replace_content in replace_contents: |
| 40 | + text = text.replace(replace_content[0], replace_content[1], 1) |
| 41 | + |
| 42 | + with open("../README-zh-cn.md", "w", encoding="utf-8") as res: |
| 43 | + res.write(text) |
0 commit comments