mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-03 04:15:37 -04:00
[keyboard] Translate layouts as well
This commit is contained in:
parent
6863db0dc1
commit
4746754344
1 changed files with 13 additions and 2 deletions
|
@ -165,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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue