[partition Untangle, Warnings--
The translations apply to labels and a tooltip, which depends on the partition-table type. Move the strings together and make the whole range of the switch explicitly.
This commit is contained in:
parent
e8ca298712
commit
f0eb7ffbda
@ -68,7 +68,8 @@ DeviceInfoWidget::setPartitionTableType( PartitionTable::TableType type )
|
|||||||
void
|
void
|
||||||
DeviceInfoWidget::retranslateUi()
|
DeviceInfoWidget::retranslateUi()
|
||||||
{
|
{
|
||||||
QString typeString = PartitionTable::tableTypeToName( m_tableType ).toUpper();
|
QString typeString;
|
||||||
|
QString toolTipString;
|
||||||
|
|
||||||
// fix up if the name shouldn't be uppercase:
|
// fix up if the name shouldn't be uppercase:
|
||||||
switch ( m_tableType )
|
switch ( m_tableType )
|
||||||
@ -76,38 +77,32 @@ DeviceInfoWidget::retranslateUi()
|
|||||||
case PartitionTable::msdos:
|
case PartitionTable::msdos:
|
||||||
case PartitionTable::msdos_sectorbased:
|
case PartitionTable::msdos_sectorbased:
|
||||||
typeString = "MBR";
|
typeString = "MBR";
|
||||||
|
toolTipString += tr( "<br><br>This partition table type is only advisable on older "
|
||||||
|
"systems which start from a <strong>BIOS</strong> boot "
|
||||||
|
"environment. GPT is recommended in most other cases.<br><br>"
|
||||||
|
"<strong>Warning:</strong> the MBR partition table "
|
||||||
|
"is an obsolete MS-DOS era standard.<br>"
|
||||||
|
"Only 4 <em>primary</em> partitions may be created, and of "
|
||||||
|
"those 4, one can be an <em>extended</em> partition, which "
|
||||||
|
"may in turn contain many <em>logical</em> partitions." );
|
||||||
|
break;
|
||||||
|
case PartitionTable::gpt:
|
||||||
|
// TypeString is ok
|
||||||
|
toolTipString += tr( "<br><br>This is the recommended partition table type for modern "
|
||||||
|
"systems which start from an <strong>EFI</strong> boot "
|
||||||
|
"environment." );
|
||||||
break;
|
break;
|
||||||
case PartitionTable::loop:
|
case PartitionTable::loop:
|
||||||
typeString = "loop";
|
typeString = "loop";
|
||||||
break;
|
|
||||||
case PartitionTable::mac:
|
|
||||||
typeString = "Mac";
|
|
||||||
break;
|
|
||||||
case PartitionTable::amiga:
|
|
||||||
typeString = "Amiga";
|
|
||||||
break;
|
|
||||||
case PartitionTable::sun:
|
|
||||||
typeString = "Sun";
|
|
||||||
break;
|
|
||||||
case PartitionTable::unknownTableType:
|
|
||||||
typeString = " ? ";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QString toolTipString = tr( "This device has a <strong>%1</strong> partition "
|
|
||||||
"table." )
|
|
||||||
.arg( typeString );
|
|
||||||
|
|
||||||
switch ( m_tableType )
|
|
||||||
{
|
|
||||||
case PartitionTable::loop:
|
|
||||||
toolTipString = tr( "This is a <strong>loop</strong> "
|
toolTipString = tr( "This is a <strong>loop</strong> "
|
||||||
"device.<br><br>"
|
"device.<br><br>"
|
||||||
"It is a pseudo-device with no partition table "
|
"It is a pseudo-device with no partition table "
|
||||||
"that makes a file accessible as a block device. "
|
"that makes a file accessible as a block device. "
|
||||||
"This kind of setup usually only contains a single filesystem." );
|
"This kind of setup usually only contains a single filesystem." );
|
||||||
break;
|
break;
|
||||||
|
case PartitionTable::none:
|
||||||
case PartitionTable::unknownTableType:
|
case PartitionTable::unknownTableType:
|
||||||
|
typeString = " ? ";
|
||||||
toolTipString = tr( "This installer <strong>cannot detect a partition table</strong> on the "
|
toolTipString = tr( "This installer <strong>cannot detect a partition table</strong> on the "
|
||||||
"selected storage device.<br><br>"
|
"selected storage device.<br><br>"
|
||||||
"The device either has no partition "
|
"The device either has no partition "
|
||||||
@ -117,21 +112,35 @@ DeviceInfoWidget::retranslateUi()
|
|||||||
"either automatically, or through the manual partitioning "
|
"either automatically, or through the manual partitioning "
|
||||||
"page." );
|
"page." );
|
||||||
break;
|
break;
|
||||||
case PartitionTable::gpt:
|
// The next ones need to have the name adjusted, but the default tooltip is OK
|
||||||
toolTipString += tr( "<br><br>This is the recommended partition table type for modern "
|
case PartitionTable::mac:
|
||||||
"systems which start from an <strong>EFI</strong> boot "
|
typeString = "Mac";
|
||||||
"environment." );
|
|
||||||
break;
|
break;
|
||||||
case PartitionTable::msdos:
|
case PartitionTable::amiga:
|
||||||
case PartitionTable::msdos_sectorbased:
|
typeString = "Amiga";
|
||||||
toolTipString += tr( "<br><br>This partition table type is only advisable on older "
|
break;
|
||||||
"systems which start from a <strong>BIOS</strong> boot "
|
case PartitionTable::sun:
|
||||||
"environment. GPT is recommended in most other cases.<br><br>"
|
typeString = "Sun";
|
||||||
"<strong>Warning:</strong> the MBR partition table "
|
break;
|
||||||
"is an obsolete MS-DOS era standard.<br>"
|
// Peculiar tables, do nothing and use default type and tooltip strings
|
||||||
"Only 4 <em>primary</em> partitions may be created, and of "
|
case PartitionTable::aix:
|
||||||
"those 4, one can be an <em>extended</em> partition, which "
|
case PartitionTable::bsd:
|
||||||
"may in turn contain many <em>logical</em> partitions." );
|
case PartitionTable::dasd:
|
||||||
|
case PartitionTable::dvh:
|
||||||
|
case PartitionTable::pc98:
|
||||||
|
case PartitionTable::vmd:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( typeString.isEmpty() )
|
||||||
|
{
|
||||||
|
typeString = PartitionTable::tableTypeToName( m_tableType ).toUpper();
|
||||||
|
}
|
||||||
|
if ( toolTipString.isEmpty() )
|
||||||
|
{
|
||||||
|
toolTipString = tr( "This device has a <strong>%1</strong> partition "
|
||||||
|
"table." )
|
||||||
|
.arg( typeString );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ptLabel->setText( typeString );
|
m_ptLabel->setText( typeString );
|
||||||
|
Loading…
Reference in New Issue
Block a user