refactor: messages::showReadOnlySettings, use name in title, enable translations

This commit is contained in:
sithlord48 2025-06-07 23:09:00 -04:00 committed by Nick Bolton
parent 0f5a04825a
commit 8f7fbc0a21

View file

@ -258,15 +258,13 @@ bool showClearSettings(QWidget *parent)
void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath) void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath)
{ {
QString nativePath = QDir::toNativeSeparators(systemSettingsPath); const auto title = QObject::tr("%1 Read-only settings").arg(kAppName);
QMessageBox::information( const auto message = QObject::tr(
parent, "Read-only settings", "<p>Settings are read-only because you only have read access "
QString( "to the file:</p><p>%1</p>"
"<p>Settings are read-only because you only have read access " )
"to the file:</p><p>%1</p>" .arg(QDir::toNativeSeparators(systemSettingsPath));
) QMessageBox::information(parent, title, message);
.arg(nativePath)
);
} }
void showWaylandLibraryError(QWidget *parent) void showWaylandLibraryError(QWidget *parent)