Filed attempt on making localization work

This commit is contained in:
Stiepen22 2013-09-08 23:43:19 +02:00
parent 45a338a3cd
commit 3e1cb57988
4 changed files with 1235 additions and 1 deletions

View File

@ -3,6 +3,8 @@
#include <iostream>
#include <QDir>
#include <QNetworkAccessManager>
#include <QTranslator>
#include <QLibraryInfo>
#include "gui/mainwindow.h"
#include "logic/lists/InstanceList.h"
@ -224,10 +226,22 @@ int main(int argc, char *argv[])
// initialize Qt
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
MainWindow mainWin;
mainWin.show();
switch(app.status())
{
case MultiMC::Initialized:

View File

@ -91,7 +91,7 @@ void ConsoleWindow::on_btnKillMinecraft_clicked()
QMessageBox r_u_sure;
//: Main question of the kill confirmation dialog
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.setDefaultButton(QMessageBox::Yes);
if (r_u_sure.exec() == QMessageBox::Yes)

View File

1220
translations/mmc_de_DE.ts Normal file

File diff suppressed because it is too large Load Diff