Process more messages

This commit is contained in:
Emir SARI 2023-10-15 14:39:17 +03:00
parent 814f5f0ccc
commit 125a58f7c0
4 changed files with 18 additions and 18 deletions

View file

@ -304,7 +304,7 @@ Helper::handleLastError()
if ( typeMsg.isEmpty() )
{
typeMsg = tr( "Unknown exception type" );
typeMsg = tr( "Unknown exception type", "@error" );
}
debug << typeMsg << '\n';
}
@ -322,7 +322,7 @@ Helper::handleLastError()
if ( valMsg.isEmpty() )
{
valMsg = tr( "unparseable Python error" );
valMsg = tr( "Unparseable Python error", "@error" );
}
// Special-case: CalledProcessError has an attribute "output" with the command output,
@ -366,14 +366,14 @@ Helper::handleLastError()
if ( tbMsg.isEmpty() )
{
tbMsg = tr( "unparseable Python traceback" );
tbMsg = tr( "Unparseable Python traceback", "@error" );
}
debug << tbMsg << '\n';
}
if ( typeMsg.isEmpty() && valMsg.isEmpty() && tbMsg.isEmpty() )
{
return tr( "Unfetchable Python error." );
return tr( "Unfetchable Python error", "@error" );
}
QStringList msgList;

View file

@ -230,7 +230,7 @@ PythonJob::prettyStatusMessage() const
// The description is updated when progress is reported, see emitProgress()
if ( m_description.isEmpty() )
{
return tr( "Running %1 operation." ).arg( QDir( m_workingPath ).dirName() );
return tr( "Running %1 operation", "@status" ).arg( QDir( m_workingPath ).dirName() );
}
else
{
@ -259,15 +259,15 @@ PythonJob::exec()
if ( !workingDir.exists() || !workingDir.isReadable() )
{
return JobResult::error(
tr( "Bad working directory path" ),
tr( "Working directory %1 for python job %2 is not readable." ).arg( m_workingPath ).arg( prettyName() ) );
tr( "Bad working directory path", "@error" ),
tr( "Working directory %1 for python job %2 is not readable.", "@error" ).arg( m_workingPath ).arg( prettyName() ) );
}
QFileInfo scriptFI( workingDir.absoluteFilePath( m_scriptFile ) );
if ( !scriptFI.exists() || !scriptFI.isFile() || !scriptFI.isReadable() )
{
return JobResult::error( tr( "Bad main script file" ),
tr( "Main script file %1 for python job %2 is not readable." )
return JobResult::error( tr( "Bad main script file", "@error" ),
tr( "Main script file %1 for python job %2 is not readable.", "@error" )
.arg( scriptFI.absoluteFilePath() )
.arg( prettyName() ) );
}
@ -340,7 +340,7 @@ PythonJob::exec()
bp::handle_exception();
PyErr_Clear();
return JobResult::internalError(
tr( "Boost.Python error in job \"%1\"." ).arg( prettyName() ), msg, JobResult::PythonUncaughtException );
tr( "Boost.Python error in job \"%1\"", "@error" ).arg( prettyName() ), msg, JobResult::PythonUncaughtException );
}
}

View file

@ -96,7 +96,7 @@ RequirementsChecker::addCheckedRequirements( Module* m )
m_model->addRequirementsList( l );
}
Q_EMIT requirementsProgress( tr( "Requirements checking for module '%1' is complete." ).arg( m->name() ) );
Q_EMIT requirementsProgress( tr( "Requirements checking for module '%1' is complete.", "@info" ).arg( m->name() ) );
}
void
@ -120,13 +120,13 @@ RequirementsChecker::reportProgress()
{
cDebug() << "Remaining modules:" << remaining << Logger::DebugList( remainingNames );
unsigned int posInterval = ( m_progressTimer->interval() < 0 ) ? 1000 : uint( m_progressTimer->interval() );
QString waiting = tr( "Waiting for %n module(s).", "", remaining );
QString elapsed = tr( "(%n second(s))", "", m_progressTimeouts * posInterval / 1000 );
QString waiting = tr( "Waiting for %n module(s)", "@status", remaining );
QString elapsed = tr( "(%n second(s))", "@status", m_progressTimeouts * posInterval / 999 );
Q_EMIT requirementsProgress( waiting + QString( " " ) + elapsed );
}
else
{
Q_EMIT requirementsProgress( tr( "System-requirements checking is complete." ) );
Q_EMIT requirementsProgress( tr( "System-requirements checking is complete.", "@info" ) );
}
}

View file

@ -30,13 +30,13 @@ prettyNameForFileSystemType( FileSystem::Type t )
switch ( t )
{
case FileSystem::Unknown:
return QObject::tr( "unknown" );
return QObject::tr( "unknown", "@partition info" );
case FileSystem::Extended:
return QObject::tr( "extended" );
return QObject::tr( "extended", "@partition info" );
case FileSystem::Unformatted:
return QObject::tr( "unformatted" );
return QObject::tr( "unformatted", "@partition info" );
case FileSystem::LinuxSwap:
return QObject::tr( "swap" );
return QObject::tr( "swap", "@partition info" );
case FileSystem::Fat16:
case FileSystem::Fat32:
case FileSystem::Ntfs: