summaryrefslogtreecommitdiff
path: root/src/gui/updatewindow.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-08 22:03:33 +0100
committerIra Rice <irarice@gmail.com>2009-01-08 16:27:30 -0700
commit193ccbdba8031a351ea622f8842b6d9a0b6cfd43 (patch)
tree5e62faa24be231e60a3aa2643fa233f356ac23c7 /src/gui/updatewindow.cpp
parent3f8387402ee7b528026450232cb457c8ae1cf4e2 (diff)
downloadmana-193ccbdba8031a351ea622f8842b6d9a0b6cfd43.tar.gz
mana-193ccbdba8031a351ea622f8842b6d9a0b6cfd43.tar.bz2
mana-193ccbdba8031a351ea622f8842b6d9a0b6cfd43.tar.xz
mana-193ccbdba8031a351ea622f8842b6d9a0b6cfd43.zip
Made remaining dialogs translatable
Most strings are now translatable. Please do report any missing ones. Strings excluded from translation are anything that gets written to the log file or is otherwise not shown in the GUI. Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
Diffstat (limited to 'src/gui/updatewindow.cpp')
-rw-r--r--src/gui/updatewindow.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index e0a9da2e..72cbb34a 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -43,6 +43,7 @@
#include "../resources/resourcemanager.h"
+#include "../utils/gettext.h"
#include "../utils/tostring.h"
/**
@@ -75,7 +76,7 @@ loadTextFile(const std::string &fileName)
std::ifstream fin(fileName.c_str());
if (!fin) {
- logger->log("Couldn't load text file: %s", fileName.c_str());
+ logger->log(_("Couldn't load text file: %s"), fileName.c_str());
return lines;
}
@@ -90,7 +91,7 @@ loadTextFile(const std::string &fileName)
UpdaterWindow::UpdaterWindow(const std::string &updateHost,
const std::string &updatesDir):
- Window("Updating..."),
+ Window(_("Updating...")),
mThread(NULL),
mDownloadStatus(UPDATE_NEWS),
mUpdateHost(updateHost),
@@ -109,10 +110,10 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost,
mBrowserBox = new BrowserBox();
mScrollArea = new ScrollArea(mBrowserBox);
- mLabel = new gcn::Label("Connecting...");
+ mLabel = new gcn::Label(_("Connecting..."));
mProgressBar = new ProgressBar(0.0, 310, 20, 168, 116, 31);
- mCancelButton = new Button("Cancel", "cancel", this);
- mPlayButton = new Button("Play", "play", this);
+ mCancelButton = new Button(_("Cancel"), "cancel", this);
+ mPlayButton = new Button(_("Play"), "play", this);
mBrowserBox->setOpaque(false);
mPlayButton->setEnabled(false);
@@ -193,7 +194,7 @@ void UpdaterWindow::loadNews()
{
if (!mMemoryBuffer)
{
- logger->log("Couldn't load news");
+ logger->log(_("Couldn't load news"));
return;
}
@@ -324,8 +325,8 @@ int UpdaterWindow::downloadThread(void *ptr)
{
case CURLE_COULDNT_CONNECT:
default:
- std::cerr << "curl error " << res << ": "
- << uw->mCurlError << " host: " << url.c_str()
+ std::cerr << _("curl error ") << res << ": "
+ << uw->mCurlError << _(" host: ") << url.c_str()
<< std::endl;
break;
}
@@ -360,7 +361,7 @@ int UpdaterWindow::downloadThread(void *ptr)
// Remove the corrupted file
::remove(outFilename.c_str());
logger->log(
- "Checksum for file %s failed: (%lx/%lx)",
+ _("Checksum for file %s failed: (%lx/%lx)"),
uw->mCurrentFile.c_str(),
adler, uw->mCurrentChecksum);
attempts++;
@@ -410,7 +411,7 @@ void UpdaterWindow::download()
if (mThread == NULL)
{
- logger->log("Unable to create mThread");
+ logger->log(_("Unable to create mThread"));
mDownloadStatus = UPDATE_ERROR;
}
}
@@ -448,9 +449,9 @@ void UpdaterWindow::logic()
mThread = NULL;
}
mBrowserBox->addRow("");
- mBrowserBox->addRow("##1 The update process is incomplete.");
- mBrowserBox->addRow("##1 It is strongly recommended that");
- mBrowserBox->addRow("##1 you try again later");
+ mBrowserBox->addRow(_("##1 The update process is incomplete."));
+ mBrowserBox->addRow(_("##1 It is strongly recommended that"));
+ mBrowserBox->addRow(_("##1 you try again later"));
mBrowserBox->addRow(mCurlError);
mScrollArea->setVerticalScrollAmount(
mScrollArea->getVerticalMaxScroll());
@@ -504,7 +505,7 @@ void UpdaterWindow::logic()
}
else
{
- logger->log("%s already here", mCurrentFile.c_str());
+ logger->log(_("%s already here"), mCurrentFile.c_str());
}
mLineIndex++;
}
@@ -517,7 +518,7 @@ void UpdaterWindow::logic()
break;
case UPDATE_COMPLETE:
enable();
- setLabel("Completed");
+ setLabel(_("Completed"));
break;
case UPDATE_IDLE:
break;