diff options
author | saturneric <[email protected]> | 2024-01-16 13:35:59 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-16 13:35:59 +0000 |
commit | 620ae9e7c1a8b2db2515c080416cb592066e5fec (patch) | |
tree | 900f3e55118aa2a5049d99dd743d3e595016fc7b /src/ui/function/SetOwnerTrustLevel.cpp | |
parent | fix: make task and threading system safer (diff) | |
download | GpgFrontend-620ae9e7c1a8b2db2515c080416cb592066e5fec.tar.gz GpgFrontend-620ae9e7c1a8b2db2515c080416cb592066e5fec.zip |
refactor: remove libgettext from project
Diffstat (limited to 'src/ui/function/SetOwnerTrustLevel.cpp')
-rw-r--r-- | src/ui/function/SetOwnerTrustLevel.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/ui/function/SetOwnerTrustLevel.cpp b/src/ui/function/SetOwnerTrustLevel.cpp index 91917961..360abfce 100644 --- a/src/ui/function/SetOwnerTrustLevel.cpp +++ b/src/ui/function/SetOwnerTrustLevel.cpp @@ -46,41 +46,42 @@ auto SetOwnerTrustLevel::Exec(const QString& key_id) -> bool { QStringList items; - items << _("Unknown") << _("Undefined") << _("Never") << _("Marginal") - << _("Full") << _("Ultimate"); + items << tr("Unknown") << tr("Undefined") << tr("Never") << tr("Marginal") + << tr("Full") << tr("Ultimate"); bool ok; - QString item = QInputDialog::getItem(this, _("Modify Owner Trust Level"), - _("Trust for the Key Pair:"), items, + QString item = QInputDialog::getItem(this, tr("Modify Owner Trust Level"), + tr("Trust for the Key Pair:"), items, key.GetOwnerTrustLevel(), false, &ok); if (ok && !item.isEmpty()) { GF_UI_LOG_DEBUG("selected owner trust policy: {}", item.toStdString()); int trust_level = 0; // Unknown Level - if (item == _("Ultimate")) { + if (item == tr("Ultimate")) { trust_level = 5; - } else if (item == _("Full")) { + } else if (item == tr("Full")) { trust_level = 4; - } else if (item == _("Marginal")) { + } else if (item == tr("Marginal")) { trust_level = 3; - } else if (item == _("Never")) { + } else if (item == tr("Never")) { trust_level = 2; - } else if (item == _("Undefined")) { + } else if (item == tr("Undefined")) { trust_level = 1; } if (trust_level == 0) { QMessageBox::warning( - this, _("Warning"), - QString(_("Owner Trust Level cannot set to Unknown level, automately " - "changing it into Undefined level."))); + this, tr("Warning"), + QString( + tr("Owner Trust Level cannot set to Unknown level, automately " + "changing it into Undefined level."))); trust_level = 1; } bool status = GpgKeyManager::GetInstance().SetOwnerTrustLevel(key, trust_level); if (!status) { - QMessageBox::critical(this, _("Failed"), - QString(_("Modify Owner Trust Level failed."))); + QMessageBox::critical(this, tr("Failed"), + tr("Modify Owner Trust Level failed.")); return false; } |