From 10cedd0b393c7b136e67a1f78188ae324f76a4d2 Mon Sep 17 00:00:00 2001 From: furszy Date: Mon, 6 Dec 2021 21:15:20 -0300 Subject: [PATCH] GUI governance: add missing strings to the translations process. Github-Pull: #2672 Rebased-From: 9d86871ebfdc87e238a61ef46bbbc2ae98393e68 --- src/qt/pivx/governancemodel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qt/pivx/governancemodel.cpp b/src/qt/pivx/governancemodel.cpp index 5d7186fd32384..5740d6f80742e 100644 --- a/src/qt/pivx/governancemodel.cpp +++ b/src/qt/pivx/governancemodel.cpp @@ -197,21 +197,21 @@ OperationResult GovernanceModel::validatePropURL(const QString& url) const OperationResult GovernanceModel::validatePropAmount(CAmount amount) const { if (amount < PROPOSAL_MIN_AMOUNT) { // Future: move constant to a budget interface. - return {false, strprintf("Amount below the minimum of %s PIV", FormatMoney(PROPOSAL_MIN_AMOUNT))}; + return {false, strprintf(_("Amount below the minimum of %s PIV"), FormatMoney(PROPOSAL_MIN_AMOUNT))}; } if (amount > getMaxAvailableBudgetAmount()) { - return {false, strprintf("Amount exceeding the maximum available of %s PIV", FormatMoney(getMaxAvailableBudgetAmount()))}; + return {false, strprintf(_("Amount exceeding the maximum available of %s PIV"), FormatMoney(getMaxAvailableBudgetAmount()))}; } return {true}; } OperationResult GovernanceModel::validatePropPaymentCount(int paymentCount) const { - if (paymentCount < 1) return { false, "Invalid payment count, must be greater than zero."}; + if (paymentCount < 1) return { false, _("Invalid payment count, must be greater than zero.")}; int nMaxPayments = getPropMaxPaymentsCount(); if (paymentCount > nMaxPayments) { - return { false, strprintf("Invalid payment count, cannot be greater than %d", nMaxPayments)}; + return { false, strprintf(_("Invalid payment count, cannot be greater than %d"), nMaxPayments)}; } return {true}; } @@ -232,13 +232,13 @@ OperationResult GovernanceModel::createProposal(const std::string& strProposalNa // Parse address const CTxDestination* dest = Standard::GetTransparentDestination(Standard::DecodeDestination(strPaymentAddr)); - if (!dest) return {false, "invalid recipient address for the proposal"}; + if (!dest) return {false, _("invalid recipient address for the proposal")}; CScript scriptPubKey = GetScriptForDestination(*dest); // Validate proposal CBudgetProposal proposal(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, UINT256_ZERO); if (!proposal.IsWellFormed(g_budgetman.GetTotalBudget(proposal.GetBlockStart()))) { - return {false, strprintf("Proposal is not valid %s", proposal.IsInvalidReason())}; + return {false, strprintf(_("Proposal is not valid %s"), proposal.IsInvalidReason())}; } // Craft and send transaction.