App: Retranslate all pages when the language is changed

This commit is contained in:
Jamie Mansfield
2022-02-22 18:23:53 +00:00
committed by Sefa Eyeoglu
parent a2c85a8531
commit dd5c4b6864
54 changed files with 158 additions and 11 deletions

View File

@ -50,6 +50,11 @@ bool ImportPage::shouldDisplay() const
return true;
}
void ImportPage::retranslate()
{
ui->retranslateUi(this);
}
void ImportPage::openedImpl()
{
updateState();

View File

@ -52,6 +52,7 @@ public:
return "Zip-import";
}
virtual bool shouldDisplay() const override;
void retranslate() override;
void setUrl(const QString & url);
void openedImpl() override;

View File

@ -74,6 +74,11 @@ bool VanillaPage::shouldDisplay() const
return true;
}
void VanillaPage::retranslate()
{
ui->retranslateUi(this);
}
BaseVersionPtr VanillaPage::selectedVersion() const
{
return m_selectedVersion;

View File

@ -52,6 +52,8 @@ public:
return "Vanilla-platform";
}
virtual bool shouldDisplay() const override;
void retranslate() override;
void openedImpl() override;
BaseVersionPtr selectedVersion() const;

View File

@ -65,6 +65,11 @@ bool AtlPage::shouldDisplay() const
return true;
}
void AtlPage::retranslate()
{
ui->retranslateUi(this);
}
void AtlPage::openedImpl()
{
if(!initialized)

View File

@ -57,6 +57,7 @@ public:
return "ATL-platform";
}
virtual bool shouldDisplay() const override;
void retranslate() override;
void openedImpl() override;

View File

@ -57,6 +57,11 @@ bool FlamePage::shouldDisplay() const
return true;
}
void FlamePage::retranslate()
{
ui->retranslateUi(this);
}
void FlamePage::openedImpl()
{
suggestCurrent();

View File

@ -57,6 +57,7 @@ public:
return "Flame-platform";
}
virtual bool shouldDisplay() const override;
void retranslate() override;
void openedImpl() override;

View File

@ -78,6 +78,11 @@ bool FtbPage::shouldDisplay() const
return true;
}
void FtbPage::retranslate()
{
ui->retranslateUi(this);
}
void FtbPage::openedImpl()
{
if(!initialised)

View File

@ -55,6 +55,7 @@ public:
return "FTB-platform";
}
virtual bool shouldDisplay() const override;
void retranslate() override;
void openedImpl() override;

View File

@ -122,6 +122,11 @@ void Page::openedImpl()
suggestCurrent();
}
void Page::retranslate()
{
ui->retranslateUi(this);
}
void Page::suggestCurrent()
{
if(!isOpened)

View File

@ -66,6 +66,7 @@ public:
}
bool shouldDisplay() const override;
void openedImpl() override;
void retranslate() override;
private:
void suggestCurrent();

View File

@ -61,6 +61,11 @@ bool TechnicPage::shouldDisplay() const
return true;
}
void TechnicPage::retranslate()
{
ui->retranslateUi(this);
}
void TechnicPage::openedImpl()
{
suggestCurrent();

View File

@ -57,6 +57,7 @@ public:
return "Technic-platform";
}
virtual bool shouldDisplay() const override;
void retranslate() override;
void openedImpl() override;