diff -Nru ibus-table-1.3.9.20110827/debian/changelog ibus-table-1.3.9.20110827/debian/changelog --- ibus-table-1.3.9.20110827/debian/changelog 2011-09-03 16:04:16.000000000 +0000 +++ ibus-table-1.3.9.20110827/debian/changelog 2012-03-15 09:09:09.000000000 +0000 @@ -1,3 +1,12 @@ +ibus-table (1.3.9.20110827-1ubuntu1) precise; urgency=low + + * debian/patches/en_hk_fix.patch: + backport 3 upstream commits to fix the bug "Default Locale-Based + Chinese Mode Setting is Inconvenient to Hong Kong Users", (lp: #947908) + thanks Anthony Wong for reporting the issue and doing the backport + + -- Sebastien Bacher Thu, 08 Mar 2012 22:36:11 +0100 + ibus-table (1.3.9.20110827-1) unstable; urgency=low * New upstream release. diff -Nru ibus-table-1.3.9.20110827/debian/control ibus-table-1.3.9.20110827/debian/control --- ibus-table-1.3.9.20110827/debian/control 2011-09-03 16:04:15.000000000 +0000 +++ ibus-table-1.3.9.20110827/debian/control 2012-03-15 09:09:32.000000000 +0000 @@ -1,7 +1,8 @@ Source: ibus-table Section: utils Priority: optional -Maintainer: IME Packaging Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: IME Packaging Team Uploaders: LI Daobing , Asias He Build-Depends: debhelper (>= 7.0.50~), diff -Nru ibus-table-1.3.9.20110827/debian/patches/en_hk_fix.patch ibus-table-1.3.9.20110827/debian/patches/en_hk_fix.patch --- ibus-table-1.3.9.20110827/debian/patches/en_hk_fix.patch 1970-01-01 00:00:00.000000000 +0000 +++ ibus-table-1.3.9.20110827/debian/patches/en_hk_fix.patch 2012-03-10 13:01:16.000000000 +0000 @@ -0,0 +1,43 @@ +diff -uNr ibus-table-1.3.9.20110827/engine/tabdict.py ibus-table-1.3.9.20110827.new/engine/tabdict.py +--- ibus-table-1.3.9.20110827/engine/tabdict.py 2011-08-26 23:11:32.000000000 +0800 ++++ ibus-table-1.3.9.20110827.new/engine/tabdict.py 2012-03-10 20:48:09.242331184 +0800 +@@ -26,7 +26,6 @@ + sys.setdefaultencoding('utf-8') + + tab_dict = { +- '0':0, + 'a':1, 'b':2, 'c':3, 'd':4, 'e':5, + 'f':6, 'g':7, 'h':8, 'i':9, 'j':10, + 'k':11, 'l':12, 'm':13, 'n':14, 'o':15, +diff -uNr ibus-table-1.3.9.20110827/engine/table.py ibus-table-1.3.9.20110827.new/engine/table.py +--- ibus-table-1.3.9.20110827/engine/table.py 2011-08-27 00:10:09.000000000 +0800 ++++ ibus-table-1.3.9.20110827.new/engine/table.py 2012-03-10 20:48:54.890329561 +0800 +@@ -113,13 +113,12 @@ + else: + __lc = os.environ['LANG'].split('.')[0].lower() + +- if __lc.find('zh_') == 0: +- # this is a zh_XX +- __place =__lc.split('_')[1] +- if __place == 'cn': +- return 0 +- else: +- return 1 ++ if __lc.find('_cn') != -1: ++ return 0 ++ # hk and tw is should use tc as default ++ elif __lc.find('_hk') != -1 or __lc.find('_tw') != -1\ ++ or __lc.find('_mo') != -1: ++ return 1 + else: + if self.db._is_chinese: + # if IME declare as Chinese IME +@@ -128,7 +127,7 @@ + return -1 + except: + return -1 +- ++ + def change_chinese_mode (self): + if self._chinese_mode != -1: + self._chinese_mode = (self._chinese_mode +1 ) % 5 diff -Nru ibus-table-1.3.9.20110827/debian/patches/series ibus-table-1.3.9.20110827/debian/patches/series --- ibus-table-1.3.9.20110827/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ ibus-table-1.3.9.20110827/debian/patches/series 2012-03-15 09:07:24.000000000 +0000 @@ -0,0 +1 @@ +en_hk_fix.patch