Fix scratchpad translation on language change. (#3078)
This commit is contained in:
parent
a4953575f1
commit
fa30464a96
|
@ -22,7 +22,7 @@
|
||||||
<location filename="about.ui" line="81"/>
|
<location filename="about.ui" line="81"/>
|
||||||
<source>Copyright © 2007-%1 Cppcheck team.</source>
|
<source>Copyright © 2007-%1 Cppcheck team.</source>
|
||||||
<oldsource>Copyright © 2007-2019 Cppcheck team.</oldsource>
|
<oldsource>Copyright © 2007-2019 Cppcheck team.</oldsource>
|
||||||
<translation type="unfinished">Copyright © 2007-2019 Cppcheck-Team.</translation>
|
<translation>Copyright © 2007-%1 Cppcheck-Team.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="about.ui" line="91"/>
|
<location filename="about.ui" line="91"/>
|
||||||
|
@ -2310,7 +2310,7 @@ Legen Sie unter dem Menü Ansicht fest, welche Arten von Fehlern angezeigt werde
|
||||||
<message>
|
<message>
|
||||||
<location filename="resultsview.ui" line="196"/>
|
<location filename="resultsview.ui" line="196"/>
|
||||||
<source>Variables</source>
|
<source>Variables</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Variablen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="resultsview.ui" line="217"/>
|
<location filename="resultsview.ui" line="217"/>
|
||||||
|
@ -2345,7 +2345,7 @@ Legen Sie unter dem Menü Ansicht fest, welche Arten von Fehlern angezeigt werde
|
||||||
<message>
|
<message>
|
||||||
<location filename="scratchpad.ui" line="37"/>
|
<location filename="scratchpad.ui" line="37"/>
|
||||||
<source>Optionally enter a filename (mainly for automatic language detection) and click on "Check":</source>
|
<source>Optionally enter a filename (mainly for automatic language detection) and click on "Check":</source>
|
||||||
<translation>Optional einen Dateinamen (hauptsächlich für automatische Spracherkennung) eingeben und auf "Check" klicken:</translation>
|
<translation>Optional einen Dateinamen (hauptsächlich für automatische Spracherkennung) eingeben und auf "Prüfe" klicken:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="scratchpad.ui" line="71"/>
|
<location filename="scratchpad.ui" line="71"/>
|
||||||
|
|
|
@ -1462,6 +1462,8 @@ void MainWindow::setLanguage(const QString &code)
|
||||||
mLineEditFilter->setPlaceholderText(QCoreApplication::translate("MainWindow", "Quick Filter:"));
|
mLineEditFilter->setPlaceholderText(QCoreApplication::translate("MainWindow", "Quick Filter:"));
|
||||||
if (mProjectFile)
|
if (mProjectFile)
|
||||||
formatAndSetTitle(tr("Project:") + ' ' + mProjectFile->getFilename());
|
formatAndSetTitle(tr("Project:") + ' ' + mProjectFile->getFilename());
|
||||||
|
if (mScratchPad)
|
||||||
|
mScratchPad->translate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,11 @@ ScratchPad::ScratchPad(MainWindow& mainWindow)
|
||||||
connect(mUI.mCheckButton, &QPushButton::clicked, this, &ScratchPad::checkButtonClicked);
|
connect(mUI.mCheckButton, &QPushButton::clicked, this, &ScratchPad::checkButtonClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScratchPad::translate()
|
||||||
|
{
|
||||||
|
mUI.retranslateUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
void ScratchPad::checkButtonClicked()
|
void ScratchPad::checkButtonClicked()
|
||||||
{
|
{
|
||||||
QString filename = mUI.lineEdit->text();
|
QString filename = mUI.lineEdit->text();
|
||||||
|
|
|
@ -35,6 +35,11 @@ class ScratchPad : public QDialog {
|
||||||
public:
|
public:
|
||||||
explicit ScratchPad(MainWindow& mainWindow);
|
explicit ScratchPad(MainWindow& mainWindow);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Translate dialog
|
||||||
|
*/
|
||||||
|
void translate();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
/**
|
/**
|
||||||
* @brief Called when check button is clicked.
|
* @brief Called when check button is clicked.
|
||||||
|
|
Loading…
Reference in New Issue