Bug 92344

Summary: French keyboard for Togolese local languages
Product: xkeyboard-config Reporter: Mats Blakstad <mats.gbproject>
Component: GeneralAssignee: xkb
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: mats.gbproject
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: New 'tg' (Togo) file for symbols
French Togo rules
Reviewed 'tg' (Togo) file for symbols

Description Mats Blakstad 2015-10-08 08:31:05 UTC
Created attachment 118756 [details]
New 'tg' (Togo) file for symbols

This keyboard is based on French basic keyboard (See Bug 92341) that is normally used in Togo. The layout add symbols used to write different local languages in Togo.

There are 2 issues that I'm not able to solve:

1. Why are dead keys not working with the local languages symbols? Example:
<dead_acute> <o> = ó
<dead_acute> <ɛ> !=  ɛ́

How can I fix this?

2. My second question is if it is possible to combine dead keys? Like
<dead_acute> <dead_tilde> <ɔ> = ɔ̃́
Because some of the languages combine tone marks on the letters
Comment 1 Mats Blakstad 2015-10-08 08:34:19 UTC
Created attachment 118757 [details] [review]
French Togo rules

Adding rules patch too
Comment 2 Andreas Wettstein 2015-10-08 09:23:57 UTC
> 1. Why are dead keys not working with the local languages symbols? Example:
> <dead_acute> <o> = ó
> <dead_acute> <ɛ> !=  ɛ́

These compose sequences are not yet known, you have to add them.  For the compose sequences in libX11, it looks like this:

<dead_acute> <U025B>                    : "ɛ́"

For testing, you can put the new sequences in a personal ~/.XCompose file.  You have to make sure that they are used, too; by default, Gtk and Qt applications do not use the libX11 compose sequences.  You can change that by setting the environment variables,

GTK_IM_MODULE=xim
QT_IM_MODULE=xim

The libX11 repository is here: http://cgit.freedesktop.org/xorg/lib/libX11
The files where compose sequences are added is nls/en_US.UTF-8/Compose.pre.
Note that compose sequences do not belong to XKB.  I think the best is to send your patch for the compose sequences directly to the xorg-devel mailing list.

For Gtk and Qt, I do not know the location and procedure to submit proposals for new sequences.

> 2. My second question is if it is possible to combine dead keys? Like
> <dead_acute> <dead_tilde> <ɔ> = ɔ̃́

Yes, this is possible:

<dead_acute> <dead_tilde> <U0255>       : "ɔ̃́"
Comment 3 Mats Blakstad 2015-10-10 02:24:47 UTC
Thanks a lot for info!

Does it mean that the keyboard can be added to XKB independently of the compose sequences?

I'll soon upload an updated patch with some small modifications. Does the rest look okay?

> The files where compose sequences are added is nls/en_US.UTF-8/Compose.pre.

I will try upload a patch both there and GTK/QT to make it work... but why inside 'en_US' in libX11? Will that not be mostly for people from the US?
Comment 4 Andreas Wettstein 2015-10-19 19:10:10 UTC
(In reply to Mats Blakstad from comment #3)

> Does it mean that the keyboard can be added to XKB independently of the
> compose sequences?

Yes.

> I'll soon upload an updated patch with some small modifications. Does the
> rest look okay?

I noticed some missing underscores in the rules.  I also wonder about the override for AD03.  I do not think you need it.
 
> I will try upload a patch both there and GTK/QT to make it work... but why
> inside 'en_US' in libX11? Will that not be mostly for people from the US?

Many countries use the en_US file.  I guess this is determined by nls/locale.dir.pre.  While the required dead keys and letters depend strongly on the language, the actual dead key sequences do so much less.  Of course, not all languages need all sequences, but surplus sequences hurt only little.  Therefore, many languages can share the same compose file.
Comment 5 Mats Blakstad 2015-10-20 06:44:05 UTC
> I noticed some missing underscores in the rules.

Where?

> Therefore, many languages can share the same compose file.

Sure I agree! Just not very intuitive to know that everyone share 'en_US' :)

By the way, I fount out that Gtk update their compose sequences sporadically from exactly Xorg and en_US.UTF-8:
https://bugzilla.gnome.org/show_bug.cgi?id=756331
https://git.gnome.org/browse/gtk+/tree/gtk/gtkimcontextsimpleseqs.h#n18
Comment 6 Andreas Wettstein 2015-10-22 05:03:56 UTC
Comment on attachment 118757 [details] [review]
French Togo rules

Review of attachment 118757 [details] [review]:
-----------------------------------------------------------------

The tags in the desciption and shortDescripiton should begin with an underscore.
Comment 7 Sergey V. Udaltsov 2015-12-14 00:25:22 UTC
Thanks, commmitted. The missing underscores found. Also, ISO639 code is fixed to be just 'fr'
Comment 8 Mats Blakstad 2016-01-11 00:31:44 UTC
Created attachment 120941 [details]
Reviewed 'tg' (Togo) file for symbols

We've continued to work on the keyboard, I didn't get any notifications with updates about this issue!

Can you use this last version that I've uploaded now? The euro sign is moved back to same place as French version to keep the keyboards aligned, and some few other small adjustments.

It would be great if you can make sure that I'm notified about changes on this issue!

> ISO639 code is fixed to be just 'fr'

Can we add several language codes here? The keyboard is made to work for several languages, we can add the codes for all of them.
Comment 9 Mats Blakstad 2016-01-11 03:22:44 UTC
I also need to check up one more detail, would be great if you can confirm that we can update the keyboard.
Comment 10 Mats Blakstad 2016-01-11 04:48:45 UTC
I also started issue to add the composers needed for this keyboard here:
https://bugs.freedesktop.org/show_bug.cgi?id=93660
Comment 11 Sergey V. Udaltsov 2016-01-14 00:46:20 UTC
I am sorry, I do not know about any way to notify about changes in git, for particular file. You can get notifications from xkb maillist though.

Your new version is committed to git, thanks for contribution.

Regarding the ISO codes - yes, you can add several of them, there are examples in base.xml
Comment 12 Mats Blakstad 2016-03-17 23:39:10 UTC
Can I only use ISO-codes or is it possible to add language subtags from IANA Language Subtag Registry?
http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
Comment 13 Sergey V. Udaltsov 2016-04-03 23:39:50 UTC
(In reply to Mats Blakstad from comment #12)
> Can I only use ISO-codes or is it possible to add language subtags from IANA
> Language Subtag Registry?
> http://www.iana.org/assignments/language-subtag-registry/language-subtag-
> registry

I am afraid, we are using only ISO codes - so that GUI tools could easily lookup them (with localized descriptions).
Comment 14 Mats Blakstad 2017-04-08 19:54:27 UTC
Okay, I've added patch to update language codes here;
https://bugs.freedesktop.org/show_bug.cgi?id=100623

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.