Bug 35709 - check keymap setting in basic settings
check keymap setting in basic settings
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Basic settings
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0
Assigned To: Alexander Kläser
Alexander Kramer
: interim-4
: 36347 36519 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-26 18:43 CEST by Felix Botner
Modified: 2014-11-26 06:55 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2014-08-26 18:43:08 CEST
see bug #35495 #35496

locale/keymap is deprecated, the installer only sets xorg/keyboard/options/XkbModel xorg/keyboard/options/XkbLayout xorg/keyboard/options/XkbVariant xorg/keyboard/options/XkbOptions

we should check is system-setup/basic settings/appliance mode still works without locale/keymap
Comment 1 Philipp Hahn univentionstaff 2014-08-27 10:59:53 CEST
See attachment #6033 [details] for a patch to remove the old locale/keymap code.
Comment 2 Stefan Gohmann univentionstaff 2014-10-30 10:22:09 CET
*** Bug 36347 has been marked as a duplicate of this bug. ***
Comment 3 Stefan Gohmann univentionstaff 2014-10-30 10:24:55 CET
As discussed, pleas apply the patch and give the bug back to me.
Comment 4 Philipp Hahn univentionstaff 2014-10-30 10:33:47 CET
r55129 | Bug #35709 base: Remove deprecated keyboard layout handling
Comment 5 Alexander Kläser univentionstaff 2014-10-31 14:13:17 CET
I added the missing dependency handling. I was wondering whether the empty entry for layout and variant is the correct way. If the first entry is the default one variant, the empty entry could be removed (as the first entry is selected automatically). What happens if an empty string is set?
It was just the dependency of variant to layout, correct?

univention-system-setup (8.1.37-1):
* Bug #35709: added missing widget dependencies for LanguagePage
Comment 6 Stefan Gohmann univentionstaff 2014-11-01 00:21:11 CET
Via UMC language settings the keyboard model, the layout and the variant is configurable. The appliance mode is similar to the debian installer selection.

In the debian installer mode system setup doesn't overwrite the selected keyboard setting.

(In reply to Alexander Kläser from comment #5)
> I added the missing dependency handling. I was wondering whether the empty

Thanks, that works fine.

> entry for layout and variant is the correct way. If the first entry is the
> default one variant, the empty entry could be removed (as the first entry is
> selected automatically). What happens if an empty string is set?

An empty value for the variant is allowed and the default.

> It was just the dependency of variant to layout, correct?

Yes.

> univention-system-setup (8.1.37-1):
> * Bug #35709: added missing widget dependencies for LanguagePage

Changelog: r55229
Comment 7 Alexander Kramer univentionstaff 2014-11-04 16:08:58 CET
OK - system-setup/basic and settings/appliance mode works without locale/keymap
OK - debian installer: sets the correct ucr variables
OK - update from ucs3.2-3 to 4.0-0 works fine - only the XkbOptions variable is missing, which we don't use
OK - changes in the language module are reflected in kde
Comment 8 Alexander Kläser univentionstaff 2014-11-06 14:19:54 CET
When choosing New York as city, the current code tries to set 'en' as keyboard layout which fails (should be 'us').
Comment 9 Alexander Kläser univentionstaff 2014-11-06 17:20:13 CET
(In reply to Alexander Kläser from comment #8)
> When choosing New York as city, the current code tries to set 'en' as
> keyboard layout which fails (should be 'us').

I fixed this and cleaned up obsolete code/removed unneeded data (see deb changelog below).

@QA: Please also check whether the keyboard layout is set correctly in the X-session. AFAIS this should be fine now.

univention-system-setup (8.1.52-1):
Bug #35709:
* fixed erroneous setting of keyboard layout for a chosen city
* use same data for setup/lang/countrycodes as for the city search
  (used as ComboBox in the certificate settings)
* removed obsolete methods setup/lang/{default_timezone,default_keymap}
* removed unneeded data from usr/share/univention-system-setup/locale/
* removed method util::_xkeymap() as the layout can now directly been set
  for the X-session in setup/keymap/save
* removed unneeded code in the city-data scripts
Comment 10 Alexander Kramer univentionstaff 2014-11-07 10:23:35 CET
Checked a bunch of cities and found some more without a defined keyboard layout.
I don't know if we want to support them all, but i think australian cities should also work (see piwik)

Here some of the cities without a defined keyboard-layout. Just to get an idea:
Kairo, Pago Pago, The Valley, Algier, Luanda, Buenos Aires, Syndey, Hamilton, ...

And all canadian cities got a french keyboard layout (e.g. Vancouver) I am not sure if this is right.
Also i got an error by picking New Dehli, because the system setup was not able to display the charactars. 


> @QA: Please also check whether the keyboard layout is set correctly in the
> X-session. AFAIS this should be fine now.

Works fine. Tested it for german, english and french
Comment 11 Alexander Kläser univentionstaff 2014-11-07 14:02:07 CET
(In reply to Alexander Kramer from comment #10)
> Checked a bunch of cities and found some more without a defined keyboard
> layout.
> I don't know if we want to support them all, but i think australian cities
> should also work (see piwik)
> 
> Here some of the cities without a defined keyboard-layout. Just to get an
> idea:
> Kairo, Pago Pago, The Valley, Algier, Luanda, Buenos Aires, Syndey,
> Hamilton, ...

Good catch!

In /usr/share/X11/xkb/rules/base.xml there exist also entries for Arabic and Spanish (Latin America) which come with a list of country codes. I used this additional information, thus Arabic and Latin American countries should work now.

Australia is not in the base.xml file :/ . As a fallback, the default language of the country is now matched. This results in British English keyboard layout for Australia which should be fine.

> And all canadian cities got a french keyboard layout (e.g. Vancouver) I am
> not sure if this is right.

C'est frai? This information is stored exactly like this in base.xml. I left it as it is for now, in hope that the information in base.xml gets updated at some point.

> Also i got an error by picking New Dehli, because the system setup was not
> able to display the charactars. 

As discussed, this might a problem with our font which does not support Unicode. Apart from that I see no problem, as I do not know that keyboard layout.

> > @QA: Please also check whether the keyboard layout is set correctly in the
> > X-session. AFAIS this should be fine now.
> 
> Works fine. Tested it for german, english and french

Très bien!

It was actually easy to localize the keyboard layouts and variants, as .mo files already ship with the package xkb-data :) .

univention-system-setup (8.1.54-1):
Bug #35709:
* try to match language to determine the keyboard layout if the itself
  cannot be matched
* add translations to keyboard information
Comment 12 Alexander Kläser univentionstaff 2014-11-07 14:47:27 CET
*** Bug 36519 has been marked as a duplicate of this bug. ***
Comment 13 Alexander Kramer univentionstaff 2014-11-12 15:48:51 CET
Works great. But one little thing: There is a typo for spanish, it says spabish instead ;)
Comment 14 Alexander Kläser univentionstaff 2014-11-13 11:19:34 CET
(In reply to Alexander Kramer from comment #13)
> Works great. But one little thing: There is a typo for spanish, it says
> spabish instead ;)

I saw this, as well! However, this is a bug in the translation files of xkb-data. I created Bug 36626 for that.
Comment 15 Alexander Kramer univentionstaff 2014-11-17 08:04:02 CET
OK - Still works great!
Comment 16 Stefan Gohmann univentionstaff 2014-11-26 06:55:35 CET
UCS 4.0-0 has been released:
 http://docs.univention.de/release-notes-4.0-0-en.html
 http://docs.univention.de/release-notes-4.0-0-de.html

If this error occurs again, please use "Clone This Bug".