diff --git a/cockatrice/src/dlg_update.cpp b/cockatrice/src/dlg_update.cpp index 57a763ab..8a7212e3 100644 --- a/cockatrice/src/dlg_update.cpp +++ b/cockatrice/src/dlg_update.cpp @@ -21,7 +21,7 @@ DlgUpdate::DlgUpdate(QWidget *parent) : QDialog(parent) { statusLabel = new QLabel(this); statusLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); statusLabel->setWordWrap(true); - descriptionLabel = new QLabel(tr("Current release channel:") + " " + tr(settingsCache->getUpdateReleaseChannel()->getName().toUtf8()), this); + descriptionLabel = new QLabel(tr("Current release channel") + QString(": %1").arg(tr(settingsCache->getUpdateReleaseChannel()->getName().toUtf8())), this); progress = new QProgressBar(this); buttonBox = new QDialogButtonBox(this); @@ -53,8 +53,7 @@ DlgUpdate::DlgUpdate(QWidget *parent) : QDialog(parent) { if (!QSslSocket::supportsSsl()) { enableUpdateButton(false); QMessageBox::critical(this, tr("Error"), - tr("Cockatrice was not built with SSL support, so you cannot download updates automatically! " - "Please visit the download page to update manually.")); + tr("Cockatrice was not built with SSL support, therefore you cannot download updates automatically! \nPlease visit the download page to update manually.")); } //Initialize the checker and downloader class @@ -88,7 +87,7 @@ void DlgUpdate::downloadUpdate() { void DlgUpdate::cancelDownload() { emit uDownloader->stopDownload(); - setLabel("Download Canceled"); + setLabel("Download canceled"); addStopDownloadAndRemoveOthers(false); downloadProgressMade(0, 1); } @@ -106,7 +105,7 @@ void DlgUpdate::finishedUpdateCheck(bool needToUpdate, bool isCompatible, Releas //Update the UI to say we've finished progress->setMaximum(100); - setLabel(tr("Finished checking for updates.")); + setLabel(tr("Finished checking for updates")); //If there are no available builds, then they can't auto update. enableUpdateButton(isCompatible); @@ -115,8 +114,11 @@ void DlgUpdate::finishedUpdateCheck(bool needToUpdate, bool isCompatible, Releas if (!needToUpdate) { //If there's no need to update, tell them that. However we still allow them to run the //downloader themselves if there's a compatible build - QMessageBox::information(this, tr("Cockatrice Update"), tr("Your version of Cockatrice is up to date.")); - setLabel(tr("You are already running the latest %1 release - %2").arg(tr(settingsCache->getUpdateReleaseChannel()->getName().toUtf8())).arg(VERSION_STRING)); + QMessageBox::information(this, tr("No Update Available"), + tr("Cockatrice is up to date!") + "

" + + tr("You are already running the latest version available in the chosen release channel.") + "
" + + "" + tr("Current version") + QString(": %1
").arg(VERSION_STRING) + + "" + tr("Selected release channel") + QString(": %1").arg(tr(settingsCache->getUpdateReleaseChannel()->getName().toUtf8()))); return; } @@ -126,20 +128,22 @@ void DlgUpdate::finishedUpdateCheck(bool needToUpdate, bool isCompatible, Releas updateUrl = release->getDownloadUrl(); int reply; - reply = QMessageBox::question(this, "Update Available", - tr("A new version is available:
%1
published on %2 ." - "
More informations are available on the release changelog" - "
Do you want to update now?").arg(release->getName(), publishDate, release->getDescriptionUrl()), + reply = QMessageBox::question(this, tr("Update Available"), + tr("A new version of Cockatrice is available!") + "

" + + "" + tr("New version") + QString(": %1
").arg(release->getName()) + + "" + tr("Released") + QString(": %1 (").arg(publishDate, release->getDescriptionUrl()) + tr("Changelog") + ")

" + + tr("Do you want to update now?"), QMessageBox::Yes | QMessageBox::No); if (reply == QMessageBox::Yes) downloadUpdate(); } else { - QMessageBox::information(this, tr("Cockatrice Update"), - tr("A new version is available:
%1
published on %2 ." - "
More informations are available on the release changelog" - "
Unfortunately there are no packages available for your operating system. " - "You may have to use a developer build or build from source yourself. Please visit the download page.").arg(release->getName(), publishDate, release->getDescriptionUrl())); + QMessageBox::information(this, tr("Update Available"), + tr("A new version of Cockatrice is available!") + "

" + + "" + tr("New version") + QString(": %1
").arg(release->getName()) + + "" + tr("Released") + QString(": %1 (").arg(publishDate, release->getDescriptionUrl()) + tr("Changelog") + ")

" + + tr("Unfortunately there are no download packages available for your operating system. \nYou may have to build from source yourself.") + "

" + + tr("Please check the download page manually and visit the wiki for instructions on compiling.")); } } @@ -169,14 +173,16 @@ void DlgUpdate::setLabel(QString newText) { } void DlgUpdate::updateCheckError(QString errorString) { - setLabel("Error"); - QMessageBox::critical(this, tr("Update Error"), tr("An error occurred while checking for updates: ") + errorString); + setLabel(tr("Error")); + QMessageBox::critical(this, tr("Update Error"), + tr("An error occurred while checking for updates:") + QString(" ") + errorString); } void DlgUpdate::downloadError(QString errorString) { setLabel(tr("Error")); enableUpdateButton(true); - QMessageBox::critical(this, tr("Update Error"), tr("An error occurred while downloading an update: ") + errorString); + QMessageBox::critical(this, tr("Update Error"), + tr("An error occurred while downloading an update:") + QString(" ") + errorString); } void DlgUpdate::downloadSuccessful(QUrl filepath) { @@ -190,7 +196,9 @@ void DlgUpdate::downloadSuccessful(QUrl filepath) { } else { setLabel(tr("Error")); QMessageBox::critical(this, tr("Update Error"), - tr("Unable to open the installer. You might be able to manually update by closing Cockatrice and running the installer at %1.").arg(filepath.toLocalFile())); + tr("Cockatrice is unable to open the installer.") + "

" + + tr("Try to update manually by closing Cockatrice and running the installer.") + "
" + + tr("Download location") + QString(": %1").arg(filepath.toLocalFile())); } }