Use Retranslator in Partitioning module.
This commit is contained in:
parent
8575240b95
commit
faa77d7f5e
@ -32,6 +32,7 @@
|
||||
#include "GlobalStorage.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "utils/Retranslator.h"
|
||||
#include "Branding.h"
|
||||
|
||||
#include <QBoxLayout>
|
||||
@ -51,7 +52,6 @@ AlongsidePage::AlongsidePage( QWidget* parent )
|
||||
mainLayout->addLayout( partitionsComboLayout );
|
||||
|
||||
QLabel* partitionsLabel = new QLabel;
|
||||
partitionsLabel->setText( tr( "Choose partition to shrink:" ) );
|
||||
partitionsComboLayout->addWidget( partitionsLabel );
|
||||
|
||||
m_partitionsComboBox = new QComboBox;
|
||||
@ -60,7 +60,13 @@ AlongsidePage::AlongsidePage( QWidget* parent )
|
||||
|
||||
partitionsComboLayout->addStretch();
|
||||
|
||||
mainLayout->addWidget( new QLabel( tr( "Allocate drive space by dragging the divider below:" ) ) );
|
||||
QLabel* allocateSpaceLabel = new QLabel();
|
||||
mainLayout->addWidget( allocateSpaceLabel );
|
||||
|
||||
CALAMARES_RETRANSLATE(
|
||||
partitionsLabel->setText( tr( "Choose partition to shrink:" ) );
|
||||
allocateSpaceLabel->setText( tr( "Allocate drive space by dragging the divider below:" ) );
|
||||
)
|
||||
|
||||
m_splitterWidget = new PartitionSplitterWidget;
|
||||
mainLayout->addWidget( m_splitterWidget );
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Retranslator.h"
|
||||
#include "Branding.h"
|
||||
|
||||
#include <QBoxLayout>
|
||||
@ -102,6 +103,7 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
|
||||
|
||||
if ( osproberEntries.count() == 0 )
|
||||
{
|
||||
CALAMARES_RETRANSLATE(
|
||||
m_messageLabel->setText( tr( "This computer currently does not seem to have an operating system on it. "
|
||||
"What would you like to do?" ) );
|
||||
|
||||
@ -110,6 +112,7 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
|
||||
"documents, photos, music, and any other files." )
|
||||
.arg( Calamares::Branding::instance()->
|
||||
string( Calamares::Branding::VersionedName ) ) );
|
||||
)
|
||||
|
||||
alongsideButton->hide();
|
||||
}
|
||||
@ -119,6 +122,7 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
|
||||
|
||||
if ( !osName.isEmpty() )
|
||||
{
|
||||
CALAMARES_RETRANSLATE(
|
||||
m_messageLabel->setText( tr( "This computer currently has %1 on it. "
|
||||
"What would you like to do?" )
|
||||
.arg( osName ) );
|
||||
@ -138,9 +142,11 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
|
||||
.arg( osName )
|
||||
.arg( Calamares::Branding::instance()->
|
||||
string( Calamares::Branding::VersionedName ) ) );
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
CALAMARES_RETRANSLATE(
|
||||
m_messageLabel->setText( tr( "This computer already has an operating system on it. "
|
||||
"What would you like to do?" ) );
|
||||
|
||||
@ -156,6 +162,7 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
|
||||
"documents, photos, music, and any other files." )
|
||||
.arg( Calamares::Branding::instance()->
|
||||
string( Calamares::Branding::VersionedName ) ) );
|
||||
)
|
||||
}
|
||||
if ( !osproberEntries.first().canBeResized )
|
||||
alongsideButton->hide();
|
||||
@ -175,6 +182,7 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
|
||||
}
|
||||
}
|
||||
|
||||
CALAMARES_RETRANSLATE(
|
||||
m_messageLabel->setText( tr( "This computer currently has multiple operating systems on it. "
|
||||
"What would you like to do?" ) );
|
||||
|
||||
@ -190,6 +198,7 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
|
||||
"documents, photos, music, and any other files." )
|
||||
.arg( Calamares::Branding::instance()->
|
||||
string( Calamares::Branding::VersionedName ) ) );
|
||||
)
|
||||
|
||||
if ( !atLeastOneCanBeResized )
|
||||
alongsideButton->hide();
|
||||
@ -200,11 +209,13 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
|
||||
m_itemsLayout->addWidget( hLine );
|
||||
|
||||
PrettyRadioButton* somethingElseButton = new PrettyRadioButton;
|
||||
CALAMARES_RETRANSLATE(
|
||||
somethingElseButton->setText( tr( "<b>Something else</b><br/>"
|
||||
"You can create or resize partitions yourself, or choose "
|
||||
"multiple partitions for %1." )
|
||||
.arg( Calamares::Branding::instance()->
|
||||
string( Calamares::Branding::ShortVersionedName ) ) );
|
||||
)
|
||||
somethingElseButton->setIconSize( iconSize );
|
||||
somethingElseButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::Partitions,
|
||||
CalamaresUtils::Original,
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Retranslator.h"
|
||||
|
||||
#include <QBoxLayout>
|
||||
#include <QDir>
|
||||
@ -44,8 +45,9 @@ EraseDiskPage::EraseDiskPage( QWidget* parent )
|
||||
QVBoxLayout* mainLayout = new QVBoxLayout;
|
||||
setLayout( mainLayout );
|
||||
|
||||
QLabel* driveLabel = new QLabel( tr( "Select drive:" ) );
|
||||
QLabel* driveLabel = new QLabel( this );
|
||||
mainLayout->addWidget( driveLabel );
|
||||
CALAMARES_RETRANSLATE( driveLabel->setText( tr( "Select drive:" ) ); )
|
||||
|
||||
m_drivesView = new QListView;
|
||||
mainLayout->addWidget( m_drivesView );
|
||||
|
@ -34,6 +34,8 @@
|
||||
#include <core/device.h>
|
||||
#include <core/partition.h>
|
||||
|
||||
#include "utils/Retranslator.h"
|
||||
|
||||
// Qt
|
||||
#include <QDebug>
|
||||
#include <QHeaderView>
|
||||
@ -74,6 +76,8 @@ PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent )
|
||||
connect( m_ui->createButton, &QAbstractButton::clicked, this, &PartitionPage::onCreateClicked );
|
||||
connect( m_ui->editButton, &QAbstractButton::clicked, this, &PartitionPage::onEditClicked );
|
||||
connect( m_ui->deleteButton, &QAbstractButton::clicked, this, &PartitionPage::onDeleteClicked );
|
||||
|
||||
CALAMARES_RETRANSLATE( m_ui->retranslateUi( this ); )
|
||||
}
|
||||
|
||||
PartitionPage::~PartitionPage()
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "CalamaresVersion.h"
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Retranslator.h"
|
||||
#include "widgets/WaitingWidget.h"
|
||||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
@ -57,8 +58,9 @@ PartitionViewStep::PartitionViewStep( QObject* parent )
|
||||
{
|
||||
m_widget->setContentsMargins( 0, 0, 0, 0 );
|
||||
|
||||
QWidget* waitingWidget = new WaitingWidget( tr( "Gathering system information..." ) );
|
||||
WaitingWidget* waitingWidget = new WaitingWidget( QString() );
|
||||
m_widget->addWidget( waitingWidget );
|
||||
CALAMARES_RETRANSLATE( waitingWidget->setText( tr( "Gathering system information..." ) ); )
|
||||
|
||||
QTimer* timer = new QTimer;
|
||||
timer->setSingleShot( true );
|
||||
|
Loading…
Reference in New Issue
Block a user