mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-23 16:22:58 +03:00
Translation has been changed
This commit is contained in:
parent
ea2a38758d
commit
b878cf95ae
@ -108,20 +108,6 @@ Dialog.exec() == 1;
|
||||
</scriptContext>
|
||||
<suppressFieldAndVarError Type="bool" Value="0"/>
|
||||
<translation Type="Translation">
|
||||
<Default Value="0">
|
||||
<page1>
|
||||
<TextItem1>
|
||||
<content Checked="N" SourceValue="Test" Value="Test"/>
|
||||
</TextItem1>
|
||||
</page1>
|
||||
</Default>
|
||||
<Russian Value="96">
|
||||
<page1>
|
||||
<TextItem1>
|
||||
<content Checked="Y" SourceValue="Test" Value="Проверка"/>
|
||||
</TextItem1>
|
||||
</page1>
|
||||
</Russian>
|
||||
</translation>
|
||||
</object>
|
||||
</Report>
|
||||
|
@ -1010,7 +1010,8 @@ void ReportEnginePrivate::activateLanguage(QLocale::Language language)
|
||||
BaseDesignIntf* item = page->childByName(itemTranslation->itemName);
|
||||
if (item) {
|
||||
foreach(PropertyTranslation* propertyTranslation, itemTranslation->propertyesTranslation){
|
||||
item->setProperty(propertyTranslation->propertyName.toLatin1(), propertyTranslation->value);
|
||||
if (propertyTranslation->checked)
|
||||
item->setProperty(propertyTranslation->propertyName.toLatin1(), propertyTranslation->value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1123,11 +1124,6 @@ ReportPages ReportEnginePrivate::renderToPages()
|
||||
m_reportRender = ReportRender::Ptr(new ReportRender);
|
||||
updateTranslations();
|
||||
|
||||
dataManager()->clearErrors();
|
||||
dataManager()->connectAllDatabases();
|
||||
dataManager()->setDesignTime(false);
|
||||
dataManager()->updateDatasourceModel();
|
||||
|
||||
connect(m_reportRender.data(),SIGNAL(pageRendered(int)),
|
||||
this, SIGNAL(renderPageFinished(int)));
|
||||
|
||||
@ -1152,6 +1148,11 @@ ReportPages ReportEnginePrivate::renderToPages()
|
||||
|
||||
if (m_scriptEngineContext->runInitScript()){
|
||||
|
||||
dataManager()->clearErrors();
|
||||
dataManager()->connectAllDatabases();
|
||||
dataManager()->setDesignTime(false);
|
||||
dataManager()->updateDatasourceModel();
|
||||
|
||||
activateLanguage(m_reportLanguage);
|
||||
emit renderStarted();
|
||||
|
||||
|
@ -232,14 +232,17 @@ void XMLWriter::saveTranslation(QString propertyName, QObject* item, QDomElement
|
||||
languageNode.appendChild(pageNode);
|
||||
foreach(ItemTranslation* item, page->itemsTranslation){
|
||||
QDomElement itemNode = m_doc->createElement(item->itemName);
|
||||
pageNode.appendChild(itemNode);
|
||||
foreach(PropertyTranslation* property, item->propertyesTranslation){
|
||||
QDomElement propertyNode = m_doc->createElement(property->propertyName);
|
||||
propertyNode.setAttribute("Value",property->value);
|
||||
propertyNode.setAttribute("SourceValue", property->sourceValue);
|
||||
propertyNode.setAttribute("Checked", property->checked ? "Y":"N");
|
||||
itemNode.appendChild(propertyNode);
|
||||
if (property->sourceValue.compare(property->value) != 0){
|
||||
QDomElement propertyNode = m_doc->createElement(property->propertyName);
|
||||
propertyNode.setAttribute("Value",property->value);
|
||||
propertyNode.setAttribute("SourceValue", property->sourceValue);
|
||||
propertyNode.setAttribute("Checked", property->checked ? "Y":"N");
|
||||
itemNode.appendChild(propertyNode);
|
||||
}
|
||||
}
|
||||
if (!itemNode.childNodes().isEmpty())
|
||||
pageNode.appendChild(itemNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user