Load translations from the current directory so translators don't have to recompile to test their translations

This commit is contained in:
David Sansome 2010-03-02 17:29:43 +00:00
parent 6a43c8f6c6
commit 111c019edd
1 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,7 @@
#include <QtDebug>
#include <QLibraryInfo>
#include <QTranslator>
#include <QDir>
int main(int argc, char *argv[]) {
QCoreApplication::setApplicationName("Clementine");
@ -49,6 +50,12 @@ int main(int argc, char *argv[]) {
clementine_translator.load("clementine_" + QLocale::system().name(), ":/translations");
a.installTranslator(&clementine_translator);
// Also look for translations in the current directory so translators don't
// need to recompile Clementine to test their translations
QTranslator pwd_translator;
clementine_translator.load("clementine_" + QLocale::system().name(), QDir::currentPath());
a.installTranslator(&clementine_translator);
// Window
MainWindow w;
a.setActivationWindow(&w);