Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keyboard layout descriptions: more liberal language name check
Checking whether the layout+variant description from evdev starts with the exact ISO-ified name of the language or country with which it's associated is rather too strict. See things like the official ISO name of Iran - "Iran, Islamic Republic of" - or the ISO name of modern Greek - "Greek, Modern (1453-)" - or Berber - "Berber languages". These cases mean our layout list winds up with entries like "Greek, Modern (1453-) (Greek)" in it. Avoid that with a more liberal check. Once we have our 'lang' string, take the first word of it, strip any trailing commas and semi-colons, then check if that word is in the evdev description, and if so, don't prepend the lang string. Signed-off-by: Adam Williamson <[email protected]>
- Loading branch information