Diffusion KWin a3be3e8e80b6

Translate the layout name when passing to layout change OSD

Authored by graesslin on Jan 22 2017, 10:55 AM.

Description

Translate the layout name when passing to layout change OSD

Summary:
Xkbcommon does not localize the layout names. We always get the US
English variant. KWin so far passed the strings from xkbcommon directly
to UI visible parts such as the Plasma OSD. This results in not
translated elements in our UI.

As I figured out today the translations exist in the domain
xkeyboard-config. Passing the strings from xkbcommon through this domain
gives us translated layouts.

Unfortunately the xkeyboard-config is not installed by default on all
distributions. E.g. on ubuntu/neon one needs to install xkb-data-i18n
to have the translations available.

Test Plan: Untested as I fail to start Plasma/5.8 KWin on my dev system

Reviewers: KWin, Plasma

Subscribers: plasma-devel, kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D4243