Skip to content

Commit

Permalink
Update some auth strings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 7, 2025
1 parent 23b55d6 commit 70ea5e5
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 38 deletions.
18 changes: 9 additions & 9 deletions src/core/auth/qgsauthmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ bool QgsAuthManager::createAndStoreRandomMasterPasswordInKeyChain()
}
else
{
emit passwordHelperMessageLog( tr( "Master password could not be written to your %1" ).arg( passwordHelperDisplayName() ), authManTag(), Qgis::MessageLevel::Warning );
emit passwordHelperMessageLog( tr( "Master password could not be written to the %1" ).arg( passwordHelperDisplayName() ), authManTag(), Qgis::MessageLevel::Warning );
return false;
}

Expand Down Expand Up @@ -1518,15 +1518,15 @@ bool QgsAuthManager::backupAuthenticationDatabase( QString *backuppath )

if ( sqliteDatabasePath().isEmpty() )
{
const char *err = QT_TR_NOOP( "The authentication database is not filesystem-based" );
const char *err = QT_TR_NOOP( "The authentication storage is not filesystem-based" );
QgsDebugError( err );
emit messageLog( tr( err ), authManTag(), Qgis::MessageLevel::Warning );
return false;
}

if ( !QFile::exists( sqliteDatabasePath() ) )
{
const char *err = QT_TR_NOOP( "No authentication database found" );
const char *err = QT_TR_NOOP( "No authentication database file found" );
QgsDebugError( err );
emit messageLog( tr( err ), authManTag(), Qgis::MessageLevel::Warning );
return false;
Expand Down Expand Up @@ -3368,7 +3368,7 @@ QString QgsAuthManager::passwordHelperRead()
if ( job.error() )
{
mPasswordHelperErrorCode = job.error();
mPasswordHelperErrorMessage = tr( "Retrieving password from your %1 failed: %2." ).arg( passwordHelperDisplayName(), job.errorString() );
mPasswordHelperErrorMessage = tr( "Retrieving password from the %1 failed: %2." ).arg( passwordHelperDisplayName(), job.errorString() );
// Signals used in the tests to exit main application loop
emit passwordHelperFailure();
}
Expand All @@ -3379,7 +3379,7 @@ QString QgsAuthManager::passwordHelperRead()
if ( password.isEmpty() )
{
mPasswordHelperErrorCode = QKeychain::EntryNotFound;
mPasswordHelperErrorMessage = tr( "Empty password retrieved from your %1." ).arg( passwordHelperDisplayName( true ) );
mPasswordHelperErrorMessage = tr( "Empty password retrieved from the %1." ).arg( passwordHelperDisplayName( true ) );
// Signals used in the tests to exit main application loop
emit passwordHelperFailure();
}
Expand Down Expand Up @@ -3413,7 +3413,7 @@ bool QgsAuthManager::passwordHelperWrite( const QString &password )
if ( job.error() )
{
mPasswordHelperErrorCode = job.error();
mPasswordHelperErrorMessage = tr( "Storing password in your %1 failed: %2." ).arg( passwordHelperDisplayName(), job.errorString() );
mPasswordHelperErrorMessage = tr( "Storing password in the %1 failed: %2." ).arg( passwordHelperDisplayName(), job.errorString() );
// Signals used in the tests to exit main application loop
emit passwordHelperFailure();
result = false;
Expand Down Expand Up @@ -3478,7 +3478,7 @@ void QgsAuthManager::passwordHelperProcessError()
// we also want to disable the wallet system to prevent annoying
// notification on each subsequent access.
setPasswordHelperEnabled( false );
mPasswordHelperErrorMessage = tr( "There was an error and integration with your %1 system has been disabled. "
mPasswordHelperErrorMessage = tr( "There was an error and integration with your %1 has been disabled. "
"You can re-enable it at any time through the \"Utilities\" menu "
"in the Authentication pane of the options dialog. %2" )
.arg( passwordHelperDisplayName(), mPasswordHelperErrorMessage );
Expand Down Expand Up @@ -3518,7 +3518,7 @@ bool QgsAuthManager::masterPasswordInput()
}
else
{
emit passwordHelperMessageLog( tr( "Master password stored in your %1 is not valid" ).arg( passwordHelperDisplayName() ), authManTag(), Qgis::MessageLevel::Warning );
emit passwordHelperMessageLog( tr( "Master password stored in the %1 is not valid" ).arg( passwordHelperDisplayName() ), authManTag(), Qgis::MessageLevel::Warning );
}
}
}
Expand All @@ -3536,7 +3536,7 @@ bool QgsAuthManager::masterPasswordInput()
{
if ( !passwordHelperWrite( pass ) )
{
emit passwordHelperMessageLog( tr( "Master password could not be written to your %1" ).arg( passwordHelperDisplayName() ), authManTag(), Qgis::MessageLevel::Warning );
emit passwordHelperMessageLog( tr( "Master password could not be written to the %1" ).arg( passwordHelperDisplayName() ), authManTag(), Qgis::MessageLevel::Warning );
}
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class CORE_EXPORT QgsExpressionUtils
return v.userType() == QMetaType::Type::QVariantList || v.userType() == QMetaType::Type::QStringList;
}

// implicit conversion to string
// implicit conversion to string
static QString getStringValue( const QVariant &value, QgsExpression * )
{
return value.toString();
Expand Down
18 changes: 9 additions & 9 deletions src/gui/auth/qgsauthauthoritieseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ void QgsAuthAuthoritiesEditor::btnAddCa_clicked()
const QList<QSslCertificate> &certs( dlg->certificatesToImport() );
if ( !QgsApplication::authManager()->storeCertAuthorities( certs ) )
{
messageBar()->pushMessage( tr( "ERROR storing CA(s) in authentication database" ), Qgis::MessageLevel::Critical );
messageBar()->pushMessage( tr( "ERROR storing CA(s) in authentication storage" ), Qgis::MessageLevel::Critical );
}

QgsApplication::authManager()->rebuildCaCertsCache();
Expand Down Expand Up @@ -501,19 +501,19 @@ void QgsAuthAuthoritiesEditor::btnRemoveCa_clicked()

if ( cert.isNull() )
{
messageBar()->pushMessage( tr( "Certificate could not be found in database for id %1:" ).arg( digest ), Qgis::MessageLevel::Warning );
messageBar()->pushMessage( tr( "Certificate could not be found in the authentication storage for id %1:" ).arg( digest ), Qgis::MessageLevel::Warning );
return;
}

if ( !QgsApplication::authManager()->removeCertAuthority( cert ) )
{
messageBar()->pushMessage( tr( "ERROR removing CA from authentication database for id %1:" ).arg( digest ), Qgis::MessageLevel::Critical );
messageBar()->pushMessage( tr( "ERROR removing CA from the authentication storage for id %1:" ).arg( digest ), Qgis::MessageLevel::Critical );
return;
}

if ( !QgsApplication::authManager()->removeCertTrustPolicy( cert ) )
{
messageBar()->pushMessage( tr( "ERROR removing cert trust policy from authentication database for id %1:" ).arg( digest ), Qgis::MessageLevel::Critical );
messageBar()->pushMessage( tr( "ERROR removing cert trust policy from the authentication storage for id %1:" ).arg( digest ), Qgis::MessageLevel::Critical );
return;
}

Expand Down Expand Up @@ -646,11 +646,11 @@ void QgsAuthAuthoritiesEditor::btnCaFile_clicked()

if ( !QgsApplication::authManager()->storeAuthSetting( QStringLiteral( "cafile" ), QVariant( fn ) ) )
{
logMessage( QObject::tr( "Could not store 'CA file path' in authentication database." ), QObject::tr( "Authorities Manager" ), Qgis::MessageLevel::Warning );
logMessage( QObject::tr( "Could not store 'CA file path' in authentication storage." ), QObject::tr( "Authorities Manager" ), Qgis::MessageLevel::Warning );
}
if ( !QgsApplication::authManager()->storeAuthSetting( QStringLiteral( "cafileallowinvalid" ), QVariant( dlg->allowInvalidCerts() ) ) )
{
logMessage( QObject::tr( "Could not store 'CA file allow invalids' setting in authentication database." ), QObject::tr( "Authorities Manager" ), Qgis::MessageLevel::Warning );
logMessage( QObject::tr( "Could not store 'CA file allow invalids' setting in authentication storage." ), QObject::tr( "Authorities Manager" ), Qgis::MessageLevel::Warning );
}

QgsApplication::authManager()->rebuildCaCertsCache();
Expand Down Expand Up @@ -682,12 +682,12 @@ void QgsAuthAuthoritiesEditor::btnCaFileClear_clicked()
{
if ( !QgsApplication::authManager()->removeAuthSetting( QStringLiteral( "cafile" ) ) )
{
logMessage( QObject::tr( "Could not remove 'CA file path' from authentication database." ), QObject::tr( "Authorities Manager" ), Qgis::MessageLevel::Warning );
logMessage( QObject::tr( "Could not remove 'CA file path' from authentication storage." ), QObject::tr( "Authorities Manager" ), Qgis::MessageLevel::Warning );
return;
}
if ( !QgsApplication::authManager()->removeAuthSetting( QStringLiteral( "cafileallowinvalid" ) ) )
{
logMessage( QObject::tr( "Could not remove 'CA file allow invalids' setting from authentication database." ), QObject::tr( "Authorities Manager" ), Qgis::MessageLevel::Warning );
logMessage( QObject::tr( "Could not remove 'CA file allow invalids' setting from authentication storage." ), QObject::tr( "Authorities Manager" ), Qgis::MessageLevel::Warning );
return;
}

Expand All @@ -702,7 +702,7 @@ void QgsAuthAuthoritiesEditor::btnCaFileClear_clicked()
{
if ( !QgsApplication::authManager()->removeCertTrustPolicies( certs ) )
{
messageBar()->pushMessage( tr( "ERROR removing cert(s) trust policy from authentication database." ), Qgis::MessageLevel::Critical );
messageBar()->pushMessage( tr( "ERROR removing cert(s) trust policy from authentication storage." ), Qgis::MessageLevel::Critical );
return;
}
QgsApplication::authManager()->rebuildCertTrustCache();
Expand Down
4 changes: 2 additions & 2 deletions src/gui/auth/qgsautheditorwidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ void QgsAuthEditorWidgets::setupUtilitiesMenu()
mActionAutoClearAccessCache->setCheckable( true );
mActionAutoClearAccessCache->setChecked( QgsSettings().value( QStringLiteral( "clear_auth_cache_on_errors" ), true, QgsSettings::Section::Auth ).toBool() );

mActionPasswordHelperDelete = new QAction( tr( "Clear the Master Password from your %1…" ).arg( QgsAuthManager::passwordHelperDisplayName( true ) ), this );
mActionPasswordHelperEnable = new QAction( tr( "Integrate Master Password with your %1" ).arg( QgsAuthManager::passwordHelperDisplayName( true ) ), this );
mActionPasswordHelperDelete = new QAction( tr( "Clear the Master Password from the %1…" ).arg( QgsAuthManager::passwordHelperDisplayName( true ) ), this );
mActionPasswordHelperEnable = new QAction( tr( "Integrate Master Password with the %1" ).arg( QgsAuthManager::passwordHelperDisplayName( true ) ), this );
mActionPasswordHelperLoggingEnable = new QAction( tr( "Enable Password Helper Debug Log" ), this );

mActionPasswordHelperEnable->setCheckable( true );
Expand Down
4 changes: 2 additions & 2 deletions src/gui/auth/qgsauthguiutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ QString QgsAuthGuiUtils::getOpenFileName( QWidget *parent, const QString &title,

void QgsAuthGuiUtils::passwordHelperDelete( QgsMessageBar *msgbar, QWidget *parent )
{
if ( QMessageBox::warning( parent, QObject::tr( "Delete Password" ), QObject::tr( "Do you really want to delete the master password from your %1?" ).arg( QgsAuthManager::passwordHelperDisplayName() ), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Cancel ) == QMessageBox::Cancel )
if ( QMessageBox::warning( parent, QObject::tr( "Delete Password" ), QObject::tr( "Do you really want to delete the master password from the %1?" ).arg( QgsAuthManager::passwordHelperDisplayName() ), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Cancel ) == QMessageBox::Cancel )
{
return;
}
Expand All @@ -344,7 +344,7 @@ void QgsAuthGuiUtils::passwordHelperDelete( QgsMessageBar *msgbar, QWidget *pare
}
else
{
msg = QObject::tr( "Master password was successfully deleted from your %1" )
msg = QObject::tr( "Master password was successfully deleted from the %1" )
.arg( QgsAuthManager::passwordHelperDisplayName() );

level = Qgis::MessageLevel::Info;
Expand Down
4 changes: 2 additions & 2 deletions src/gui/auth/qgsauthidentitieseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void QgsAuthIdentitiesEditor::btnAddIdentity_clicked()
const QPair<QSslCertificate, QSslKey> &bundle( dlg->certBundleToImport() );
if ( !QgsApplication::authManager()->storeCertIdentity( bundle.first, bundle.second ) )
{
messageBar()->pushMessage( tr( "ERROR storing identity bundle in authentication database." ), Qgis::MessageLevel::Critical );
messageBar()->pushMessage( tr( "ERROR storing identity bundle in authentication storage." ), Qgis::MessageLevel::Critical );
}
populateIdentitiesView();
mRootCertIdentItem->setExpanded( true );
Expand Down Expand Up @@ -326,7 +326,7 @@ void QgsAuthIdentitiesEditor::btnRemoveIdentity_clicked()

if ( !QgsApplication::authManager()->removeCertIdentity( digest ) )
{
messageBar()->pushMessage( tr( "ERROR removing cert identity from authentication database for id %1:" ).arg( digest ), Qgis::MessageLevel::Critical );
messageBar()->pushMessage( tr( "ERROR removing cert identity from authentication storage for id %1:" ).arg( digest ), Qgis::MessageLevel::Critical );
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/gui/auth/qgsauthmasterpassresetdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ QgsMasterPasswordResetDialog::QgsMasterPasswordResetDialog( QWidget *parent )
}
}

QString warning = tr( "Your authentication database will be duplicated and re-encrypted using the new password." );
QString warning = tr( "The authentication store will be re-encrypted using the new password." );
if ( QgsApplication::authManager()->passwordHelperEnabled() )
{
warning += QStringLiteral( "<p><b>%1</b></p>" ).arg( tr( "Your new password will automatically be stored in the system %1." ).arg( QgsAuthManager::passwordHelperDisplayName() ) );
warning += QStringLiteral( "<p><b>%1</b></p>" ).arg( tr( "The new password will automatically be stored in the system %1." ).arg( QgsAuthManager::passwordHelperDisplayName() ) );
}

lblWarning->setText( warning );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/auth/qgsauthserverseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ void QgsAuthServersEditor::btnRemoveServer_clicked()

if ( !QgsApplication::authManager()->removeSslCertCustomConfig( digest, hostport ) )
{
messageBar()->pushMessage( tr( "ERROR removing SSL custom config from authentication database for host:port, id %1:" ).arg( hostport, digest ), Qgis::MessageLevel::Critical );
messageBar()->pushMessage( tr( "ERROR removing SSL custom config from authentication storage for host:port, id %1:" ).arg( hostport, digest ), Qgis::MessageLevel::Critical );
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/auth/qgsauthsslconfigwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ void QgsAuthSslConfigWidget::saveSslCertConfig()
}
if ( !QgsApplication::authManager()->storeSslCertCustomConfig( sslCustomConfig() ) )
{
QgsDebugError( QStringLiteral( "SSL custom config FAILED to store in authentication database" ) );
QgsDebugError( QStringLiteral( "SSL custom config FAILED to store in authentication storage" ) );
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/ui/auth/qgsauthauthoritieseditor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<item>
<widget class="QToolButton" name="btnAddCa">
<property name="toolTip">
<string>Import certificate(s) to authentication database</string>
<string>Import certificate(s) to authentication storage</string>
</property>
<property name="text">
<string/>
Expand All @@ -121,7 +121,7 @@
<item>
<widget class="QToolButton" name="btnRemoveCa">
<property name="toolTip">
<string>Remove certificate from authentication database</string>
<string>Remove certificate from authentication storage</string>
</property>
<property name="text">
<string/>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/auth/qgsauthcertificatemanager.ui
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<string notr="true">color: rgb(128, 128, 128);</string>
</property>
<property name="text">
<string>Note: Editing writes directly to authentication database</string>
<string>Note: Editing writes directly to authentication storage</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/auth/qgsauthconfigedit.ui
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<string notr="true">color: rgb(128, 128, 128);</string>
</property>
<property name="text">
<string>Note: Saving writes directly to authentication database</string>
<string>Note: Saving writes directly to authentication storage</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/auth/qgsauthconfiguriedit.ui
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<string notr="true">color: rgb(128, 128, 128);</string>
</property>
<property name="text">
<string>Note: Button actions above affect authentication database</string>
<string>Note: Button actions above affect authentication storage</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/auth/qgsautheditorwidgets.ui
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<string notr="true">QLabel {color: rgb(128, 128, 128);}</string>
</property>
<property name="text">
<string>Note: Editing writes directly to authentication database</string>
<string>Note: Editing writes directly to authentication storage</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down
4 changes: 2 additions & 2 deletions src/ui/auth/qgsauthidentitieseditor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<item>
<widget class="QToolButton" name="btnAddIdentity">
<property name="toolTip">
<string>Import identity bundle to authentication database</string>
<string>Import identity bundle to authentication storage</string>
</property>
<property name="text">
<string/>
Expand All @@ -69,7 +69,7 @@
<item>
<widget class="QToolButton" name="btnRemoveIdentity">
<property name="toolTip">
<string>Remove identity bundle from authentication database</string>
<string>Remove identity bundle from authentication storage</string>
</property>
<property name="text">
<string/>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/auth/qgsauthsettingswidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Configurations store encrypted credentials in the QGIS authentication database.</string>
<string>Configurations store encrypted credentials in the QGIS authentication storage.</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
Expand Down

0 comments on commit 70ea5e5

Please sign in to comment.