fix translations files path (#184)

* fix translations files path

* add soft link for translation files
This commit is contained in:
Ahmed Zetao Yang
2018-04-12 00:54:42 +08:00
committed by Dharkael
parent a5ad7299b0
commit 91bf065e82
2 changed files with 3 additions and 2 deletions

View File

@@ -85,6 +85,7 @@ elif [[ "${DIST}" == "trusty" ]]; then
cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so $APPIMAGE_DST_PATH/appdir/usr/plugins/platforminputcontexts/
cd $APPIMAGE_DST_PATH/appdir/usr/bin
ln -sf ../plugins/platforms/ . # An unknown bug
ln -sf ../share/flameshot/translations/ . # add translation soft link
cd ${project_dir}
# -verbose=2

View File

@@ -29,9 +29,9 @@ const QString PathInfo::blackIconPath() {
}
QStringList PathInfo::translationsPaths() {
QString binaryPath = QFileInfo(qApp->applicationFilePath())
QString binaryPath = QFileInfo(qApp->applicationDirPath())
.absoluteFilePath();
QString trPath = QDir::toNativeSeparators(binaryPath) + "translations";
QString trPath = QDir::toNativeSeparators(binaryPath + "/translations") ;
#if defined(Q_OS_LINUX)
return QStringList()
<< QString(APP_PREFIX) + "/share/flameshot/translations"