[keyboard] Re-jig translation extraction

- Use classes to prompt lupdate to extract with a better
  context (e.g. the class name, rather than plain "QObject")
  so that the translation-lookup can use the named context.
- Add hard-coded "default" variant
- Add totally bogus Tajik translations, for testing purposes
This commit is contained in:
Adriaan de Groot 2020-11-01 13:46:32 +01:00
parent 1a5fa36fb6
commit f088efdf84
7 changed files with 4379 additions and 4323 deletions

View file

@ -20,6 +20,18 @@
static QTranslator* s_kbtranslator = nullptr;
void
retranslateKeyboardModels()
{
cqDeleter< QTranslator > d{ s_kbtranslator };
if ( !s_kbtranslator )
{
s_kbtranslator = new QTranslator;
}
d.preserve = CalamaresUtils::loadTranslator( QLocale(), QStringLiteral("kb_"), s_kbtranslator );
}
XKBListModel::XKBListModel( QObject* parent )
: QAbstractListModel( parent )
{