mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 08:58:22 -04:00
[users] Refactor retranslation
- move retranslation to a method so that code-formatting doesn't get confused by it.
This commit is contained in:
parent
28c9da414b
commit
a4e3ea2a86
2 changed files with 22 additions and 17 deletions
|
@ -107,32 +107,35 @@ UsersPage::UsersPage( QWidget* parent )
|
||||||
setWriteRootPassword( true );
|
setWriteRootPassword( true );
|
||||||
ui->checkBoxReusePassword->setChecked( true );
|
ui->checkBoxReusePassword->setChecked( true );
|
||||||
ui->checkBoxValidatePassword->setChecked( true );
|
ui->checkBoxValidatePassword->setChecked( true );
|
||||||
|
|
||||||
setPasswordCheckboxVisible( false );
|
setPasswordCheckboxVisible( false );
|
||||||
|
|
||||||
CALAMARES_RETRANSLATE(
|
CALAMARES_RETRANSLATE_SLOT( &UsersPage::retranslate );
|
||||||
ui->retranslateUi( this );
|
|
||||||
if ( Calamares::Settings::instance()->isSetupMode() )
|
|
||||||
{
|
|
||||||
ui->textBoxUsername->setToolTip( tr( "<small>If more than one person will "
|
|
||||||
"use this computer, you can create multiple "
|
|
||||||
"accounts after setup.</small>" ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ui->textBoxUsername->setToolTip( tr( "<small>If more than one person will "
|
|
||||||
"use this computer, you can create multiple "
|
|
||||||
"accounts after installation.</small>" ) );
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UsersPage::~UsersPage()
|
UsersPage::~UsersPage()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
UsersPage::retranslate()
|
||||||
|
{
|
||||||
|
ui->retranslateUi( this );
|
||||||
|
if ( Calamares::Settings::instance()->isSetupMode() )
|
||||||
|
{
|
||||||
|
ui->textBoxUsername->setToolTip( tr( "<small>If more than one person will "
|
||||||
|
"use this computer, you can create multiple "
|
||||||
|
"accounts after setup.</small>" ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->textBoxUsername->setToolTip( tr( "<small>If more than one person will "
|
||||||
|
"use this computer, you can create multiple "
|
||||||
|
"accounts after installation.</small>" ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
UsersPage::isReady()
|
UsersPage::isReady()
|
||||||
|
|
|
@ -85,6 +85,8 @@ private:
|
||||||
*/
|
*/
|
||||||
bool checkPasswordAcceptance( const QString& pw1, const QString& pw2, QLabel* badge, QLabel* message );
|
bool checkPasswordAcceptance( const QString& pw1, const QString& pw2, QLabel* badge, QLabel* message );
|
||||||
|
|
||||||
|
void retranslate();
|
||||||
|
|
||||||
Ui::Page_UserSetup* ui;
|
Ui::Page_UserSetup* ui;
|
||||||
|
|
||||||
PasswordCheckList m_passwordChecks;
|
PasswordCheckList m_passwordChecks;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue