Bug 854539 - translit table gives KeyError
translit table gives KeyError
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: ibus-table (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Mike FABIAN
Fedora Extras Quality Assurance
:
Depends On: 845798
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-05 05:53 EDT by Mike FABIAN
Modified: 2012-11-28 06:54 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 845798
Environment:
Last Closed: 2012-11-28 06:54:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike FABIAN 2012-09-05 05:53:13 EDT
+++ This bug was initially created as a clone of Bug #845798 +++

Description of problem:
Though translit table is not failing build, it does throw a KeyError

ö is not in tab_dict
Traceback (most recent call last):
  File "/usr/share/ibus-table/engine/tabdict.py", line 62, in __init__
    self._key_id = tab_dict[xm_key]
KeyError: u'\xf6'
ä is not in tab_dict
Traceback (most recent call last):
  File "/usr/share/ibus-table/engine/tabdict.py", line 62, in __init__
    self._key_id = tab_dict[xm_key]
KeyError: u'\xe4'
ü is not in tab_dict
Traceback (most recent call last):
  File "/usr/share/ibus-table/engine/tabdict.py", line 62, in __init__
    self._key_id = tab_dict[xm_key]
KeyError: u'\xfc'


Version-Release number of selected component (if applicable):
ibus-table-others-1.3.0.20100907-6.fc15.noarch

How reproducible:
always

Steps to Reproduce:
1./bin/ibus-table-createdb  -n /usr/share/ibus-table/tables/translit.db -s translit.txt
2.
3.
  
Actual results:
gives KeyError

Expected results:
should not give KeyError

Additional info:

--- Additional comment from mfabian@redhat.com on 2012-09-03 10:15:01 EDT ---

http://code.google.com/p/ibus/issues/detail?id=1030

--- Additional comment from mfabian@redhat.com on 2012-09-03 18:35:18 EDT ---

https://github.com/acevery/ibus-table/commit/24596c02c86a0453c59485f8b0031279803f1581

--- Additional comment from mfabian@redhat.com on 2012-09-04 11:25:43 EDT ---

I tried with the latest master from

https://github.com/maxiaojun/ibus-table.git

which has the patch mentioned in comment#2

and applied the follwing additional patch to ibus-table:

$ cat ibus-table-1.3.9.20110827-uppercase-umlauts.patch
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()

--- Additional comment from mfabian@redhat.com on 2012-09-04 11:27:16 EDT ---

Created attachment 609731 [details]
ibus-table-others-1.3.0.20100907-improve-translit.patch

Then I added the attached patch to ibus-table-others.

--- Additional comment from mfabian@redhat.com on 2012-09-04 11:30:26 EDT ---

After I did the stuff in comment#3 and comment#4, the translit table
in ibus-table-others builds without errors.

I can see that other additions I made to translit.txt are working,
for example I can type "YO" to get Ё, before my patch in comment#4 only "Yo"
inserted Ё, "YO" did not.

But the non-ASCII keys like äöüÄÖÜ still do *not* work.

--- Additional comment from mfabian@redhat.com on 2012-09-05 03:09:23 EDT ---

This patch to ibus-table makes the äöüÄÖÜ in the translit table work:

$ cat ibus-table-1.3.9.20110827-enable-non-ascii.patch
diff -ru ibus-table-1.3.9.20120904.orig/engine/table.py ibus-table-1.3.9.20120904/engine/table.py
--- ibus-table-1.3.9.20120904.orig/engine/table.py      2012-09-03 16:51:59.000000000 +0200
+++ ibus-table-1.3.9.20120904/engine/table.py   2012-09-05 08:46:51.676913255 +0200
@@ -1377,8 +1377,8 @@
                 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):
-                return False
+            #elif key.code > 127 and (not self._editor._py_mode):
+            #    return False
 
         if key.code == keysyms.Escape:
             self.reset ()
ibus-table-1.3.9.20120904/engineだけに発見: table.py.~1~

--- Additional comment from mfabian@redhat.com on 2012-09-05 03:19:14 EDT ---

Ah, Yuwei Yu already fixed it properly upstream yesterday:

https://github.com/acevery/ibus-table/commit/50692ab9599c3845bc9f29cb0516ee78b6b0eda0
Comment 1 Parag Nemade 2012-11-09 00:21:10 EST
Any updates here?
Comment 2 Mike FABIAN 2012-11-12 02:24:05 EST
It is fixed in our ibus-table package version >= 1.3.9.20110827-4

http://pkgs.fedoraproject.org/cgit/ibus-table.git/commit/?h=f17&id=2be11093ef354e9ab07eea0163cf1971b37aa0ee
Comment 3 Fedora Update System 2012-11-12 03:02:00 EST
ibus-table-1.4.99.20120907-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ibus-table-1.4.99.20120907-3.fc17
Comment 4 Fedora Update System 2012-11-12 20:00:21 EST
Package ibus-table-1.4.99.20120907-3.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ibus-table-1.4.99.20120907-3.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18073/ibus-table-1.4.99.20120907-3.fc17
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2012-11-13 07:50:56 EST
ibus-table-1.4.99.20121113-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ibus-table-1.4.99.20121113-1.fc17
Comment 6 Fedora Update System 2012-11-28 06:54:19 EST
ibus-table-1.4.99.20121113-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.