From 57bda4e77167655eb4bf5c0e365c128913869d2c Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 24 May 2018 02:25:26 +0300 Subject: [PATCH] Designer translation fixed --- designer/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/designer/main.cpp b/designer/main.cpp index 3fcb4a9..87c0832 100644 --- a/designer/main.cpp +++ b/designer/main.cpp @@ -9,27 +9,26 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); DesignerSettingManager manager; - LimeReport::ReportEngine report; + QTranslator limeReportTranslator; QTranslator qtTranslator; QString translationPath = QApplication::applicationDirPath(); translationPath.append("/languages"); + Qt::LayoutDirection layoutDirection = QLocale::system().textDirection(); QString designerTranslation = QLocale(manager.getCurrentDefaultLanguage()).name(); if (limeReportTranslator.load("limereport_"+designerTranslation, translationPath)){ - qtTranslator.load("qt_" + designerTranslation, translationPath); a.installTranslator(&qtTranslator); a.installTranslator(&limeReportTranslator); - Qt::LayoutDirection layoutDirection = QLocale(manager.getCurrentDefaultLanguage()).textDirection(); - a.setLayoutDirection(layoutDirection); - report.setPreviewLayoutDirection(layoutDirection); } + LimeReport::ReportEngine report; + report.setPreviewLayoutDirection(layoutDirection); if (a.arguments().count()>1){ report.loadFromFile(a.arguments().at(1));