all builds are now with wxWidgets-2.9.0, we are now using UTF-8,
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>
Wed, 17 Feb 2010 17:22:01 +0000 (17:22 +0000)
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>
Wed, 17 Feb 2010 17:22:01 +0000 (17:22 +0000)
added support for language translation file locale/<lang>/LC_MESSAGES/bitcoin.mo
-- version 0.2.2

16 files changed:
build-msw.txt
build-unix.txt
locale/readme.txt [new file with mode: 0644]
main.cpp
makefile.mingw [moved from makefile with 78% similarity]
makefile.unix [moved from makefile.unix.wx2.9 with 89% similarity]
makefile.unix.wx2.8 [deleted file]
makefile.vc
serialize.h
ui.cpp
ui.h
uibase.cpp
uibase.h
uiproject.fbp
util.cpp
util.h

index 9786255..adb526a 100644 (file)
@@ -29,11 +29,11 @@ Dependencies
 ------------\r
 Libraries you need to download separately and build:\r
 \r
-              default path   download\r
-wxWidgets      \wxwidgets     prebuilt: http://wxpack.sourceforge.net\r
-OpenSSL        \openssl       http://www.openssl.org/source/\r
-Berkeley DB    \db            http://www.oracle.com/technology/software/products/berkeley-db/index.html\r
-Boost          \boost         http://www.boost.org/users/download/\r
+             default path  download\r
+wxWidgets-2.9  \wxwidgets   http://www.wxwidgets.org/downloads/\r
+OpenSSL        \openssl     http://www.openssl.org/source/\r
+Berkeley DB    \db          http://www.oracle.com/technology/software/products/berkeley-db/index.html\r
+Boost          \boost       http://www.boost.org/users/download/\r
 \r
 Their licenses:\r
 wxWidgets      LGPL 2.1 with very liberal exceptions\r
@@ -43,10 +43,10 @@ Boost          MIT-like license
 \r
 Versions used in this release:\r
 MinGW GCC    3.4.5\r
-wxWidgets    2.8.9\r
+wxWidgets    2.9.0\r
 OpenSSL      0.9.8k\r
 Berkeley DB  4.7.25.NC\r
-Boost        1.34.1\r
+Boost        1.42.1\r
 \r
 \r
 Notes\r
@@ -59,6 +59,14 @@ The release is built with GCC and then "strip bitcoin.exe" to strip the debug
 symbols, which reduces the executable size by about 90%.\r
 \r
 \r
+wxWidgets\r
+---------\r
+cd \wxwidgets\build\msw\r
+make -f makefile.gcc\r
+ or\r
+nmake -f makefile.vc\r
+\r
+\r
 OpenSSL\r
 -------\r
 Bitcoin does not use any encryption.  If you want to do a no-everything\r
@@ -104,5 +112,5 @@ download bjam.exe from
 http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941\r
 cd \boost\r
 bjam toolset=gcc --build-type=complete stage\r
-or\r
+ or\r
 bjam toolset=msvc --build-type=complete stage\r
index f1a72ea..5e3f574 100644 (file)
@@ -20,15 +20,11 @@ sudo apt-get install libdb4.7-dev
 sudo apt-get install libdb4.7++-dev\r
 sudo apt-get install libboost-dev\r
 \r
-The release was built with wxWidgets 2.8.9 ansi on 32-bit.  The current\r
-sourcecode can be built on 64-bit with wxWidgets 2.9.0.\r
+We're now using wxWidgets 2.9, which uses UTF-8.\r
 \r
-There is currently no libwxgtk2.8-ansi-dev debian package for Karmic.\r
-libwxgtk2.8-dev is the "unicode" build, but for wxWidgets 2.8 "unicode"\r
-means wchar, not UTF-8.  wchar wxString doesn't convert to std::string.\r
-We haven't been able to compile the 2.8 versions on 64-bit.\r
-\r
-wxWidgets 2.9 is UTF-8 and compiles on 64-bit.\r
+There isn't currently a debian package of wxWidgets we can use.  The 2.8\r
+packages for Karmic are UTF-16 unicode and won't work for us, and we've had\r
+trouble building 2.8 on 64-bit.\r
 \r
 You need to download wxWidgets from http://www.wxwidgets.org/downloads/\r
 and build it yourself.  See the build instructions and configure parameters\r
@@ -42,9 +38,9 @@ Boost          MIT-like license
 Versions used in this release:\r
 GCC          4.3.3\r
 OpenSSL      0.9.8k\r
-wxWidgets    2.8.9\r
+wxWidgets    2.9.0\r
 Berkeley DB  4.7.25.NC\r
-Boost        1.40.0\r
+Boost        1.38.0\r
 \r
 \r
 Notes\r
@@ -59,7 +55,9 @@ symbols, which reduces the executable size by about 90%.
 \r
 wxWidgets\r
 ---------\r
-cd /usr/local/wxWidgets-2.8.9 or 2.9.0\r
+cd /usr/local\r
+tar -xzvf wxWidgets-2.9.0.tar.gz\r
+cd /usr/local/wxWidgets-2.9.0\r
 mkdir buildgtk\r
 cd buildgtk\r
 ../configure --with-gtk --enable-debug --disable-shared --enable-monolithic\r
@@ -72,7 +70,7 @@ ldconfig
 Boost\r
 -----\r
 If you want to build Boost yourself,\r
-cd /usr/local/boost_1_40_0\r
+cd /usr/local/boost_1_42_0\r
 su\r
 ./bootstrap.sh\r
 ./bjam install\r
diff --git a/locale/readme.txt b/locale/readme.txt
new file mode 100644 (file)
index 0000000..9fca3ce
--- /dev/null
@@ -0,0 +1,5 @@
+put bitcoin.po and bitcoin.mo files at:\r
+locale/<langcode>/LC_MESSAGES/bitcoin.mo and .po\r
+\r
+.po is the sourcefile\r
+.mo is the compiled translation\r
index 3391a29..665a78e 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1460,27 +1460,13 @@ bool ScanMessageStart(Stream& s)
 \r
 bool CheckDiskSpace(int64 nAdditionalBytes)\r
 {\r
-#ifdef __WXMSW__\r
-    uint64 nFreeBytesAvailable = 0;     // bytes available to caller\r
-    uint64 nTotalNumberOfBytes = 0;     // bytes on disk\r
-    uint64 nTotalNumberOfFreeBytes = 0; // free bytes on disk\r
-    if (!GetDiskFreeSpaceEx(GetDataDir().c_str(),\r
-            (PULARGE_INTEGER)&nFreeBytesAvailable,\r
-            (PULARGE_INTEGER)&nTotalNumberOfBytes,\r
-            (PULARGE_INTEGER)&nTotalNumberOfFreeBytes))\r
-    {\r
-        printf("ERROR: GetDiskFreeSpaceEx() failed\n");\r
-        return true;\r
-    }\r
-#else\r
     uint64 nFreeBytesAvailable = filesystem::space(GetDataDir()).available;\r
-#endif\r
 \r
     // Check for 15MB because database could create another 10MB log file at any time\r
     if (nFreeBytesAvailable < (int64)15000000 + nAdditionalBytes)\r
     {\r
         fShutdown = true;\r
-        ThreadSafeMessageBox("Warning: Your disk space is low  ", "Bitcoin", wxOK | wxICON_EXCLAMATION);\r
+        ThreadSafeMessageBox(_("Warning: Disk space is low  "), "Bitcoin", wxOK | wxICON_EXCLAMATION);\r
         CreateThread(Shutdown, NULL);\r
         return false;\r
     }\r
@@ -2962,16 +2948,16 @@ string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew)
         {\r
             string strError;\r
             if (nValue + nFeeRequired > GetBalance())\r
-                strError = strprintf("Error: This is an oversized transaction that requires a transaction fee of %s  ", FormatMoney(nFeeRequired).c_str());\r
+                strError = strprintf(_("Error: This is an oversized transaction that requires a transaction fee of %s  "), FormatMoney(nFeeRequired).c_str());\r
             else\r
-                strError = "Error: Transaction creation failed  ";\r
+                strError = _("Error: Transaction creation failed  ");\r
             printf("SendMoney() : %s", strError.c_str());\r
             return strError;\r
         }\r
         if (!CommitTransactionSpent(wtxNew, key))\r
         {\r
             printf("SendMoney() : Error finalizing transaction");\r
-            return "Error finalizing transaction";\r
+            return _("Error finalizing transaction");\r
         }\r
 \r
         // Track how many getdata requests our transaction gets\r
@@ -2985,7 +2971,7 @@ string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew)
         {\r
             // This must not fail. The transaction has already been signed and recorded.\r
             printf("SendMoney() : Error: Transaction not valid");\r
-            return "Error: The transaction was rejected.  This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.";\r
+            return _("Error: The transaction was rejected.  This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");\r
         }\r
         wtxNew.RelayWalletTransaction();\r
     }\r
@@ -2999,14 +2985,14 @@ string SendMoneyToBitcoinAddress(string strAddress, int64 nValue, CWalletTx& wtx
 {\r
     // Check amount\r
     if (nValue <= 0)\r
-        return "Invalid amount";\r
+        return _("Invalid amount");\r
     if (nValue + nTransactionFee > GetBalance())\r
-        return "You don't have enough money";\r
+        return _("You don't have enough money");\r
 \r
     // Parse bitcoin address\r
     CScript scriptPubKey;\r
     if (!scriptPubKey.SetBitcoinAddress(strAddress))\r
-        return "Invalid bitcoin address";\r
+        return _("Invalid bitcoin address");\r
 \r
     return SendMoney(scriptPubKey, nValue, wtxNew);\r
 }\r
similarity index 78%
rename from makefile
rename to makefile.mingw
index 71f3744..2644cba 100644 (file)
--- a/makefile
@@ -3,27 +3,30 @@
 # file license.txt or http://www.opensource.org/licenses/mit-license.php.\r
 \r
 \r
-ifneq "$(BUILD)" "debug"\r
-ifneq "$(BUILD)" "release"\r
-BUILD=debug\r
-endif\r
-endif\r
-ifeq "$(BUILD)" "debug"\r
-D=d\r
-DEBUGFLAGS=-g -D__WXDEBUG__\r
-endif\r
+# for wxWidgets-2.8.x, search and replace "mswud"->"mswd" and "29u"->"28"\r
 \r
+INCLUDEPATHS= \\r
+ -I"/boost" \\r
+ -I"/db/build_unix" \\r
+ -I"/openssl/include" \\r
+ -I"/wxwidgets/lib/gcc_lib/mswud" \\r
+ -I"/wxwidgets/include"\r
 \r
+LIBPATHS= \\r
+ -L"/boost/stage/lib" \\r
+ -L"/db/build_unix" \\r
+ -L"/openssl/out" \\r
+ -L"/wxwidgets/lib/gcc_lib"\r
 \r
-INCLUDEPATHS=-I"/boost" -I"/db/build_unix" -I"/openssl/include" -I"/wxwidgets/lib/gcc_lib/mswd" -I"/wxwidgets/include"\r
-LIBPATHS=-L"/boost/stage/lib" -L"/db/build_unix" -L"/openssl/out" -L"/wxwidgets/lib/gcc_lib"\r
 LIBS= \\r
  -l libboost_system-mgw34-mt-d -l libboost_filesystem-mgw34-mt-d \\r
  -l db_cxx \\r
  -l eay32 \\r
- -l wxmsw28$(D)_richtext -l wxmsw28$(D)_html -l wxmsw28$(D)_core -l wxmsw28$(D)_adv -l wxbase28$(D) -l wxtiff$(D) -l wxjpeg$(D) -l wxpng$(D) -l wxzlib$(D) -l wxregex$(D) -l wxexpat$(D) \\r
+ -l wxmsw29ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd \\r
  -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi\r
+\r
 WXDEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH\r
+DEBUGFLAGS=-g -D__WXDEBUG__\r
 CFLAGS=-mthreads -O0 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)\r
 HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h\r
 \r
similarity index 89%
rename from makefile.unix.wx2.9
rename to makefile.unix
index 0b3b09b..a8ec936 100644 (file)
@@ -3,17 +3,6 @@
 # file license.txt or http://www.opensource.org/licenses/mit-license.php.\r
 \r
 \r
-ifneq "$(BUILD)" "debug"\r
-ifneq "$(BUILD)" "release"\r
-BUILD=debug\r
-endif\r
-endif\r
-ifeq "$(BUILD)" "debug"\r
-D=d\r
-DEBUGFLAGS=-g -D__WXDEBUG__\r
-endif\r
-\r
-\r
 \r
 INCLUDEPATHS= \\r
  -I"/usr/include" \\r
@@ -28,12 +17,13 @@ LIBS= \
  -Wl,-Bstatic \\r
    -l boost_system-mt -l boost_filesystem-mt \\r
    -l db_cxx \\r
-   -l wx_gtk2u$(D)-2.9 \\r
+   -l wx_gtk2ud-2.9 \\r
  -Wl,-Bdynamic \\r
    -l crypto \\r
    -l gtk-x11-2.0 -l gthread-2.0 -l SM\r
 \r
 WXDEFS=-D__WXGTK__ -DNOPCH\r
+DEBUGFLAGS=-g -D__WXDEBUG__\r
 CFLAGS=-O0 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)\r
 HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h\r
 \r
diff --git a/makefile.unix.wx2.8 b/makefile.unix.wx2.8
deleted file mode 100644 (file)
index 38d9bc0..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright (c) 2009-2010 Satoshi Nakamoto\r
-# Distributed under the MIT/X11 software license, see the accompanying\r
-# file license.txt or http://www.opensource.org/licenses/mit-license.php.\r
-\r
-\r
-ifneq "$(BUILD)" "debug"\r
-ifneq "$(BUILD)" "release"\r
-BUILD=debug\r
-endif\r
-endif\r
-ifeq "$(BUILD)" "debug"\r
-D=d\r
-DEBUGFLAGS=-g -D__WXDEBUG__\r
-endif\r
-\r
-\r
-\r
-INCLUDEPATHS= \\r
- -I"/usr/include" \\r
- -I"/usr/local/include/wx-2.8" \\r
- -I"/usr/local/lib/wx/include/gtk2-ansi-debug-static-2.8"\r
-\r
-LIBPATHS= \\r
- -L"/usr/lib" \\r
- -L"/usr/local/lib"\r
-\r
-LIBS= \\r
- -Wl,-Bstatic \\r
-   -l boost_system -l boost_filesystem \\r
-   -l db_cxx \\r
-   -l wx_gtk2$(D)-2.8 \\r
- -Wl,-Bdynamic \\r
-   -l crypto \\r
-   -l gtk-x11-2.0 -l gthread-2.0 -l SM\r
-\r
-WXDEFS=-D__WXGTK__ -DNOPCH\r
-CFLAGS=-O0 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)\r
-HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h\r
-\r
-\r
-\r
-all: bitcoin\r
-\r
-\r
-headers.h.gch: headers.h            $(HEADERS)\r
-       g++ -c $(CFLAGS) -o $@ $<\r
-\r
-obj/util.o: util.cpp                $(HEADERS)\r
-       g++ -c $(CFLAGS) -o $@ $<\r
-\r
-obj/script.o: script.cpp            $(HEADERS)\r
-       g++ -c $(CFLAGS) -o $@ $<\r
-\r
-obj/db.o: db.cpp                    $(HEADERS)\r
-       g++ -c $(CFLAGS) -o $@ $<\r
-\r
-obj/net.o: net.cpp                  $(HEADERS)\r
-       g++ -c $(CFLAGS) -o $@ $<\r
-\r
-obj/main.o: main.cpp                $(HEADERS) sha.h\r
-       g++ -c $(CFLAGS) -o $@ $<\r
-\r
-obj/ui.o: ui.cpp                    $(HEADERS)\r
-       g++ -c $(CFLAGS) -o $@ $<\r
-\r
-obj/uibase.o: uibase.cpp            uibase.h\r
-       g++ -c $(CFLAGS) -o $@ $<\r
-\r
-obj/sha.o: sha.cpp                  sha.h\r
-       g++ -c $(CFLAGS) -O3 -o $@ $<\r
-\r
-obj/irc.o: irc.cpp                  $(HEADERS)\r
-       g++ -c $(CFLAGS) -o $@ $<\r
-\r
-obj/rpc.o: rpc.cpp                  $(HEADERS)\r
-       g++ -c $(CFLAGS) -o $@ $<\r
-\r
-\r
-\r
-OBJS=obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o \\r
-        obj/ui.o obj/uibase.o obj/sha.o obj/irc.o obj/rpc.o\r
-\r
-bitcoin: headers.h.gch $(OBJS)\r
-       g++ $(CFLAGS) -o $@ $(LIBPATHS) $(OBJS) $(LIBS)\r
-\r
-clean:\r
-       -rm obj/*\r
-       -rm headers.h.gch\r
index 5ca8de4..c407be3 100644 (file)
@@ -3,26 +3,31 @@
 # file license.txt or http://www.opensource.org/licenses/mit-license.php.\r
 \r
 \r
-!IF "$(BUILD)" != "debug" && "$(BUILD)" != "release"\r
-BUILD=debug\r
-!ENDIF\r
-!IF "$(BUILD)" == "debug"\r
-D=d\r
-DEBUGFLAGS=/Zi /Od /D__WXDEBUG__\r
-!ENDIF\r
+# for wxWidgets-2.8.x, search and replace "mswud"->"mswd" and "29u"->"28"\r
 \r
+INCLUDEPATHS= \\r
+  /I"/boost" \\r
+  /I"/db/build_windows" \\r
+  /I"/openssl/include" \\r
+  /I"/wxwidgets/lib/vc_lib/mswud" \\r
+  /I"/wxwidgets/include"\r
 \r
+LIBPATHS= \\r
+  /LIBPATH:"/boost/stage/lib" \\r
+  /LIBPATH:"/db/build_windows/debug" \\r
+  /LIBPATH:"/openssl/out" \\r
+  /LIBPATH:"/wxwidgets/lib/vc_lib"\r
 \r
-INCLUDEPATHS=/I"/boost" /I"/db/build_windows" /I"/openssl/include" /I"/wxwidgets/lib/vc_lib/mswd" /I"/wxwidgets/include"\r
-LIBPATHS=/LIBPATH:"/boost/stage/lib" /LIBPATH:"/db/build_windows/$(BUILD)" /LIBPATH:"/openssl/out" /LIBPATH:"/wxwidgets/lib/vc_lib"\r
 LIBS= \\r
-    libboost_system-vc80-mt-gd.lib libboost_filesystem-vc80-mt-gd.lib \\r
-    libdb47s$(D).lib \\r
-    libeay32.lib \\r
-    wxmsw28$(D)_richtext.lib wxmsw28$(D)_html.lib wxmsw28$(D)_core.lib wxmsw28$(D)_adv.lib wxbase28$(D).lib wxtiff$(D).lib wxjpeg$(D).lib wxpng$(D).lib wxzlib$(D).lib wxregex$(D).lib wxexpat$(D).lib \\r
-    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib ws2_32.lib shlwapi.lib\r
+  libboost_system-vc80-mt-gd.lib libboost_filesystem-vc80-mt-gd.lib \\r
+  libdb47sd.lib \\r
+  libeay32.lib \\r
+  wxmsw29ud_html.lib wxmsw29ud_core.lib wxmsw29ud_adv.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib \\r
+  kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib ws2_32.lib shlwapi.lib\r
+\r
 WXDEFS=/DWIN32 /D__WXMSW__ /D_WINDOWS /DNOPCH\r
-CFLAGS=/c /nologo /Ob0 /MD$(D) /EHsc /GR /Zm300 $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)\r
+DEBUGFLAGS=/Zi /Od /D__WXDEBUG__\r
+CFLAGS=/c /nologo /Ob0 /MDd /EHsc /GR /Zm300 $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)\r
 HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h\r
 \r
 \r
index 12b58ad..f3b9997 100644 (file)
@@ -19,8 +19,8 @@ class CScript;
 class CDataStream;\r
 class CAutoFile;\r
 \r
-static const int VERSION = 201;\r
-static const char* pszSubVer = ".2";\r
+static const int VERSION = 202;\r
+static const char* pszSubVer = ".0";\r
 \r
 \r
 \r
diff --git a/ui.cpp b/ui.cpp
index f506fcf..87ba19e 100644 (file)
--- a/ui.cpp
+++ b/ui.cpp
@@ -229,8 +229,8 @@ CMainFrame::CMainFrame(wxWindow* parent) : CMainFrameBase(parent)
     m_staticTextBalance->SetSize(140, 17);\r
     // & underlines don't work on the toolbar buttons on gtk\r
     m_toolBar->ClearTools();\r
-    m_toolBar->AddTool(wxID_BUTTONSEND, "Send Coins", wxBitmap(send20_xpm), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString);\r
-    m_toolBar->AddTool(wxID_BUTTONRECEIVE, "Address Book", wxBitmap(addressbook20_xpm), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString);\r
+    m_toolBar->AddTool(wxID_BUTTONSEND, _("Send Coins"), wxBitmap(send20_xpm), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString);\r
+    m_toolBar->AddTool(wxID_BUTTONRECEIVE, _("Address Book"), wxBitmap(addressbook20_xpm), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString);\r
     m_toolBar->Realize();\r
     // resize to fit ubuntu's huge default font\r
     dResize = 1.20;\r
@@ -244,13 +244,13 @@ CMainFrame::CMainFrame(wxWindow* parent) : CMainFrameBase(parent)
     int nDateWidth = DateTimeStr(1229413914).size() * 6 + 8;\r
     if (!strstr(DateTimeStr(1229413914).c_str(), "2008"))\r
         nDateWidth += 12;\r
-    m_listCtrl->InsertColumn(0, "",             wxLIST_FORMAT_LEFT,  dResize * 0);\r
-    m_listCtrl->InsertColumn(1, "",             wxLIST_FORMAT_LEFT,  dResize * 0);\r
-    m_listCtrl->InsertColumn(2, "Status",       wxLIST_FORMAT_LEFT,  dResize * 110);\r
-    m_listCtrl->InsertColumn(3, "Date",         wxLIST_FORMAT_LEFT,  dResize * nDateWidth);\r
-    m_listCtrl->InsertColumn(4, "Description",  wxLIST_FORMAT_LEFT,  dResize * 409 - nDateWidth);\r
-    m_listCtrl->InsertColumn(5, "Debit",        wxLIST_FORMAT_RIGHT, dResize * 79);\r
-    m_listCtrl->InsertColumn(6, "Credit",       wxLIST_FORMAT_RIGHT, dResize * 79);\r
+    m_listCtrl->InsertColumn(0, "",               wxLIST_FORMAT_LEFT,  dResize * 0);\r
+    m_listCtrl->InsertColumn(1, "",               wxLIST_FORMAT_LEFT,  dResize * 0);\r
+    m_listCtrl->InsertColumn(2, _("Status"),      wxLIST_FORMAT_LEFT,  dResize * 110);\r
+    m_listCtrl->InsertColumn(3, _("Date"),        wxLIST_FORMAT_LEFT,  dResize * nDateWidth);\r
+    m_listCtrl->InsertColumn(4, _("Description"), wxLIST_FORMAT_LEFT,  dResize * 409 - nDateWidth);\r
+    m_listCtrl->InsertColumn(5, _("Debit"),       wxLIST_FORMAT_RIGHT, dResize * 79);\r
+    m_listCtrl->InsertColumn(6, _("Credit"),      wxLIST_FORMAT_RIGHT, dResize * 79);\r
 \r
     // Init status bar\r
     int pnWidths[3] = { -100, 88, 290 };\r
@@ -450,19 +450,19 @@ string FormatTxStatus(const CWalletTx& wtx)
     if (!wtx.IsFinal())\r
     {\r
         if (wtx.nLockTime < 500000000)\r
-            return strprintf("Open for %d blocks", nBestHeight - wtx.nLockTime);\r
+            return strprintf(_("Open for %d blocks"), nBestHeight - wtx.nLockTime);\r
         else\r
-            return strprintf("Open until %s", DateTimeStr(wtx.nLockTime).c_str());\r
+            return strprintf(_("Open until %s"), DateTimeStr(wtx.nLockTime).c_str());\r
     }\r
     else\r
     {\r
         int nDepth = wtx.GetDepthInMainChain();\r
         if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)\r
-            return strprintf("%d/offline?", nDepth);\r
+            return strprintf(_("%d/offline?"), nDepth);\r
         else if (nDepth < 6)\r
-            return strprintf("%d/unconfirmed", nDepth);\r
+            return strprintf(_("%d/unconfirmed"), nDepth);\r
         else\r
-            return strprintf("%d confirmations", nDepth);\r
+            return strprintf(_("%d confirmations"), nDepth);\r
     }\r
 }\r
 \r
@@ -547,7 +547,7 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex)
         if (wtx.IsCoinBase())\r
         {\r
             // Coinbase\r
-            strDescription = "Generated";\r
+            strDescription = _("Generated");\r
             if (nCredit == 0)\r
             {\r
                 int64 nUnmatured = 0;\r
@@ -555,15 +555,15 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex)
                     nUnmatured += txout.GetCredit();\r
                 if (wtx.IsInMainChain())\r
                 {\r
-                    strDescription = strprintf("Generated (%s matures in %d more blocks)", FormatMoney(nUnmatured).c_str(), wtx.GetBlocksToMaturity());\r
+                    strDescription = strprintf(_("Generated (%s matures in %d more blocks)"), FormatMoney(nUnmatured).c_str(), wtx.GetBlocksToMaturity());\r
 \r
                     // Check if the block was requested by anyone\r
                     if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)\r
-                        strDescription = "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!";\r
+                        strDescription = _("Generated - Warning: This block was not received by any other nodes and will probably not be accepted!");\r
                 }\r
                 else\r
                 {\r
-                    strDescription = "Generated (not accepted)";\r
+                    strDescription = _("Generated (not accepted)");\r
                 }\r
             }\r
         }\r
@@ -571,7 +571,7 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex)
         {\r
             // Online transaction\r
             if (!mapValue["from"].empty())\r
-                strDescription += "From: " + mapValue["from"];\r
+                strDescription += _("From: ") + mapValue["from"];\r
             if (!mapValue["message"].empty())\r
             {\r
                 if (!strDescription.empty())\r
@@ -594,9 +594,9 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex)
                             string strAddress = PubKeyToAddress(vchPubKey);\r
                             if (mapAddressBook.count(strAddress))\r
                             {\r
-                                //strDescription += "Received payment to ";\r
-                                //strDescription += "Received with address ";\r
-                                strDescription += "From: unknown, To: ";\r
+                                //strDescription += _("Received payment to ");\r
+                                //strDescription += _("Received with address ");\r
+                                strDescription += _("From: unknown, To: ");\r
                                 strDescription += strAddress;\r
                                 /// The labeling feature is just too confusing, so I hid it\r
                                 /// by putting it at the end where it runs off the screen.\r
@@ -636,7 +636,7 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex)
             InsertLine(fNew, nIndex, hash, strSort,\r
                        strStatus,\r
                        nTime ? DateTimeStr(nTime) : "",\r
-                       "Payment to yourself",\r
+                       _("Payment to yourself"),\r
                        "",\r
                        "");\r
             /// issue: can't tell which is the payment and which is the change anymore\r
@@ -670,7 +670,7 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex)
                         strAddress = Hash160ToAddress(hash160);\r
                 }\r
 \r
-                string strDescription = "To: ";\r
+                string strDescription = _("To: ");\r
                 CRITICAL_BLOCK(cs_mapAddressBook)\r
                     if (mapAddressBook.count(strAddress) && !mapAddressBook[strAddress].empty())\r
                         strDescription += mapAddressBook[strAddress] + " ";\r
@@ -960,12 +960,12 @@ void CMainFrame::OnPaintListCtrl(wxPaintEvent& event)
     // Update status bar\r
     string strGen = "";\r
     if (fGenerateBitcoins)\r
-        strGen = "    Generating";\r
+        strGen = _("    Generating");\r
     if (fGenerateBitcoins && vNodes.empty())\r
-        strGen = "(not connected)";\r
+        strGen = _("(not connected)");\r
     m_statusBar->SetStatusText(strGen, 1);\r
 \r
-    string strStatus = strprintf("     %d connections     %d blocks     %d transactions", vNodes.size(), nBestHeight + 1, nTransactionCount);\r
+    string strStatus = strprintf(_("     %d connections     %d blocks     %d transactions"), vNodes.size(), nBestHeight + 1, nTransactionCount);\r
     m_statusBar->SetStatusText(strStatus, 2);\r
 \r
     if (fDebug && GetTime() - nThreadSocketHandlerHeartbeat > 60)\r
@@ -1160,20 +1160,20 @@ CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetails
 \r
 \r
 \r
-        strHTML += "<b>Status:</b> " + FormatTxStatus(wtx);\r
+        strHTML += _("<b>Status:</b> ") + FormatTxStatus(wtx);\r
         int nRequests = wtx.GetRequestCount();\r
         if (nRequests != -1)\r
         {\r
             if (nRequests == 0)\r
-                strHTML += ", has not been successfully broadcast yet";\r
+                strHTML += _(", has not been successfully broadcast yet");\r
             else if (nRequests == 1)\r
-                strHTML += strprintf(", broadcast through %d node", nRequests);\r
+                strHTML += strprintf(_(", broadcast through %d node"), nRequests);\r
             else\r
-                strHTML += strprintf(", broadcast through %d nodes", nRequests);\r
+                strHTML += strprintf(_(", broadcast through %d nodes"), nRequests);\r
         }\r
         strHTML += "<br>";\r
 \r
-        strHTML += "<b>Date:</b> " + (nTime ? DateTimeStr(nTime) : "") + "<br>";\r
+        strHTML += _("<b>Date:</b> ") + (nTime ? DateTimeStr(nTime) : "") + "<br>";\r
 \r
 \r
         //\r
@@ -1181,13 +1181,13 @@ CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetails
         //\r
         if (wtx.IsCoinBase())\r
         {\r
-            strHTML += "<b>Source:</b> Generated<br>";\r
+            strHTML += _("<b>Source:</b> Generated<br>");\r
         }\r
         else if (!wtx.mapValue["from"].empty())\r
         {\r
             // Online transaction\r
             if (!wtx.mapValue["from"].empty())\r
-                strHTML += "<b>From:</b> " + HtmlEscape(wtx.mapValue["from"]) + "<br>";\r
+                strHTML += _("<b>From:</b> ") + HtmlEscape(wtx.mapValue["from"]) + "<br>";\r
         }\r
         else\r
         {\r
@@ -1205,13 +1205,13 @@ CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetails
                             string strAddress = PubKeyToAddress(vchPubKey);\r
                             if (mapAddressBook.count(strAddress))\r
                             {\r
-                                strHTML += "<b>From:</b> unknown<br>";\r
-                                strHTML += "<b>To:</b> ";\r
+                                strHTML += string() + _("<b>From:</b> ") + _("unknown") + "<br>";\r
+                                strHTML += _("<b>To:</b> ");\r
                                 strHTML += HtmlEscape(strAddress);\r
                                 if (!mapAddressBook[strAddress].empty())\r
-                                    strHTML += " (yours, label: " + mapAddressBook[strAddress] + ")";\r
+                                    strHTML += _(" (yours, label: ") + mapAddressBook[strAddress] + ")";\r
                                 else\r
-                                    strHTML += " (yours)";\r
+                                    strHTML += _(" (yours)");\r
                                 strHTML += "<br>";\r
                             }\r
                         }\r
@@ -1230,7 +1230,7 @@ CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetails
         {\r
             // Online transaction\r
             strAddress = wtx.mapValue["to"];\r
-            strHTML += "<b>To:</b> ";\r
+            strHTML += _("<b>To:</b> ");\r
             if (mapAddressBook.count(strAddress) && !mapAddressBook[strAddress].empty())\r
                 strHTML += mapAddressBook[strAddress] + " ";\r
             strHTML += HtmlEscape(strAddress) + "<br>";\r
@@ -1248,17 +1248,19 @@ CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetails
             int64 nUnmatured = 0;\r
             foreach(const CTxOut& txout, wtx.vout)\r
                 nUnmatured += txout.GetCredit();\r
+            strHTML += _("<b>Credit:</b> ");\r
             if (wtx.IsInMainChain())\r
-                strHTML += strprintf("<b>Credit:</b> (%s matures in %d more blocks)<br>", FormatMoney(nUnmatured).c_str(), wtx.GetBlocksToMaturity());\r
+                strHTML += strprintf(_("(%s matures in %d more blocks)"), FormatMoney(nUnmatured).c_str(), wtx.GetBlocksToMaturity());\r
             else\r
-                strHTML += "<b>Credit:</b> (not accepted)<br>";\r
+                strHTML += _("(not accepted)");\r
+            strHTML += "<br>";\r
         }\r
         else if (nNet > 0)\r
         {\r
             //\r
             // Credit\r
             //\r
-            strHTML += "<b>Credit:</b> " + FormatMoney(nNet) + "<br>";\r
+            strHTML += _("<b>Credit:</b> ") + FormatMoney(nNet) + "<br>";\r
         }\r
         else\r
         {\r
@@ -1287,7 +1289,7 @@ CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetails
                         if (ExtractHash160(txout.scriptPubKey, hash160))\r
                         {\r
                             string strAddress = Hash160ToAddress(hash160);\r
-                            strHTML += "<b>To:</b> ";\r
+                            strHTML += _("<b>To:</b> ");\r
                             if (mapAddressBook.count(strAddress) && !mapAddressBook[strAddress].empty())\r
                                 strHTML += mapAddressBook[strAddress] + " ";\r
                             strHTML += strAddress;\r
@@ -1295,7 +1297,7 @@ CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetails
                         }\r
                     }\r
 \r
-                    strHTML += "<b>Debit:</b> " + FormatMoney(-txout.nValue) + "<br>";\r
+                    strHTML += _("<b>Debit:</b> ") + FormatMoney(-txout.nValue) + "<br>";\r
                 }\r
 \r
                 if (fAllToMe)\r
@@ -1303,13 +1305,13 @@ CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetails
                     // Payment to self\r
                     /// issue: can't tell which is the payment and which is the change anymore\r
                     //int64 nValue = wtx.vout[0].nValue;\r
-                    //strHTML += "<b>Debit:</b> " + FormatMoney(-nValue) + "<br>";\r
-                    //strHTML += "<b>Credit:</b> " + FormatMoney(nValue) + "<br>";\r
+                    //strHTML += _("<b>Debit:</b> ") + FormatMoney(-nValue) + "<br>";\r
+                    //strHTML += _("<b>Credit:</b> ") + FormatMoney(nValue) + "<br>";\r
                 }\r
 \r
                 int64 nTxFee = nDebit - wtx.GetValueOut();\r
                 if (nTxFee > 0)\r
-                    strHTML += "<b>Transaction fee:</b> " + FormatMoney(-nTxFee) + "<br>";\r
+                    strHTML += _("<b>Transaction fee:</b> ") + FormatMoney(-nTxFee) + "<br>";\r
             }\r
             else\r
             {\r
@@ -1318,24 +1320,24 @@ CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetails
                 //\r
                 foreach(const CTxIn& txin, wtx.vin)\r
                     if (txin.IsMine())\r
-                        strHTML += "<b>Debit:</b> " + FormatMoney(-txin.GetDebit()) + "<br>";\r
+                        strHTML += _("<b>Debit:</b> ") + FormatMoney(-txin.GetDebit()) + "<br>";\r
                 foreach(const CTxOut& txout, wtx.vout)\r
                     if (txout.IsMine())\r
-                        strHTML += "<b>Credit:</b> " + FormatMoney(txout.GetCredit()) + "<br>";\r
+                        strHTML += _("<b>Credit:</b> ") + FormatMoney(txout.GetCredit()) + "<br>";\r
             }\r
         }\r
 \r
-        strHTML += "<b>Net amount:</b> " + FormatMoney(nNet, true) + "<br>";\r
+        strHTML += _("<b>Net amount:</b> ") + FormatMoney(nNet, true) + "<br>";\r
 \r
 \r
         //\r
         // Message\r
         //\r
         if (!wtx.mapValue["message"].empty())\r
-            strHTML += "<br><b>Message:</b><br>" + HtmlEscape(wtx.mapValue["message"], true) + "<br>";\r
+            strHTML += string() + "<br><b>" + _("Message:") + "</b><br>" + HtmlEscape(wtx.mapValue["message"], true) + "<br>";\r
 \r
         if (wtx.IsCoinBase())\r
-            strHTML += "<br>Generated coins must wait 120 blocks before they can be spent.  When you generated this block, it was broadcast to the network to be added to the block chain.  If it fails to get into the chain, it will change to \"not accepted\" and not be spendable.  This may occasionally happen if another node generates a block within a few seconds of yours.<br>";\r
+            strHTML += string() + "<br>" + _("Generated coins must wait 120 blocks before they can be spent.  When you generated this block, it was broadcast to the network to be added to the block chain.  If it fails to get into the chain, it will change to \"not accepted\" and not be spendable.  This may occasionally happen if another node generates a block within a few seconds of yours.") + "<br>";\r
 \r
 \r
         //\r
@@ -1402,12 +1404,12 @@ void CTxDetailsDialog::OnButtonOK(wxCommandEvent& event)
 COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent)\r
 {\r
     // Set up list box of page choices\r
-    m_listBox->Append("Main");\r
-    //m_listBox->Append("Test 2");\r
+    m_listBox->Append(_("Main"));\r
+    //m_listBox->Append(_("Test 2"));\r
     m_listBox->SetSelection(0);\r
     SelectPage(0);\r
 #ifndef __WXMSW__\r
-    m_checkBoxMinimizeOnClose->SetLabel("&Minimize on close");\r
+    m_checkBoxMinimizeOnClose->SetLabel(_("&Minimize on close"));\r
     m_checkBoxStartOnSystemStartup->Enable(false); // not implemented yet\r
 #endif\r
 \r
@@ -1559,16 +1561,16 @@ void COptionsDialog::OnButtonApply(wxCommandEvent& event)
 \r
 CAboutDialog::CAboutDialog(wxWindow* parent) : CAboutDialogBase(parent)\r
 {\r
-    m_staticTextVersion->SetLabel(strprintf("version 0.%d.%d beta", VERSION/100, VERSION%100));\r
+    m_staticTextVersion->SetLabel(strprintf(_("version 0.%d.%d beta"), VERSION/100, VERSION%100));\r
 \r
-#if !wxUSE_UNICODE\r
-    // Workaround until upgrade to wxWidgets supporting UTF-8\r
-    // Hack to change the (c) character from UTF-8 back to ANSI\r
+    // Change (c) into UTF-8 or ANSI copyright symbol\r
     wxString str = m_staticTextMain->GetLabel();\r
-    if (str.Find('\xC2') != wxNOT_FOUND)\r
-        str.Remove(str.Find('\xC2'), 1);\r
-    m_staticTextMain->SetLabel(str);\r
+#if wxUSE_UNICODE\r
+    str.Replace("(c)", wxString::FromUTF8("\xC2\xA9"));\r
+#else\r
+    str.Replace("(c)", "\xA9");\r
 #endif\r
+    m_staticTextMain->SetLabel(str);\r
 #ifndef __WXMSW__\r
     // Resize on Linux to make the window fit the text.\r
     // The text was wrapped manually rather than using the Wrap setting because\r
@@ -1577,7 +1579,7 @@ CAboutDialog::CAboutDialog(wxWindow* parent) : CAboutDialogBase(parent)
     if (fontTmp.GetPointSize() > 8);\r
         fontTmp.SetPointSize(8);\r
     m_staticTextMain->SetFont(fontTmp);\r
-    SetSize(GetSize().GetWidth() + 44, GetSize().GetHeight() - 4);\r
+    SetSize(GetSize().GetWidth() + 44, GetSize().GetHeight() + 10);\r
 #endif\r
 }\r
 \r
@@ -1644,8 +1646,8 @@ void CSendDialog::OnTextAddress(wxCommandEvent& event)
     {\r
         strFromSave    = m_textCtrlFrom->GetValue();\r
         strMessageSave = m_textCtrlMessage->GetValue();\r
-        m_textCtrlFrom->SetValue("Will appear as \"From: Unknown\"");\r
-        m_textCtrlMessage->SetValue("Can't include a message when sending to a Bitcoin address");\r
+        m_textCtrlFrom->SetValue(_("Will appear as \"From: Unknown\""));\r
+        m_textCtrlMessage->SetValue(_("Can't include a message when sending to a Bitcoin address"));\r
     }\r
     else if (fEnable && !fEnabledPrev)\r
     {\r
@@ -1697,17 +1699,17 @@ void CSendDialog::OnButtonSend(wxCommandEvent& event)
     int64 nValue = 0;\r
     if (!ParseMoney(m_textCtrlAmount->GetValue(), nValue) || nValue <= 0)\r
     {\r
-        wxMessageBox("Error in amount  ", "Send Coins");\r
+        wxMessageBox(_("Error in amount  "), _("Send Coins"));\r
         return;\r
     }\r
     if (nValue > GetBalance())\r
     {\r
-        wxMessageBox("Amount exceeds your balance  ", "Send Coins");\r
+        wxMessageBox(_("Amount exceeds your balance  "), _("Send Coins"));\r
         return;\r
     }\r
     if (nValue + nTransactionFee > GetBalance())\r
     {\r
-        wxMessageBox(string("Total exceeds your balance when the ") + FormatMoney(nTransactionFee) + " transaction fee is included  ", "Send Coins");\r
+        wxMessageBox(string(_("Total exceeds your balance when the ")) + FormatMoney(nTransactionFee) + _(" transaction fee is included  "), _("Send Coins"));\r
         return;\r
     }\r
 \r
@@ -1723,9 +1725,9 @@ void CSendDialog::OnButtonSend(wxCommandEvent& event)
 \r
         string strError = SendMoney(scriptPubKey, nValue, wtx);\r
         if (strError != "")\r
-            wxMessageBox(strError + "  ", "Sending...");\r
+            wxMessageBox(strError + "  ", _("Sending..."));\r
         else\r
-            wxMessageBox("Payment sent  ", "Sending...");\r
+            wxMessageBox(_("Payment sent  "), _("Sending..."));\r
     }\r
     else\r
     {\r
@@ -1733,7 +1735,7 @@ void CSendDialog::OnButtonSend(wxCommandEvent& event)
         CAddress addr(strAddress);\r
         if (!addr.IsValid())\r
         {\r
-            wxMessageBox("Invalid address  ", "Send Coins");\r
+            wxMessageBox(_("Invalid address  "), _("Send Coins"));\r
             return;\r
         }\r
 \r
@@ -1787,7 +1789,7 @@ CSendingDialog::CSendingDialog(wxWindow* parent, const CAddress& addrIn, int64 n
     SetSize(1.2 * GetSize().GetWidth(), 1.08 * GetSize().GetHeight());\r
 #endif\r
 \r
-    SetTitle(strprintf("Sending %s to %s", FormatMoney(nPrice).c_str(), wtx.mapValue["to"].c_str()));\r
+    SetTitle(strprintf(_("Sending %s to %s"), FormatMoney(nPrice).c_str(), wtx.mapValue["to"].c_str()));\r
     m_textCtrlStatus->SetValue("");\r
 \r
     CreateThread(SendingDialogStartTransfer, this);\r
@@ -1859,13 +1861,13 @@ void CSendingDialog::OnPaint(wxPaintEvent& event)
     }\r
     if (fAbort && fCanCancel && IsShown())\r
     {\r
-        strcpy(pszStatus, "CANCELLED");\r
+        strcpy(pszStatus, _("CANCELLED"));\r
         m_buttonOK->Enable(true);\r
         m_buttonOK->SetFocus();\r
         m_buttonCancel->Enable(false);\r
-        m_buttonCancel->SetLabel("Cancelled");\r
+        m_buttonCancel->SetLabel(_("Cancelled"));\r
         Close();\r
-        wxMessageBox("Transfer cancelled  ", "Sending...", wxOK, this);\r
+        wxMessageBox(_("Transfer cancelled  "), _("Sending..."), wxOK, this);\r
     }\r
     event.Skip();\r
 }\r
@@ -1893,7 +1895,7 @@ bool CSendingDialog::Status()
     if (fAbort && fCanCancel)\r
     {\r
         memset(pszStatus, 0, 10);\r
-        strcpy(pszStatus, "CANCELLED");\r
+        strcpy(pszStatus, _("CANCELLED"));\r
         Repaint();\r
         fWorkDone = true;\r
         return false;\r
@@ -1919,7 +1921,7 @@ bool CSendingDialog::Error(const string& str)
 {\r
     fCanCancel = false;\r
     fWorkDone = true;\r
-    Status(string("Error: ") + str);\r
+    Status(string(_("Error: ")) + str);\r
     return false;\r
 }\r
 \r
@@ -1933,22 +1935,22 @@ void CSendingDialog::StartTransfer()
     // Make sure we have enough money\r
     if (nPrice + nTransactionFee > GetBalance())\r
     {\r
-        Error("You don't have enough money");\r
+        Error(_("You don't have enough money"));\r
         return;\r
     }\r
 \r
     // We may have connected already for product details\r
-    if (!Status("Connecting..."))\r
+    if (!Status(_("Connecting...")))\r
         return;\r
     CNode* pnode = ConnectNode(addr, 15 * 60);\r
     if (!pnode)\r
     {\r
-        Error("Unable to connect");\r
+        Error(_("Unable to connect"));\r
         return;\r
     }\r
 \r
     // Send order to seller, with response going to OnReply2 via event handler\r
-    if (!Status("Requesting public key..."))\r
+    if (!Status(_("Requesting public key...")))\r
         return;\r
     pnode->PushRequest("checkorder", wtx, SendingDialogOnReply2, this);\r
 }\r
@@ -1960,7 +1962,7 @@ void SendingDialogOnReply2(void* parg, CDataStream& vRecv)
 \r
 void CSendingDialog::OnReply2(CDataStream& vRecv)\r
 {\r
-    if (!Status("Received public key..."))\r
+    if (!Status(_("Received public key...")))\r
         return;\r
 \r
     CScript scriptPubKey;\r
@@ -1972,7 +1974,7 @@ void CSendingDialog::OnReply2(CDataStream& vRecv)
         {\r
             string strMessage;\r
             vRecv >> strMessage;\r
-            Error("Transfer was not accepted");\r
+            Error(_("Transfer was not accepted"));\r
             //// todo: enlarge the window and enable a hidden white box to put seller's message\r
             return;\r
         }\r
@@ -1981,7 +1983,7 @@ void CSendingDialog::OnReply2(CDataStream& vRecv)
     catch (...)\r
     {\r
         //// what do we want to do about this?\r
-        Error("Invalid response received");\r
+        Error(_("Invalid response received"));\r
         return;\r
     }\r
 \r
@@ -1996,11 +1998,11 @@ void CSendingDialog::OnReply2(CDataStream& vRecv)
     CRITICAL_BLOCK(cs_main)\r
     {\r
         // Pay\r
-        if (!Status("Creating transaction..."))\r
+        if (!Status(_("Creating transaction...")))\r
             return;\r
         if (nPrice + nTransactionFee > GetBalance())\r
         {\r
-            Error("You don't have enough money");\r
+            Error(_("You don't have enough money"));\r
             return;\r
         }\r
         CKey key;\r
@@ -2008,9 +2010,9 @@ void CSendingDialog::OnReply2(CDataStream& vRecv)
         if (!CreateTransaction(scriptPubKey, nPrice, wtx, key, nFeeRequired))\r
         {\r
             if (nPrice + nFeeRequired > GetBalance())\r
-                Error(strprintf("This is an oversized transaction that requires a transaction fee of %s", FormatMoney(nFeeRequired).c_str()));\r
+                Error(strprintf(_("This is an oversized transaction that requires a transaction fee of %s"), FormatMoney(nFeeRequired).c_str()));\r
             else\r
-                Error("Transaction creation failed");\r
+                Error(_("Transaction creation failed"));\r
             return;\r
         }\r
 \r
@@ -2018,7 +2020,7 @@ void CSendingDialog::OnReply2(CDataStream& vRecv)
         CNode* pnode = ConnectNode(addr, 2 * 60 * 60);\r
         if (!pnode)\r
         {\r
-            Error("Lost connection, transaction cancelled");\r
+            Error(_("Lost connection, transaction cancelled"));\r
             return;\r
         }\r
 \r
@@ -2034,13 +2036,13 @@ void CSendingDialog::OnReply2(CDataStream& vRecv)
                 return;\r
             fCanCancel = false;\r
         }\r
-        if (!Status("Sending payment..."))\r
+        if (!Status(_("Sending payment...")))\r
             return;\r
 \r
         // Commit\r
         if (!CommitTransactionSpent(wtx, key))\r
         {\r
-            Error("Error finalizing payment");\r
+            Error(_("Error finalizing payment"));\r
             return;\r
         }\r
 \r
@@ -2052,7 +2054,7 @@ void CSendingDialog::OnReply2(CDataStream& vRecv)
             printf("ERROR: CSendingDialog : wtxNew.AcceptTransaction() %s failed\n", wtx.GetHash().ToString().c_str());\r
         wtx.RelayWalletTransaction();\r
 \r
-        Status("Waiting for confirmation...");\r
+        Status(_("Waiting for confirmation..."));\r
         MainFrameRepaint();\r
     }\r
 }\r
@@ -2070,22 +2072,22 @@ void CSendingDialog::OnReply3(CDataStream& vRecv)
         vRecv >> nRet;\r
         if (nRet > 0)\r
         {\r
-            Error("The payment was sent, but the recipient was unable to verify it.\n"\r
-                  "The transaction is recorded and will credit to the recipient,\n"\r
-                  "but the comment information will be blank.");\r
+            Error(_("The payment was sent, but the recipient was unable to verify it.\n"\r
+                    "The transaction is recorded and will credit to the recipient,\n"\r
+                    "but the comment information will be blank."));\r
             return;\r
         }\r
     }\r
     catch (...)\r
     {\r
         //// what do we want to do about this?\r
-        Error("Payment was sent, but an invalid response was received");\r
+        Error(_("Payment was sent, but an invalid response was received"));\r
         return;\r
     }\r
 \r
     fSuccess = true;\r
     fWorkDone = true;\r
-    Status("Payment completed");\r
+    Status(_("Payment completed"));\r
 }\r
 \r
 \r
@@ -2101,8 +2103,8 @@ void CSendingDialog::OnReply3(CDataStream& vRecv)
 CYourAddressDialog::CYourAddressDialog(wxWindow* parent, const string& strInitSelected) : CYourAddressDialogBase(parent)\r
 {\r
     // Init column headers\r
-    m_listCtrl->InsertColumn(0, "Label", wxLIST_FORMAT_LEFT, 200);\r
-    m_listCtrl->InsertColumn(1, "Bitcoin Address", wxLIST_FORMAT_LEFT, 350);\r
+    m_listCtrl->InsertColumn(0, _("Label"), wxLIST_FORMAT_LEFT, 200);\r
+    m_listCtrl->InsertColumn(1, _("Bitcoin Address"), wxLIST_FORMAT_LEFT, 350);\r
     m_listCtrl->SetFocus();\r
 \r
     // Fill listctrl with address book data\r
@@ -2162,7 +2164,7 @@ void CYourAddressDialog::OnButtonRename(wxCommandEvent& event)
         return;\r
     string strName = (string)m_listCtrl->GetItemText(nIndex);\r
     string strAddress = (string)GetItemText(m_listCtrl, nIndex, 1);\r
-    CGetTextFromUserDialog dialog(this, "Edit Address Label", "New Label", strName);\r
+    CGetTextFromUserDialog dialog(this, _("Edit Address Label"), _("New Label"), strName);\r
     if (!dialog.ShowModal())\r
         return;\r
     strName = dialog.GetValue();\r
@@ -2176,7 +2178,7 @@ void CYourAddressDialog::OnButtonRename(wxCommandEvent& event)
 void CYourAddressDialog::OnButtonNew(wxCommandEvent& event)\r
 {\r
     // Ask name\r
-    CGetTextFromUserDialog dialog(this, "New Bitcoin Address", "Label", "");\r
+    CGetTextFromUserDialog dialog(this, _("New Bitcoin Address"), _("Label"), "");\r
     if (!dialog.ShowModal())\r
         return;\r
     string strName = dialog.GetValue();\r
@@ -2236,8 +2238,8 @@ CAddressBookDialog::CAddressBookDialog(wxWindow* parent, const wxString& strInit
         m_buttonCancel->Show(false);\r
 \r
     // Init column headers\r
-    m_listCtrl->InsertColumn(0, "Name", wxLIST_FORMAT_LEFT, 200);\r
-    m_listCtrl->InsertColumn(1, "Address", wxLIST_FORMAT_LEFT, 350);\r
+    m_listCtrl->InsertColumn(0, _("Name"), wxLIST_FORMAT_LEFT, 200);\r
+    m_listCtrl->InsertColumn(1, _("Address"), wxLIST_FORMAT_LEFT, 350);\r
     m_listCtrl->SetFocus();\r
 \r
     // Set Icon\r
@@ -2307,7 +2309,7 @@ bool CAddressBookDialog::CheckIfMine(const string& strAddress, const string& str
     uint160 hash160;\r
     bool fMine = (AddressToHash160(strAddress, hash160) && mapPubKeys.count(hash160));\r
     if (fMine)\r
-        wxMessageBox("This is one of your own addresses for receiving payments and cannot be entered in the address book.  ", strTitle);\r
+        wxMessageBox(_("This is one of your own addresses for receiving payments and cannot be entered in the address book.  "), strTitle);\r
     return fMine;\r
 }\r
 \r
@@ -2322,13 +2324,13 @@ void CAddressBookDialog::OnButtonEdit(wxCommandEvent& event)
     string strAddressOrg = strAddress;\r
     do\r
     {\r
-        CGetTextFromUserDialog dialog(this, "Edit Address", "Name", strName, "Address", strAddress);\r
+        CGetTextFromUserDialog dialog(this, _("Edit Address"), _("Name"), strName, _("Address"), strAddress);\r
         if (!dialog.ShowModal())\r
             return;\r
         strName = dialog.GetValue1();\r
         strAddress = dialog.GetValue2();\r
     }\r
-    while (CheckIfMine(strAddress, "Edit Address"));\r
+    while (CheckIfMine(strAddress, _("Edit Address")));\r
 \r
     // Change name\r
     if (strAddress != strAddressOrg)\r
@@ -2346,13 +2348,13 @@ void CAddressBookDialog::OnButtonNew(wxCommandEvent& event)
     string strAddress;\r
     do\r
     {\r
-        CGetTextFromUserDialog dialog(this, "New Address", "Name", strName, "Address", strAddress);\r
+        CGetTextFromUserDialog dialog(this, _("New Address"), _("Name"), strName, _("Address"), strAddress);\r
         if (!dialog.ShowModal())\r
             return;\r
         strName = dialog.GetValue1();\r
         strAddress = dialog.GetValue2();\r
     }\r
-    while (CheckIfMine(strAddress, "New Address"));\r
+    while (CheckIfMine(strAddress, _("New Address")));\r
 \r
     // Add to list and select it\r
     SetAddressBookName(strAddress, strName);\r
@@ -2436,11 +2438,11 @@ void CMyTaskBarIcon::Show(bool fShow)
     static char pszPrevTip[200];\r
     if (fShow)\r
     {\r
-        string strTooltip = "Bitcoin";\r
+        string strTooltip = _("Bitcoin");\r
         if (fGenerateBitcoins)\r
-            strTooltip = "Bitcoin - Generating";\r
+            strTooltip = _("Bitcoin - Generating");\r
         if (fGenerateBitcoins && vNodes.empty())\r
-            strTooltip = "Bitcoin - (not connected)";\r
+            strTooltip = _("Bitcoin - (not connected)");\r
 \r
         // Optimization, only update when changed, using char array to be reentrant\r
         if (strncmp(pszPrevTip, strTooltip.c_str(), sizeof(pszPrevTip)-1) != 0)\r
@@ -2515,12 +2517,12 @@ void CMyTaskBarIcon::UpdateTooltip()
 wxMenu* CMyTaskBarIcon::CreatePopupMenu()\r
 {\r
     wxMenu* pmenu = new wxMenu;\r
-    pmenu->Append(ID_TASKBAR_RESTORE, "&Open Bitcoin");\r
-    pmenu->Append(ID_TASKBAR_OPTIONS, "O&ptions...");\r
-    pmenu->AppendCheckItem(ID_TASKBAR_GENERATE, "&Generate Coins")->Check(fGenerateBitcoins);\r
+    pmenu->Append(ID_TASKBAR_RESTORE, _("&Open Bitcoin"));\r
+    pmenu->Append(ID_TASKBAR_OPTIONS, _("O&ptions..."));\r
+    pmenu->AppendCheckItem(ID_TASKBAR_GENERATE, _("&Generate Coins"))->Check(fGenerateBitcoins);\r
 #ifndef __WXMAC_OSX__ // Mac has built-in quit menu\r
     pmenu->AppendSeparator();\r
-    pmenu->Append(ID_TASKBAR_EXIT, "E&xit");\r
+    pmenu->Append(ID_TASKBAR_EXIT, _("E&xit"));\r
 #endif\r
     return pmenu;\r
 }\r
@@ -2542,7 +2544,9 @@ wxMenu* CMyTaskBarIcon::CreatePopupMenu()
 // Define a new application\r
 class CMyApp: public wxApp\r
 {\r
-  public:\r
+public:\r
+    wxLocale m_locale;\r
+\r
     CMyApp(){};\r
     ~CMyApp(){};\r
     bool OnInit();\r
@@ -2584,9 +2588,9 @@ bool CMyApp::OnInit()
 bool CMyApp::OnInit2()\r
 {\r
 #ifdef _MSC_VER\r
-    // Turn off microsoft heap dump noise for now\r
+    // Turn off microsoft heap dump noise\r
     _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);\r
-    _CrtSetReportFile(_CRT_WARN, CreateFile("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0));\r
+    _CrtSetReportFile(_CRT_WARN, CreateFileA("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0));\r
 #endif\r
 #if defined(__WXMSW__) && defined(__WXDEBUG__)\r
     // Disable malfunctioning wxWidgets debug assertion\r
@@ -2599,6 +2603,31 @@ bool CMyApp::OnInit2()
     SetAppName("bitcoin");\r
     umask(077);\r
 #endif\r
+#ifdef __WXMSW__\r
+#if wxUSE_UNICODE\r
+    // Hack to set wxConvLibc codepage to UTF-8 on Windows,\r
+    // may break if wxMBConv_win32 implementation in strconv.cpp changes.\r
+    class wxMBConv_win32 : public wxMBConv\r
+    {\r
+    public:\r
+        long m_CodePage;\r
+        size_t m_minMBCharWidth;\r
+    };\r
+    if (((wxMBConv_win32*)&wxConvLibc)->m_CodePage == CP_ACP)\r
+        ((wxMBConv_win32*)&wxConvLibc)->m_CodePage = CP_UTF8;\r
+#endif\r
+#endif\r
+\r
+    // Load locale/<lang>/LC_MESSAGES/bitcoin.mo language file\r
+    m_locale.Init(wxLANGUAGE_DEFAULT, 0);\r
+    m_locale.AddCatalogLookupPathPrefix("locale");\r
+    if (!fWindows)\r
+    {\r
+        m_locale.AddCatalogLookupPathPrefix("/usr/share/locale");\r
+        m_locale.AddCatalogLookupPathPrefix("/usr/local/share/locale");\r
+    }\r
+    m_locale.AddCatalog("wxstd"); // wxWidgets standard translations, if any\r
+    m_locale.AddCatalog("bitcoin");\r
 \r
     //\r
     // Parameters\r
@@ -2612,33 +2641,31 @@ bool CMyApp::OnInit2()
     ParseParameters(argc, argv);\r
     if (mapArgs.count("-?") || mapArgs.count("--help"))\r
     {\r
-#ifdef __WXMSW__\r
-        string strUsage =\r
-            "Usage: bitcoin [options]\t\t\t\t\t\t\n"\r
-            "Options:\n"\r
-            "  -gen\t\t  Generate coins\n"\r
-            "  -gen=0\t\t  Don't generate coins\n"\r
-            "  -min\t\t  Start minimized\n"\r
-            "  -datadir=<dir>\t  Specify data directory\n"\r
-            "  -proxy=<ip:port>\t  Connect through socks4 proxy\n"\r
-            "  -addnode=<ip>\t  Add a node to connect to\n"\r
-            "  -connect=<ip>\t  Connect only to the specified node\n"\r
-            "  -?\t\t  This help message\n";\r
-        wxMessageBox(strUsage, "Bitcoin", wxOK);\r
-#else\r
-        string strUsage =\r
-            "Usage: bitcoin [options]\n"\r
-            "Options:\n"\r
-            "  -gen              Generate coins\n"\r
-            "  -gen=0            Don't generate coins\n"\r
-            "  -min              Start minimized\n"\r
-            "  -datadir=<dir>    Specify data directory\n"\r
-            "  -proxy=<ip:port>  Connect through socks4 proxy\n"\r
-            "  -addnode=<ip>     Add a node to connect to\n"\r
-            "  -connect=<ip>     Connect only to the specified node\n"\r
-            "  -?                This help message\n";\r
-        fprintf(stderr, "%s", strUsage.c_str());\r
-#endif\r
+        wxString strUsage = string() +\r
+            _("Usage: bitcoin [options]") + "\t\t\t\t\t\t\n" +\r
+            _("Options:\n") +\r
+            "  -gen            \t\t   " + _("Generate coins\n") +\r
+            "  -gen=0          \t\t   " + _("Don't generate coins\n") +\r
+            "  -min            \t\t   " + _("Start minimized\n") +\r
+            "  -datadir=<dir>  \t   "   + _("Specify data directory\n") +\r
+            "  -proxy=<ip:port>\t   "   + _("Connect through socks4 proxy\n") +\r
+            "  -addnode=<ip>   \t   "   + _("Add a node to connect to\n") +\r
+            "  -connect=<ip>   \t   "   + _("Connect only to the specified node\n") +\r
+            "  -?              \t\t   " + _("This help message\n");\r
+\r
+        if (fWindows)\r
+        {\r
+            // Remove spaces, the tabs make the columns line up in the message box\r
+            for (int i = 0; i < 50; i++)\r
+                strUsage.Replace(" \t", "\t");\r
+            wxMessageBox(strUsage, "Bitcoin", wxOK);\r
+        }\r
+        else\r
+        {\r
+            // Remove tabs\r
+            strUsage.Replace("\t", "");\r
+            fprintf(stderr, "%s", ((string)strUsage).c_str());\r
+        }\r
         return false;\r
     }\r
 \r
@@ -2661,7 +2688,9 @@ bool CMyApp::OnInit2()
     if (!fDebug && !pszSetDataDir[0])\r
         ShrinkDebugFile();\r
     printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");\r
-    printf("Bitcoin version %d%s, OS version %s\n", VERSION, pszSubVer, ((string)wxGetOsDescription()).c_str());\r
+    printf("Bitcoin version 0.%d.%d%s beta, OS version %s\n", VERSION/100, VERSION%100, pszSubVer, ((string)wxGetOsDescription()).c_str());\r
+    printf("System default language is %d %s\n", m_locale.GetSystemLanguage(), ((string)m_locale.GetSysName()).c_str());\r
+    printf("Language file %s (%s)\n", (string("locale/") + (string)m_locale.GetCanonicalName() + "/LC_MESSAGES/bitcoin.mo").c_str(), ((string)m_locale.GetLocale()).c_str());\r
 \r
     if (mapArgs.count("-loadblockindextest"))\r
     {\r
@@ -2691,7 +2720,7 @@ bool CMyApp::OnInit2()
         {\r
             // TODO: find out how to do this in Linux, or replace with wxWidgets commands\r
             // Show the previous instance and exit\r
-            HWND hwndPrev = FindWindow("wxWindowClassNR", "Bitcoin");\r
+            HWND hwndPrev = FindWindowA("wxWindowClassNR", "Bitcoin");\r
             if (hwndPrev)\r
             {\r
                 if (IsIconic(hwndPrev))\r
@@ -2732,19 +2761,19 @@ bool CMyApp::OnInit2()
     printf("Loading addresses...\n");\r
     nStart = GetTimeMillis();\r
     if (!LoadAddresses())\r
-        strErrors += "Error loading addr.dat      \n";\r
+        strErrors += _("Error loading addr.dat      \n");\r
     printf(" addresses   %15"PRI64d"ms\n", GetTimeMillis() - nStart);\r
 \r
     printf("Loading block index...\n");\r
     nStart = GetTimeMillis();\r
     if (!LoadBlockIndex())\r
-        strErrors += "Error loading blkindex.dat      \n";\r
+        strErrors += _("Error loading blkindex.dat      \n");\r
     printf(" block index %15"PRI64d"ms\n", GetTimeMillis() - nStart);\r
 \r
     printf("Loading wallet...\n");\r
     nStart = GetTimeMillis();\r
     if (!LoadWallet(fFirstRun))\r
-        strErrors += "Error loading wallet.dat      \n";\r
+        strErrors += _("Error loading wallet.dat      \n");\r
     printf(" wallet      %15"PRI64d"ms\n", GetTimeMillis() - nStart);\r
 \r
     printf("Done loading\n");\r
@@ -2812,7 +2841,7 @@ bool CMyApp::OnInit2()
         addrProxy = CAddress(mapArgs["-proxy"]);\r
         if (!addrProxy.IsValid())\r
         {\r
-            wxMessageBox("Invalid -proxy address", "Bitcoin");\r
+            wxMessageBox(_("Invalid -proxy address"), "Bitcoin");\r
             return false;\r
         }\r
     }\r
@@ -2947,7 +2976,7 @@ void CMyApp::OnUnhandledException()
 \r
 void CMyApp::OnFatalException()\r
 {\r
-    wxMessageBox("Program has crashed and will terminate.  ", "Bitcoin", wxOK | wxICON_ERROR);\r
+    wxMessageBox(_("Program has crashed and will terminate.  "), "Bitcoin", wxOK | wxICON_ERROR);\r
 }\r
 \r
 \r
@@ -2962,7 +2991,7 @@ string MyGetSpecialFolderPath(int nFolder, bool fCreate)
     char pszPath[MAX_PATH+100] = "";\r
 \r
     // SHGetSpecialFolderPath is not usually available on NT 4.0\r
-    HMODULE hShell32 = LoadLibrary("shell32.dll");\r
+    HMODULE hShell32 = LoadLibraryA("shell32.dll");\r
     if (hShell32)\r
     {\r
         PSHGETSPECIALFOLDERPATHA pSHGetSpecialFolderPath =\r
@@ -3017,7 +3046,7 @@ void SetStartOnSystemStartup(bool fAutoStart)
         if (SUCCEEDED(hres))\r
         {\r
             // Get the current executable path\r
-            char pszExePath[MAX_PATH];\r
+            TCHAR pszExePath[MAX_PATH];\r
             GetModuleFileName(NULL, pszExePath, sizeof(pszExePath));\r
 \r
             // Set the path to the shortcut target\r
diff --git a/ui.h b/ui.h
index da1ada7..50d39ab 100644 (file)
--- a/ui.h
+++ b/ui.h
@@ -16,12 +16,12 @@ extern int fMinimizeOnClose;
 \r
 \r
 \r
-extern void HandleCtrlA(wxKeyEvent& event);\r
-extern string FormatTxStatus(const CWalletTx& wtx);\r
-extern void UIThreadCall(boost::function0<void>);\r
-extern void MainFrameRepaint();\r
-extern void Shutdown(void* parg);\r
-extern int ThreadSafeMessageBox(const string& message, const string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);\r
+void HandleCtrlA(wxKeyEvent& event);\r
+string FormatTxStatus(const CWalletTx& wtx);\r
+void UIThreadCall(boost::function0<void>);\r
+void MainFrameRepaint();\r
+void Shutdown(void* parg);\r
+int ThreadSafeMessageBox(const string& message, const string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);\r
 \r
 \r
 \r
index 03bd791..5b3f9ab 100644 (file)
@@ -1,6 +1,3 @@
-// Copyright (c) 2009-2010 Satoshi Nakamoto\r
-// Distributed under the MIT/X11 software license, see the accompanying\r
-// file license.txt or http://www.opensource.org/licenses/mit-license.php.\r
 ///////////////////////////////////////////////////////////////////////////\r
 // C++ code generated with wxFormBuilder (version Apr 16 2008)\r
 // http://www.wxformbuilder.org/\r
@@ -406,22 +403,14 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w
        \r
        bSizer64->Add( 0, 16, 0, wxEXPAND, 5 );\r
        \r
-       m_staticText321 = new wxStaticText( m_panelTest2, wxID_ANY, _("Test panel 2 for future expansion"), wxDefaultPosition, wxDefaultSize, 0 );\r
+       m_staticText321 = new wxStaticText( m_panelTest2, wxID_ANY, _("// [don't translate] Test panel 2 for future expansion"), wxDefaultPosition, wxDefaultSize, 0 );\r
        m_staticText321->Wrap( -1 );\r
        bSizer64->Add( m_staticText321, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );\r
        \r
-       m_staticText69 = new wxStaticText( m_panelTest2, wxID_ANY, _("Let's not start multiple pages until the first page is filled up"), wxDefaultPosition, wxDefaultSize, 0 );\r
+       m_staticText69 = new wxStaticText( m_panelTest2, wxID_ANY, _("// [don't translate] Let's not start multiple pages until the first page is filled up"), wxDefaultPosition, wxDefaultSize, 0 );\r
        m_staticText69->Wrap( -1 );\r
        bSizer64->Add( m_staticText69, 0, wxALL, 5 );\r
        \r
-       m_staticText70 = new wxStaticText( m_panelTest2, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );\r
-       m_staticText70->Wrap( -1 );\r
-       bSizer64->Add( m_staticText70, 0, wxALL, 5 );\r
-       \r
-       m_staticText71 = new wxStaticText( m_panelTest2, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );\r
-       m_staticText71->Wrap( -1 );\r
-       bSizer64->Add( m_staticText71, 0, wxALL, 5 );\r
-       \r
        m_panelTest2->SetSizer( bSizer64 );\r
        m_panelTest2->Layout();\r
        bSizer64->Fit( m_panelTest2 );\r
@@ -521,7 +510,7 @@ CAboutDialogBase::CAboutDialogBase( wxWindow* parent, wxWindowID id, const wxStr
        \r
        bSizer631->Add( 0, 4, 0, wxEXPAND, 5 );\r
        \r
-       m_staticTextMain = new wxStaticText( this, wxID_ANY, _("Copyright © 2009-2010 Satoshi Nakamoto.\n\nThis is experimental software.  Do not rely on it for actual financial transactions.\n\nDistributed under the MIT/X11 software license, see the accompanying file \nlicense.txt or http://www.opensource.org/licenses/mit-license.php.\n\nThis product includes software developed by the OpenSSL Project for use in the \nOpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \nEric Young (eay@cryptsoft.com)."), wxDefaultPosition, wxDefaultSize, 0 );\r
+       m_staticTextMain = new wxStaticText( this, wxID_ANY, _("Copyright (c) 2009-2010 Satoshi Nakamoto.\n\nThis is experimental software.  Do not rely on it for actual financial transactions.\n\nDistributed under the MIT/X11 software license, see the accompanying file \nlicense.txt or http://www.opensource.org/licenses/mit-license.php.\n\nThis product includes software developed by the OpenSSL Project for use in the \nOpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \nEric Young (eay@cryptsoft.com)."), wxDefaultPosition, wxDefaultSize, 0 );\r
        m_staticTextMain->Wrap( -1 );\r
        bSizer631->Add( m_staticTextMain, 0, wxALL, 5 );\r
        \r
index 2dfc2af..494ed10 100644 (file)
--- a/uibase.h
+++ b/uibase.h
@@ -1,6 +1,3 @@
-// Copyright (c) 2009-2010 Satoshi Nakamoto\r
-// Distributed under the MIT/X11 software license, see the accompanying\r
-// file license.txt or http://www.opensource.org/licenses/mit-license.php.\r
 ///////////////////////////////////////////////////////////////////////////\r
 // C++ code generated with wxFormBuilder (version Apr 16 2008)\r
 // http://www.wxformbuilder.org/\r
@@ -178,8 +175,6 @@ class COptionsDialogBase : public wxDialog
                \r
                wxStaticText* m_staticText321;\r
                wxStaticText* m_staticText69;\r
-               wxStaticText* m_staticText70;\r
-               wxStaticText* m_staticText71;\r
                wxButton* m_buttonOK;\r
                wxButton* m_buttonCancel;\r
                wxButton* m_buttonApply;\r
index 5c6eaa5..988df2a 100644 (file)
                                                         <property name="font"></property>\r
                                                         <property name="hidden">0</property>\r
                                                         <property name="id">wxID_ANY</property>\r
-                                                        <property name="label">Test panel 2 for future expansion</property>\r
+                                                        <property name="label">// [don&apos;t translate] Test panel 2 for future expansion</property>\r
                                                         <property name="maximum_size"></property>\r
                                                         <property name="minimum_size"></property>\r
                                                         <property name="name">m_staticText321</property>\r
                                                         <property name="font"></property>\r
                                                         <property name="hidden">0</property>\r
                                                         <property name="id">wxID_ANY</property>\r
-                                                        <property name="label">Let&apos;s not start multiple pages until the first page is filled up</property>\r
+                                                        <property name="label">// [don&apos;t translate] Let&apos;s not start multiple pages until the first page is filled up</property>\r
                                                         <property name="maximum_size"></property>\r
                                                         <property name="minimum_size"></property>\r
                                                         <property name="name">m_staticText69</property>\r
                                                         <event name="OnUpdateUI"></event>\r
                                                     </object>\r
                                                 </object>\r
-                                                <object class="sizeritem" expanded="1">\r
-                                                    <property name="border">5</property>\r
-                                                    <property name="flag">wxALL</property>\r
-                                                    <property name="proportion">0</property>\r
-                                                    <object class="wxStaticText" expanded="1">\r
-                                                        <property name="bg"></property>\r
-                                                        <property name="context_help"></property>\r
-                                                        <property name="enabled">1</property>\r
-                                                        <property name="fg"></property>\r
-                                                        <property name="font"></property>\r
-                                                        <property name="hidden">0</property>\r
-                                                        <property name="id">wxID_ANY</property>\r
-                                                        <property name="label">MyLabel</property>\r
-                                                        <property name="maximum_size"></property>\r
-                                                        <property name="minimum_size"></property>\r
-                                                        <property name="name">m_staticText70</property>\r
-                                                        <property name="permission">protected</property>\r
-                                                        <property name="pos"></property>\r
-                                                        <property name="size"></property>\r
-                                                        <property name="style"></property>\r
-                                                        <property name="subclass"></property>\r
-                                                        <property name="tooltip"></property>\r
-                                                        <property name="window_extra_style"></property>\r
-                                                        <property name="window_name"></property>\r
-                                                        <property name="window_style"></property>\r
-                                                        <property name="wrap">-1</property>\r
-                                                        <event name="OnChar"></event>\r
-                                                        <event name="OnEnterWindow"></event>\r
-                                                        <event name="OnEraseBackground"></event>\r
-                                                        <event name="OnKeyDown"></event>\r
-                                                        <event name="OnKeyUp"></event>\r
-                                                        <event name="OnKillFocus"></event>\r
-                                                        <event name="OnLeaveWindow"></event>\r
-                                                        <event name="OnLeftDClick"></event>\r
-                                                        <event name="OnLeftDown"></event>\r
-                                                        <event name="OnLeftUp"></event>\r
-                                                        <event name="OnMiddleDClick"></event>\r
-                                                        <event name="OnMiddleDown"></event>\r
-                                                        <event name="OnMiddleUp"></event>\r
-                                                        <event name="OnMotion"></event>\r
-                                                        <event name="OnMouseEvents"></event>\r
-                                                        <event name="OnMouseWheel"></event>\r
-                                                        <event name="OnPaint"></event>\r
-                                                        <event name="OnRightDClick"></event>\r
-                                                        <event name="OnRightDown"></event>\r
-                                                        <event name="OnRightUp"></event>\r
-                                                        <event name="OnSetFocus"></event>\r
-                                                        <event name="OnSize"></event>\r
-                                                        <event name="OnUpdateUI"></event>\r
-                                                    </object>\r
-                                                </object>\r
-                                                <object class="sizeritem" expanded="1">\r
-                                                    <property name="border">5</property>\r
-                                                    <property name="flag">wxALL</property>\r
-                                                    <property name="proportion">0</property>\r
-                                                    <object class="wxStaticText" expanded="1">\r
-                                                        <property name="bg"></property>\r
-                                                        <property name="context_help"></property>\r
-                                                        <property name="enabled">1</property>\r
-                                                        <property name="fg"></property>\r
-                                                        <property name="font"></property>\r
-                                                        <property name="hidden">0</property>\r
-                                                        <property name="id">wxID_ANY</property>\r
-                                                        <property name="label">MyLabel</property>\r
-                                                        <property name="maximum_size"></property>\r
-                                                        <property name="minimum_size"></property>\r
-                                                        <property name="name">m_staticText71</property>\r
-                                                        <property name="permission">protected</property>\r
-                                                        <property name="pos"></property>\r
-                                                        <property name="size"></property>\r
-                                                        <property name="style"></property>\r
-                                                        <property name="subclass"></property>\r
-                                                        <property name="tooltip"></property>\r
-                                                        <property name="window_extra_style"></property>\r
-                                                        <property name="window_name"></property>\r
-                                                        <property name="window_style"></property>\r
-                                                        <property name="wrap">-1</property>\r
-                                                        <event name="OnChar"></event>\r
-                                                        <event name="OnEnterWindow"></event>\r
-                                                        <event name="OnEraseBackground"></event>\r
-                                                        <event name="OnKeyDown"></event>\r
-                                                        <event name="OnKeyUp"></event>\r
-                                                        <event name="OnKillFocus"></event>\r
-                                                        <event name="OnLeaveWindow"></event>\r
-                                                        <event name="OnLeftDClick"></event>\r
-                                                        <event name="OnLeftDown"></event>\r
-                                                        <event name="OnLeftUp"></event>\r
-                                                        <event name="OnMiddleDClick"></event>\r
-                                                        <event name="OnMiddleDown"></event>\r
-                                                        <event name="OnMiddleUp"></event>\r
-                                                        <event name="OnMotion"></event>\r
-                                                        <event name="OnMouseEvents"></event>\r
-                                                        <event name="OnMouseWheel"></event>\r
-                                                        <event name="OnPaint"></event>\r
-                                                        <event name="OnRightDClick"></event>\r
-                                                        <event name="OnRightDown"></event>\r
-                                                        <event name="OnRightUp"></event>\r
-                                                        <event name="OnSetFocus"></event>\r
-                                                        <event name="OnSize"></event>\r
-                                                        <event name="OnUpdateUI"></event>\r
-                                                    </object>\r
-                                                </object>\r
                                             </object>\r
                                         </object>\r
                                     </object>\r
                                                 <property name="font"></property>\r
                                                 <property name="hidden">0</property>\r
                                                 <property name="id">wxID_ANY</property>\r
-                                                <property name="label">Copyright © 2009-2010 Satoshi Nakamoto.&#x0A;&#x0A;This is experimental software.  Do not rely on it for actual financial transactions.&#x0A;&#x0A;Distributed under the MIT/X11 software license, see the accompanying file &#x0A;license.txt or http://www.opensource.org/licenses/mit-license.php.&#x0A;&#x0A;This product includes software developed by the OpenSSL Project for use in the &#x0A;OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by &#x0A;Eric Young (eay@cryptsoft.com).</property>\r
+                                                <property name="label">Copyright (c) 2009-2010 Satoshi Nakamoto.&#x0A;&#x0A;This is experimental software.  Do not rely on it for actual financial transactions.&#x0A;&#x0A;Distributed under the MIT/X11 software license, see the accompanying file &#x0A;license.txt or http://www.opensource.org/licenses/mit-license.php.&#x0A;&#x0A;This product includes software developed by the OpenSSL Project for use in the &#x0A;OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by &#x0A;Eric Young (eay@cryptsoft.com).</property>\r
                                                 <property name="maximum_size"></property>\r
                                                 <property name="minimum_size"></property>\r
                                                 <property name="name">m_staticTextMain</property>\r
index 2f5be22..266c1dd 100644 (file)
--- a/util.cpp
+++ b/util.cpp
@@ -90,7 +90,7 @@ void RandAddSeedPerfmon()
     unsigned char pdata[250000];\r
     memset(pdata, 0, sizeof(pdata));\r
     unsigned long nSize = sizeof(pdata);\r
-    long ret = RegQueryValueEx(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, pdata, &nSize);\r
+    long ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, pdata, &nSize);\r
     RegCloseKey(HKEY_PERFORMANCE_DATA);\r
     if (ret == ERROR_SUCCESS)\r
     {\r
@@ -193,7 +193,7 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
                 p2++;\r
                 char c = *p2;\r
                 *p2 = '\0';\r
-                OutputDebugString(p1);\r
+                OutputDebugStringA(p1);\r
                 *p2 = c;\r
                 p1 = p2;\r
             }\r
@@ -441,7 +441,7 @@ void FormatException(char* pszMessage, std::exception* pex, const char* pszThrea
 #ifdef __WXMSW__\r
     char pszModule[MAX_PATH];\r
     pszModule[0] = '\0';\r
-    GetModuleFileName(NULL, pszModule, sizeof(pszModule));\r
+    GetModuleFileNameA(NULL, pszModule, sizeof(pszModule));\r
 #else\r
     // might not be thread safe, uses wxString\r
     //const char* pszModule = wxStandardPaths::Get().GetExecutablePath().mb_str();\r
diff --git a/util.h b/util.h
index 933c71b..188a9ec 100644 (file)
--- a/util.h
+++ b/util.h
@@ -340,10 +340,11 @@ void skipspaces(T& it)
         ++it;\r
 }\r
 \r
-\r
-\r
-\r
-\r
+inline const char* wxGetTranslation(const char* psz)\r
+{\r
+    // Return translated UTF-8 const char*\r
+    return wxGetTranslation(wxString(psz, wxConvUTF8)).utf8_str();\r
+}\r
 \r
 \r
 \r