summaryrefslogtreecommitdiff
path: root/raveos-calamares/0005-raveos-qml-forditas.patch
diff options
context:
space:
mode:
Diffstat (limited to 'raveos-calamares/0005-raveos-qml-forditas.patch')
-rw-r--r--raveos-calamares/0005-raveos-qml-forditas.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/raveos-calamares/0005-raveos-qml-forditas.patch b/raveos-calamares/0005-raveos-qml-forditas.patch
new file mode 100644
index 0000000..286b4a1
--- /dev/null
+++ b/raveos-calamares/0005-raveos-qml-forditas.patch
@@ -0,0 +1,75 @@
+--- a/src/calamares/CalamaresWindow.cpp
++++ b/src/calamares/CalamaresWindow.cpp
+@@ -319,6 +319,7 @@
+ w->setSource(
+ QUrl( Calamares::searchQmlFile( Calamares::QmlSearch::Both, QStringLiteral( "calamares-sidebar" ) ) ) );
+ setDimension( w, o, desiredWidth );
++ CALAMARES_RETRANSLATE_FOR( w, w->engine()->retranslate(); );
+ return w;
+ }
+
+@@ -338,6 +339,7 @@
+ w->setSource(
+ QUrl( Calamares::searchQmlFile( Calamares::QmlSearch::Both, QStringLiteral( "calamares-navigation" ) ) ) );
+ setDimension( w, o, desiredWidth );
++ CALAMARES_RETRANSLATE_FOR( w, w->engine()->retranslate(); );
+ return w;
+ }
+ #else
+--- a/src/libcalamaresui/ViewManager.cpp
++++ b/src/libcalamaresui/ViewManager.cpp
+@@ -92,6 +92,16 @@
+ connect( JobQueue::instance(), &JobQueue::finished, this, &ViewManager::next );
+
+ CALAMARES_RETRANSLATE_SLOT( &ViewManager::updateButtonLabels );
++ CALAMARES_RETRANSLATE( QMetaObject::invokeMethod(
++ this,
++ [ this ]()
++ {
++ if ( rowCount() > 0 )
++ {
++ emit dataChanged( index( 0 ), index( rowCount() - 1 ) );
++ }
++ },
++ Qt::QueuedConnection ); );
+
+ #ifdef PRESERVE_FOR_TRANSLATION_PURPOSES
+ tr( "&Yes" );
+--- a/src/libcalamaresui/viewpages/QmlViewStep.cpp
++++ b/src/libcalamaresui/viewpages/QmlViewStep.cpp
+@@ -17,6 +17,7 @@
+ #include "utils/Logger.h"
+ #include "utils/NamedEnum.h"
+ #include "utils/Qml.h"
++#include "utils/Retranslator.h"
+ #include "utils/Variant.h"
+ #include "widgets/WaitingWidget.h"
+
+@@ -87,6 +88,7 @@
+ layout->addWidget( m_spinner );
+
+ m_qmlEngine->addImportPath( Calamares::qmlModulesDir().absolutePath() );
++ CALAMARES_RETRANSLATE( m_qmlEngine->retranslate(); );
+
+ // QML Loading starts when the configuration for the module is set.
+ }
+@@ -156,17 +158,8 @@
+ QSize
+ QmlViewStep::widgetMargins( Qt::Orientations panelSides )
+ {
+- // If any panels around it, use the standard, but if all the
+- // panels are hidden, like on full-screen with subsumed navigation,
+- // then no margins.
+- if ( panelSides )
+- {
+- return ViewStep::widgetMargins( panelSides );
+- }
+- else
+- {
+- return QSize( 0, 0 );
+- }
++ Q_UNUSED( panelSides )
++ return QSize( 0, 0 );
+ }
+
+ void