mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 02:30:44 +00:00
Make link to other languages be itself translatable in Release Notes and Credits dialogs
This commit is contained in:
parent
f1a9dbfae3
commit
1f1d60bcab
@ -8,7 +8,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<b>For other languages, go to:</b>
|
||||
<b>This page in other languages:</b>
|
||||
<br><a href=http://www.apneaboard.com/wiki/index.php/OSCAR_Credits>http://www.apneaboard.com/wiki/index.php/OSCAR_Credits</a></p>
|
||||
<h1>Credits</h1>
|
||||
<hr style="width: 100%; height: 2px;" >
|
||||
|
@ -8,7 +8,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<b>For other languages, go to:</b>
|
||||
<b>This page in other languages:</b>
|
||||
<br><a href=http://www.apneaboard.com/wiki/index.php/OSCAR_Release_Notes>http://www.apneaboard.com/wiki/index.php/OSCAR_Release_Notes</a></p>
|
||||
<p>
|
||||
<b>Changes and fixes in OSCAR v1.3.1-alpha.0</b>
|
||||
@ -18,6 +18,7 @@
|
||||
<li>[fix] Correct SleepStyle machines sometimes identified as Icon machines.</li>
|
||||
<li>[fix] Update copyright notices in html files.</li>
|
||||
<li>[fix] Correct value display on exact data points, and near session boundaries with drift.</li>
|
||||
<li>[fix] Link to translations in Credits and Release Notes html is now translated to selected language.</li>
|
||||
</ul>
|
||||
<p>
|
||||
<b>Changes and fixes in OSCAR v1.3.0</b>
|
||||
|
@ -2,6 +2,7 @@
|
||||
*
|
||||
* Date created: 7/5/2018
|
||||
*
|
||||
* Copyright (c) 2019-2022 The OSCAR Team
|
||||
* Copyright (c) 2018 Mark Watkins <mark@jedimark.net>
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
@ -76,6 +77,10 @@ QString AboutDialog::getFilename(QString name)
|
||||
return filename;
|
||||
}
|
||||
|
||||
QString transLink (QString text) {
|
||||
return text.replace("This page in other languages:", QObject::tr("This page in other languages:"));
|
||||
}
|
||||
|
||||
QString AboutDialog::getAbout()
|
||||
{
|
||||
QString aboutFile = getFilename("about");
|
||||
@ -83,6 +88,7 @@ QString AboutDialog::getAbout()
|
||||
QString text = tr("Sorry, could not locate About file.");
|
||||
if (clfile.open(QIODevice::ReadOnly)) {
|
||||
text = clfile.readAll();
|
||||
text = transLink(text);
|
||||
} else
|
||||
qWarning() << "Could not open" << aboutFile << "for reading, error code" << clfile.error() << clfile.errorString();
|
||||
// qDebug() << "Failed to open About file";
|
||||
@ -97,6 +103,7 @@ QString AboutDialog::getCredits()
|
||||
QString text = tr("Sorry, could not locate Credits file.");
|
||||
if (clfile.open(QIODevice::ReadOnly)) {
|
||||
text = clfile.readAll();
|
||||
text = transLink(text);
|
||||
} else {
|
||||
qWarning() << "Could not open" << creditsFile << "for reading, error code" << clfile.error() << clfile.errorString();
|
||||
}
|
||||
@ -128,6 +135,7 @@ QString AboutDialog::getRelnotes()
|
||||
}
|
||||
text += changeLog;
|
||||
text += "</body></html>";
|
||||
text = transLink(text);
|
||||
return text;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user