|
|
@ -59,6 +59,7 @@ void IMetaDataPlugin::init(const QJsonObject &metaData)
|
|
|
|
if (IGridForm *pluginUi = dynamic_cast<IGridForm*>(m_ui))
|
|
|
|
if (IGridForm *pluginUi = dynamic_cast<IGridForm*>(m_ui))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
pluginUi->setPluginId(pluginId());
|
|
|
|
pluginUi->setPluginId(pluginId());
|
|
|
|
|
|
|
|
pluginUi->setTranslations(m_translations);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (m_service != NULL)
|
|
|
|
if (m_service != NULL)
|
|
|
@ -87,6 +88,23 @@ void IMetaDataPlugin::parseMetaData(const QJsonObject &metaData)
|
|
|
|
foreach (QJsonValue depVal, data.toObject()["dependecies"].toArray()) {
|
|
|
|
foreach (QJsonValue depVal, data.toObject()["dependecies"].toArray()) {
|
|
|
|
m_dependsOn.append(depVal.toString());
|
|
|
|
m_dependsOn.append(depVal.toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QJsonValue trVal = data.toObject()["translations"];
|
|
|
|
|
|
|
|
QString locale = QLocale::system().name();
|
|
|
|
|
|
|
|
QJsonValue trLocalized;
|
|
|
|
|
|
|
|
foreach (QString key, trVal.toObject().keys()) {
|
|
|
|
|
|
|
|
if (locale.contains(key, Qt::CaseInsensitive)) {
|
|
|
|
|
|
|
|
trLocalized = trVal.toObject()[key];
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!trLocalized.isNull())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
foreach (QString key, trLocalized.toObject().keys()) {
|
|
|
|
|
|
|
|
m_translations[key] = trLocalized.toObject()[key].toString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QString IMetaDataPlugin::parseLocaleText(const QJsonObject &object)
|
|
|
|
QString IMetaDataPlugin::parseLocaleText(const QJsonObject &object)
|
|
|
|