On Sat, May 09, 2015 at 08:34:26PM +0100, Adam D. Barratt wrote: > It's up to you which way you want to manage that. However, I would > appreciate it if the changelog could mention the actual issues > addressed, rather than simply "Backport 2.4 bugfix". > > With the above note in mind, please go ahead. The package ibus-cangjie (2.2-2+deb8u1) is in stable now, with a revised changelog. -- ChangZhuo Chen (陳昌倬) <czchen@gmail.com> http://czchen.info/ Key fingerprint = EC9F 905D 866D BE46 A896 C827 BE0C 9242 03F4 552D
diff -Nru ibus-cangjie-2.2/debian/changelog ibus-cangjie-2.2/debian/changelog
--- ibus-cangjie-2.2/debian/changelog 2015-05-11 01:13:01.000000000 +0800
+++ ibus-cangjie-2.2/debian/changelog 2015-05-12 23:16:54.000000000 +0800
@@ -1,3 +1,25 @@
+ibus-cangjie (2.2-2+deb8u1) stable; urgency=medium
+
+ * Backport 2.4 bugfix (Closes: 782453)
+ * A serious usability issue, where we would in some cases suggest
+ duplicate characters to the users:
+ https://github.com/Cangjians/ibus-cangjie/issues/63
+
+ * A python traceback (in the background, not crashing the engine,
+ but which was nevertheless triggering automatic crash catchers):
+ https://github.com/Cangjians/ibus-cangjie/issues/57
+
+ * An incorrect translation for Taiwan users:
+ https://github.com/Cangjians/ibus-cangjie/issues/61
+
+ * works around another serious usability issue, where the candidate popup
+ was misplaced (i.e not at the input cursor, but at the bottom of the
+ screen) on some applications, most notably Firefox (which is quite the
+ common app)
+ https://github.com/Cangjians/ibus-cangjie/issues/60
+
+ -- ChangZhuo Chen (陳昌倬) <czchen@gmail.com> Sun, 10 May 2015 18:00:01 +0800
+
ibus-cangjie (2.2-2) unstable; urgency=medium
[ChangZhuo Chen]
diff -Nru ibus-cangjie-2.2/debian/patches/0002-backport-2.4-bugfix.patch ibus-cangjie-2.2/debian/patches/0002-backport-2.4-bugfix.patch
--- ibus-cangjie-2.2/debian/patches/0002-backport-2.4-bugfix.patch 1970-01-01 08:00:00.000000000 +0800
+++ ibus-cangjie-2.2/debian/patches/0002-backport-2.4-bugfix.patch 2015-05-12 23:15:18.000000000 +0800
@@ -0,0 +1,96 @@
+Description: Backport 2.4 bugfix
+---
+Origin: upstream
+Bug-Debian: http://bugs.debian.org/782453
+--- ibus-cangjie-2.2.orig/po/zh_TW.po
++++ ibus-cangjie-2.2/po/zh_TW.po
+@@ -98,7 +98,7 @@ msgstr "輸入法版本"
+ msgid ""
+ "Only characters common in Hong Kong can be inputted by default.\n"
+ "The following additional characters can be enabled:"
+-msgstr "預設情況下只能輸入香港常用字。\n可以額外啟用下列額字元:"
++msgstr "預設情況下只能輸入香港常用字。\n可以額外啟用下列字元:"
+
+ #. The Taiwanese Zhuyin alphabet is known under two names in English.
+ #. Obviously, if it only has one name in your language, don't try to keep two
+--- ibus-cangjie-2.2.orig/src/engine.py
++++ ibus-cangjie-2.2/src/engine.py
+@@ -249,7 +249,12 @@ class Engine(IBus.Engine):
+ self.get_candidates(by_shortcode=True)
+
+ else:
+- self.get_candidates()
++ try:
++ self.get_candidates()
++
++ except cangjie.errors.CangjieNoCharsError:
++ self.play_error_bell()
++ return True
+
+ if self.lookuptable.get_number_of_candidates():
+ self.do_select_candidate(1)
+@@ -394,9 +399,16 @@ class Engine(IBus.Engine):
+ else:
+ chars = self.cangjie.get_characters_by_shortcode(code)
+
++ # Finding an element in a dict is **much** faster than in a list
++ seen = {}
++
+ for c in sorted(chars, key=attrgetter("frequency"), reverse=True):
++ if c.chchar in seen:
++ continue
++
+ self.lookuptable.append_candidate(IBus.Text.new_from_string(c.chchar))
+ num_candidates += 1
++ seen[c.chchar] = True
+
+ if num_candidates == 1:
+ self.do_select_candidate(1)
+@@ -421,6 +433,20 @@ class Engine(IBus.Engine):
+ text = IBus.Text.new_from_string(self.current_radicals)
+ super(Engine, self).update_auxiliary_text(text, len(self.current_radicals)>0)
+
++ # We don't use pre-edit at all for Cangjie or Quick
++ #
++ # However, some applications (most notably Firefox) fail to correctly
++ # position the candidate popup, as if they got confused by the absence
++ # of a pre-edit text. :(
++ #
++ # This is a horrible hack, but it fixes the immediate problem.
++ if self.current_radicals:
++ super(Engine, self).update_preedit_text(IBus.Text.new_from_string('\u200B'), 0, True)
++
++ else:
++ super(Engine, self).update_preedit_text(IBus.Text.new_from_string(''), 0, False)
++ # End of the horrible workaround
++
+ def update_lookup_table(self):
+ """Update the lookup table."""
+ if not self.current_input:
+--- ibus-cangjie-2.2.orig/src/setup.py
++++ ibus-cangjie-2.2/src/setup.py
+@@ -99,6 +99,9 @@ class Setup(object):
+ We need to react, in case the value was changed from somewhere else,
+ for example from another setup UI.
+ """
++ if key == "halfwidth-chars":
++ return
++
+ if key == "version":
+ new_value = self.settings.get_int(key)
+
+--- ibus-cangjie-2.2.orig/tests/run_tests.in
++++ ibus-cangjie-2.2/tests/run_tests.in
+@@ -47,6 +47,12 @@ class MockEngine:
+ # We don't need anything here for the unit tests
+ pass
+
++ def update_preedit_text(self, text, cursor_pos, visible):
++ # We don't need anything here for the unit tests
++ #
++ # We only have this for an ugly workaround.
++ pass
++
+
+ class MockLookupTable:
+ def __init__(self):
diff -Nru ibus-cangjie-2.2/debian/patches/series ibus-cangjie-2.2/debian/patches/series
--- ibus-cangjie-2.2/debian/patches/series 2015-05-11 01:13:01.000000000 +0800
+++ ibus-cangjie-2.2/debian/patches/series 2015-05-12 23:15:18.000000000 +0800
@@ -1 +1,2 @@
0001-install-engine-to-correct-dir.diff
+0002-backport-2.4-bugfix.patch
Attachment:
signature.asc
Description: Digital signature