aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/bin
diff options
context:
space:
mode:
authorAnthony Fok <foka>2000-12-17 11:19:46 +0000
committerAnthony Fok <foka>2000-12-17 11:19:46 +0000
commit28d133a7a1ee5a637fe8001cf9d809aa4ea21bcc (patch)
tree660e1e01b2af708c978bb68ae6a17153ade3c7c1 /chinese/bin
parent29612803d77e509d385d4aada39af9701c8ae3b9 (diff)
Revisions to allow for zh-hk.
CVS version numbers chinese/bin/tocn.pl: 1.21 -> 1.22 chinese/bin/totw.pl: 1.19 -> 1.20
Diffstat (limited to 'chinese/bin')
-rwxr-xr-xchinese/bin/tocn.pl2
-rwxr-xr-xchinese/bin/totw.pl25
2 files changed, 20 insertions, 7 deletions
diff --git a/chinese/bin/tocn.pl b/chinese/bin/tocn.pl
index 91f617b5c75..940cf3f0681 100755
--- a/chinese/bin/tocn.pl
+++ b/chinese/bin/tocn.pl
@@ -3,7 +3,7 @@
s|^(<HTML lang="zh)">|$1-CN">|;
s|^(<META http-equiv=.*charset)=Big5">|$1=GB2312">|;
s/(\.zh)(?=\.(?:gif|jpg|png))/$1-cn/g;
-s|^<A href=".*">(ÖÐÎÄ&nbsp;\(GB\))</A>(?=&nbsp;)|$1|;
+s|^<A href=".*">(&#20013;&#25991;&nbsp;.+CN.+)</A>(?=&nbsp;)|<B>$1</B>|;
# ÏÈ°ÑÈ«²¿¡¸Öø¡¹×ÖתΪ¡¸×Å¡¹¡­¡­
1 while (s/^((?:[\x00-\x7F]|[\x80-\xFF].)*)Öø/$1×Å/);
diff --git a/chinese/bin/totw.pl b/chinese/bin/totw.pl
index 273b47b4a0f..40ddbec3476 100755
--- a/chinese/bin/totw.pl
+++ b/chinese/bin/totw.pl
@@ -1,8 +1,12 @@
#!/usr/bin/perl -pi
-s|^(<HTML lang="zh)">|$1-TW">|;
-s/(\.zh)(?=\.(?:gif|jpg|png))/$1-tw/g;
-s|^<A href=".*">(¤¤¤å&nbsp;\(Big5\))</A>(?=&nbsp;)|$1|;
+$0 =~ m|to(..)\.pl$|;
+my $sublang = $1;
+my $SUBLANG = uc($sublang);
+
+s|^(<HTML lang="zh)">|$1-$SUBLANG)">|;
+s/(\.zh)(?=\.(?:gif|jpg|png))/$1-$sublang/g;
+s|^<A href=".*">(&#20013;&#25991;&nbsp;.+$SUBLANG.+)</A>(?=&nbsp;)|<B>$1</B>|;
s/¾Þ§@¨t²Î/§@·~¨t²Î/g;
s/µ¡¤f¨t²Î/µøµ¡¨t²Î/g;
@@ -13,7 +17,7 @@ s/Ãè¹³(¯¸(ÂI)?)?/¬M®g¯¸¥x/g;
# s/Ãè¹³((ºô)?¯¸)/¬M®g$1/g;
s/ºôµ¸¹ï¶H¼Ò«¬Àô¹Ò/ºôµ¸ª«¥ó¼Ò«¬Àô¹Ò/g;
-s/«æ±Ï½L/«æ±ÏºÏºÐ/g;
+s/«æ±Ï½L/±Ï´©ºÏºÐ/g;
s/(¤Þ¾É|±Ò°Ê)½L/±Ò°ÊºÏºÐ/g;
s/¦w¸Ë½L/¦w¸ËºÏºÐ/g;
@@ -41,8 +45,17 @@ s/¸É¤B¤å¥ó/­×¸ÉÀÉ®×/g;
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*)¸}¥»/$1½Z¥»/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*)¯¸ÂI/$1¯¸¥x/);
-# ¥xÆW¥Î»y¡A­»´äª©¤£¥Î¡C
-if (1) {
+if ($sublang eq 'hk') {
+# s/¸Uºûºô/¥þ²y¸ê°Tºô/g;
+# s/¤¬Ápºô/ºô»Úºô¸ô/g;
+ 1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*)ºô¸ô/$1ºôµ¸/);
+ 1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*)¥Î¤á/$1¨Ï¥ÎªÌ/);
+# 1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*)¬É­±/$1¤¶­±/);
+ 1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*)­pµe/$1­p¹º/);
+ 1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*)³s(?=ô|µ¸)/$1Áp/);
+}
+
+if ($sublang eq 'tw') {
s/¸Uºûºô/¥þ²y¸ê°Tºô/g;
s/¤¬Ápºô/ºô»Úºô¸ô/g;
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*)ºôµ¸/$1ºô¸ô/);

© 2014-2024 Faster IT GmbH | imprint | privacy policy