Use Retranslator in Partitioning module.

main
Teo Mrnjavac 10 years ago
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,14 +103,16 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
if ( osproberEntries.count() == 0 )
{
m_messageLabel->setText( tr( "This computer currently does not seem to have an operating system on it. "
"What would you like to do?" ) );
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?" ) );
eraseButton->setText( tr( "<b>Erase disk and install %1</b><br/>"
"<font color=\"red\">Warning: </font>This will delete all of your programs, "
"documents, photos, music, and any other files." )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) ) );
eraseButton->setText( tr( "<b>Erase disk and install %1</b><br/>"
"<font color=\"red\">Warning: </font>This will delete all of your programs, "
"documents, photos, music, and any other files." )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) ) );
)
alongsideButton->hide();
}
@ -119,43 +122,47 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
if ( !osName.isEmpty() )
{
m_messageLabel->setText( tr( "This computer currently has %1 on it. "
"What would you like to do?" )
.arg( osName ) );
alongsideButton->setText( tr( "<b>Install %2 alongside %1</b><br/>"
"Documents, music and other personal files will be kept. "
"You can choose which operating system you want each time the "
"computer starts up." )
CALAMARES_RETRANSLATE(
m_messageLabel->setText( tr( "This computer currently has %1 on it. "
"What would you like to do?" )
.arg( osName ) );
alongsideButton->setText( tr( "<b>Install %2 alongside %1</b><br/>"
"Documents, music and other personal files will be kept. "
"You can choose which operating system you want each time the "
"computer starts up." )
.arg( osName )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) ) );
eraseButton->setText( tr( "<b>Replace %1 with %2</b><br/>"
"<font color=\"red\">Warning: </font>This will erase the whole disk and "
"delete all of your %1 programs, "
"documents, photos, music, and any other files." )
.arg( osName )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) ) );
eraseButton->setText( tr( "<b>Replace %1 with %2</b><br/>"
"<font color=\"red\">Warning: </font>This will erase the whole disk and "
"delete all of your %1 programs, "
"documents, photos, music, and any other files." )
.arg( osName )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) ) );
)
}
else
{
m_messageLabel->setText( tr( "This computer already has an operating system on it. "
"What would you like to do?" ) );
alongsideButton->setText( tr( "<b>Install %1 alongside your current operating system</b><br/>"
"Documents, music and other personal files will be kept. "
"You can choose which operating system you want each time the "
"computer starts up." )
CALAMARES_RETRANSLATE(
m_messageLabel->setText( tr( "This computer already has an operating system on it. "
"What would you like to do?" ) );
alongsideButton->setText( tr( "<b>Install %1 alongside your current operating system</b><br/>"
"Documents, music and other personal files will be kept. "
"You can choose which operating system you want each time the "
"computer starts up." )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) ) );
eraseButton->setText( tr( "<b>Erase disk and install %1</b><br/>"
"<font color=\"red\">Warning: </font>This will delete all of your Windows 7 programs, "
"documents, photos, music, and any other files." )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) ) );
eraseButton->setText( tr( "<b>Erase disk and install %1</b><br/>"
"<font color=\"red\">Warning: </font>This will delete all of your Windows 7 programs, "
"documents, photos, music, and any other files." )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) ) );
)
}
if ( !osproberEntries.first().canBeResized )
alongsideButton->hide();
@ -175,21 +182,23 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
}
}
m_messageLabel->setText( tr( "This computer currently has multiple operating systems on it. "
"What would you like to do?" ) );
CALAMARES_RETRANSLATE(
m_messageLabel->setText( tr( "This computer currently has multiple operating systems on it. "
"What would you like to do?" ) );
alongsideButton->setText( tr( "<b>Install %1 alongside your current operating systems</b><br/>"
"Documents, music and other personal files will be kept. "
"You can choose which operating system you want each time the "
"computer starts up." )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) ) );
alongsideButton->setText( tr( "<b>Install %1 alongside your current operating systems</b><br/>"
"Documents, music and other personal files will be kept. "
"You can choose which operating system you want each time the "
"computer starts up." )
eraseButton->setText( tr( "<b>Erase disk and install %1</b><br/>"
"<font color=\"red\">Warning: </font>This will delete all of your Windows 7 programs, "
"documents, photos, music, and any other files." )
.arg( Calamares::Branding::instance()->
string( Calamares::Branding::VersionedName ) ) );
eraseButton->setText( tr( "<b>Erase disk and install %1</b><br/>"
"<font color=\"red\">Warning: </font>This will delete all of your Windows 7 programs, "
"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;
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 ) ) );
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…
Cancel
Save