The translation happens whenever this code is run, which may
not match the language the user subsequently selects.
It also causes general problems with the translation,
since we end up with a possibly-partly-translated name.
This lands Artem's work on supporting non-ASCII layouts better,
which currently only applies to Russian layouts -- it works with
a table, so it is easy to extend for other layouts.
The QML and Widget steps now completely share the Config backend,
which is why there's so many commits here: the Widget page needed
to have most of its code ripped out, and the models for
keyboard data were broken in various ways and needed fixing.
FIXES#1211
- With debugging and untangling done, the lambdas are simple
and short, so return to using them. One point of improvement
might be to give the models suitable slots themselves,
to avoid even this indirection.
- Use the just-refactored XKBListModel to store the xkb key-value
pairs for variants, drop most of the complicated implementation,
store just a single list of values.
- Remove code that is duplicated in Config.
- Hook up UI for physical keyboard model, and back.
- For now, introduce some named slots with debugging output.
This makes debugging a lot easier since we have function names
to work with rather than anonymous lambdas
- Config already *has* everythind, but drop the useless copies
and duplicated code from the Page
- Plug the models model into the Page
- While here, document the model / layout / variant distinctions
The code doesn't fill the UI properly, and the drop-down
for the models combobox is not right, but at least the data
is shared.