aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-06-13 16:56:37 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-06-13 16:56:37 +0200
commit39cf857db9b926c47f545cba1d7113267260c40e (patch)
tree8aa3a7fbfa8079e7837650c8c3f0e9032ba87df4 /src/qt
parente83474f2ebbae84394f0b86cfea977d3024bd33f (diff)
Internationalization -- initial step, make _ return a std::string to prevent memory leaks
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp8
-rw-r--r--src/qt/transactiondesc.cpp1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index e003267426..a71c348254 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -87,6 +87,14 @@ void MainFrameRepaint()
{
}
+/*
+ Translate string to current locale using Qt.
+ */
+std::string _(const char* psz)
+{
+ return QCoreApplication::translate("bitcoin-core", psz).toStdString();
+}
+
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 4d8a55e99a..a9e55d5a6a 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -2,6 +2,7 @@
#include "guiutil.h"
#include "main.h"
+#include "externui.h"
#include <QString>