Bug 1013651

Summary: fi_FI compose keys not working with ibus
Product: [Fedora] Fedora Reporter: Marko Myllynen <myllynen>
Component: ibusAssignee: fujiwara <tfujiwar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: i18n-bugs, mfabian, myllynen, shawn.p.huang, tfujiwar, tiagomatos
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ibus-1.5.5-1.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1051431 (view as bug list) Environment:
Last Closed: 2014-01-17 05:43:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1051431    
Attachments:
Description Flags
Patch for engine/main.vala
none
Patch for engine/main.vala none

Description Marko Myllynen 2013-09-30 14:09:43 UTC
Description of problem as discussed on IRC:

With F18 and later setting LC_CTYPE=fi_FI.UTF-8 does not make /usr/share/X11/locale/fi_FI.UTF-8/Compose keys to work, one needs to set also XMODIFIERS=@im=none as ibus has special casing only for pt_BR.UTF-8 currently.

ibus should handle also other relevant compose maps in addition to pt_BR.UTF-8. The list of compose file which really differ from en_US.UTF-8 is:

/usr/share/X11/locale/am_ET.UTF-8/Compose
/usr/share/X11/locale/el_GR.UTF-8/Compose
/usr/share/X11/locale/fi_FI.UTF-8/Compose
/usr/share/X11/locale/pt_BR.UTF-8/Compose

Version-Release number of selected component (if applicable):
ibus-1.5.4-1.fc20

Additional info:
The quick test to see whether fi_FI compose keys work is that with LC_CTYPE=fi_FI.UTF-8 dead_acute + space should produce acute (not apostrophe as with en_US.UTF-8).

Comment 1 Marko Myllynen 2013-09-30 14:24:51 UTC
Note that /etc/X11/xinit/xinitrc.d/50-xinput.sh defines:

_xcompose_language_list="am_ET el_GR fi_FI pt_BR ru_RU"

Comment 2 fujiwara 2013-10-03 04:36:25 UTC
(In reply to Marko Myllynen from comment #0)

I compared en_US.UTF-8/Compose and fi_FI.UTF-8/Compose and it seems only '<dead_acute> <space>' is different and others are same.

Comment 3 Marko Myllynen 2013-10-03 04:44:10 UTC
(In reply to fujiwara from comment #2)
> I compared en_US.UTF-8/Compose and fi_FI.UTF-8/Compose and it seems only
> '<dead_acute> <space>' is different and others are same.

That should pretty much be the case nowadays, some time ago the mappings which were only in fi_FI.UTF-8 were added to en_US.UTF-8:

http://cgit.freedesktop.org/xorg/lib/libX11/commit/nls/en_US.UTF-8/Compose.pre?id=9b8d8c9e5b27273e8856a3851ba9b68022bed3cd

Thanks.

Comment 4 fujiwara 2013-10-04 04:46:05 UTC
(In reply to Marko Myllynen from comment #3)
> http://cgit.freedesktop.org/xorg/lib/libX11/commit/nls/en_US.UTF-8/Compose.
> pre?id=9b8d8c9e5b27273e8856a3851ba9b68022bed3cd

OK, thank you for the link and then we need to fix en_US.UTF-8.
ibus en_US.UTF-8 was copied from GTK+ one and it seems it's old.

Now I created the patch of en_US.UTF-8 and fi_FI.UTF-8 but others are not yet.

I'm a bit tired to convert the data and probably it's better to fix this in post f20 since the change is big and the f20 beta is coming.
Probably it's also better for me to fix the fi problem when running apps with GTK_IM_MODULE=gtk-im-context-simple .

Comment 5 fujiwara 2013-10-04 05:27:21 UTC
Created attachment 807400 [details]
Patch for engine/main.vala

Attached the ongoing patch at the moment.

Comment 6 Marko Myllynen 2013-10-04 09:47:08 UTC
(In reply to fujiwara from comment #4)
> OK, thank you for the link and then we need to fix en_US.UTF-8.
> ibus en_US.UTF-8 was copied from GTK+ one and it seems it's old.
> 
> I'm a bit tired to convert the data and probably it's better to fix this in
> post f20 since the change is big and the f20 beta is coming.

No prob - just one additional data point (which you probably already noticed) that when looking at the changelog for en_US.UTF-8/Compose.pre it looks like a yearly update or so might be warranted:

http://cgit.freedesktop.org/xorg/lib/libX11/log/nls/en_US.UTF-8/Compose.pre

Thanks.

Comment 7 fujiwara 2013-10-04 10:03:14 UTC
(In reply to Marko Myllynen from comment #6)
> http://cgit.freedesktop.org/xorg/lib/libX11/log/nls/en_US.UTF-8/Compose.pre

Yes, my patch was generated with that file by compose-parse.py :
https://git.gnome.org/browse/gtk+/tree/gtk/compose-parse.py#n24

The script referred the old pointer and I changed it to your link yesterday.

--- gtk+-3.9.8/gtk/compose-parse.py.orig
+++ gtk+-3.9.8/gtk/compose-parse.py
@@ -21,8 +21,8 @@
 import getopt
 
 # We grab files off the web, left and right.
-URL_COMPOSE = 'http://gitweb.freedesktop.org/?p=xorg/lib/libX11.git;a=blob_plain;f=nls/en_US.UTF-8/Compose.pre'
-URL_KEYSYMSTXT = "http://www.cl.cam.ac.uk/~mgk25/ucs/keysyms.txt"
+URL_COMPOSE = 'http://cgit.freedesktop.org/xorg/lib/libX11/plain/nls/en_US.UTF-8/Compose.pre'
+URL_KEYSYMSTXT = "https://raw.github.com/substack/node-keysym/master/data/keysyms.txt"
 URL_GDKKEYSYMSH = "http://git.gnome.org/browse/gtk%2B/plain/gdk/gdkkeysyms.h"
 URL_UNICODEDATATXT = 'http://www.unicode.org/Public/6.0.0/ucd/UnicodeData.txt'
 FILENAME_COMPOSE_SUPPLEMENTARY = 'gtk-compose-lookaside.txt'

Comment 8 fujiwara 2013-10-07 08:27:05 UTC
Created attachment 808759 [details]
Patch for engine/main.vala

OK, now I finished to generate the candidate patch.
I commented out am_ET Compose file until get the actual request because it uses ASCII key at first but not compose keys.

Comment 9 fujiwara 2013-10-08 03:34:25 UTC
I created the test rpms:
http://fujiwara.fedorapeople.org/ibus/20131008/6034085/

Could you try the packages?


Please note I fix ibus only but not gtk-im-context-simple .

If you use GNOME, need to add some input methods with 'gnome-control-center region' command and then GNOME will launch ibus-daemon. You could refer 'ps' command.
(You don't have to use input method engines actually but need to list the engines on panel icon to enable IBus on GNOME.)

If you use non-GNOME, ibus can be enabled by im-chooser command and you need to install some XKB layout engines with ibus-setup command.

Comment 10 Jens Petersen 2013-10-09 03:02:50 UTC
BTW if you're not using gnome-shell what you probably want
to do is use im-chooser to switch to XIM input, which supports
locale compose.  We really need to add locale compose also
to the gtk simple immodule.

Comment 11 Mike FABIAN 2013-10-09 07:10:20 UTC
I tested the packages from comment#9 on Fedora 20 Beta TC1 and they
work fine.

Comment 12 Marko Myllynen 2013-10-09 07:53:30 UTC
(In reply to fujiwara from comment #9)
> I created the test rpms:
> http://fujiwara.fedorapeople.org/ibus/20131008/6034085/
> 
> Could you try the packages?
> 
> Please note I fix ibus only but not gtk-im-context-simple .
> 
> If you use GNOME, need to add some input methods with 'gnome-control-center
> region' command and then GNOME will launch ibus-daemon. You could refer 'ps'
> command.
> (You don't have to use input method engines actually but need to list the
> engines on panel icon to enable IBus on GNOME.)

I updated the packages, rebooted, logged in via GDM, launched gnome-terminal under gnome-shell and confirmed that LC_CTYPE is fi_FI.UTF-8. Then I added with 'gnome-control-center region' Finnish and French as Input Sources. fi is in use and 'ps -ef | grep ibus' shows ibus running. However, the simple test dead_acute + space still produces apostrophe not acute as expected.

Please let me know if there was a hickup in my testing procedure.

Thanks.

Comment 13 Marko Myllynen 2013-10-09 09:21:28 UTC
> Please let me know if there was a hickup in my testing procedure.

After some IRC discussion it turned out that I needed to add English (English AG (Hunspell)) as an Input Source then ibus is enabled and the test packages work as expected. So from ibus point of view the issue is solved.

Thanks.

Comment 14 fujiwara 2013-10-10 02:57:27 UTC
(In reply to Marko Myllynen from comment #13)
> After some IRC discussion it turned out that I needed to add English
> (English AG (Hunspell)) as an Input Source then ibus is enabled and the test
> packages work as expected. So from ibus point of view the issue is solved.

Thank you for the test.
Now I'm working on both ibus and gtk.

Comment 15 fujiwara 2013-11-01 08:17:45 UTC
The patch is upstreamed:
https://github.com/ibus/ibus/commit/e64b25c0ab8fadeae97fe78dcfcbc3a5d0869c6b

Regarding to GTK+, I filed a bug:
https://bugzilla.gnome.org/show_bug.cgi?id=710510

Comment 16 fujiwara 2014-01-07 08:48:17 UTC
Now en-us copmose keys are updated in GTK+:
https://bugzilla.gnome.org/show_bug.cgi?id=710510

I filed the compose keys for locales in GTK+:
https://bugzilla.gnome.org/show_bug.cgi?id=721120

Comment 17 fujiwara 2014-01-14 08:17:26 UTC
I fixed ibus side in this bug.
gtk bug is filed in comment 16.

Comment 18 Fedora Update System 2014-01-14 08:22:19 UTC
ibus-1.5.5-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ibus-1.5.5-1.fc20

Comment 19 Fedora Update System 2014-01-14 08:22:46 UTC
ibus-1.5.5-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/ibus-1.5.5-1.fc19

Comment 20 Fedora Update System 2014-01-15 06:08:22 UTC
Package ibus-1.5.5-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ibus-1.5.5-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0847/ibus-1.5.5-1.fc19
then log in and leave karma (feedback).

Comment 21 Fedora Update System 2014-01-17 05:43:20 UTC
ibus-1.5.5-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2014-01-30 03:37:49 UTC
ibus-1.5.5-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.