feat: 添加 Django 国际化翻译文件自动化脚本#6323
Open
wangliang181230 wants to merge 3 commits into
Open
Conversation
8147dc4 to
3380acf
Compare
567b290 to
64de0a9
Compare
64de0a9 to
2ae6bd4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Django 国际化翻译文件自动化脚本
功能执行过程:
msgid进行排序)not_internationalized.txt文件中使用说明:
KEEP_NO_SOURCE为False,自动将源码中已经不存在的项从翻译文件中删除。(但会保留已翻译的项)脚本对源码的检索率自查:
100%4197处: - 检索词:正则\b(?:_|gettext_lazy|gettext)\(\s*(?:'[^']|"[^"]|'''|""")检索到
4212处,减掉当前脚本内的15处,即4197处。4197处,和源码中的一致: - 检索词:#: apps/后续优化方向建议:
添加
自动翻译功能,就可以做成自动化程序了。请对
翻译功能比较熟的朋友,后续添加该功能,谢谢!!!此次执行日志: