Enable keyboard-model and layout-name translations.

SEE #1515
This commit is contained in:
Adriaan de Groot 2020-11-04 23:36:33 +01:00
commit be7b63051e
18 changed files with 10290 additions and 19 deletions

View File

@ -31,6 +31,8 @@ This release contains contributions from (alphabetically by first name):
and usernames). (Thanks Artem)
- Various cleanups and documentation improvements in the *partition*
module, and configurable GPT name for swap. (Thanks Gaël)
- A long-standing bug related to GPT partition flags in the
*partition* module has been resolved. #1327 #1267
- The *users* module now has a more detailed way to specify
user groups -- which may be system groups rather than user-GIDs.
A new option in each group can require that the group already

View File

@ -92,9 +92,16 @@ done
# those are done separately.
_srcdirs="src/calamares src/libcalamares src/libcalamaresui src/modules src/qml"
$LUPDATE -no-obsolete $_srcdirs -ts lang/calamares_en.ts
# Updating the TZ only needs to happen when the TZ themselves are updated,
# very-very-rarely.
# Non-Transifex special-cases
#
# - timezone names can be translated, but that's 700+ strings I don't want
# to inflict on translators normally
# - keyboard layouts can be translated, but that's 767 strings
#
# For both of these, the language / translation only needs to be updated
# when the source data is updated, which is very very rarely.
# $LUPDATE -no-obsolete -extensions cxxtr src/libcalamares/locale -ts lang/tz_en.ts
# $LUPDATE -no-obsolete -extensions cxxtr src/modules/keyboard -ts lang/kb_en.ts
if test -n "$XMLLINT" ; then
TS_FILE="lang/calamares_en.ts"

4621
lang/kb_en.ts Normal file

File diff suppressed because it is too large Load Diff

4621
lang/kb_tg.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@ -42,7 +42,7 @@ set( calamares_i18n_qrc_content "" )
# calamares and qt language files
foreach( lang ${CALAMARES_TRANSLATION_LANGUAGES} )
foreach( tlsource "calamares_${lang}" "tz_${lang}" )
foreach( tlsource "calamares_${lang}" "tz_${lang}" "kb_${lang}" )
if( EXISTS "${CMAKE_SOURCE_DIR}/lang/${tlsource}.ts" )
set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}<file>${tlsource}.qm</file>\n" )
list( APPEND TS_FILES "${CMAKE_SOURCE_DIR}/lang/${tlsource}.ts" )

View File

@ -16,21 +16,29 @@
#include <type_traits>
/// @brief Convenience to zero out and deleteLater of any QObject-derived-class
/** @brief Convenience to zero out and deleteLater of any QObject-derived-class
*
* If, before destruction, preserve is set to @c true, then
* the object is "preserved", and not deleted at all.
*/
template < typename T >
struct cqDeleter
{
T*& p;
bool preserve = false;
~cqDeleter()
{
static_assert( std::is_base_of< QObject, T >::value, "Not a QObject-class" );
if ( !preserve )
{
if ( p )
{
p->deleteLater();
}
p = nullptr;
}
}
};
/// @brief Sets a bool to @p value and resets to !value on destruction

View File

@ -193,10 +193,9 @@ installTranslator( const QLocale& locale, const QString& brandingTranslationsPre
{
loadSingletonTranslator( BrandingLoader( locale, brandingTranslationsPrefix ), s_brandingTranslator );
loadSingletonTranslator( TZLoader( locale ), s_tztranslator );
loadSingletonTranslator( CalamaresLoader( locale ), s_translator );
CalamaresLoader l( locale ); // because we want the extracted localeName
loadSingletonTranslator( std::move( l ), s_translator );
s_translatorLocaleName = l.m_localeName;
s_translatorLocaleName = CalamaresLoader::mungeLocaleName(locale);
}
@ -206,6 +205,12 @@ translatorLocaleName()
return s_translatorLocaleName;
}
bool
loadTranslator( const QLocale& locale, const QString& prefix, QTranslator *translator )
{
return ::tryLoad( translator, prefix, locale.name() );
}
Retranslator*
Retranslator::retranslatorFor( QObject* parent )
{

View File

@ -21,6 +21,7 @@
class QEvent;
class QLocale;
class QTranslator;
namespace CalamaresUtils
{
@ -31,8 +32,29 @@ namespace CalamaresUtils
*/
DLLEXPORT void installTranslator( const QLocale& locale, const QString& brandingTranslationsPrefix );
/** @brief The name of the (locale of the) most recently installed translator
*
* May return something different from the locale.name() of the
* QLocale passed in, because Calamares will munge some names and
* may remap translations.
*/
DLLEXPORT QString translatorLocaleName();
/** @brief Loads <prefix><locale> translations into the given @p translator
*
* This function is not intended for general use: it is for those special
* cases where modules need their own translator / translations for data
* that is locale to the module. Tries to load a .qm from "sensible"
* locations, which are the same ones that installTranslator() would use.
* Takes local-translations into account.
*
* Note that @p prefix should end with an underscore '_' -- this function
* does not introduce one by itself.
*
* @returns @c true on success
*/
DLLEXPORT bool loadTranslator( const QLocale& locale, const QString& prefix, QTranslator* translator );
/** @brief Set @p allow to true to load translations from current dir.
*
* If false, (or never called) the translations are loaded only from

View File

@ -560,3 +560,9 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
m_writeEtcDefaultKeyboard = true;
}
}
void
Config::retranslate()
{
retranslateKeyboardModels();
}

View File

@ -58,6 +58,17 @@ public:
*/
KeyboardVariantsModel* keyboardVariants() const;
/** @brief Call this to change application language
*
* The models (for keyboard model, layouts and variants) provide
* translations of strings in the xkb table, so need to be
* notified of language changes as well.
*
* Only widgets get LanguageChange events, so one of them will
* need to call this.
*/
void retranslate();
signals:
void prettyStatusChanged();

View File

@ -0,0 +1,825 @@
/* GENERATED FILE DO NOT EDIT
*
* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: no
* SPDX-License-Identifier: CC0-1.0
*
* This file is derived from base.lst in the Xorg distribution
*
*/
/** THIS FILE EXISTS ONLY FOR TRANSLATIONS PURPOSES **/
// *INDENT-OFF*
// clang-format off
/* This returns a reference to local, which is a terrible idea.
* Good thing it's not meant to be compiled.
*/
class kb_models : public QObject {
Q_OBJECT
public:
const QStringList& table()
{
return QStringList {
tr("A4Tech KB-21", "kb_models"),
tr("A4Tech KBS-8", "kb_models"),
tr("A4Tech Wireless Desktop RFKB-23", "kb_models"),
tr("Acer AirKey V", "kb_models"),
tr("Acer C300", "kb_models"),
tr("Acer Ferrari 4000", "kb_models"),
tr("Acer laptop", "kb_models"),
tr("Advance Scorpius KI", "kb_models"),
tr("Apple", "kb_models"),
tr("Apple Aluminium (ANSI)", "kb_models"),
tr("Apple Aluminium (ISO)", "kb_models"),
tr("Apple Aluminium (JIS)", "kb_models"),
tr("Apple laptop", "kb_models"),
tr("Asus laptop", "kb_models"),
tr("Azona RF2300 wireless Internet", "kb_models"),
tr("BTC 5090", "kb_models"),
tr("BTC 5113RF Multimedia", "kb_models"),
tr("BTC 5126T", "kb_models"),
tr("BTC 6301URF", "kb_models"),
tr("BTC 9000", "kb_models"),
tr("BTC 9000A", "kb_models"),
tr("BTC 9001AH", "kb_models"),
tr("BTC 9019U", "kb_models"),
tr("BTC 9116U Mini Wireless Internet and Gaming", "kb_models"),
tr("BenQ X-Touch", "kb_models"),
tr("BenQ X-Touch 730", "kb_models"),
tr("BenQ X-Touch 800", "kb_models"),
tr("Brother Internet", "kb_models"),
tr("Cherry B.UNLIMITED", "kb_models"),
tr("Cherry Blue Line CyBo@rd", "kb_models"),
tr("Cherry Blue Line CyBo@rd (alt.)", "kb_models"),
tr("Cherry CyBo@rd USB-Hub", "kb_models"),
tr("Cherry CyMotion Expert", "kb_models"),
tr("Cherry CyMotion Master Linux", "kb_models"),
tr("Cherry CyMotion Master XPress", "kb_models"),
tr("Chicony Internet", "kb_models"),
tr("Chicony KB-9885", "kb_models"),
tr("Chicony KU-0108", "kb_models"),
tr("Chicony KU-0420", "kb_models"),
tr("Chromebook", "kb_models"),
tr("Classmate PC", "kb_models"),
tr("Compaq Armada laptop", "kb_models"),
tr("Compaq Easy Access", "kb_models"),
tr("Compaq Internet (13 keys)", "kb_models"),
tr("Compaq Internet (18 keys)", "kb_models"),
tr("Compaq Internet (7 keys)", "kb_models"),
tr("Compaq Presario laptop", "kb_models"),
tr("Compaq iPaq", "kb_models"),
tr("Creative Desktop Wireless 7000", "kb_models"),
tr("DTK2000", "kb_models"),
tr("Dell", "kb_models"),
tr("Dell 101-key PC", "kb_models"),
tr("Dell Inspiron 6000/8000 laptop", "kb_models"),
tr("Dell Latitude laptop", "kb_models"),
tr("Dell Precision M laptop", "kb_models"),
tr("Dell Precision M65 laptop", "kb_models"),
tr("Dell SK-8125", "kb_models"),
tr("Dell SK-8135", "kb_models"),
tr("Dell USB Multimedia", "kb_models"),
tr("Dexxa Wireless Desktop", "kb_models"),
tr("Diamond 9801/9802", "kb_models"),
tr("Ennyah DKB-1008", "kb_models"),
tr("Everex STEPnote", "kb_models"),
tr("FL90", "kb_models"),
tr("Fujitsu-Siemens Amilo laptop", "kb_models"),
tr("Generic 101-key PC", "kb_models"),
tr("Generic 102-key PC", "kb_models"),
tr("Generic 104-key PC", "kb_models"),
tr("Generic 104-key PC with L-shaped Enter key", "kb_models"),
tr("Generic 105-key PC", "kb_models"),
tr("Generic 86-key PC", "kb_models"),
tr("Genius Comfy KB-12e", "kb_models"),
tr("Genius Comfy KB-16M/Multimedia KWD-910", "kb_models"),
tr("Genius Comfy KB-21e-Scroll", "kb_models"),
tr("Genius KB-19e NB", "kb_models"),
tr("Genius KKB-2050HS", "kb_models"),
tr("Gyration", "kb_models"),
tr("Happy Hacking", "kb_models"),
tr("Happy Hacking for Mac", "kb_models"),
tr("Hewlett-Packard Internet", "kb_models"),
tr("Hewlett-Packard Mini 110 laptop", "kb_models"),
tr("Hewlett-Packard NEC SK-2500 Multimedia", "kb_models"),
tr("Hewlett-Packard Omnibook 500", "kb_models"),
tr("Hewlett-Packard Omnibook 500 FA", "kb_models"),
tr("Hewlett-Packard Omnibook 6000/6100", "kb_models"),
tr("Hewlett-Packard Omnibook XE3 GC", "kb_models"),
tr("Hewlett-Packard Omnibook XE3 GF", "kb_models"),
tr("Hewlett-Packard Omnibook XT1000", "kb_models"),
tr("Hewlett-Packard Pavilion ZT1100", "kb_models"),
tr("Hewlett-Packard Pavilion dv5", "kb_models"),
tr("Hewlett-Packard nx9020", "kb_models"),
tr("Honeywell Euroboard", "kb_models"),
tr("IBM Rapid Access", "kb_models"),
tr("IBM Rapid Access II", "kb_models"),
tr("IBM Space Saver", "kb_models"),
tr("IBM ThinkPad 560Z/600/600E/A22E", "kb_models"),
tr("IBM ThinkPad R60/T60/R61/T61", "kb_models"),
tr("IBM ThinkPad Z60m/Z60t/Z61m/Z61t", "kb_models"),
tr("Keytronic FlexPro", "kb_models"),
tr("Kinesis", "kb_models"),
tr("Logitech", "kb_models"),
tr("Logitech Access", "kb_models"),
tr("Logitech Cordless Desktop", "kb_models"),
tr("Logitech Cordless Desktop (alt.)", "kb_models"),
tr("Logitech Cordless Desktop EX110", "kb_models"),
tr("Logitech Cordless Desktop LX-300", "kb_models"),
tr("Logitech Cordless Desktop Navigator", "kb_models"),
tr("Logitech Cordless Desktop Optical", "kb_models"),
tr("Logitech Cordless Desktop Pro (2nd alt.)", "kb_models"),
tr("Logitech Cordless Desktop iTouch", "kb_models"),
tr("Logitech Cordless Freedom/Desktop Navigator", "kb_models"),
tr("Logitech G15 extra keys via G15daemon", "kb_models"),
tr("Logitech Internet", "kb_models"),
tr("Logitech Internet 350", "kb_models"),
tr("Logitech Internet Navigator", "kb_models"),
tr("Logitech Ultra-X", "kb_models"),
tr("Logitech Ultra-X Cordless Media Desktop", "kb_models"),
tr("Logitech diNovo", "kb_models"),
tr("Logitech diNovo Edge", "kb_models"),
tr("Logitech iTouch", "kb_models"),
tr("Logitech iTouch Cordless Y-RB6", "kb_models"),
tr("Logitech iTouch Internet Navigator SE", "kb_models"),
tr("Logitech iTouch Internet Navigator SE USB", "kb_models"),
tr("MacBook/MacBook Pro", "kb_models"),
tr("MacBook/MacBook Pro (intl.)", "kb_models"),
tr("Macintosh", "kb_models"),
tr("Macintosh Old", "kb_models"),
tr("Memorex MX1998", "kb_models"),
tr("Memorex MX2500 EZ-Access", "kb_models"),
tr("Memorex MX2750", "kb_models"),
tr("Microsoft Comfort Curve 2000", "kb_models"),
tr("Microsoft Internet", "kb_models"),
tr("Microsoft Internet Pro (Swedish)", "kb_models"),
tr("Microsoft Natural", "kb_models"),
tr("Microsoft Natural Elite", "kb_models"),
tr("Microsoft Natural Ergonomic 4000", "kb_models"),
tr("Microsoft Natural Pro OEM", "kb_models"),
tr("Microsoft Natural Pro USB/Internet Pro", "kb_models"),
tr("Microsoft Natural Pro/Internet Pro", "kb_models"),
tr("Microsoft Natural Wireless Ergonomic 7000", "kb_models"),
tr("Microsoft Office Keyboard", "kb_models"),
tr("Microsoft Surface", "kb_models"),
tr("Microsoft Wireless Multimedia 1.0A", "kb_models"),
tr("NEC SK-1300", "kb_models"),
tr("NEC SK-2500", "kb_models"),
tr("NEC SK-6200", "kb_models"),
tr("NEC SK-7100", "kb_models"),
tr("Northgate OmniKey 101", "kb_models"),
tr("OLPC", "kb_models"),
tr("Ortek Multimedia/Internet MCK-800", "kb_models"),
tr("PC-98", "kb_models"),
tr("Propeller Voyager KTEZ-1000", "kb_models"),
tr("QTronix Scorpius 98N+", "kb_models"),
tr("SVEN Ergonomic 2500", "kb_models"),
tr("SVEN Slim 303", "kb_models"),
tr("Samsung SDM 4500P", "kb_models"),
tr("Samsung SDM 4510P", "kb_models"),
tr("Sanwa Supply SKB-KG3", "kb_models"),
tr("Silvercrest Multimedia Wireless", "kb_models"),
tr("SteelSeries Apex 300 (Apex RAW)", "kb_models"),
tr("Sun Type 6 (Japanese)", "kb_models"),
tr("Sun Type 6 USB (Japanese)", "kb_models"),
tr("Sun Type 6 USB (Unix)", "kb_models"),
tr("Sun Type 6/7 USB", "kb_models"),
tr("Sun Type 6/7 USB (European)", "kb_models"),
tr("Sun Type 7 USB", "kb_models"),
tr("Sun Type 7 USB (European)", "kb_models"),
tr("Sun Type 7 USB (Japanese)/Japanese 106-key", "kb_models"),
tr("Sun Type 7 USB (Unix)", "kb_models"),
tr("Super Power Multimedia", "kb_models"),
tr("Symplon PaceBook tablet", "kb_models"),
tr("Targa Visionary 811", "kb_models"),
tr("Toshiba Satellite S3000", "kb_models"),
tr("Truly Ergonomic 227", "kb_models"),
tr("Truly Ergonomic 229", "kb_models"),
tr("Truly Ergonomic Computer Keyboard Model 227 (Wide Alt keys)", "kb_models"),
tr("Truly Ergonomic Computer Keyboard Model 229 (Standard sized Alt keys, additional Super and Menu key)", "kb_models"),
tr("Trust Direct Access", "kb_models"),
tr("Trust Slimline", "kb_models"),
tr("Trust Wireless Classic", "kb_models"),
tr("TypeMatrix EZ-Reach 2020", "kb_models"),
tr("TypeMatrix EZ-Reach 2030 PS2", "kb_models"),
tr("TypeMatrix EZ-Reach 2030 USB", "kb_models"),
tr("TypeMatrix EZ-Reach 2030 USB (102/105:EU mode)", "kb_models"),
tr("TypeMatrix EZ-Reach 2030 USB (106:JP mode)", "kb_models"),
tr("Unitek KB-1925", "kb_models"),
tr("ViewSonic KU-306 Internet", "kb_models"),
tr("Winbook Model XP5", "kb_models"),
tr("Yahoo! Internet", "kb_models"),
tr("eMachines m6800 laptop", "kb_models"),
QString()
};
}
}
/* This returns a reference to local, which is a terrible idea.
* Good thing it's not meant to be compiled.
*/
class kb_layouts : public QObject {
Q_OBJECT
public:
const QStringList& table()
{
return QStringList {
tr("Afghani", "kb_layouts"),
tr("Albanian", "kb_layouts"),
tr("Amharic", "kb_layouts"),
tr("Arabic", "kb_layouts"),
tr("Arabic (Morocco)", "kb_layouts"),
tr("Arabic (Syria)", "kb_layouts"),
tr("Armenian", "kb_layouts"),
tr("Azerbaijani", "kb_layouts"),
tr("Bambara", "kb_layouts"),
tr("Bangla", "kb_layouts"),
tr("Belarusian", "kb_layouts"),
tr("Belgian", "kb_layouts"),
tr("Bosnian", "kb_layouts"),
tr("Braille", "kb_layouts"),
tr("Bulgarian", "kb_layouts"),
tr("Burmese", "kb_layouts"),
tr("Chinese", "kb_layouts"),
tr("Croatian", "kb_layouts"),
tr("Czech", "kb_layouts"),
tr("Danish", "kb_layouts"),
tr("Dhivehi", "kb_layouts"),
tr("Dutch", "kb_layouts"),
tr("Dzongkha", "kb_layouts"),
tr("English (Australian)", "kb_layouts"),
tr("English (Cameroon)", "kb_layouts"),
tr("English (Ghana)", "kb_layouts"),
tr("English (Nigeria)", "kb_layouts"),
tr("English (South Africa)", "kb_layouts"),
tr("English (UK)", "kb_layouts"),
tr("English (US)", "kb_layouts"),
tr("Esperanto", "kb_layouts"),
tr("Estonian", "kb_layouts"),
tr("Faroese", "kb_layouts"),
tr("Filipino", "kb_layouts"),
tr("Finnish", "kb_layouts"),
tr("French", "kb_layouts"),
tr("French (Canada)", "kb_layouts"),
tr("French (Democratic Republic of the Congo)", "kb_layouts"),
tr("French (Guinea)", "kb_layouts"),
tr("French (Togo)", "kb_layouts"),
tr("Georgian", "kb_layouts"),
tr("German", "kb_layouts"),
tr("German (Austria)", "kb_layouts"),
tr("German (Switzerland)", "kb_layouts"),
tr("Greek", "kb_layouts"),
tr("Hebrew", "kb_layouts"),
tr("Hungarian", "kb_layouts"),
tr("Icelandic", "kb_layouts"),
tr("Indian", "kb_layouts"),
tr("Indonesian (Arab Melayu, phonetic)", "kb_layouts"),
tr("Indonesian (Javanese)", "kb_layouts"),
tr("Iraqi", "kb_layouts"),
tr("Irish", "kb_layouts"),
tr("Italian", "kb_layouts"),
tr("Japanese", "kb_layouts"),
tr("Japanese (PC-98)", "kb_layouts"),
tr("Kabylian (azerty layout, no dead keys)", "kb_layouts"),
tr("Kazakh", "kb_layouts"),
tr("Khmer (Cambodia)", "kb_layouts"),
tr("Korean", "kb_layouts"),
tr("Kyrgyz", "kb_layouts"),
tr("Lao", "kb_layouts"),
tr("Latvian", "kb_layouts"),
tr("Lithuanian", "kb_layouts"),
tr("Macedonian", "kb_layouts"),
tr("Malay (Jawi, Arabic Keyboard)", "kb_layouts"),
tr("Maltese", "kb_layouts"),
tr("Maori", "kb_layouts"),
tr("Moldavian", "kb_layouts"),
tr("Mongolian", "kb_layouts"),
tr("Montenegrin", "kb_layouts"),
tr("Nepali", "kb_layouts"),
tr("Norwegian", "kb_layouts"),
tr("Persian", "kb_layouts"),
tr("Polish", "kb_layouts"),
tr("Portuguese", "kb_layouts"),
tr("Portuguese (Brazil)", "kb_layouts"),
tr("Romanian", "kb_layouts"),
tr("Russian", "kb_layouts"),
tr("Serbian", "kb_layouts"),
tr("Sinhala (phonetic)", "kb_layouts"),
tr("Slovak", "kb_layouts"),
tr("Slovenian", "kb_layouts"),
tr("Spanish", "kb_layouts"),
tr("Spanish (Latin American)", "kb_layouts"),
tr("Swahili (Kenya)", "kb_layouts"),
tr("Swahili (Tanzania)", "kb_layouts"),
tr("Swedish", "kb_layouts"),
tr("Taiwanese", "kb_layouts"),
tr("Tajik", "kb_layouts"),
tr("Thai", "kb_layouts"),
tr("Tswana", "kb_layouts"),
tr("Turkish", "kb_layouts"),
tr("Turkmen", "kb_layouts"),
tr("Ukrainian", "kb_layouts"),
tr("Urdu (Pakistan)", "kb_layouts"),
tr("Uzbek", "kb_layouts"),
tr("Vietnamese", "kb_layouts"),
tr("Wolof", "kb_layouts"),
QString()
};
}
}
/* This returns a reference to local, which is a terrible idea.
* Good thing it's not meant to be compiled.
*/
class kb_variants : public QObject {
Q_OBJECT
public:
const QStringList& table()
{
return QStringList {
tr("Akan", "kb_variants"),
tr("Albanian (Plisi)", "kb_variants"),
tr("Albanian (Veqilharxhi)", "kb_variants"),
tr("Arabic (AZERTY)", "kb_variants"),
tr("Arabic (AZERTY, Eastern Arabic numerals)", "kb_variants"),
tr("Arabic (Algeria)", "kb_variants"),
tr("Arabic (Buckwalter)", "kb_variants"),
tr("Arabic (Eastern Arabic numerals)", "kb_variants"),
tr("Arabic (Macintosh)", "kb_variants"),
tr("Arabic (OLPC)", "kb_variants"),
tr("Arabic (Pakistan)", "kb_variants"),
tr("Arabic (QWERTY)", "kb_variants"),
tr("Arabic (QWERTY, Eastern Arabic numerals)", "kb_variants"),
tr("Armenian (alt. eastern)", "kb_variants"),
tr("Armenian (alt. phonetic)", "kb_variants"),
tr("Armenian (eastern)", "kb_variants"),
tr("Armenian (phonetic)", "kb_variants"),
tr("Armenian (western)", "kb_variants"),
tr("Asturian (Spain, with bottom-dot H and L)", "kb_variants"),
tr("Avatime", "kb_variants"),
tr("Azerbaijani (Cyrillic)", "kb_variants"),
tr("Bangla (India)", "kb_variants"),
tr("Bangla (India, Baishakhi Inscript)", "kb_variants"),
tr("Bangla (India, Baishakhi)", "kb_variants"),
tr("Bangla (India, Bornona)", "kb_variants"),
tr("Bangla (India, Gitanjali)", "kb_variants"),
tr("Bangla (India, Probhat)", "kb_variants"),
tr("Bangla (Probhat)", "kb_variants"),
tr("Bashkirian", "kb_variants"),
tr("Belarusian (Latin)", "kb_variants"),
tr("Belarusian (intl.)", "kb_variants"),
tr("Belarusian (legacy)", "kb_variants"),
tr("Belgian (ISO, alt.)", "kb_variants"),
tr("Belgian (Latin-9 only, alt.)", "kb_variants"),
tr("Belgian (Sun dead keys)", "kb_variants"),
tr("Belgian (Sun dead keys, alt.)", "kb_variants"),
tr("Belgian (Wang 724 AZERTY)", "kb_variants"),
tr("Belgian (alt.)", "kb_variants"),
tr("Belgian (no dead keys)", "kb_variants"),
tr("Berber (Morocco, Tifinagh alt.)", "kb_variants"),
tr("Berber (Morocco, Tifinagh extended phonetic)", "kb_variants"),
tr("Berber (Morocco, Tifinagh extended)", "kb_variants"),
tr("Berber (Morocco, Tifinagh phonetic)", "kb_variants"),
tr("Berber (Morocco, Tifinagh phonetic, alt.)", "kb_variants"),
tr("Berber (Morocco, Tifinagh)", "kb_variants"),
tr("Bosnian (US)", "kb_variants"),
tr("Bosnian (US, with Bosnian digraphs)", "kb_variants"),
tr("Bosnian (with Bosnian digraphs)", "kb_variants"),
tr("Bosnian (with guillemets)", "kb_variants"),
tr("Braille (left-handed inverted thumb)", "kb_variants"),
tr("Braille (left-handed)", "kb_variants"),
tr("Braille (right-handed inverted thumb)", "kb_variants"),
tr("Braille (right-handed)", "kb_variants"),
tr("Bulgarian (enhanced)", "kb_variants"),
tr("Bulgarian (new phonetic)", "kb_variants"),
tr("Bulgarian (traditional phonetic)", "kb_variants"),
tr("Burmese Zawgyi", "kb_variants"),
tr("Cameroon (AZERTY, intl.)", "kb_variants"),
tr("Cameroon (Dvorak, intl.)", "kb_variants"),
tr("Cameroon Multilingual (QWERTY, intl.)", "kb_variants"),
tr("Canadian (intl.)", "kb_variants"),
tr("Canadian (intl., 1st part)", "kb_variants"),
tr("Canadian (intl., 2nd part)", "kb_variants"),
tr("Catalan (Spain, with middle-dot L)", "kb_variants"),
tr("Cherokee", "kb_variants"),
tr("Chuvash", "kb_variants"),
tr("Chuvash (Latin)", "kb_variants"),
tr("CloGaelach", "kb_variants"),
tr("Crimean Tatar (Turkish Alt-Q)", "kb_variants"),
tr("Crimean Tatar (Turkish F)", "kb_variants"),
tr("Crimean Tatar (Turkish Q)", "kb_variants"),
tr("Croatian (US)", "kb_variants"),
tr("Croatian (US, with Croatian digraphs)", "kb_variants"),
tr("Croatian (with Croatian digraphs)", "kb_variants"),
tr("Croatian (with guillemets)", "kb_variants"),
tr("Czech (QWERTY)", "kb_variants"),
tr("Czech (QWERTY, Macintosh)", "kb_variants"),
tr("Czech (QWERTY, extended backslash)", "kb_variants"),
tr("Czech (UCW, only accented letters)", "kb_variants"),
tr("Czech (US, Dvorak, UCW support)", "kb_variants"),
tr("Czech (with &lt;\|&gt; key)", "kb_variants"),
tr("Danish (Dvorak)", "kb_variants"),
tr("Danish (Macintosh)", "kb_variants"),
tr("Danish (Macintosh, no dead keys)", "kb_variants"),
tr("Danish (Windows)", "kb_variants"),
tr("Danish (no dead keys)", "kb_variants"),
tr("Default", "kb_variants"),
tr("Dutch (Macintosh)", "kb_variants"),
tr("Dutch (Sun dead keys)", "kb_variants"),
tr("Dutch (standard)", "kb_variants"),
tr("English (Canada)", "kb_variants"),
tr("English (Colemak)", "kb_variants"),
tr("English (Dvorak)", "kb_variants"),
tr("English (Dvorak, alt. intl.)", "kb_variants"),
tr("English (Dvorak, intl., with dead keys)", "kb_variants"),
tr("English (Dvorak, left-handed)", "kb_variants"),
tr("English (Dvorak, right-handed)", "kb_variants"),
tr("English (Ghana, GILLBT)", "kb_variants"),
tr("English (Ghana, multilingual)", "kb_variants"),
tr("English (India, with rupee)", "kb_variants"),
tr("English (Macintosh)", "kb_variants"),
tr("English (Mali, US, Macintosh)", "kb_variants"),
tr("English (Mali, US, intl.)", "kb_variants"),
tr("English (Norman)", "kb_variants"),
tr("English (UK, Colemak)", "kb_variants"),
tr("English (UK, Dvorak)", "kb_variants"),
tr("English (UK, Dvorak, with UK punctuation)", "kb_variants"),
tr("English (UK, Macintosh)", "kb_variants"),
tr("English (UK, Macintosh, intl.)", "kb_variants"),
tr("English (UK, extended, Windows)", "kb_variants"),
tr("English (UK, intl., with dead keys)", "kb_variants"),
tr("English (US, Symbolic)", "kb_variants"),
tr("English (US, alt. intl.)", "kb_variants"),
tr("English (US, euro on 5)", "kb_variants"),
tr("English (US, intl., with dead keys)", "kb_variants"),
tr("English (Workman)", "kb_variants"),
tr("English (Workman, intl., with dead keys)", "kb_variants"),
tr("English (classic Dvorak)", "kb_variants"),
tr("English (intl., with AltGr dead keys)", "kb_variants"),
tr("English (programmer Dvorak)", "kb_variants"),
tr("English (the divide/multiply toggle the layout)", "kb_variants"),
tr("Esperanto (Brazil, Nativo)", "kb_variants"),
tr("Esperanto (Portugal, Nativo)", "kb_variants"),
tr("Esperanto (legacy)", "kb_variants"),
tr("Estonian (Dvorak)", "kb_variants"),
tr("Estonian (US)", "kb_variants"),
tr("Estonian (no dead keys)", "kb_variants"),
tr("Ewe", "kb_variants"),
tr("Faroese (no dead keys)", "kb_variants"),
tr("Filipino (Capewell-Dvorak, Baybayin)", "kb_variants"),
tr("Filipino (Capewell-Dvorak, Latin)", "kb_variants"),
tr("Filipino (Capewell-QWERF 2006, Baybayin)", "kb_variants"),
tr("Filipino (Capewell-QWERF 2006, Latin)", "kb_variants"),
tr("Filipino (Colemak, Baybayin)", "kb_variants"),
tr("Filipino (Colemak, Latin)", "kb_variants"),
tr("Filipino (Dvorak, Baybayin)", "kb_variants"),
tr("Filipino (Dvorak, Latin)", "kb_variants"),
tr("Filipino (QWERTY, Baybayin)", "kb_variants"),
tr("Finnish (Macintosh)", "kb_variants"),
tr("Finnish (Windows)", "kb_variants"),
tr("Finnish (classic)", "kb_variants"),
tr("Finnish (classic, no dead keys)", "kb_variants"),
tr("French (AZERTY)", "kb_variants"),
tr("French (AZERTY, AFNOR)", "kb_variants"),
tr("French (BEPO)", "kb_variants"),
tr("French (BEPO, AFNOR)", "kb_variants"),
tr("French (BEPO, Latin-9 only)", "kb_variants"),
tr("French (Breton)", "kb_variants"),
tr("French (Cameroon)", "kb_variants"),
tr("French (Canada, Dvorak)", "kb_variants"),
tr("French (Canada, legacy)", "kb_variants"),
tr("French (Dvorak)", "kb_variants"),
tr("French (Macintosh)", "kb_variants"),
tr("French (Mali, alt.)", "kb_variants"),
tr("French (Morocco)", "kb_variants"),
tr("French (Sun dead keys)", "kb_variants"),
tr("French (Switzerland)", "kb_variants"),
tr("French (Switzerland, Macintosh)", "kb_variants"),
tr("French (Switzerland, Sun dead keys)", "kb_variants"),
tr("French (Switzerland, no dead keys)", "kb_variants"),
tr("French (US)", "kb_variants"),
tr("French (alt.)", "kb_variants"),
tr("French (alt., Latin-9 only)", "kb_variants"),
tr("French (alt., Sun dead keys)", "kb_variants"),
tr("French (alt., no dead keys)", "kb_variants"),
tr("French (legacy, alt.)", "kb_variants"),
tr("French (legacy, alt., Sun dead keys)", "kb_variants"),
tr("French (legacy, alt., no dead keys)", "kb_variants"),
tr("French (no dead keys)", "kb_variants"),
tr("Friulian (Italy)", "kb_variants"),
tr("Fula", "kb_variants"),
tr("Ga", "kb_variants"),
tr("Georgian (France, AZERTY Tskapo)", "kb_variants"),
tr("Georgian (Italy)", "kb_variants"),
tr("Georgian (MESS)", "kb_variants"),
tr("Georgian (ergonomic)", "kb_variants"),
tr("German (Austria, Macintosh)", "kb_variants"),
tr("German (Austria, Sun dead keys)", "kb_variants"),
tr("German (Austria, no dead keys)", "kb_variants"),
tr("German (Dvorak)", "kb_variants"),
tr("German (E1)", "kb_variants"),
tr("German (E2)", "kb_variants"),
tr("German (Macintosh)", "kb_variants"),
tr("German (Macintosh, no dead keys)", "kb_variants"),
tr("German (Neo 2)", "kb_variants"),
tr("German (QWERTY)", "kb_variants"),
tr("German (Sun dead keys)", "kb_variants"),
tr("German (Switzerland, Macintosh)", "kb_variants"),
tr("German (Switzerland, Sun dead keys)", "kb_variants"),
tr("German (Switzerland, legacy)", "kb_variants"),
tr("German (Switzerland, no dead keys)", "kb_variants"),
tr("German (T3)", "kb_variants"),
tr("German (US)", "kb_variants"),
tr("German (dead acute)", "kb_variants"),
tr("German (dead grave acute)", "kb_variants"),
tr("German (dead tilde)", "kb_variants"),
tr("German (no dead keys)", "kb_variants"),
tr("Greek (extended)", "kb_variants"),
tr("Greek (no dead keys)", "kb_variants"),
tr("Greek (polytonic)", "kb_variants"),
tr("Greek (simple)", "kb_variants"),
tr("Gujarati", "kb_variants"),
tr("Hanyu Pinyin (with AltGr dead keys)", "kb_variants"),
tr("Hausa (Ghana)", "kb_variants"),
tr("Hausa (Nigeria)", "kb_variants"),
tr("Hawaiian", "kb_variants"),
tr("Hebrew (Biblical, Tiro)", "kb_variants"),
tr("Hebrew (lyx)", "kb_variants"),
tr("Hebrew (phonetic)", "kb_variants"),
tr("Hindi (Bolnagri)", "kb_variants"),
tr("Hindi (KaGaPa, phonetic)", "kb_variants"),
tr("Hindi (Wx)", "kb_variants"),
tr("Hungarian (QWERTY)", "kb_variants"),
tr("Hungarian (QWERTY, 101-key, comma, dead keys)", "kb_variants"),
tr("Hungarian (QWERTY, 101-key, comma, no dead keys)", "kb_variants"),
tr("Hungarian (QWERTY, 101-key, dot, dead keys)", "kb_variants"),
tr("Hungarian (QWERTY, 101-key, dot, no dead keys)", "kb_variants"),
tr("Hungarian (QWERTY, 102-key, comma, dead keys)", "kb_variants"),
tr("Hungarian (QWERTY, 102-key, comma, no dead keys)", "kb_variants"),
tr("Hungarian (QWERTY, 102-key, dot, dead keys)", "kb_variants"),
tr("Hungarian (QWERTY, 102-key, dot, no dead keys)", "kb_variants"),
tr("Hungarian (QWERTZ, 101-key, comma, dead keys)", "kb_variants"),
tr("Hungarian (QWERTZ, 101-key, comma, no dead keys)", "kb_variants"),
tr("Hungarian (QWERTZ, 101-key, dot, dead keys)", "kb_variants"),
tr("Hungarian (QWERTZ, 101-key, dot, no dead keys)", "kb_variants"),
tr("Hungarian (QWERTZ, 102-key, comma, dead keys)", "kb_variants"),
tr("Hungarian (QWERTZ, 102-key, comma, no dead keys)", "kb_variants"),
tr("Hungarian (QWERTZ, 102-key, dot, dead keys)", "kb_variants"),
tr("Hungarian (QWERTZ, 102-key, dot, no dead keys)", "kb_variants"),
tr("Hungarian (no dead keys)", "kb_variants"),
tr("Hungarian (standard)", "kb_variants"),
tr("Icelandic (Dvorak)", "kb_variants"),
tr("Icelandic (Macintosh)", "kb_variants"),
tr("Icelandic (Macintosh, legacy)", "kb_variants"),
tr("Icelandic (Sun dead keys)", "kb_variants"),
tr("Icelandic (no dead keys)", "kb_variants"),
tr("Igbo", "kb_variants"),
tr("Indic (phonetic, IPA)", "kb_variants"),
tr("Indonesian (Arab Melayu, extended phonetic)", "kb_variants"),
tr("Inuktitut", "kb_variants"),
tr("Irish (UnicodeExpert)", "kb_variants"),
tr("Italian (IBM 142)", "kb_variants"),
tr("Italian (Macintosh)", "kb_variants"),
tr("Italian (US)", "kb_variants"),
tr("Italian (Windows)", "kb_variants"),
tr("Italian (intl., with dead keys)", "kb_variants"),
tr("Italian (no dead keys)", "kb_variants"),
tr("Japanese (Dvorak)", "kb_variants"),
tr("Japanese (Kana 86)", "kb_variants"),
tr("Japanese (Kana)", "kb_variants"),
tr("Japanese (Macintosh)", "kb_variants"),
tr("Japanese (OADG 109A)", "kb_variants"),
tr("Kabylian (Algeria, Tifinagh)", "kb_variants"),
tr("Kabylian (azerty layout, with dead keys)", "kb_variants"),
tr("Kabylian (qwerty-gb layout, with dead keys)", "kb_variants"),
tr("Kabylian (qwerty-us layout, with dead keys)", "kb_variants"),
tr("Kalmyk", "kb_variants"),
tr("Kannada", "kb_variants"),
tr("Kannada (KaGaPa, phonetic)", "kb_variants"),
tr("Kashubian", "kb_variants"),
tr("Kazakh (Latin)", "kb_variants"),
tr("Kazakh (extended)", "kb_variants"),
tr("Kazakh (with Russian)", "kb_variants"),
tr("Kikuyu", "kb_variants"),
tr("Komi", "kb_variants"),
tr("Korean (101/104-key compatible)", "kb_variants"),
tr("Kurdish (Iran, Arabic-Latin)", "kb_variants"),
tr("Kurdish (Iran, F)", "kb_variants"),
tr("Kurdish (Iran, Latin Alt-Q)", "kb_variants"),
tr("Kurdish (Iran, Latin Q)", "kb_variants"),
tr("Kurdish (Iraq, Arabic-Latin)", "kb_variants"),
tr("Kurdish (Iraq, F)", "kb_variants"),
tr("Kurdish (Iraq, Latin Alt-Q)", "kb_variants"),
tr("Kurdish (Iraq, Latin Q)", "kb_variants"),
tr("Kurdish (Syria, F)", "kb_variants"),
tr("Kurdish (Syria, Latin Alt-Q)", "kb_variants"),
tr("Kurdish (Syria, Latin Q)", "kb_variants"),
tr("Kurdish (Turkey, F)", "kb_variants"),
tr("Kurdish (Turkey, Latin Alt-Q)", "kb_variants"),
tr("Kurdish (Turkey, Latin Q)", "kb_variants"),
tr("Kyrgyz (phonetic)", "kb_variants"),
tr("Lao (STEA)", "kb_variants"),
tr("Latvian (F)", "kb_variants"),
tr("Latvian (adapted)", "kb_variants"),
tr("Latvian (apostrophe)", "kb_variants"),
tr("Latvian (ergonomic, ŪGJRMV)", "kb_variants"),
tr("Latvian (modern)", "kb_variants"),
tr("Latvian (tilde)", "kb_variants"),
tr("Lithuanian (IBM LST 1205-92)", "kb_variants"),
tr("Lithuanian (LEKP)", "kb_variants"),
tr("Lithuanian (LEKPa)", "kb_variants"),
tr("Lithuanian (US)", "kb_variants"),
tr("Lithuanian (standard)", "kb_variants"),
tr("Lower Sorbian", "kb_variants"),
tr("Lower Sorbian (QWERTZ)", "kb_variants"),
tr("Macedonian (no dead keys)", "kb_variants"),
tr("Malay (Jawi, phonetic)", "kb_variants"),
tr("Malayalam", "kb_variants"),
tr("Malayalam (Lalitha)", "kb_variants"),
tr("Malayalam (enhanced Inscript, with rupee)", "kb_variants"),
tr("Maltese (UK, with AltGr overrides)", "kb_variants"),
tr("Maltese (US layout with AltGr overrides)", "kb_variants"),
tr("Maltese (US)", "kb_variants"),
tr("Manipuri (Eeyek)", "kb_variants"),
tr("Marathi (KaGaPa, phonetic)", "kb_variants"),
tr("Marathi (enhanced Inscript)", "kb_variants"),
tr("Mari", "kb_variants"),
tr("Mmuock", "kb_variants"),
tr("Moldavian (Gagauz)", "kb_variants"),
tr("Mongolian (Bichig)", "kb_variants"),
tr("Mongolian (Galik)", "kb_variants"),
tr("Mongolian (Manchu Galik)", "kb_variants"),
tr("Mongolian (Manchu)", "kb_variants"),
tr("Mongolian (Todo Galik)", "kb_variants"),
tr("Mongolian (Todo)", "kb_variants"),
tr("Mongolian (Xibe)", "kb_variants"),
tr("Montenegrin (Cyrillic)", "kb_variants"),
tr("Montenegrin (Cyrillic, ZE and ZHE swapped)", "kb_variants"),
tr("Montenegrin (Cyrillic, with guillemets)", "kb_variants"),
tr("Montenegrin (Latin, QWERTY)", "kb_variants"),
tr("Montenegrin (Latin, Unicode)", "kb_variants"),
tr("Montenegrin (Latin, Unicode, QWERTY)", "kb_variants"),
tr("Montenegrin (Latin, with guillemets)", "kb_variants"),
tr("Northern Saami (Finland)", "kb_variants"),
tr("Northern Saami (Norway)", "kb_variants"),
tr("Northern Saami (Norway, no dead keys)", "kb_variants"),
tr("Northern Saami (Sweden)", "kb_variants"),
tr("Norwegian (Colemak)", "kb_variants"),
tr("Norwegian (Dvorak)", "kb_variants"),
tr("Norwegian (Macintosh)", "kb_variants"),
tr("Norwegian (Macintosh, no dead keys)", "kb_variants"),
tr("Norwegian (Windows)", "kb_variants"),
tr("Norwegian (no dead keys)", "kb_variants"),
tr("Occitan", "kb_variants"),
tr("Ogham", "kb_variants"),
tr("Ogham (IS434)", "kb_variants"),
tr("Ol Chiki", "kb_variants"),
tr("Oriya", "kb_variants"),
tr("Ossetian (Georgia)", "kb_variants"),
tr("Ossetian (Windows)", "kb_variants"),
tr("Ossetian (legacy)", "kb_variants"),
tr("Pannonian Rusyn", "kb_variants"),
tr("Pashto", "kb_variants"),
tr("Pashto (Afghanistan, OLPC)", "kb_variants"),
tr("Persian (Afghanistan, Dari OLPC)", "kb_variants"),
tr("Persian (with Persian keypad)", "kb_variants"),
tr("Polish (British keyboard)", "kb_variants"),
tr("Polish (Dvorak)", "kb_variants"),
tr("Polish (Dvorak, with Polish quotes on key 1)", "kb_variants"),
tr("Polish (Dvorak, with Polish quotes on quotemark key)", "kb_variants"),
tr("Polish (QWERTZ)", "kb_variants"),
tr("Polish (legacy)", "kb_variants"),
tr("Polish (programmer Dvorak)", "kb_variants"),
tr("Portuguese (Brazil, Dvorak)", "kb_variants"),
tr("Portuguese (Brazil, IBM/Lenovo ThinkPad)", "kb_variants"),
tr("Portuguese (Brazil, Nativo for US keyboards)", "kb_variants"),
tr("Portuguese (Brazil, Nativo)", "kb_variants"),
tr("Portuguese (Brazil, no dead keys)", "kb_variants"),
tr("Portuguese (Macintosh)", "kb_variants"),
tr("Portuguese (Macintosh, Sun dead keys)", "kb_variants"),
tr("Portuguese (Macintosh, no dead keys)", "kb_variants"),
tr("Portuguese (Nativo for US keyboards)", "kb_variants"),
tr("Portuguese (Nativo)", "kb_variants"),
tr("Portuguese (Sun dead keys)", "kb_variants"),
tr("Portuguese (no dead keys)", "kb_variants"),
tr("Punjabi (Gurmukhi Jhelum)", "kb_variants"),
tr("Punjabi (Gurmukhi)", "kb_variants"),
tr("Romanian (Germany)", "kb_variants"),
tr("Romanian (Germany, no dead keys)", "kb_variants"),
tr("Romanian (Windows)", "kb_variants"),
tr("Romanian (cedilla)", "kb_variants"),
tr("Romanian (standard cedilla)", "kb_variants"),
tr("Romanian (standard)", "kb_variants"),
tr("Russian (Belarus)", "kb_variants"),
tr("Russian (Czech, phonetic)", "kb_variants"),
tr("Russian (DOS)", "kb_variants"),
tr("Russian (Georgia)", "kb_variants"),
tr("Russian (Germany, phonetic)", "kb_variants"),
tr("Russian (Kazakhstan, with Kazakh)", "kb_variants"),
tr("Russian (Macintosh)", "kb_variants"),
tr("Russian (Poland, phonetic Dvorak)", "kb_variants"),
tr("Russian (Sweden, phonetic)", "kb_variants"),
tr("Russian (Sweden, phonetic, no dead keys)", "kb_variants"),
tr("Russian (US, phonetic)", "kb_variants"),
tr("Russian (Ukraine, standard RSTU)", "kb_variants"),
tr("Russian (legacy)", "kb_variants"),
tr("Russian (phonetic)", "kb_variants"),
tr("Russian (phonetic, AZERTY)", "kb_variants"),
tr("Russian (phonetic, Dvorak)", "kb_variants"),
tr("Russian (phonetic, French)", "kb_variants"),
tr("Russian (phonetic, Windows)", "kb_variants"),
tr("Russian (phonetic, YAZHERTY)", "kb_variants"),
tr("Russian (typewriter)", "kb_variants"),
tr("Russian (typewriter, legacy)", "kb_variants"),
tr("Saisiyat (Taiwan)", "kb_variants"),
tr("Samogitian", "kb_variants"),
tr("Sanskrit (KaGaPa, phonetic)", "kb_variants"),
tr("Serbian (Cyrillic, ZE and ZHE swapped)", "kb_variants"),
tr("Serbian (Cyrillic, with guillemets)", "kb_variants"),
tr("Serbian (Latin)", "kb_variants"),
tr("Serbian (Latin, QWERTY)", "kb_variants"),
tr("Serbian (Latin, Unicode)", "kb_variants"),
tr("Serbian (Latin, Unicode, QWERTY)", "kb_variants"),
tr("Serbian (Latin, with guillemets)", "kb_variants"),
tr("Serbian (Russia)", "kb_variants"),
tr("Serbo-Croatian (US)", "kb_variants"),
tr("Sicilian", "kb_variants"),
tr("Silesian", "kb_variants"),
tr("Sindhi", "kb_variants"),
tr("Sinhala (US)", "kb_variants"),
tr("Slovak (QWERTY)", "kb_variants"),
tr("Slovak (QWERTY, extended backslash)", "kb_variants"),
tr("Slovak (extended backslash)", "kb_variants"),
tr("Slovenian (US)", "kb_variants"),
tr("Slovenian (with guillemets)", "kb_variants"),
tr("Spanish (Dvorak)", "kb_variants"),
tr("Spanish (Latin American, Colemak for gaming)", "kb_variants"),
tr("Spanish (Latin American, Colemak)", "kb_variants"),
tr("Spanish (Latin American, Dvorak)", "kb_variants"),
tr("Spanish (Latin American, Sun dead keys)", "kb_variants"),
tr("Spanish (Latin American, dead tilde)", "kb_variants"),
tr("Spanish (Latin American, no dead keys)", "kb_variants"),
tr("Spanish (Macintosh)", "kb_variants"),
tr("Spanish (Sun dead keys)", "kb_variants"),
tr("Spanish (Windows)", "kb_variants"),
tr("Spanish (dead tilde)", "kb_variants"),
tr("Spanish (no dead keys)", "kb_variants"),
tr("Swedish (Dvorak)", "kb_variants"),
tr("Swedish (Dvorak, intl.)", "kb_variants"),
tr("Swedish (Macintosh)", "kb_variants"),
tr("Swedish (Svdvorak)", "kb_variants"),
tr("Swedish (US)", "kb_variants"),
tr("Swedish (no dead keys)", "kb_variants"),
tr("Swedish Sign Language", "kb_variants"),
tr("Syriac", "kb_variants"),
tr("Syriac (phonetic)", "kb_variants"),
tr("Taiwanese (indigenous)", "kb_variants"),
tr("Tajik (legacy)", "kb_variants"),
tr("Tamil (Inscript)", "kb_variants"),
tr("Tamil (Sri Lanka, TamilNet '99)", "kb_variants"),
tr("Tamil (Sri Lanka, TamilNet '99, TAB encoding)", "kb_variants"),
tr("Tamil (TamilNet '99 with Tamil numerals)", "kb_variants"),
tr("Tamil (TamilNet '99)", "kb_variants"),
tr("Tamil (TamilNet '99, TAB encoding)", "kb_variants"),
tr("Tamil (TamilNet '99, TSCII encoding)", "kb_variants"),
tr("Tatar", "kb_variants"),
tr("Telugu", "kb_variants"),
tr("Telugu (KaGaPa, phonetic)", "kb_variants"),
tr("Telugu (Sarala)", "kb_variants"),
tr("Thai (Pattachote)", "kb_variants"),
tr("Thai (TIS-820.2538)", "kb_variants"),
tr("Tibetan", "kb_variants"),
tr("Tibetan (with ASCII numerals)", "kb_variants"),
tr("Turkish (Alt-Q)", "kb_variants"),
tr("Turkish (F)", "kb_variants"),
tr("Turkish (Germany)", "kb_variants"),
tr("Turkish (Sun dead keys)", "kb_variants"),
tr("Turkish (intl., with dead keys)", "kb_variants"),
tr("Turkmen (Alt-Q)", "kb_variants"),
tr("Udmurt", "kb_variants"),
tr("Ukrainian (Windows)", "kb_variants"),
tr("Ukrainian (homophonic)", "kb_variants"),
tr("Ukrainian (legacy)", "kb_variants"),
tr("Ukrainian (phonetic)", "kb_variants"),
tr("Ukrainian (standard RSTU)", "kb_variants"),
tr("Ukrainian (typewriter)", "kb_variants"),
tr("Urdu (Pakistan, CRULP)", "kb_variants"),
tr("Urdu (Pakistan, NLA)", "kb_variants"),
tr("Urdu (Windows)", "kb_variants"),
tr("Urdu (alt. phonetic)", "kb_variants"),
tr("Urdu (phonetic)", "kb_variants"),
tr("Uyghur", "kb_variants"),
tr("Uzbek (Afghanistan)", "kb_variants"),
tr("Uzbek (Afghanistan, OLPC)", "kb_variants"),
tr("Uzbek (Latin)", "kb_variants"),
tr("Vietnamese (French)", "kb_variants"),
tr("Vietnamese (US)", "kb_variants"),
tr("Yakut", "kb_variants"),
tr("Yoruba", "kb_variants"),
QString()
};
}
}

View File

@ -11,9 +11,26 @@
#include "KeyboardLayoutModel.h"
#include "utils/Logger.h"
#include "utils/RAII.h"
#include "utils/Retranslator.h"
#include <QTranslator>
#include <algorithm>
static QTranslator* s_kbtranslator = nullptr;
void
retranslateKeyboardModels()
{
if ( !s_kbtranslator )
{
s_kbtranslator = new QTranslator;
}
(void)CalamaresUtils::loadTranslator( QLocale(), QStringLiteral( "kb_" ), s_kbtranslator );
}
XKBListModel::XKBListModel( QObject* parent )
: QAbstractListModel( parent )
{
@ -41,6 +58,14 @@ XKBListModel::data( const QModelIndex& index, int role ) const
switch ( role )
{
case LabelRole:
if ( s_kbtranslator && !s_kbtranslator->isEmpty() && m_contextname )
{
auto s = s_kbtranslator->translate( m_contextname, item.label.toUtf8().data() );
if ( !s.isEmpty() )
{
return s;
}
}
return item.label;
case KeyRole:
return item.key;
@ -93,6 +118,8 @@ XKBListModel::setCurrentIndex( int index )
KeyboardModelsModel::KeyboardModelsModel( QObject* parent )
: XKBListModel( parent )
{
m_contextname = "kb_models";
// The models map is from human-readable names (!) to xkb identifier
const auto models = KeyboardGlobal::getKeyboardModels();
m_list.reserve( models.count() );
@ -138,7 +165,18 @@ KeyboardLayoutModel::data( const QModelIndex& index, int role ) const
switch ( role )
{
case Qt::DisplayRole:
return m_layouts.at( index.row() ).second.description;
{
auto description = m_layouts.at( index.row() ).second.description;
if ( s_kbtranslator && !s_kbtranslator->isEmpty() )
{
auto s = s_kbtranslator->translate( "kb_layouts", description.toUtf8().data() );
if ( !s.isEmpty() )
{
return s;
}
}
return description;
}
case KeyboardVariantsRole:
return QVariant::fromValue( m_layouts.at( index.row() ).second.variants );
case KeyboardLayoutKeyRole:
@ -207,6 +245,7 @@ KeyboardLayoutModel::currentIndex() const
KeyboardVariantsModel::KeyboardVariantsModel( QObject* parent )
: XKBListModel( parent )
{
m_contextname = "kb_variants";
}
void

View File

@ -21,7 +21,6 @@
*
* This model acts like it has a single selection, as well.
*/
class XKBListModel : public QAbstractListModel
{
Q_OBJECT
@ -70,6 +69,7 @@ protected:
};
QVector< ModelInfo > m_list;
int m_currentIndex = -1;
const char* m_contextname = nullptr;
};
@ -146,4 +146,8 @@ public:
void setVariants( QMap< QString, QString > variants );
};
/** @brief Adjust to changes in application language.
*/
void retranslateKeyboardModels();
#endif // KEYBOARDLAYOUTMODEL_H

View File

@ -95,10 +95,17 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent )
connect( config->keyboardVariants(), &KeyboardVariantsModel::currentIndexChanged, [this]( int index ) {
ui->variantSelector->setCurrentIndex( m_config->keyboardVariants()->index( index ) );
} );
CALAMARES_RETRANSLATE( ui->retranslateUi( this ); )
CALAMARES_RETRANSLATE_SLOT( &KeyboardPage::retranslate )
}
KeyboardPage::~KeyboardPage()
{
delete ui;
}
void
KeyboardPage::retranslate()
{
ui->retranslateUi( this );
m_config->retranslate();
}

View File

@ -37,6 +37,8 @@ public:
explicit KeyboardPage( Config* config, QWidget* parent = nullptr );
~KeyboardPage() override;
void retranslate();
private:
Ui::Page_Keyboard* ui;
KeyBoardPreview* m_keyboardPreview;

View File

@ -84,12 +84,6 @@ parseKeyboardModels( const char* filepath )
{
QString modelDesc = rx.cap( 2 );
QString model = rx.cap( 1 );
if ( model == "pc105" )
{
modelDesc += " - " + QObject::tr( "Default Keyboard Model" );
}
models.insert( modelDesc, model );
}
}

View File

@ -0,0 +1,96 @@
#! /usr/bin/env python3
#
# === This file is part of Calamares - <https://calamares.io> ===
#
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
# SPDX-License-Identifier: BSD-2-Clause
#
"""
Python3 script to scrape x keyboard layout file and produce translations.
To use this script, you must have a base.lst in a standard location,
/usr/local/share/X11/xkb/rules/base.lst (this is usual on FreeBSD).
Prints out a few tables of keyboard model, layout, variant names for
use in translations.
"""
def scrape_file(file, modelsset, layoutsset, variantsset):
import re
# These RE's match what is in keyboardglobal.cpp
model_re = re.compile("^\\s+(\\S+)\\s+(\\w.*)\n$")
layout_re = re.compile("^\\s+(\\S+)\\s+(\\w.*)\n$")
variant_re = re.compile("^\\s+(\\S+)\\s+(\\S+): (\\w.*)\n$")
MODEL, LAYOUT, VARIANT = range(3)
state = None
for line in file.readlines():
# Handle changes in section
if line.startswith("! model"):
state = MODEL
continue
elif line.startswith("! layout"):
state = LAYOUT
continue
elif line.startswith("! variant"):
state = VARIANT
continue
elif not line.strip():
state = None
# Unchanged from last blank
if state is None:
continue
if state == MODEL:
m = model_re.match(line)
name = m.groups()[1]
modelsset.add(name)
if state == LAYOUT:
l = layout_re.match(line)
name = l.groups()[1]
layoutsset.add(name)
if state == VARIANT:
v = variant_re.match(line)
name = v.groups()[2]
variantsset.add(name)
def write_set(file, label, set):
file.write("/* This returns a reference to local, which is a terrible idea.\n * Good thing it's not meant to be compiled.\n */\n")
# Note {{ is an escaped { for Python string formatting
file.write("class {!s} : public QObject {{\nQ_OBJECT\npublic:\n".format(label))
file.write("\tconst QStringList& table()\n\t{\n\treturn QStringList {\n")
for x in sorted(set):
file.write("""\t\ttr("{!s}", "{!s}"),\n""".format(x, label))
file.write("\t\tQString()\n\t};\n}\n}\n\n")
cpp_header_comment = """/* GENERATED FILE DO NOT EDIT
*
* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: no
* SPDX-License-Identifier: CC0-1.0
*
* This file is derived from base.lst in the Xorg distribution
*
*/
/** THIS FILE EXISTS ONLY FOR TRANSLATIONS PURPOSES **/
// *INDENT-OFF*
// clang-format off
"""
if __name__ == "__main__":
models=set()
layouts=set()
variants=set()
variants.add( "Default" )
with open("/usr/local/share/X11/xkb/rules/base.lst", "r") as f:
scrape_file(f, models, layouts, variants)
with open("KeyboardData_p.cxxtr", "w") as f:
f.write(cpp_header_comment)
write_set(f, "kb_models", models)
write_set(f, "kb_layouts", layouts)
write_set(f, "kb_variants", variants)

View File

@ -5,3 +5,4 @@
#layout additional-layout additional-variant vconsole-keymap
ru us - ruwin_alt_sh-UTF-8
ua us - ua-utf