Try harder to find the translation files

They could be below the data directory ("share") or next to it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-10-10 12:34:47 -07:00
parent 8bd26af44e
commit f5423c48b8

View file

@ -106,7 +106,9 @@ void init_ui(int *argcp, char ***argvp)
qDebug() << "can't find Qt localization for locale" << uiLang;
}
ssrfTranslator = new QTranslator;
if (ssrfTranslator->load(loc,"subsurface", "_")) {
if (ssrfTranslator->load(loc,"subsurface", "_") ||
ssrfTranslator->load(loc,"subsurface", "_", getSubsurfaceDataPath("translations")) ||
ssrfTranslator->load(loc,"subsurface", "_", getSubsurfaceDataPath("../translations"))) {
application->installTranslator(ssrfTranslator);
} else {
qDebug() << "can't find Subsurface localization for locale" << uiLang;