Python-i18n: add /usr/local/share/locale to search
This commit is contained in:
parent
d6d5f54d00
commit
538c59adb9
@ -271,8 +271,16 @@ gettext_path()
|
|||||||
// TODO: can we detect DESTDIR-installs?
|
// TODO: can we detect DESTDIR-installs?
|
||||||
QStringList candidatePaths = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "locale", QStandardPaths::LocateDirectory);
|
QStringList candidatePaths = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "locale", QStandardPaths::LocateDirectory);
|
||||||
QString extra = QCoreApplication::applicationDirPath();
|
QString extra = QCoreApplication::applicationDirPath();
|
||||||
_add_localedirs(candidatePaths, extra);
|
_add_localedirs(candidatePaths, extra); // Often /usr/local/bin
|
||||||
_add_localedirs(candidatePaths, QDir().canonicalPath());
|
if ( !extra.isEmpty() )
|
||||||
|
{
|
||||||
|
QDir d(extra);
|
||||||
|
if (d.cd("../share/locale")) // Often /usr/local/bin/../share/locale -> /usr/local/share/locale
|
||||||
|
{
|
||||||
|
_add_localedirs(candidatePaths, d.canonicalPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_add_localedirs(candidatePaths, QDir().canonicalPath()); // .
|
||||||
|
|
||||||
cDebug() << "Standard paths" << candidatePaths;
|
cDebug() << "Standard paths" << candidatePaths;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user