From ea2a38758d499ea4504c64d62d235b9562f7e2ce Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sat, 1 Sep 2018 23:21:52 +0300 Subject: [PATCH] Translation has been fixed --- include/lrglobal.h | 2 +- limereport/lrreporttranslation.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/lrglobal.h b/include/lrglobal.h index 65a04d2..de0ac9d 100644 --- a/include/lrglobal.h +++ b/include/lrglobal.h @@ -46,7 +46,7 @@ //#include #include #else -#include +#include #endif namespace LimeReport { diff --git a/limereport/lrreporttranslation.cpp b/limereport/lrreporttranslation.cpp index db54b37..aa6cfdd 100644 --- a/limereport/lrreporttranslation.cpp +++ b/limereport/lrreporttranslation.cpp @@ -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);