[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Debian JP master SVN www commits (rev.1088)



=======================================================
Repository: /org/svn.debian.or.jp/repos
  Revision: 1088
  Commiter: lurdan
      Date: 2010-10-01 09:06:25 +0900 (金, 01 10月 2010)
=======================================================
Log:

update trans_table to generate tsv glossary.

=======================================================
Changed:

U   www/trunk/progs/update
U   www/trunk/src/community/translate/index.tt2
U   www/trunk/src/community/translate/trans_table/Makefile
A   www/trunk/src/community/translate/trans_table/skk2tsv.pl

Modified: www/trunk/progs/update
===================================================================
--- www/trunk/progs/update	2010-09-27 07:43:36 UTC (rev 1087)
+++ www/trunk/progs/update	2010-10-01 00:06:25 UTC (rev 1088)
@@ -14,6 +14,7 @@
     }; print "$ret"')
 
 progs/skk2tt.pl src/community/translate/trans_table/table.skk > src/community/translate/trans_table.tt2
+( cd src/community/translate/trans_table && make trans_table.tsv trans_table.dict )
 
 case "$1" in
   recreate)

Modified: www/trunk/src/community/translate/index.tt2
===================================================================
--- www/trunk/src/community/translate/index.tt2	2010-09-27 07:43:36 UTC (rev 1087)
+++ www/trunk/src/community/translate/index.tt2	2010-10-01 00:06:25 UTC (rev 1088)
@@ -12,7 +12,10 @@
 	<h3>Debian Project のドキュメントおよび Web ページの作業方法</h3>
 	<ul>
 	<li><a href="./webtrans_howto/webtrans_howto.ja.html/">Debian Project ウェブページ翻訳作業マニュアル</a></li>
-	<li><a href="./trans_table.html">Debian JP Doc/WWW 対訳表</a></li>
+	<li><a href="./trans_table.html">Debian JP Doc/WWW 対訳表</a>
+            (<a href="trans_table/trans_table.skk">skk</a>/
+             <a href="trans_table/trans_table.tsv>tsv</a>/
+             <a href="trans_table/trans_table.dict.tar.gz">dict</a>)</li>
         <li><a href="./ddtp.html">Debian パッケージ説明文の翻訳作業について</a></li>  
 <!--	
 <li><a href="description-ja.html">Debian パッケージの説明文を日本語で読みたい! 〜DDTP へのお誘い〜</a></li>

Modified: www/trunk/src/community/translate/trans_table/Makefile
===================================================================
--- www/trunk/src/community/translate/trans_table/Makefile	2010-09-27 07:43:36 UTC (rev 1087)
+++ www/trunk/src/community/translate/trans_table/Makefile	2010-10-01 00:06:25 UTC (rev 1088)
@@ -7,7 +7,7 @@
 
 MAKE = make
 
-all: trans_table.sgml trans_table.html trans_table.dict
+all: trans_table.sgml trans_table.html trans_table.dict trans_table.tsv
 
 trans_table.sgml: table.skk
 	./skk2sgml.pl table.skk > trans_table.sgml
@@ -21,6 +21,12 @@
 #	dictzip trans_table.dict
 	tar zcf trans_table.dict.tar.gz trans_table.{index,dict}
 
+#trans_table.tt2: table.skk
+#	./skk2tt.pl table.skk > ../trans_table.tt2
+
+trans_table.tsv: table.skk
+	./skk2tsv.pl table.skk | nkf -w > trans_table.tsv
+
 dist:
 	rm -f *~
 	( cd .. && \

Added: www/trunk/src/community/translate/trans_table/skk2tsv.pl
===================================================================
--- www/trunk/src/community/translate/trans_table/skk2tsv.pl	                        (rev 0)
+++ www/trunk/src/community/translate/trans_table/skk2tsv.pl	2010-10-01 00:06:25 UTC (rev 1088)
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+# -*- mode: perl -*-
+# Copyright (C) 1998, Mitsuru Oka <oka@debian.or.jp>
+
+%words = {};                    # insert a,b,c,...,z,etc.. of array
+
+# 擬似 skk フォーマットをパース、中間テーブル構築
+while(<>) {
+    next if /^(;.*|)$/;
+    m|([a-zA-Z][a-zA-Z0-9-.\s]*)\s+/(.+)/$| || die "error `$_'";
+    my $keyword = $1;
+    my $key = uc(substr($keyword,0,1));
+    my $transwords = $2;
+
+    if ($word{$key}) {
+        $word{$key}->{$keyword} = $transwords;
+    } else {
+        $word{$key} = {};
+        $word{$key}{$keyword} = $transwords;
+    }
+}
+
+$current_time = localtime time; # 更新日付
+
+# tsv 生成
+foreach (sort keys %word) {
+    my $key = $_;
+
+    my $c_word = $word{$key};
+    foreach (sort keys %$c_word) {
+        my $keyword = $_;
+        print <<"EOL";
+$keyword\t$c_word->{$keyword}\t
+EOL
+    }
+}


Property changes on: www/trunk/src/community/translate/trans_table/skk2tsv.pl
___________________________________________________________________
Name: svn:executable
   + *