Filed attempt on making localization work
This commit is contained in:
parent
45a338a3cd
commit
3e1cb57988
14
MultiMC.cpp
14
MultiMC.cpp
@ -3,6 +3,8 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QTranslator>
|
||||||
|
#include <QLibraryInfo>
|
||||||
|
|
||||||
#include "gui/mainwindow.h"
|
#include "gui/mainwindow.h"
|
||||||
#include "logic/lists/InstanceList.h"
|
#include "logic/lists/InstanceList.h"
|
||||||
@ -224,10 +226,22 @@ int main(int argc, char *argv[])
|
|||||||
// initialize Qt
|
// initialize Qt
|
||||||
MultiMC app(argc, argv);
|
MultiMC app(argc, argv);
|
||||||
|
|
||||||
|
std::cout << "Loading Language File for " << QLocale::system().name().toLocal8Bit().constData() << "..." << std::endl;
|
||||||
|
|
||||||
|
QTranslator qtTranslator;
|
||||||
|
qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||||
|
app.installTranslator(&qtTranslator);
|
||||||
|
|
||||||
|
QTranslator mmcTranslator;
|
||||||
|
mmcTranslator.load("mmc_" + QLocale::system().name());
|
||||||
|
app.installTranslator(&mmcTranslator);
|
||||||
|
|
||||||
// show main window
|
// show main window
|
||||||
MainWindow mainWin;
|
MainWindow mainWin;
|
||||||
mainWin.show();
|
mainWin.show();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch(app.status())
|
switch(app.status())
|
||||||
{
|
{
|
||||||
case MultiMC::Initialized:
|
case MultiMC::Initialized:
|
||||||
|
@ -91,7 +91,7 @@ void ConsoleWindow::on_btnKillMinecraft_clicked()
|
|||||||
QMessageBox r_u_sure;
|
QMessageBox r_u_sure;
|
||||||
//: Main question of the kill confirmation dialog
|
//: Main question of the kill confirmation dialog
|
||||||
r_u_sure.setText(tr("Kill Minecraft?"));
|
r_u_sure.setText(tr("Kill Minecraft?"));
|
||||||
r_u_sure.setInformativeText("This can cause the instance to get corrupted and should only be used if Minecraft is frozen for some reason");
|
r_u_sure.setInformativeText(tr("This can cause the instance to get corrupted and should only be used if Minecraft is frozen for some reason"));
|
||||||
r_u_sure.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
|
r_u_sure.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
|
||||||
r_u_sure.setDefaultButton(QMessageBox::Yes);
|
r_u_sure.setDefaultButton(QMessageBox::Yes);
|
||||||
if (r_u_sure.exec() == QMessageBox::Yes)
|
if (r_u_sure.exec() == QMessageBox::Yes)
|
||||||
|
1220
translations/mmc_de_DE.ts
Normal file
1220
translations/mmc_de_DE.ts
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user