0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

scripted-diff: Replace three dots with ellipsis in the UI strings

-BEGIN VERIFY SCRIPT-
sed -i -E -e 's/\.\.\."\)(\.|,|\)| )/…"\)\1/' -- $(git ls-files -- 'src' ':(exclude)src/qt/bitcoinstrings.cpp')
sed -i -e 's/\.\.\.\\"/…\\"/' src/qt/sendcoinsdialog.cpp
sed -i -e 's|\.\.\.</string>|…</string>|' src/qt/forms/*.ui
sed -i -e 's|\.\.\.)</string>|…)</string>|' src/qt/forms/sendcoinsdialog.ui
-END VERIFY SCRIPT-
This commit is contained in:
Hennadii Stepanov 2021-05-02 21:53:36 +03:00
parent 2448457cca
commit d66f283ac0
No known key found for this signature in database
GPG key ID: 410108112E7EA81F
19 changed files with 58 additions and 58 deletions

View file

@ -15,7 +15,7 @@
BanMan::BanMan(fs::path ban_file, CClientUIInterface* client_interface, int64_t default_ban_time) BanMan::BanMan(fs::path ban_file, CClientUIInterface* client_interface, int64_t default_ban_time)
: m_client_interface(client_interface), m_ban_db(std::move(ban_file)), m_default_ban_time(default_ban_time) : m_client_interface(client_interface), m_ban_db(std::move(ban_file)), m_default_ban_time(default_ban_time)
{ {
if (m_client_interface) m_client_interface->InitMessage(_("Loading banlist...").translated); if (m_client_interface) m_client_interface->InitMessage(_("Loading banlist").translated);
int64_t n_start = GetTimeMillis(); int64_t n_start = GetTimeMillis();
m_is_dirty = false; m_is_dirty = false;

View file

@ -1387,7 +1387,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
}; };
bilingual_str strLoadError; bilingual_str strLoadError;
uiInterface.InitMessage(_("Loading block index...").translated); uiInterface.InitMessage(_("Loading block index").translated);
do { do {
const int64_t load_block_index_start_time = GetTimeMillis(); const int64_t load_block_index_start_time = GetTimeMillis();
@ -1520,7 +1520,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
for (CChainState* chainstate : chainman.GetAll()) { for (CChainState* chainstate : chainman.GetAll()) {
if (!is_coinsview_empty(chainstate)) { if (!is_coinsview_empty(chainstate)) {
uiInterface.InitMessage(_("Verifying blocks...").translated); uiInterface.InitMessage(_("Verifying blocks").translated);
if (fHavePruned && args.GetArg("-checkblocks", DEFAULT_CHECKBLOCKS) > MIN_BLOCKS_TO_KEEP) { if (fHavePruned && args.GetArg("-checkblocks", DEFAULT_CHECKBLOCKS) > MIN_BLOCKS_TO_KEEP) {
LogPrintf("Prune: pruned datadir may not have more than %d blocks; only checking available blocks\n", LogPrintf("Prune: pruned datadir may not have more than %d blocks; only checking available blocks\n",
MIN_BLOCKS_TO_KEEP); MIN_BLOCKS_TO_KEEP);
@ -1620,7 +1620,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
if (!fReindex) { if (!fReindex) {
LOCK(cs_main); LOCK(cs_main);
for (CChainState* chainstate : chainman.GetAll()) { for (CChainState* chainstate : chainman.GetAll()) {
uiInterface.InitMessage(_("Pruning blockstore...").translated); uiInterface.InitMessage(_("Pruning blockstore").translated);
chainstate->PruneAndFlush(); chainstate->PruneAndFlush();
} }
} }

View file

@ -2476,7 +2476,7 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
} }
if (clientInterface) { if (clientInterface) {
clientInterface->InitMessage(_("Loading P2P addresses...").translated); clientInterface->InitMessage(_("Loading P2P addresses").translated);
} }
// Load addresses from peers.dat // Load addresses from peers.dat
int64_t nStart = GetTimeMillis(); int64_t nStart = GetTimeMillis();
@ -2500,7 +2500,7 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
LogPrintf("%i block-relay-only anchors will be tried for connections.\n", m_anchors.size()); LogPrintf("%i block-relay-only anchors will be tried for connections.\n", m_anchors.size());
} }
uiInterface.InitMessage(_("Starting network threads...").translated); uiInterface.InitMessage(_("Starting network threads").translated);
fAddressesInitialized = true; fAddressesInitialized = true;

View file

@ -633,7 +633,7 @@ int GuiMain(int argc, char* argv[])
if (app.baseInitialize()) { if (app.baseInitialize()) {
app.requestInitialize(); app.requestInitialize();
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(PACKAGE_NAME), (HWND)app.getMainWinId()); WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely").arg(PACKAGE_NAME), (HWND)app.getMainWinId());
#endif #endif
app.exec(); app.exec();
app.requestShutdown(); app.requestShutdown();

View file

@ -308,27 +308,27 @@ void BitcoinGUI::createActions()
aboutQtAction = new QAction(tr("About &Qt"), this); aboutQtAction = new QAction(tr("About &Qt"), this);
aboutQtAction->setStatusTip(tr("Show information about Qt")); aboutQtAction->setStatusTip(tr("Show information about Qt"));
aboutQtAction->setMenuRole(QAction::AboutQtRole); aboutQtAction->setMenuRole(QAction::AboutQtRole);
optionsAction = new QAction(tr("&Options..."), this); optionsAction = new QAction(tr("&Options"), this);
optionsAction->setStatusTip(tr("Modify configuration options for %1").arg(PACKAGE_NAME)); optionsAction->setStatusTip(tr("Modify configuration options for %1").arg(PACKAGE_NAME));
optionsAction->setMenuRole(QAction::PreferencesRole); optionsAction->setMenuRole(QAction::PreferencesRole);
optionsAction->setEnabled(false); optionsAction->setEnabled(false);
toggleHideAction = new QAction(tr("&Show / Hide"), this); toggleHideAction = new QAction(tr("&Show / Hide"), this);
toggleHideAction->setStatusTip(tr("Show or hide the main Window")); toggleHideAction->setStatusTip(tr("Show or hide the main Window"));
encryptWalletAction = new QAction(tr("&Encrypt Wallet..."), this); encryptWalletAction = new QAction(tr("&Encrypt Wallet"), this);
encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet")); encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet"));
encryptWalletAction->setCheckable(true); encryptWalletAction->setCheckable(true);
backupWalletAction = new QAction(tr("&Backup Wallet..."), this); backupWalletAction = new QAction(tr("&Backup Wallet"), this);
backupWalletAction->setStatusTip(tr("Backup wallet to another location")); backupWalletAction->setStatusTip(tr("Backup wallet to another location"));
changePassphraseAction = new QAction(tr("&Change Passphrase..."), this); changePassphraseAction = new QAction(tr("&Change Passphrase"), this);
changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption")); changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption"));
signMessageAction = new QAction(tr("Sign &message..."), this); signMessageAction = new QAction(tr("Sign &message"), this);
signMessageAction->setStatusTip(tr("Sign messages with your Bitcoin addresses to prove you own them")); signMessageAction->setStatusTip(tr("Sign messages with your Bitcoin addresses to prove you own them"));
verifyMessageAction = new QAction(tr("&Verify message..."), this); verifyMessageAction = new QAction(tr("&Verify message"), this);
verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Bitcoin addresses")); verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Bitcoin addresses"));
m_load_psbt_action = new QAction(tr("&Load PSBT from file..."), this); m_load_psbt_action = new QAction(tr("&Load PSBT from file"), this);
m_load_psbt_action->setStatusTip(tr("Load Partially Signed Bitcoin Transaction")); m_load_psbt_action->setStatusTip(tr("Load Partially Signed Bitcoin Transaction"));
m_load_psbt_clipboard_action = new QAction(tr("Load PSBT from clipboard..."), this); m_load_psbt_clipboard_action = new QAction(tr("Load PSBT from clipboard"), this);
m_load_psbt_clipboard_action->setStatusTip(tr("Load Partially Signed Bitcoin Transaction from clipboard")); m_load_psbt_clipboard_action->setStatusTip(tr("Load Partially Signed Bitcoin Transaction from clipboard"));
openRPCConsoleAction = new QAction(tr("Node window"), this); openRPCConsoleAction = new QAction(tr("Node window"), this);
@ -342,7 +342,7 @@ void BitcoinGUI::createActions()
usedReceivingAddressesAction = new QAction(tr("&Receiving addresses"), this); usedReceivingAddressesAction = new QAction(tr("&Receiving addresses"), this);
usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels")); usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels"));
openAction = new QAction(tr("Open &URI..."), this); openAction = new QAction(tr("Open &URI"), this);
openAction->setStatusTip(tr("Open a bitcoin: URI")); openAction->setStatusTip(tr("Open a bitcoin: URI"));
m_open_wallet_action = new QAction(tr("Open Wallet"), this); m_open_wallet_action = new QAction(tr("Open Wallet"), this);
@ -350,14 +350,14 @@ void BitcoinGUI::createActions()
m_open_wallet_action->setStatusTip(tr("Open a wallet")); m_open_wallet_action->setStatusTip(tr("Open a wallet"));
m_open_wallet_menu = new QMenu(this); m_open_wallet_menu = new QMenu(this);
m_close_wallet_action = new QAction(tr("Close Wallet..."), this); m_close_wallet_action = new QAction(tr("Close Wallet"), this);
m_close_wallet_action->setStatusTip(tr("Close wallet")); m_close_wallet_action->setStatusTip(tr("Close wallet"));
m_create_wallet_action = new QAction(tr("Create Wallet..."), this); m_create_wallet_action = new QAction(tr("Create Wallet"), this);
m_create_wallet_action->setEnabled(false); m_create_wallet_action->setEnabled(false);
m_create_wallet_action->setStatusTip(tr("Create a new wallet")); m_create_wallet_action->setStatusTip(tr("Create a new wallet"));
m_close_all_wallets_action = new QAction(tr("Close All Wallets..."), this); m_close_all_wallets_action = new QAction(tr("Close All Wallets"), this);
m_close_all_wallets_action->setStatusTip(tr("Close all wallets")); m_close_all_wallets_action->setStatusTip(tr("Close all wallets"));
showHelpMessageAction = new QAction(tr("&Command-line options"), this); showHelpMessageAction = new QAction(tr("&Command-line options"), this);
@ -944,7 +944,7 @@ void BitcoinGUI::updateHeadersSyncProgressLabel()
int headersTipHeight = clientModel->getHeaderTipHeight(); int headersTipHeight = clientModel->getHeaderTipHeight();
int estHeadersLeft = (GetTime() - headersTipTime) / Params().GetConsensus().nPowTargetSpacing; int estHeadersLeft = (GetTime() - headersTipTime) / Params().GetConsensus().nPowTargetSpacing;
if (estHeadersLeft > HEADER_HEIGHT_DELTA_SYNC) if (estHeadersLeft > HEADER_HEIGHT_DELTA_SYNC)
progressBarLabel->setText(tr("Syncing Headers (%1%)...").arg(QString::number(100.0 / (headersTipHeight+estHeadersLeft)*headersTipHeight, 'f', 1))); progressBarLabel->setText(tr("Syncing Headers (%1%)").arg(QString::number(100.0 / (headersTipHeight+estHeadersLeft)*headersTipHeight, 'f', 1)));
} }
void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab) void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
@ -990,24 +990,24 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
updateHeadersSyncProgressLabel(); updateHeadersSyncProgressLabel();
return; return;
} }
progressBarLabel->setText(tr("Synchronizing with network...")); progressBarLabel->setText(tr("Synchronizing with network"));
updateHeadersSyncProgressLabel(); updateHeadersSyncProgressLabel();
break; break;
case BlockSource::DISK: case BlockSource::DISK:
if (header) { if (header) {
progressBarLabel->setText(tr("Indexing blocks on disk...")); progressBarLabel->setText(tr("Indexing blocks on disk"));
} else { } else {
progressBarLabel->setText(tr("Processing blocks on disk...")); progressBarLabel->setText(tr("Processing blocks on disk"));
} }
break; break;
case BlockSource::REINDEX: case BlockSource::REINDEX:
progressBarLabel->setText(tr("Reindexing blocks on disk...")); progressBarLabel->setText(tr("Reindexing blocks on disk"));
break; break;
case BlockSource::NONE: case BlockSource::NONE:
if (header) { if (header) {
return; return;
} }
progressBarLabel->setText(tr("Connecting to peers...")); progressBarLabel->setText(tr("Connecting to peers"));
break; break;
} }
@ -1044,7 +1044,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5); progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
progressBar->setVisible(true); progressBar->setVisible(true);
tooltip = tr("Catching up...") + QString("<br>") + tooltip; tooltip = tr("Catching up") + QString("<br>") + tooltip;
if(count != prevBlocks) if(count != prevBlocks)
{ {
labelBlocksIcon->setPixmap(platformStyle->SingleColorIcon(QString( labelBlocksIcon->setPixmap(platformStyle->SingleColorIcon(QString(

View file

@ -219,7 +219,7 @@ QLabel { color: rgb(40,40,40); }</string>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="numberOfBlocksLeft"> <widget class="QLabel" name="numberOfBlocksLeft">
<property name="text"> <property name="text">
<string>Unknown...</string> <string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -245,7 +245,7 @@ QLabel { color: rgb(40,40,40); }</string>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Unknown...</string> <string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -289,7 +289,7 @@ QLabel { color: rgb(40,40,40); }</string>
<item row="4" column="1"> <item row="4" column="1">
<widget class="QLabel" name="progressIncreasePerH"> <widget class="QLabel" name="progressIncreasePerH">
<property name="text"> <property name="text">
<string>calculating...</string> <string>calculating</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -309,7 +309,7 @@ QLabel { color: rgb(40,40,40); }</string>
<item row="5" column="1"> <item row="5" column="1">
<widget class="QLabel" name="expectedTimeLeft"> <widget class="QLabel" name="expectedTimeLeft">
<property name="text"> <property name="text">
<string>calculating...</string> <string>calculating</string>
</property> </property>
</widget> </widget>
</item> </item>

View file

@ -126,7 +126,7 @@
<item> <item>
<widget class="QPushButton" name="saveButton"> <widget class="QPushButton" name="saveButton">
<property name="text"> <property name="text">
<string>Save...</string> <string>Save</string>
</property> </property>
</widget> </widget>
</item> </item>

View file

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Request payment to ...</string> <string>Request payment to </string>
</property> </property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1"> <layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<property name="sizeConstraint"> <property name="sizeConstraint">
@ -65,7 +65,7 @@
<item row="2" column="1" alignment="Qt::AlignTop"> <item row="2" column="1" alignment="Qt::AlignTop">
<widget class="QLabel" name="uri_content"> <widget class="QLabel" name="uri_content">
<property name="text"> <property name="text">
<string notr="true">bitcoin:BC1...</string> <string notr="true">bitcoin:BC1</string>
</property> </property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::RichText</enum> <enum>Qt::RichText</enum>
@ -97,7 +97,7 @@
<item row="3" column="1" alignment="Qt::AlignTop"> <item row="3" column="1" alignment="Qt::AlignTop">
<widget class="QLabel" name="address_content"> <widget class="QLabel" name="address_content">
<property name="text"> <property name="text">
<string notr="true">bc1...</string> <string notr="true">bc1</string>
</property> </property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
@ -257,7 +257,7 @@
<item> <item>
<widget class="QPushButton" name="btnSaveAs"> <widget class="QPushButton" name="btnSaveAs">
<property name="text"> <property name="text">
<string>&amp;Save Image...</string> <string>&amp;Save Image</string>
</property> </property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>

View file

@ -107,7 +107,7 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>Inputs...</string> <string>Inputs</string>
</property> </property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
@ -738,7 +738,7 @@
<item> <item>
<widget class="QPushButton" name="buttonChooseFee"> <widget class="QPushButton" name="buttonChooseFee">
<property name="text"> <property name="text">
<string>Choose...</string> <string>Choose</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -991,7 +991,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satoshis p
<item> <item>
<widget class="QLabel" name="labelSmartFee2"> <widget class="QLabel" name="labelSmartFee2">
<property name="text"> <property name="text">
<string>(Smart fee not initialized yet. This usually takes a few blocks...)</string> <string>(Smart fee not initialized yet. This usually takes a few blocks)</string>
</property> </property>
</widget> </widget>
</item> </item>

View file

@ -149,13 +149,13 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri
ui->numberOfBlocksLeft->setText(QString::number(bestHeaderHeight - count)); ui->numberOfBlocksLeft->setText(QString::number(bestHeaderHeight - count));
} else { } else {
UpdateHeaderSyncLabel(); UpdateHeaderSyncLabel();
ui->expectedTimeLeft->setText(tr("Unknown...")); ui->expectedTimeLeft->setText(tr("Unknown"));
} }
} }
void ModalOverlay::UpdateHeaderSyncLabel() { void ModalOverlay::UpdateHeaderSyncLabel() {
int est_headers_left = bestHeaderDate.secsTo(QDateTime::currentDateTime()) / Params().GetConsensus().nPowTargetSpacing; int est_headers_left = bestHeaderDate.secsTo(QDateTime::currentDateTime()) / Params().GetConsensus().nPowTargetSpacing;
ui->numberOfBlocksLeft->setText(tr("Unknown. Syncing Headers (%1, %2%)...").arg(bestHeaderHeight).arg(QString::number(100.0 / (bestHeaderHeight + est_headers_left) * bestHeaderHeight, 'f', 1))); ui->numberOfBlocksLeft->setText(tr("Unknown. Syncing Headers (%1, %2%)").arg(bestHeaderHeight).arg(QString::number(100.0 / (bestHeaderHeight + est_headers_left) * bestHeaderHeight, 'f', 1)));
} }
void ModalOverlay::toggleVisibility() void ModalOverlay::toggleVisibility()

View file

@ -27,7 +27,7 @@ QRImageWidget::QRImageWidget(QWidget *parent):
QLabel(parent), contextMenu(nullptr) QLabel(parent), contextMenu(nullptr)
{ {
contextMenu = new QMenu(this); contextMenu = new QMenu(this);
contextMenu->addAction(tr("Save Image..."), this, &QRImageWidget::saveImage); contextMenu->addAction(tr("Save Image"), this, &QRImageWidget::saveImage);
contextMenu->addAction(tr("Copy Image"), this, &QRImageWidget::copyImage); contextMenu->addAction(tr("Copy Image"), this, &QRImageWidget::copyImage);
} }

View file

@ -368,7 +368,7 @@ bool SendCoinsDialog::PrepareSendText(QString& question_string, QString& informa
if (formatted.size() > 1) { if (formatted.size() > 1) {
question_string = question_string.arg(""); question_string = question_string.arg("");
informative_text = tr("To review recipient list click \"Show Details...\""); informative_text = tr("To review recipient list click \"Show Details\"");
detailed_text = formatted.join("\n\n"); detailed_text = formatted.join("\n\n");
} else { } else {
question_string = question_string.arg("<br /><br />" + formatted.at(0)); question_string = question_string.arg("<br /><br />" + formatted.at(0));

View file

@ -73,7 +73,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
dateWidget->addItem(tr("This month"), ThisMonth); dateWidget->addItem(tr("This month"), ThisMonth);
dateWidget->addItem(tr("Last month"), LastMonth); dateWidget->addItem(tr("Last month"), LastMonth);
dateWidget->addItem(tr("This year"), ThisYear); dateWidget->addItem(tr("This year"), ThisYear);
dateWidget->addItem(tr("Range..."), Range); dateWidget->addItem(tr("Range"), Range);
hlayout->addWidget(dateWidget); hlayout->addWidget(dateWidget);
typeWidget = new QComboBox(this); typeWidget = new QComboBox(this);

View file

@ -142,7 +142,7 @@ ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f):
{ {
QVBoxLayout *layout = new QVBoxLayout(); QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(new QLabel( layout->addWidget(new QLabel(
tr("%1 is shutting down...").arg(PACKAGE_NAME) + "<br /><br />" + tr("%1 is shutting down").arg(PACKAGE_NAME) + "<br /><br />" +
tr("Do not shut down the computer until this window disappears."))); tr("Do not shut down the computer until this window disappears.")));
setLayout(layout); setLayout(layout);

View file

@ -247,7 +247,7 @@ void CreateWalletActivity::askPassphrase()
void CreateWalletActivity::createWallet() void CreateWalletActivity::createWallet()
{ {
showProgressDialog(tr("Creating Wallet <b>%1</b>...").arg(m_create_wallet_dialog->walletName().toHtmlEscaped())); showProgressDialog(tr("Creating Wallet <b>%1</b>").arg(m_create_wallet_dialog->walletName().toHtmlEscaped()));
std::string name = m_create_wallet_dialog->walletName().toStdString(); std::string name = m_create_wallet_dialog->walletName().toStdString();
uint64_t flags = 0; uint64_t flags = 0;
@ -330,7 +330,7 @@ void OpenWalletActivity::open(const std::string& path)
{ {
QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path); QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path);
showProgressDialog(tr("Opening Wallet <b>%1</b>...").arg(name.toHtmlEscaped())); showProgressDialog(tr("Opening Wallet <b>%1</b>").arg(name.toHtmlEscaped()));
QTimer::singleShot(0, worker(), [this, path] { QTimer::singleShot(0, worker(), [this, path] {
std::unique_ptr<interfaces::Wallet> wallet = node().walletClient().loadWallet(path, m_error_message, m_warning_message); std::unique_ptr<interfaces::Wallet> wallet = node().walletClient().loadWallet(path, m_error_message, m_warning_message);

View file

@ -4093,7 +4093,7 @@ bool CChainState::LoadChainTip(const CChainParams& chainparams)
CVerifyDB::CVerifyDB() CVerifyDB::CVerifyDB()
{ {
uiInterface.ShowProgress(_("Verifying blocks...").translated, 0, false); uiInterface.ShowProgress(_("Verifying blocks").translated, 0, false);
} }
CVerifyDB::~CVerifyDB() CVerifyDB::~CVerifyDB()
@ -4135,7 +4135,7 @@ bool CVerifyDB::VerifyDB(
LogPrintf("[%d%%]...", percentageDone); /* Continued */ LogPrintf("[%d%%]...", percentageDone); /* Continued */
reportDone = percentageDone/10; reportDone = percentageDone/10;
} }
uiInterface.ShowProgress(_("Verifying blocks...").translated, percentageDone, false); uiInterface.ShowProgress(_("Verifying blocks").translated, percentageDone, false);
if (pindex->nHeight <= chainstate.m_chain.Height()-nCheckDepth) if (pindex->nHeight <= chainstate.m_chain.Height()-nCheckDepth)
break; break;
if ((fPruneMode || is_snapshot_cs) && !(pindex->nStatus & BLOCK_HAVE_DATA)) { if ((fPruneMode || is_snapshot_cs) && !(pindex->nStatus & BLOCK_HAVE_DATA)) {
@ -4194,7 +4194,7 @@ bool CVerifyDB::VerifyDB(
LogPrintf("[%d%%]...", percentageDone); /* Continued */ LogPrintf("[%d%%]...", percentageDone); /* Continued */
reportDone = percentageDone/10; reportDone = percentageDone/10;
} }
uiInterface.ShowProgress(_("Verifying blocks...").translated, percentageDone, false); uiInterface.ShowProgress(_("Verifying blocks").translated, percentageDone, false);
pindex = chainstate.m_chain.Next(pindex); pindex = chainstate.m_chain.Next(pindex);
CBlock block; CBlock block;
if (!ReadBlockFromDisk(block, pindex, chainparams.GetConsensus())) if (!ReadBlockFromDisk(block, pindex, chainparams.GetConsensus()))
@ -4243,7 +4243,7 @@ bool CChainState::ReplayBlocks(const CChainParams& params)
if (hashHeads.empty()) return true; // We're already in a consistent state. if (hashHeads.empty()) return true; // We're already in a consistent state.
if (hashHeads.size() != 2) return error("ReplayBlocks(): unknown inconsistent state"); if (hashHeads.size() != 2) return error("ReplayBlocks(): unknown inconsistent state");
uiInterface.ShowProgress(_("Replaying blocks...").translated, 0, false); uiInterface.ShowProgress(_("Replaying blocks").translated, 0, false);
LogPrintf("Replaying blocks\n"); LogPrintf("Replaying blocks\n");
const CBlockIndex* pindexOld = nullptr; // Old tip during the interrupted flush. const CBlockIndex* pindexOld = nullptr; // Old tip during the interrupted flush.
@ -4289,7 +4289,7 @@ bool CChainState::ReplayBlocks(const CChainParams& params)
for (int nHeight = nForkHeight + 1; nHeight <= pindexNew->nHeight; ++nHeight) { for (int nHeight = nForkHeight + 1; nHeight <= pindexNew->nHeight; ++nHeight) {
const CBlockIndex* pindex = pindexNew->GetAncestor(nHeight); const CBlockIndex* pindex = pindexNew->GetAncestor(nHeight);
LogPrintf("Rolling forward %s (%i)\n", pindex->GetBlockHash().ToString(), nHeight); LogPrintf("Rolling forward %s (%i)\n", pindex->GetBlockHash().ToString(), nHeight);
uiInterface.ShowProgress(_("Replaying blocks...").translated, (int) ((nHeight - nForkHeight) * 100.0 / (pindexNew->nHeight - nForkHeight)) , false); uiInterface.ShowProgress(_("Replaying blocks").translated, (int) ((nHeight - nForkHeight) * 100.0 / (pindexNew->nHeight - nForkHeight)) , false);
if (!RollforwardBlock(pindex, cache, params)) return false; if (!RollforwardBlock(pindex, cache, params)) return false;
} }

View file

@ -39,7 +39,7 @@ bool VerifyWallets(interfaces::Chain& chain)
LogPrintf("Using wallet directory %s\n", GetWalletDir().string()); LogPrintf("Using wallet directory %s\n", GetWalletDir().string());
chain.initMessage(_("Verifying wallet(s)...").translated); chain.initMessage(_("Verifying wallet(s)").translated);
// For backwards compatibility if an unnamed top level wallet exists in the // For backwards compatibility if an unnamed top level wallet exists in the
// wallets directory, include it in the default list of wallets to load. // wallets directory, include it in the default list of wallets to load.

View file

@ -557,7 +557,7 @@ RPCHelpMan importwallet()
// Use uiInterface.ShowProgress instead of pwallet.ShowProgress because pwallet.ShowProgress has a cancel button tied to AbortRescan which // Use uiInterface.ShowProgress instead of pwallet.ShowProgress because pwallet.ShowProgress has a cancel button tied to AbortRescan which
// we don't want for this progress bar showing the import progress. uiInterface.ShowProgress does not have a cancel button. // we don't want for this progress bar showing the import progress. uiInterface.ShowProgress does not have a cancel button.
pwallet->chain().showProgress(strprintf("%s " + _("Importing...").translated, pwallet->GetDisplayName()), 0, false); // show progress dialog in GUI pwallet->chain().showProgress(strprintf("%s " + _("Importing").translated, pwallet->GetDisplayName()), 0, false); // show progress dialog in GUI
std::vector<std::tuple<CKey, int64_t, bool, std::string>> keys; std::vector<std::tuple<CKey, int64_t, bool, std::string>> keys;
std::vector<std::pair<CScript, int64_t>> scripts; std::vector<std::pair<CScript, int64_t>> scripts;
while (file.good()) { while (file.good()) {

View file

@ -1784,7 +1784,7 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
WalletLogPrintf("Rescan started from block %s...\n", start_block.ToString()); WalletLogPrintf("Rescan started from block %s...\n", start_block.ToString());
fAbortRescan = false; fAbortRescan = false;
ShowProgress(strprintf("%s " + _("Rescanning...").translated, GetDisplayName()), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup ShowProgress(strprintf("%s " + _("Rescanning").translated, GetDisplayName()), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup
uint256 tip_hash = WITH_LOCK(cs_wallet, return GetLastBlockHash()); uint256 tip_hash = WITH_LOCK(cs_wallet, return GetLastBlockHash());
uint256 end_hash = tip_hash; uint256 end_hash = tip_hash;
if (max_height) chain().findAncestorByHeight(tip_hash, *max_height, FoundBlock().hash(end_hash)); if (max_height) chain().findAncestorByHeight(tip_hash, *max_height, FoundBlock().hash(end_hash));
@ -1799,7 +1799,7 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
m_scanning_progress = 0; m_scanning_progress = 0;
} }
if (block_height % 100 == 0 && progress_end - progress_begin > 0.0) { if (block_height % 100 == 0 && progress_end - progress_begin > 0.0) {
ShowProgress(strprintf("%s " + _("Rescanning...").translated, GetDisplayName()), std::max(1, std::min(99, (int)(m_scanning_progress * 100)))); ShowProgress(strprintf("%s " + _("Rescanning").translated, GetDisplayName()), std::max(1, std::min(99, (int)(m_scanning_progress * 100))));
} }
if (GetTime() >= nNow + 60) { if (GetTime() >= nNow + 60) {
nNow = GetTime(); nNow = GetTime();
@ -1861,7 +1861,7 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
} }
} }
} }
ShowProgress(strprintf("%s " + _("Rescanning...").translated, GetDisplayName()), 100); // hide progress dialog in GUI ShowProgress(strprintf("%s " + _("Rescanning").translated, GetDisplayName()), 100); // hide progress dialog in GUI
if (block_height && fAbortRescan) { if (block_height && fAbortRescan) {
WalletLogPrintf("Rescan aborted at block %d. Progress=%f\n", block_height, progress_current); WalletLogPrintf("Rescan aborted at block %d. Progress=%f\n", block_height, progress_current);
result.status = ScanResult::USER_ABORT; result.status = ScanResult::USER_ABORT;
@ -3882,7 +3882,7 @@ std::shared_ptr<CWallet> CWallet::Create(interfaces::Chain& chain, const std::st
{ {
const std::string& walletFile = database->Filename(); const std::string& walletFile = database->Filename();
chain.initMessage(_("Loading wallet...").translated); chain.initMessage(_("Loading wallet").translated);
int64_t nStart = GetTimeMillis(); int64_t nStart = GetTimeMillis();
bool fFirstRun = true; bool fFirstRun = true;
@ -4132,7 +4132,7 @@ std::shared_ptr<CWallet> CWallet::Create(interfaces::Chain& chain, const std::st
} }
} }
chain.initMessage(_("Rescanning...").translated); chain.initMessage(_("Rescanning").translated);
walletInstance->WalletLogPrintf("Rescanning last %i blocks (from block %i)...\n", *tip_height - rescan_height, rescan_height); walletInstance->WalletLogPrintf("Rescanning last %i blocks (from block %i)...\n", *tip_height - rescan_height, rescan_height);
// No need to read and scan block if block was created before // No need to read and scan block if block was created before