Fix a bug found in Makefile.py.
authorPhilip Tzou <philip@users.mediawiki.org>
Mon, 1 Feb 2010 20:39:17 +0000 (20:39 +0000)
committerPhilip Tzou <philip@users.mediawiki.org>
Mon, 1 Feb 2010 20:39:17 +0000 (20:39 +0000)
includes/ZhConversion.php
includes/zhtable/Makefile.py

index 9b6fc36..e559b6c 100644 (file)
@@ -2745,7 +2745,6 @@ $zh2Hant = array(
 '𫛢' => '鸋',
 '𫛶' => '鶒',
 '𫛸' => '鶗',
-'' => '',
 '0多只' => '0多隻',
 '0天后' => '0天後',
 '0只' => '0隻',
@@ -18021,4 +18020,4 @@ $zh2SG = array(
 '笨豬跳' => '绑紧跳',
 '蹦极跳' => '绑紧跳',
 '笑星' => '谐星',
-);
\ No newline at end of file
+);
index ea78fbd..26e229d 100644 (file)
@@ -255,14 +255,14 @@ def CustomRules( dest ):
     return ret
 
 def GetPHPArray( table ):
-    lines = ['\'%s\' => \'%s\',' % (f, t) for (f, t) in table]
+    lines = ['\'%s\' => \'%s\',' % (f, t) for (f, t) in table if f and t]
     #lines = ['"%s"=>"%s",' % (f, t) for (f, t) in table]
     return '\n'.join(lines)
 
 def RemoveSameChar( src_table ):
     dst_table = {}
     for f, t in src_table.items():
-        if not f == t:
+        if f != t:
             dst_table[f] = t
     return dst_table