Filed attempt on making localization work
This commit is contained in:
		
							
								
								
									
										14
									
								
								MultiMC.cpp
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								MultiMC.cpp
									
									
									
									
									
								
							| @@ -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: | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
							
								
								
									
										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
											
										
									
								
							
		Reference in New Issue
	
	Block a user