[partition] Use modern tr() annotation

This commit is contained in:
Adriaan de Groot 2019-04-11 10:28:35 -04:00
parent e664370b28
commit 1a063a9b5d
2 changed files with 10 additions and 1 deletions

View file

@ -80,15 +80,23 @@ DeviceModel::data( const QModelIndex& index, int role ) const
else else
{ {
if ( device->logicalSize() >= 0 && device->totalLogical() >= 0 ) if ( device->logicalSize() >= 0 && device->totalLogical() >= 0 )
{
//: device[name] - size[number] (device-node[name])
return tr( "%1 - %2 (%3)" ) return tr( "%1 - %2 (%3)" )
.arg( device->name() ) .arg( device->name() )
.arg( KFormat().formatByteSize( device->capacity() ) ) .arg( KFormat().formatByteSize( device->capacity() ) )
.arg( device->deviceNode() ); .arg( device->deviceNode() );
// Newly LVM VGs don't have capacity property yet (i.e. always has 1B capacity), so don't show it for a while }
else else
{
// Newly LVM VGs don't have capacity property yet (i.e.
// always has 1B capacity), so don't show it for a while.
//
//: device[name] - (device-node[name])
return tr( "%1 - (%2)" ) return tr( "%1 - (%2)" )
.arg( device->name() ) .arg( device->name() )
.arg( device->deviceNode() ); .arg( device->deviceNode() );
}
} }
case Qt::DecorationRole: case Qt::DecorationRole:
return CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionDisk, return CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionDisk,

View file

@ -230,6 +230,7 @@ PartitionLabelsView::buildTexts( const QModelIndex& index ) const
PartitionModel::SizeColumn ) PartitionModel::SizeColumn )
.data().toString(); .data().toString();
else else
//: size[number] filesystem[name]
secondLine = tr( "%1 %2" ) secondLine = tr( "%1 %2" )
.arg( index.sibling( index.row(), .arg( index.sibling( index.row(),
PartitionModel::SizeColumn ) PartitionModel::SizeColumn )