Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't prepend random language to keyboard layout names
As reported in https://bugzilla.redhat.com/show_bug.cgi?id=2250388 we often prepend an apparently-random language to the keyboard layout+variant description we get from evdev, with sometimes bizarre results. This happens when a layout+variant is associated with more than one language: we effectively pick just one of those languages at random to "care about", and if the evdev description for the layout+variant doesn't start with the name of that language, we prepend it. This gives bizarre results like the one reported in the bug - "French (English (intl., with AltGr dead keys))". To avoid this, let's just keep track of *all* the languages a layout+variant is associated with, and if there's more than one, we'll not try to do anything clever, we'll just use the evdev description. We'll only ever prepend a language or country name if a layout+variant is associated with only one language, or no languages and at least one country. Resolves: rhbz#2250388 Signed-off-by: Adam Williamson <[email protected]>
- Loading branch information