-
Notifications
You must be signed in to change notification settings - Fork 22
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
Updated po files contain unexpected changes #36
Comments
第一个问题,都是一些api doc中的必备词汇,猜测是sphinx-intl 自动转换免去翻译了(渲染结果验证) 所以总体上是没有大问题,请问你第一次po是如何生成的呢?用的同样的工具不应该结果有异 |
前两个问题不大,第三个比较麻烦,虽然不影响渲染,但是它会产生很多不必要的变动。如果后续引入 pre-commit 的话会导致冲突(pre-commit 把所有行长度调整好,更新 po 文件后又被打乱) 。 生成工具没变,命令也没变。 我看下有没有方法解决,没办法的话就只能放弃引入 pre-commit 了。 |
或者在workflow里跑一遍pre-commit |
GitHub Actions 里的 git commit 会触发 pre-commit 吗?如果不会那就加一条 pre-commit 命令就好了。
对,发完才看到新评论…… |
是的,显式运行pre-commit |
嗯,不过暂时还不清楚怎么让 pre-commit 检查 po 文件。我先去 https://github.com/sphinx-doc/sphinx-intl 发个 issue 问下输出混乱的问题。 |
第三个问题,最大行长是默认76的,PR中的行长也没有突破这个值,所以折行稳定性是可以保证的 |
设置行长只会控制 msgid 的长度。在那个 PR 里,这一行的长度是 139。我认为更新 po 文件不该变动 msgstr 的值,不过似乎没有提供相应的设置选项。 |
看明白了,仿佛它不能正确在中文字符内折行,似乎应该报告给Babel Update: python-babel/babel#787 |
I tried to update .po files based on the updates from the upstream repo. However, the changes contain a lot of unexpected results:
api.po
asmsgid
.msgid
of alt of images was replaced with the translatedmsgstr
.msgstr
was reordered based on the position of the English word.We need to fix this issue before running the sync workflow.
See the changes in https://github.com/greyli/flask-docs-zh/pull/35/files.
The text was updated successfully, but these errors were encountered: