From 682cbe69515f764b50fefd5b254c37d69b055dfa Mon Sep 17 00:00:00 2001 From: Emir SARI Date: Mon, 23 Oct 2023 13:39:26 +0300 Subject: [PATCH] Improve string formatting and context --- src/libcalamaresui/ViewManager.cpp | 40 +++++++++---------- .../viewpages/ExecutionViewStep.cpp | 2 +- src/libcalamaresui/viewpages/QmlViewStep.cpp | 6 +-- .../ContextualProcessJob.cpp | 4 +- .../dracutlukscfg/DracutLuksCfgJob.cpp | 6 +-- src/modules/dummycpp/DummyCppJob.cpp | 2 +- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/libcalamaresui/ViewManager.cpp b/src/libcalamaresui/ViewManager.cpp index 2cd7a9fc5..10c1955e7 100644 --- a/src/libcalamaresui/ViewManager.cpp +++ b/src/libcalamaresui/ViewManager.cpp @@ -153,10 +153,10 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail cDebug() << Logger::SubEntry << "- details:" << Logger::NoQuote << details; QString heading - = Calamares::Settings::instance()->isSetupMode() ? tr( "Setup Failed" ) : tr( "Installation Failed" ); + = Calamares::Settings::instance()->isSetupMode() ? tr( "Setup Failed", "@title" ) : tr( "Installation Failed", "@title" ); ErrorDialog* errorDialog = new ErrorDialog(); - errorDialog->setWindowTitle( tr( "Error" ) ); + errorDialog->setWindowTitle( tr( "Error", "@title" ) ); errorDialog->setHeading( "" + heading + "" ); errorDialog->setInformativeText( message ); errorDialog->setShouldOfferWebPaste( Calamares::Branding::instance()->uploadServer() ); @@ -181,14 +181,14 @@ ViewManager::onInitFailed( const QStringList& modules ) { // Because this means the installer / setup program is broken by the distributor, // don't bother being precise about installer / setup wording. - QString title( tr( "Calamares Initialization Failed" ) ); + QString title( tr( "Calamares Initialization Failed", "@title" ) ); QString description( tr( "%1 can not be installed. Calamares was unable to load all of the configured modules. " - "This is a problem with the way Calamares is being used by the distribution." ) ); + "This is a problem with the way Calamares is being used by the distribution.", "@info" ) ); QString detailString; if ( modules.count() > 0 ) { - description.append( tr( "
The following modules could not be loaded:" ) ); + description.append( tr( "
The following modules could not be loaded:", "@info" ) ); QStringList details; details << QLatin1String( "