Translation has been fixed

This commit is contained in:
Arin Alexander 2018-09-01 23:21:52 +03:00
parent 4b38f75a9c
commit ea2a38758d
2 changed files with 3 additions and 4 deletions

View File

@ -46,7 +46,7 @@
//#include <QJSEngine>
#include <QQmlEngine>
#else
#include <QScriptEngine>
#include <QtScript/QScriptEngine>
#endif
namespace LimeReport {

View File

@ -82,14 +82,13 @@ void ReportTranslation::updatePageTranslation(PageDesignIntf* page)
if (itemTranslation){
foreach(QString propertyName, stringsForTranslation.keys()){
PropertyTranslation* propertyTranslation = itemTranslation->findProperty(propertyName);
bool translated = propertyTranslation->sourceValue != propertyTranslation->value;
if (propertyTranslation->checked)
propertyTranslation->sourceHasBeenChanged = propertyTranslation->sourceValue != stringsForTranslation.value(propertyName);
if (propertyTranslation->sourceHasBeenChanged)
propertyTranslation->checked = false;
propertyTranslation->sourceValue = stringsForTranslation.value(propertyName);
if ( language() == QLocale::AnyLanguage )
propertyTranslation->value = propertyTranslation->sourceValue;
if (!translated) propertyTranslation->value = propertyTranslation->sourceValue;
}
} else {
createItemTranslation(item, pageTranslation);