目前 weblate 的 git 仓库[1],中文版编译出现如下错误:
DTD Validation failed for
'/home/atzlinux/debian-handbook/tmp/zh-CN/xml/debian-handbook.xml':
11_network-services.xml:1235: validity error : Element indexterm
content does not follow the DTD, expecting (primary? , ((secondary
, ((tertiary , (see | seealso+)?) | see | seealso+)?) | see |
seealso+)?), got (primary see CDATA)
ERROR: failed to build HTML output for zh-CN
初步分析是在翻译的 11 章里面,有问题。
目前这个错误导致
./bin/build-html --lang=zh-CN
无法成功编译为最新的 html 文件。
通过排查发下,是如下这次提交导致的异常。
commit 1988932fdd49a72a8db1bbe53263ddf0a0c752c9
Author: tao wang <tonywang5@163.com>
Date: Sun Oct 25 08:12:32 2020 +0000
zh-CN: Translated using Weblate.
这次提交有修改 137 条翻译,需要排查具体是哪个翻译出现的问题:
git show 1988932fdd49a72a8db1bbe53263ddf0a0c752c9|grep ^+|wc -l
137
这 137 条翻译中,如下两条翻译,有异常,把标签<see> 改成了 <secondary>, 已经在
weblate 网页更新:
diff --git a/zh-CN/11_network-services.po
b/zh-CN/11_network-services.po
index 1ea8049b..69b617b4 100644
--- a/zh-CN/11_network-services.po
+++ b/zh-CN/11_network-services.po
@@ -500,7 +500,7 @@ msgid "<emphasis>TIP</emphasis>
White list and RBLs"
msgstr "<emphasis>技巧</emphasis> 白名单和 RBLs"
msgid "<primary>RBL</primary><see>Remote Black
List</see>"
-msgstr
"<primary>RBL</primary><secondary>远程黑名单</secondary>"
+msgstr
"<primary>RBL</primary><see>远程黑名单</see>"
msgid "<primary>Remote Black List</primary>"
msgstr "<primary>远程黑名单</primary>"
@@ -2153,7 +2153,7 @@ msgid "Samba is a suite of tools handling
the SMB protocol (also known as “CIF
msgstr ""
msgid "<primary>SMB</primary><see>Server
Message Block</see>"
-msgstr
"<primary>SMB件</primary><secondary>服务器消息块</secondary>"
+msgstr
"<primary>SMB件</primary><see>服务器消息块</see>"
msgid "<primary>Server Message Block</primary>"
msgstr "<primary>服务器消息块</primary>"
在修改好上述这两条异常翻译条目后,文档编译仍然报错,需要继续排查问题原因。
[1] https://hosted.weblate.org/git/debian-handbook/12_advanced-administration/
你好!
谢谢反馈问题!
刚才登录服务器检查,发现出现了 git 冲突导致更新失败。
未合并的路径:
(使用 "git add <文件>..." 标记解决方案)
双方修改: id-ID/06_apt.po
双方修改: it-IT/00b_foreword.po
双方修改: it-IT/01_the-debian-project.po
双方修改: it-IT/06_apt.po
双方修改: it-IT/14_security.po
双方修改: pt-BR/00a_preface.po
双方修改: pt-BR/05_packaging-system.po
双方修改: zh-CN/06_apt.po
双方修改: zh-CN/11_network-services.po
刚才处理好了,目前可以看到 weblate git 仓库最新的提交是:
commit ab9c04430e2e643420daf3725a8c0b489d69a916 (HEAD -> weblate-master, weblate/buster/master)
Author: d <dmanye@gmail.com>
Date: Tue Oct 20 21:42:23 2020 +0000
ca-ES: Translated using Weblate.
commit dda56c4266712781774f6d95c2422c355ab968aa
Author: tao wang <tonywang5@163.com>
Date: Wed Oct 21 10:02:13 2020 +0000
zh-CN: Translated using Weblate.
关于每 2 小时同步,是指服务器每 2 小时和 weblate 的 git 仓库进行同步,但在 weblate 页面翻译的信息,不是实时提交到 weblate 仓库,
所以在 http://lx.atzlinux.com:24357/debian-handbook/ 无法看到。
可以考虑和该书作者联系,获取在 weblate 上的 git 仓库提交权限,这样就可以及时把在 weblate 页面上翻译完成的内容,提交到 weblate git 仓库。
Raphaël Hertzog
hertzog@debian.org
更新 README 可以到 salsa 提 合并请求:
https://salsa.debian.org/hertzog/debian-handbook.git
在 2020/10/22 上午11:10, Chenwqin 写道:
我发现在weblate上的更新,并不是 2 小时就能在 http://lx.atzlinux.com:24357/debian-handbook/ 上看到另外我找到 fedora 一份中文本地化的指引文档,对翻译人员有一定的参考意义,可以看看能否合并到 repo 中的 readme
-- 肖盛文 xiao sheng wen Faris Xiao 微信(wechat):atzlinux 《铜豌豆 Linux》 基于 Debian 的 Linux 中文桌面操作系统:https://www.atzlinux.com Debian QA page: https://qa.debian.org/developer.php?login=atzlinux%40sina.com GnuPG Public Key: 0x339240CB