mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-01-11 12:28:09 +03:00
Translation has been fixed
This commit is contained in:
parent
4b38f75a9c
commit
ea2a38758d
@ -46,7 +46,7 @@
|
|||||||
//#include <QJSEngine>
|
//#include <QJSEngine>
|
||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
#else
|
#else
|
||||||
#include <QScriptEngine>
|
#include <QtScript/QScriptEngine>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace LimeReport {
|
namespace LimeReport {
|
||||||
|
@ -82,14 +82,13 @@ void ReportTranslation::updatePageTranslation(PageDesignIntf* page)
|
|||||||
if (itemTranslation){
|
if (itemTranslation){
|
||||||
foreach(QString propertyName, stringsForTranslation.keys()){
|
foreach(QString propertyName, stringsForTranslation.keys()){
|
||||||
PropertyTranslation* propertyTranslation = itemTranslation->findProperty(propertyName);
|
PropertyTranslation* propertyTranslation = itemTranslation->findProperty(propertyName);
|
||||||
|
bool translated = propertyTranslation->sourceValue != propertyTranslation->value;
|
||||||
if (propertyTranslation->checked)
|
if (propertyTranslation->checked)
|
||||||
propertyTranslation->sourceHasBeenChanged = propertyTranslation->sourceValue != stringsForTranslation.value(propertyName);
|
propertyTranslation->sourceHasBeenChanged = propertyTranslation->sourceValue != stringsForTranslation.value(propertyName);
|
||||||
if (propertyTranslation->sourceHasBeenChanged)
|
if (propertyTranslation->sourceHasBeenChanged)
|
||||||
propertyTranslation->checked = false;
|
propertyTranslation->checked = false;
|
||||||
propertyTranslation->sourceValue = stringsForTranslation.value(propertyName);
|
propertyTranslation->sourceValue = stringsForTranslation.value(propertyName);
|
||||||
|
if (!translated) propertyTranslation->value = propertyTranslation->sourceValue;
|
||||||
if ( language() == QLocale::AnyLanguage )
|
|
||||||
propertyTranslation->value = propertyTranslation->sourceValue;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
createItemTranslation(item, pageTranslation);
|
createItemTranslation(item, pageTranslation);
|
||||||
|
Loading…
Reference in New Issue
Block a user