Skip to content

Commit 26472f4

Browse files
committed
this branch will introcude multilanguage. Using "Qt_Linguist_for_Windows.zip" (only if no Qt SDK is installed/otherwise use "lupdate" and "lrelease") from the download section to translate x64lang.ts.
I also started to translate strings into german
1 parent acdfe92 commit 26472f4

File tree

5 files changed

+2999
-1
lines changed

5 files changed

+2999
-1
lines changed

x64_dbg_gui/Project/Src/main.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "main.h"
22
#include <QAbstractEventDispatcher>
33
#include <QMessageBox>
4+
#include <QTranslator>
45
#include "Bridge.h"
56
#include "Configuration.h"
67
#include "MainWindow.h"
@@ -48,6 +49,11 @@ static Configuration* mConfiguration;
4849
int main(int argc, char* argv[])
4950
{
5051
MyApplication application(argc, argv);
52+
QTranslator translator;
53+
QString locale = QLocale::system().name();
54+
translator.load(QString("x64") + locale);
55+
application.installTranslator(&translator);
56+
5157
QAbstractEventDispatcher::instance(application.thread())->setEventFilter(MyApplication::globalEventFilter);
5258

5359
// load config file + set config font
@@ -74,7 +80,7 @@ int main(int argc, char* argv[])
7480
const char* errormsg = DbgInit();
7581
if(errormsg)
7682
{
77-
QMessageBox msg(QMessageBox::Critical, "DbgInit Error!", QString(errormsg));
83+
QMessageBox msg(QMessageBox::Critical, QObject::tr("DbgInit Error!"), QString(errormsg));
7884
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
7985
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
8086
msg.exec();

x64_dbg_gui/Project/x64_dbg.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ LIBS += -luser32
202202
RESOURCES += \
203203
resource.qrc
204204

205+
TRANSLATIONS = ../../x64_dbg_lang/x64lang.ts
205206

206207

207208

x64_dbg_lang/x64de.qm

8.92 KB
Binary file not shown.

0 commit comments

Comments
 (0)