Temporary fix for translations location binding.

insertCatalog calls will not be used either way.
This commit is contained in:
Chusslove Illich (Часлав Илић) 2013-08-05 11:19:11 +02:00
parent 83e5e96278
commit 2e7c58b987
4 changed files with 15 additions and 18 deletions

View File

@ -447,11 +447,11 @@ void AbstractRunnerPrivate::setupScriptSupport()
// << ", main script is" << package->filePath("mainscript");
#endif
const QString translationsPath = package->filePath("translations");
if (!translationsPath.isEmpty()) {
KGlobal::dirs()->addResourceDir("locale", translationsPath);
KLocalizedString::insertCatalog(runnerDescription.pluginName());
}
// FIXME: Replace with ki18n functionality once semantics is clear.
// const QString translationsPath = package->filePath("translations");
// if (!translationsPath.isEmpty()) {
// KGlobal::dirs()->addResourceDir("locale", translationsPath);
// }
}
} // Plasma namespace

View File

@ -580,11 +580,11 @@ void DataEnginePrivate::setupScriptSupport()
<< ", main script is" << package->filePath("mainscript");
*/
const QString translationsPath = package->filePath("translations");
if (!translationsPath.isEmpty()) {
KGlobal::dirs()->addResourceDir("locale", translationsPath);
KLocalizedString::insertCatalog(dataEngineDescription.pluginName());
}
// FIXME: Replace with ki18n functionality once semantics is clear.
// const QString translationsPath = package->filePath("translations");
// if (!translationsPath.isEmpty()) {
// KGlobal::dirs()->addResourceDir("locale", translationsPath);
// }
}
void DataEnginePrivate::scheduleSourcesUpdated()

View File

@ -298,11 +298,11 @@ void AppletPrivate::setupPackage()
// << ", main script is" << package->filePath("mainscript");
#endif
const QString translationsPath = package->filePath("translations");
if (!translationsPath.isEmpty()) {
KGlobal::dirs()->addResourceDir("locale", translationsPath);
KLocalizedString::insertCatalog(appletDescription.pluginName());
}
// FIXME: Replace with ki18n functionality once semantics is clear.
// const QString translationsPath = package->filePath("translations");
// if (!translationsPath.isEmpty()) {
// KGlobal::dirs()->addResourceDir("locale", translationsPath);
// }
if (!package->filePath("mainconfigui").isEmpty()) {
q->setHasConfigurationInterface(true);

View File

@ -69,9 +69,6 @@ DeclarativeAppletScript::~DeclarativeAppletScript()
bool DeclarativeAppletScript::init()
{
//FIXME: what replaced this?
//KGlobal::locale()->insertCatalog("plasma_applet_" % description().pluginName());
//make possible to import extensions from the package
//FIXME: probably to be removed, would make possible to use native code from within the package :/
//m_interface->qmlObject()->engine()->addImportPath(package()->path()+"/contents/imports");