mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 00:33:02 +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,6 +1010,7 @@ void ReportEnginePrivate::activateLanguage(QLocale::Language language)
|
||||
BaseDesignIntf* item = page->childByName(itemTranslation->itemName);
|
||||
if (item) {
|
||||
foreach(PropertyTranslation* propertyTranslation, itemTranslation->propertyesTranslation){
|
||||
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,8 +232,8 @@ 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){
|
||||
if (property->sourceValue.compare(property->value) != 0){
|
||||
QDomElement propertyNode = m_doc->createElement(property->propertyName);
|
||||
propertyNode.setAttribute("Value",property->value);
|
||||
propertyNode.setAttribute("SourceValue", property->sourceValue);
|
||||
@ -241,6 +241,9 @@ void XMLWriter::saveTranslation(QString propertyName, QObject* item, QDomElement
|
||||
itemNode.appendChild(propertyNode);
|
||||
}
|
||||
}
|
||||
if (!itemNode.childNodes().isEmpty())
|
||||
pageNode.appendChild(itemNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
node->appendChild(translationsNode);
|
||||
|
Loading…
Reference in New Issue
Block a user