[Chinese-commits] [manpages-zh] 08/31: finish append-colophon work structure

Boyuan Yang hosiet-guest at moszumanska.debian.org
Sat Dec 24 14:25:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

hosiet-guest pushed a commit to branch master
in repository manpages-zh.

commit 10419524174fa314a7a1e0383aca13e29369bc1c
Author: Boyuan Yang <073plan at gmail.com>
Date:   Sat Dec 17 01:16:00 2016 +0800

    finish append-colophon work structure
---
 src/man7/fifo.7       |  7 +++----
 utils/append-colophon | 22 +++++++++++++++-------
 utils/pre-trans.pl    | 24 ------------------------
 3 files changed, 18 insertions(+), 35 deletions(-)

diff --git a/src/man7/fifo.7 b/src/man7/fifo.7
index 26673f5..56d3d40 100644
--- a/src/man7/fifo.7
+++ b/src/man7/fifo.7
@@ -61,7 +61,6 @@ FIFO 特殊文件可以用
 如需了解这个项目的描述、汇报漏洞的相关信息及本页面的最新版本,
 请访问
 \%https://www.kernel.org/doc/man\-pages/.
-
-本页面中文版由中文 man 手册页计划提供。请访问
-\%https://github.com/man\-pages\-zh/manpages\-zh
-项目主页了解详细信息。
+.\" manpages-zh translator: Boyuan Yang <073plan at gmail.com>
+.\" manpages-zh date: 2016-12-16
+.\" manpages-zh orig-date: 2016-12-12
diff --git a/utils/append-colophon b/utils/append-colophon
index 23f2d19..b7a4875 100755
--- a/utils/append-colophon
+++ b/utils/append-colophon
@@ -27,7 +27,7 @@ def parse_find_colophon(line: str) -> bool:
     Definition of colophon:
         .SH "跋" or .SH 跋
     """
-    if line == '.SH "跋"' or line == '.SH 跋':
+    if '.SH "跋"\n' == line or '.SH 跋\n' == line:
         return True
     else:
         return False
@@ -52,12 +52,20 @@ if __name__ == "__main__":
         pass
     print('.PP')
     print('本页面中文版由中文 man 手册页计划提供。')
-    if "translator" in t_info.keys():
-        print('\n翻译人员:' + t_info["translator"])
-    if "orig-date" in t_info.keys():
-        print('\n获取日期:' + t_info["orig-date"])
-    if "date" in t_info.keys():
-        print('\n翻译日期:' + t_info["date"])
+
+    if len(t_info.keys()) > 0:
+        "we need another paragraph"
+        print('.PP')
+        if "translator" in t_info.keys():
+            print('\\fI翻译人员\\fR:' + t_info["translator"], end="")
+            print('.br')
+        if "orig-date" in t_info.keys():
+            print('\\fI获取日期\\fR:' + t_info["orig-date"], end="")
+            print('.br')
+        if "date" in t_info.keys():
+            print('\\fI翻译日期\\fR:' + t_info["date"], end="")
+            print('.br')
+
     print('.PP')
     print("中文 man 手册页计划:\\fB" +
           "https://github.com/man-pages-zh/manpages-zh" +
diff --git a/utils/pre-trans.pl b/utils/pre-trans.pl
deleted file mode 100755
index a25e997..0000000
--- a/utils/pre-trans.pl
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env perl
-#
-# 将标题替换为中文和英文混合的标准标题
-# 将签名添加在文档最后
-#
-while (<>){
-	s/^\.SH "?SYNOPSIS"?/\.SH "总览 SYNOPSIS"/;
-	s/^\.SH "?DESCRIPTION"?/\.SH "描述 DESCRIPTION"/;
-	s/^\.SH "?SEE ALSO"?/\.SH "参见 SEE ALSO"/;
-	s/^\.SH "?AUTHOR"?/\.SH "作者 AUTHOR"/;
-	s/^\.SH "?KEYWORDS"?/\.SH "关键字 KEYWORDS"/;
-	s/^\.SH "?OPTIONS"?/\.SH "选项 OPTIONS"/;
-	s/^\.SH "?EXAMPLE"?/\.SH "范例 EXAMPLE"/;
-	print
-}
-print <<EOF;
-
-.SH "[中文版维护人]"
-.B 姓名 <email>
-.SH "[中文版最新更新]"
-.BR yyyy.mm.dd
-.SH "《中国linux论坛man手册翻译计划》:"
-.BI http://cmpp.linuxforum.net 
-EOF

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/chinese/manpages-zh.git



More information about the Chinese-commits mailing list