[ibus-table/f17] Resolves: #845798
Mike FABIAN
mfabian at fedoraproject.org
Wed Sep 5 11:46:03 UTC 2012
commit 2be11093ef354e9ab07eea0163cf1971b37aa0ee
Author: Mike FABIAN <mfabian at redhat.com>
Date: Wed Sep 5 10:16:53 2012 +0200
Resolves: #845798
- add ibus-table-1.3.9.20110827-add-some-keys-for-translit.patch (from Yuwei YU, upstream)
- add ibus-table-1.3.9.20110827-enable-non-ascii.patch (from Yuwei YU, upstream)
- add ibus-table-1.3.9.20110827-uppercase-umlauts.patch to allow uppercase as well in translit
...1.3.9.20110827-add-some-keys-for-translit.patch | 55 ++++++++++++++++++++
ibus-table-1.3.9.20110827-enable-non-ascii.patch | 20 +++++++
ibus-table-1.3.9.20110827-uppercase-umlauts.patch | 16 ++++++
ibus-table.spec | 14 +++++-
4 files changed, 104 insertions(+), 1 deletions(-)
---
diff --git a/ibus-table-1.3.9.20110827-add-some-keys-for-translit.patch b/ibus-table-1.3.9.20110827-add-some-keys-for-translit.patch
new file mode 100644
index 0000000..0d0a16c
--- /dev/null
+++ b/ibus-table-1.3.9.20110827-add-some-keys-for-translit.patch
@@ -0,0 +1,55 @@
+commit 24596c02c86a0453c59485f8b0031279803f1581
+Author: Yuwei Yu <acevery at gmail.com>
+Date: Sun Oct 2 11:53:53 2011 +0800
+
+ add some key for translit; fix #1318
+
+diff --git a/engine/tabcreatedb.py b/engine/tabcreatedb.py
+index e683c41..5b4a359 100644
+--- a/engine/tabcreatedb.py
++++ b/engine/tabcreatedb.py
+@@ -124,10 +124,10 @@ def main ():
+ _gouci = []
+ patt_com = re.compile(r'^###.*')
+ patt_blank = re.compile(r'^[ \t]*$')
+- patt_conf = re.compile(r'.*=.*')
+- patt_table = re.compile(r' *([^\s]+) *\t *([^\s]+)\t *[^\s]+ *')
+- patt_gouci = re.compile(r' *[^\s]+ *\t *[^\s]+ *')
+- patt_s = re.compile(r' *([^\s]+) *\t *([\x00-\xff]{3}) *\t *[^\s]+ *')
++ patt_conf = re.compile(r'[^\t]*=[^\t]*')
++ patt_table = re.compile(r' *([^\s]+) *\t *([^\s]+)\t *[^\s]+ *$')
++ patt_gouci = re.compile(r' *[^\s]+ *\t *[^\s]+ *$')
++ patt_s = re.compile(r' *([^\s]+) *\t *([\x00-\xff]{3}) *\t *[^\s]+ *$')
+
+ for l in f:
+ if ( not patt_com.match(l) ) and ( not patt_blank.match(l) ):
+diff --git a/engine/tabdict.py b/engine/tabdict.py
+index 368734d..8650fe4 100644
+--- a/engine/tabdict.py
++++ b/engine/tabdict.py
+@@ -25,6 +25,12 @@ import sys
+ reload (sys)
+ sys.setdefaultencoding('utf-8')
+
++def gen_uni(the_string):
++ """
++ call unicode to convert utf-8 to unicode in py, just for convenience.
++ """
++ return unicode(the_string, 'utf-8')
++
+ tab_dict = {
+ '0':0,
+ 'a':1, 'b':2, 'c':3, 'd':4, 'e':5,
+@@ -45,7 +51,11 @@ tab_dict = {
+ 'R':76, 'S':77, 'T':78, 'U':79, 'V':80,
+ 'W':81, 'X':82, 'Y':83, 'Z':84, '0':85,
+ '1':86, '2':87, '3':88, '4':89, '5':90,
+- '6':91, '7':92, '8':93, '9':94
++ '6':91, '7':92, '8':93, '9':94,
++ # for translit
++ gen_uni('ä'):95,
++ gen_uni('ö'):96,
++ gen_uni('ü'):97
+ }
+
+ tab_key_list = tab_dict.keys()
diff --git a/ibus-table-1.3.9.20110827-enable-non-ascii.patch b/ibus-table-1.3.9.20110827-enable-non-ascii.patch
new file mode 100644
index 0000000..703df0e
--- /dev/null
+++ b/ibus-table-1.3.9.20110827-enable-non-ascii.patch
@@ -0,0 +1,20 @@
+commit 50692ab9599c3845bc9f29cb0516ee78b6b0eda0
+Author: Yuwei Yu <acevery at gmail.com>
+Date: Wed Sep 5 01:22:55 2012 +0800
+
+ fix non-ASCII input key bug
+
+diff --git a/engine/table.py b/engine/table.py
+index d5ec15f..356a7e5 100644
+--- a/engine/table.py
++++ b/engine/table.py
+@@ -1367,7 +1367,8 @@ class tabengine (ibus.EngineBase):
+ if ascii.isdigit (key.code):
+ self.commit_string (cond_letter_translate (unichr (key.code)))
+ return True
+- elif key.code > 127 and (not self._editor._py_mode):
++ elif key.code > 127 and ( unichr(key.code) not in self._valid_input_chars ) \
++ and(not self._editor._py_mode):
+ return False
+
+ if key.code == keysyms.Escape:
diff --git a/ibus-table-1.3.9.20110827-uppercase-umlauts.patch b/ibus-table-1.3.9.20110827-uppercase-umlauts.patch
new file mode 100644
index 0000000..6f542d5
--- /dev/null
+++ b/ibus-table-1.3.9.20110827-uppercase-umlauts.patch
@@ -0,0 +1,16 @@
+diff -ru ibus-table-1.3.9.20120904.orig/engine/tabdict.py ibus-table-1.3.9.20120904/engine/tabdict.py
+--- ibus-table-1.3.9.20120904.orig/engine/tabdict.py 2012-09-03 16:51:59.000000000 +0200
++++ ibus-table-1.3.9.20120904/engine/tabdict.py 2012-09-04 14:50:32.186626109 +0200
+@@ -54,7 +54,10 @@
+ # for translit
+ gen_uni('ä'):95,
+ gen_uni('ö'):96,
+- gen_uni('ü'):97
++ gen_uni('ü'):97,
++ gen_uni('Ä'):98,
++ gen_uni('Ö'):99,
++ gen_uni('Ü'):100
+ }
+
+ tab_key_list = tab_dict.keys()
+ibus-table-1.3.9.20120904/engineだけに発見: tabdict.py.~1~
diff --git a/ibus-table.spec b/ibus-table.spec
index c76b9f2..457a320 100644
--- a/ibus-table.spec
+++ b/ibus-table.spec
@@ -1,11 +1,14 @@
Name: ibus-table
Version: 1.3.9.20110827
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The Table engine for IBus platform
License: LGPLv2+
Group: System Environment/Libraries
URL: http://code.google.com/p/ibus/
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
+Patch0: ibus-table-1.3.9.20110827-add-some-keys-for-translit.patch
+Patch1: ibus-table-1.3.9.20110827-uppercase-umlauts.patch
+Patch2: ibus-table-1.3.9.20110827-enable-non-ascii.patch
Requires: ibus > 1.3.0
BuildRequires: ibus-devel > 1.3.0
@@ -28,6 +31,9 @@ Development files for %{name}.
%prep
%setup -q
+%patch0 -p1 -b .add-some-keys-for-translit
+%patch1 -p1 -b .uppercase-umlauts
+%patch2 -p1 -b .enable-non-ascii
%build
%configure --disable-static --disable-additional
@@ -98,6 +104,12 @@ Development files for %{name}.
%{_datadir}/pkgconfig/%{name}.pc
%changelog
+* Wed Sep 05 2012 Mike FABIAN <mfabian at redhat.com> - 1.3.9.20110827-4
+- Resolves: #845798
+- add ibus-table-1.3.9.20110827-add-some-keys-for-translit.patch (from Yuwei YU, upstream)
+- add ibus-table-1.3.9.20110827-enable-non-ascii.patch (from Yuwei YU, upstream)
+- add ibus-table-1.3.9.20110827-uppercase-umlauts.patch to allow uppercase as well in translit
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.9.20110827-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list