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"); // << ", main script is" << package->filePath("mainscript");
#endif #endif
const QString translationsPath = package->filePath("translations"); // FIXME: Replace with ki18n functionality once semantics is clear.
if (!translationsPath.isEmpty()) { // const QString translationsPath = package->filePath("translations");
KGlobal::dirs()->addResourceDir("locale", translationsPath); // if (!translationsPath.isEmpty()) {
KLocalizedString::insertCatalog(runnerDescription.pluginName()); // KGlobal::dirs()->addResourceDir("locale", translationsPath);
} // }
} }
} // Plasma namespace } // Plasma namespace

View File

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

View File

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

View File

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