mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 12:34:39 +03:00
Designer translation fixed
This commit is contained in:
parent
150d9b1a4d
commit
57bda4e771
@ -9,27 +9,26 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
DesignerSettingManager manager;
|
DesignerSettingManager manager;
|
||||||
|
|
||||||
LimeReport::ReportEngine report;
|
|
||||||
|
|
||||||
QTranslator limeReportTranslator;
|
QTranslator limeReportTranslator;
|
||||||
QTranslator qtTranslator;
|
QTranslator qtTranslator;
|
||||||
QString translationPath = QApplication::applicationDirPath();
|
QString translationPath = QApplication::applicationDirPath();
|
||||||
translationPath.append("/languages");
|
translationPath.append("/languages");
|
||||||
|
Qt::LayoutDirection layoutDirection = QLocale::system().textDirection();
|
||||||
|
|
||||||
QString designerTranslation = QLocale(manager.getCurrentDefaultLanguage()).name();
|
QString designerTranslation = QLocale(manager.getCurrentDefaultLanguage()).name();
|
||||||
|
|
||||||
if (limeReportTranslator.load("limereport_"+designerTranslation, translationPath)){
|
if (limeReportTranslator.load("limereport_"+designerTranslation, translationPath)){
|
||||||
|
|
||||||
qtTranslator.load("qt_" + designerTranslation, translationPath);
|
qtTranslator.load("qt_" + designerTranslation, translationPath);
|
||||||
a.installTranslator(&qtTranslator);
|
a.installTranslator(&qtTranslator);
|
||||||
a.installTranslator(&limeReportTranslator);
|
a.installTranslator(&limeReportTranslator);
|
||||||
|
|
||||||
Qt::LayoutDirection layoutDirection = QLocale(manager.getCurrentDefaultLanguage()).textDirection();
|
Qt::LayoutDirection layoutDirection = QLocale(manager.getCurrentDefaultLanguage()).textDirection();
|
||||||
|
|
||||||
a.setLayoutDirection(layoutDirection);
|
a.setLayoutDirection(layoutDirection);
|
||||||
report.setPreviewLayoutDirection(layoutDirection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LimeReport::ReportEngine report;
|
||||||
|
report.setPreviewLayoutDirection(layoutDirection);
|
||||||
|
|
||||||
if (a.arguments().count()>1){
|
if (a.arguments().count()>1){
|
||||||
report.loadFromFile(a.arguments().at(1));
|
report.loadFromFile(a.arguments().at(1));
|
||||||
|
Loading…
Reference in New Issue
Block a user