Load translations from KPackage files if bundled
Test Plan: Installed battery monitor locally with kpackagetool5 -i moved x-test .po file from being installed systemwide to only being inside the bundle still get xx everywhere BUG: 374825 Reviewers: #plasma, mart Reviewed By: mart Subscribers: plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D5209
This commit is contained in:
parent
21f954d94d
commit
3a0f61b559
@ -220,13 +220,17 @@ Applet *PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
|
||||
allArgs << p.metadata().fileName() << appletId << args;
|
||||
|
||||
if (p.metadata().serviceTypes().contains(QStringLiteral("Plasma/Containment"))) {
|
||||
return new Containment(0, allArgs);
|
||||
applet = new Containment(0, allArgs);
|
||||
} else {
|
||||
return new Applet(0, allArgs);
|
||||
applet = new Applet(0, allArgs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const QString localePath = p.filePath("translations");
|
||||
if (!localePath.isEmpty()) {
|
||||
KLocalizedString::addDomainLocaleDir(QByteArray("plasma_applet_") + name.toLatin1(), localePath);
|
||||
}
|
||||
return applet;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user