From fa5e9f157e568b7fbbea1482b393181f0733f2ba Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 26 Jun 2019 10:24:48 -0400 Subject: build: Stop translating PACKAGE_NAME --- share/qt/extract_strings_qt.py | 3 --- src/Makefile.qt.include | 2 +- src/qt/utilitydialog.cpp | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py index 76ef12eeec..3cc0fa1b1d 100755 --- a/share/qt/extract_strings_qt.py +++ b/share/qt/extract_strings_qt.py @@ -76,10 +76,7 @@ f.write(""" #endif """) f.write('static const char UNUSED *bitcoin_strings[] = {\n') -f.write('QT_TRANSLATE_NOOP("bitcoin-core", "%s"),\n' % (os.getenv('PACKAGE_NAME'),)) f.write('QT_TRANSLATE_NOOP("bitcoin-core", "%s"),\n' % (os.getenv('COPYRIGHT_HOLDERS'),)) -if os.getenv('COPYRIGHT_HOLDERS_SUBSTITUTION') != os.getenv('PACKAGE_NAME'): - f.write('QT_TRANSLATE_NOOP("bitcoin-core", "%s"),\n' % (os.getenv('COPYRIGHT_HOLDERS_SUBSTITUTION'),)) messages.sort(key=operator.itemgetter(0)) for (msgid, msgstr) in messages: if msgid != EMPTY: diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index c4c08487f3..3ae8498a87 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -447,7 +447,7 @@ SECONDARY: $(QT_QM) $(srcdir)/qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_zmq_a_SOURCES) $(libbitcoin_consensus_a_SOURCES) $(libbitcoin_util_a_SOURCES) @test -n $(XGETTEXT) || echo "xgettext is required for updating translations" - $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) PACKAGE_NAME="$(PACKAGE_NAME)" COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" COPYRIGHT_HOLDERS_SUBSTITUTION="$(COPYRIGHT_HOLDERS_SUBSTITUTION)" $(PYTHON) ../share/qt/extract_strings_qt.py $^ + $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" $(PYTHON) ../share/qt/extract_strings_qt.py $^ translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_BASE_CPP) qt/bitcoin.cpp $(BITCOIN_QT_WINDOWS_CPP) $(BITCOIN_QT_WALLET_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM) @test -n $(LUPDATE) || echo "lupdate is required for updating translations" diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp index aa810690c9..7e855407ac 100644 --- a/src/qt/utilitydialog.cpp +++ b/src/qt/utilitydialog.cpp @@ -36,7 +36,7 @@ HelpMessageDialog::HelpMessageDialog(interfaces::Node& node, QWidget *parent, bo { ui->setupUi(this); - QString version = tr(PACKAGE_NAME) + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion()); + QString version = QString{PACKAGE_NAME} + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion()); /* On x86 add a bit specifier to the version so that users can distinguish between * 32 and 64 bit builds. On other architectures, 32/64 bit may be more ambiguous. */ -- cgit v1.2.3 From fabe87d2c923ab3a70b8cde2666a4d1cda8b22fb Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 26 Jun 2019 10:28:13 -0400 Subject: scripted-diff: Avoid passing PACKAGE_NAME for translation -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/\<\w+(::\w+)?\(PACKAGE_NAME\)/PACKAGE_NAME/g' $(git grep -l --extended-regexp '\<\w+(::\w+)?\(PACKAGE_NAME\)' src) -END VERIFY SCRIPT- --- src/init.cpp | 4 ++-- src/net.cpp | 2 +- src/qt/bitcoin.cpp | 10 +++++----- src/qt/bitcoingui.cpp | 12 ++++++------ src/qt/intro.cpp | 12 ++++++------ src/qt/optionsdialog.cpp | 8 ++++---- src/qt/rpcconsole.cpp | 4 ++-- src/qt/splashscreen.cpp | 2 +- src/qt/utilitydialog.cpp | 4 ++-- src/timedata.cpp | 2 +- src/wallet/wallet.cpp | 4 ++-- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 6625080c6e..a0f1bf3ea4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1179,7 +1179,7 @@ static bool LockDataDirectory(bool probeOnly) return InitError(strprintf(_("Cannot write to data directory '%s'; check permissions."), datadir.string())); } if (!LockDirectory(datadir, ".lock", probeOnly)) { - return InitError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running."), datadir.string(), _(PACKAGE_NAME))); + return InitError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running."), datadir.string(), PACKAGE_NAME)); } return true; } @@ -1197,7 +1197,7 @@ bool AppInitSanityChecks() // Sanity check if (!InitSanityCheck()) - return InitError(strprintf(_("Initialization sanity check failed. %s is shutting down."), _(PACKAGE_NAME))); + return InitError(strprintf(_("Initialization sanity check failed. %s is shutting down."), PACKAGE_NAME)); // Probe the data directory lock to give an early error message, if possible // We cannot hold the data directory lock here, as the forking for daemon() hasn't yet happened, diff --git a/src/net.cpp b/src/net.cpp index 75a47d7ad2..7d11111b25 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2039,7 +2039,7 @@ bool CConnman::BindListenPort(const CService &addrBind, std::string& strError, b { int nErr = WSAGetLastError(); if (nErr == WSAEADDRINUSE) - strError = strprintf(_("Unable to bind to %s on this computer. %s is probably already running."), addrBind.ToString(), _(PACKAGE_NAME)); + strError = strprintf(_("Unable to bind to %s on this computer. %s is probably already running."), addrBind.ToString(), PACKAGE_NAME); else strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %s)"), addrBind.ToString(), NetworkErrorString(nErr)); LogPrintf("%s\n", strError); diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 2fdbcca043..de5c1cab98 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -460,7 +460,7 @@ int GuiMain(int argc, char* argv[]) SetupUIArgs(); std::string error; if (!node->parseParameters(argc, argv, error)) { - QMessageBox::critical(nullptr, QObject::tr(PACKAGE_NAME), + QMessageBox::critical(nullptr, PACKAGE_NAME, QObject::tr("Error parsing command line arguments: %1.").arg(QString::fromStdString(error))); return EXIT_FAILURE; } @@ -497,12 +497,12 @@ int GuiMain(int argc, char* argv[]) /// - Do not call GetDataDir(true) before this step finishes if (!fs::is_directory(GetDataDir(false))) { - QMessageBox::critical(nullptr, QObject::tr(PACKAGE_NAME), + QMessageBox::critical(nullptr, PACKAGE_NAME, QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(gArgs.GetArg("-datadir", "")))); return EXIT_FAILURE; } if (!node->readConfigFiles(error)) { - QMessageBox::critical(nullptr, QObject::tr(PACKAGE_NAME), + QMessageBox::critical(nullptr, PACKAGE_NAME, QObject::tr("Error: Cannot parse configuration file: %1.").arg(QString::fromStdString(error))); return EXIT_FAILURE; } @@ -517,7 +517,7 @@ int GuiMain(int argc, char* argv[]) try { node->selectParams(gArgs.GetChainName()); } catch(std::exception &e) { - QMessageBox::critical(nullptr, QObject::tr(PACKAGE_NAME), QObject::tr("Error: %1").arg(e.what())); + QMessageBox::critical(nullptr, PACKAGE_NAME, QObject::tr("Error: %1").arg(e.what())); return EXIT_FAILURE; } #ifdef ENABLE_WALLET @@ -574,7 +574,7 @@ int GuiMain(int argc, char* argv[]) if (app.baseInitialize()) { app.requestInitialize(); #if defined(Q_OS_WIN) - WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), (HWND)app.getMainWinId()); + WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(PACKAGE_NAME), (HWND)app.getMainWinId()); #endif app.exec(); app.requestShutdown(); diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index babb2ce518..e483172796 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -294,15 +294,15 @@ void BitcoinGUI::createActions() quitAction->setStatusTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); - aboutAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&About %1").arg(tr(PACKAGE_NAME)), this); - aboutAction->setStatusTip(tr("Show information about %1").arg(tr(PACKAGE_NAME))); + aboutAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&About %1").arg(PACKAGE_NAME), this); + aboutAction->setStatusTip(tr("Show information about %1").arg(PACKAGE_NAME)); aboutAction->setMenuRole(QAction::AboutRole); aboutAction->setEnabled(false); aboutQtAction = new QAction(platformStyle->TextColorIcon(":/icons/about_qt"), tr("About &Qt"), this); aboutQtAction->setStatusTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(platformStyle->TextColorIcon(":/icons/options"), tr("&Options..."), this); - optionsAction->setStatusTip(tr("Modify configuration options for %1").arg(tr(PACKAGE_NAME))); + optionsAction->setStatusTip(tr("Modify configuration options for %1").arg(PACKAGE_NAME)); optionsAction->setMenuRole(QAction::PreferencesRole); optionsAction->setEnabled(false); toggleHideAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&Show / Hide"), this); @@ -344,7 +344,7 @@ void BitcoinGUI::createActions() showHelpMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/info"), tr("&Command-line options"), this); showHelpMessageAction->setMenuRole(QAction::NoRole); - showHelpMessageAction->setStatusTip(tr("Show the %1 help message to get a list with possible Bitcoin command-line options").arg(tr(PACKAGE_NAME))); + showHelpMessageAction->setStatusTip(tr("Show the %1 help message to get a list with possible Bitcoin command-line options").arg(PACKAGE_NAME)); connect(quitAction, &QAction::triggered, qApp, QApplication::quit); connect(aboutAction, &QAction::triggered, this, &BitcoinGUI::aboutClicked); @@ -729,7 +729,7 @@ void BitcoinGUI::createTrayIcon() #ifndef Q_OS_MAC if (QSystemTrayIcon::isSystemTrayAvailable()) { trayIcon = new QSystemTrayIcon(m_network_style->getTrayAndWindowIcon(), this); - QString toolTip = tr("%1 client").arg(tr(PACKAGE_NAME)) + " " + m_network_style->getTitleAddText(); + QString toolTip = tr("%1 client").arg(PACKAGE_NAME) + " " + m_network_style->getTitleAddText(); trayIcon->setToolTip(toolTip); } #endif @@ -1292,7 +1292,7 @@ void BitcoinGUI::updateProxyIcon() void BitcoinGUI::updateWindowTitle() { - QString window_title = tr(PACKAGE_NAME); + QString window_title = PACKAGE_NAME; #ifdef ENABLE_WALLET if (walletFrame) { WalletModel* const wallet_model = walletFrame->currentWalletModel(); diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index c595361934..102e37e471 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -119,16 +119,16 @@ Intro::Intro(QWidget *parent, uint64_t blockchain_size, uint64_t chain_state_siz m_chain_state_size(chain_state_size) { ui->setupUi(this); - ui->welcomeLabel->setText(ui->welcomeLabel->text().arg(tr(PACKAGE_NAME))); - ui->storageLabel->setText(ui->storageLabel->text().arg(tr(PACKAGE_NAME))); + ui->welcomeLabel->setText(ui->welcomeLabel->text().arg(PACKAGE_NAME)); + ui->storageLabel->setText(ui->storageLabel->text().arg(PACKAGE_NAME)); ui->lblExplanation1->setText(ui->lblExplanation1->text() - .arg(tr(PACKAGE_NAME)) + .arg(PACKAGE_NAME) .arg(m_blockchain_size) .arg(2009) .arg(tr("Bitcoin")) ); - ui->lblExplanation2->setText(ui->lblExplanation2->text().arg(tr(PACKAGE_NAME))); + ui->lblExplanation2->setText(ui->lblExplanation2->text().arg(PACKAGE_NAME)); uint64_t pruneTarget = std::max(0, gArgs.GetArg("-prune", 0)); requiredSpace = m_blockchain_size; @@ -145,7 +145,7 @@ Intro::Intro(QWidget *parent, uint64_t blockchain_size, uint64_t chain_state_siz } requiredSpace += m_chain_state_size; ui->sizeWarningLabel->setText( - tr("%1 will download and store a copy of the Bitcoin block chain.").arg(tr(PACKAGE_NAME)) + " " + + tr("%1 will download and store a copy of the Bitcoin block chain.").arg(PACKAGE_NAME) + " " + storageRequiresMsg.arg(requiredSpace) + " " + tr("The wallet will also be stored in this directory.") ); @@ -221,7 +221,7 @@ bool Intro::pickDataDirectory(interfaces::Node& node) } break; } catch (const fs::filesystem_error&) { - QMessageBox::critical(nullptr, tr(PACKAGE_NAME), + QMessageBox::critical(nullptr, PACKAGE_NAME, tr("Error: Specified data directory \"%1\" cannot be created.").arg(dataDir)); /* fall through, back to choosing screen */ } diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 40dc7bf400..57cafaaac0 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -87,12 +87,12 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) : /* Display elements init */ QDir translations(":translations"); - ui->bitcoinAtStartup->setToolTip(ui->bitcoinAtStartup->toolTip().arg(tr(PACKAGE_NAME))); - ui->bitcoinAtStartup->setText(ui->bitcoinAtStartup->text().arg(tr(PACKAGE_NAME))); + ui->bitcoinAtStartup->setToolTip(ui->bitcoinAtStartup->toolTip().arg(PACKAGE_NAME)); + ui->bitcoinAtStartup->setText(ui->bitcoinAtStartup->text().arg(PACKAGE_NAME)); - ui->openBitcoinConfButton->setToolTip(ui->openBitcoinConfButton->toolTip().arg(tr(PACKAGE_NAME))); + ui->openBitcoinConfButton->setToolTip(ui->openBitcoinConfButton->toolTip().arg(PACKAGE_NAME)); - ui->lang->setToolTip(ui->lang->toolTip().arg(tr(PACKAGE_NAME))); + ui->lang->setToolTip(ui->lang->toolTip().arg(PACKAGE_NAME)); ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant("")); for (const QString &langStr : translations.entryList()) { diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 071a197c3c..84b4a2d0d8 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -457,7 +457,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty QChar nonbreaking_hyphen(8209); ui->dataDir->setToolTip(ui->dataDir->toolTip().arg(QString(nonbreaking_hyphen) + "datadir")); ui->blocksDir->setToolTip(ui->blocksDir->toolTip().arg(QString(nonbreaking_hyphen) + "blocksdir")); - ui->openDebugLogfileButton->setToolTip(ui->openDebugLogfileButton->toolTip().arg(tr(PACKAGE_NAME))); + ui->openDebugLogfileButton->setToolTip(ui->openDebugLogfileButton->toolTip().arg(PACKAGE_NAME)); if (platformStyle->getImagesOnButtons()) { ui->openDebugLogfileButton->setIcon(platformStyle->SingleColorIcon(":/icons/export")); @@ -804,7 +804,7 @@ void RPCConsole::clear(bool clearHistory) QString clsKey = "Ctrl-L"; #endif - message(CMD_REPLY, (tr("Welcome to the %1 RPC console.").arg(tr(PACKAGE_NAME)) + "
" + + message(CMD_REPLY, (tr("Welcome to the %1 RPC console.").arg(PACKAGE_NAME) + "
" + tr("Use up and down arrows to navigate history, and %1 to clear screen.").arg(""+clsKey+"") + "
" + tr("Type %1 for an overview of available commands.").arg("help") + "
" + tr("For more information on using this console type %1.").arg("help-console") + diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index 0126a2920e..dcb9d1923f 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -39,7 +39,7 @@ SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const Netw devicePixelRatio = static_cast(QCoreApplication::instance())->devicePixelRatio(); // define text to place - QString titleText = tr(PACKAGE_NAME); + QString titleText = PACKAGE_NAME; QString versionText = QString("Version %1").arg(QString::fromStdString(FormatFullVersion())); QString copyrightText = QString::fromUtf8(CopyrightHolders(strprintf("\xc2\xA9 %u-%u ", 2009, COPYRIGHT_YEAR)).c_str()); QString titleAddText = networkStyle->getTitleAddText(); diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp index 7e855407ac..6509a701f3 100644 --- a/src/qt/utilitydialog.cpp +++ b/src/qt/utilitydialog.cpp @@ -48,7 +48,7 @@ HelpMessageDialog::HelpMessageDialog(interfaces::Node& node, QWidget *parent, bo if (about) { - setWindowTitle(tr("About %1").arg(tr(PACKAGE_NAME))); + setWindowTitle(tr("About %1").arg(PACKAGE_NAME)); std::string licenseInfo = LicenseInfo(); /// HTML-format the license message from the core @@ -150,7 +150,7 @@ ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f): { QVBoxLayout *layout = new QVBoxLayout(); layout->addWidget(new QLabel( - tr("%1 is shutting down...").arg(tr(PACKAGE_NAME)) + "

" + + tr("%1 is shutting down...").arg(PACKAGE_NAME) + "

" + tr("Do not shut down the computer until this window disappears."))); setLayout(layout); } diff --git a/src/timedata.cpp b/src/timedata.cpp index b43639d729..f4613eeec8 100644 --- a/src/timedata.cpp +++ b/src/timedata.cpp @@ -100,7 +100,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample) if (!fMatch) { fDone = true; - std::string strMessage = strprintf(_("Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly."), _(PACKAGE_NAME)); + std::string strMessage = strprintf(_("Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly."), PACKAGE_NAME); SetMiscWarning(strMessage); uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING); } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 16366a0c23..7776b7c9de 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4112,12 +4112,12 @@ std::shared_ptr CWallet::CreateWalletFromFile(interfaces::Chain& chain, walletFile)); } else if (nLoadWalletRet == DBErrors::TOO_NEW) { - chain.initError(strprintf(_("Error loading %s: Wallet requires newer version of %s"), walletFile, _(PACKAGE_NAME))); + chain.initError(strprintf(_("Error loading %s: Wallet requires newer version of %s"), walletFile, PACKAGE_NAME)); return nullptr; } else if (nLoadWalletRet == DBErrors::NEED_REWRITE) { - chain.initError(strprintf(_("Wallet needed to be rewritten: restart %s to complete"), _(PACKAGE_NAME))); + chain.initError(strprintf(_("Wallet needed to be rewritten: restart %s to complete"), PACKAGE_NAME)); return nullptr; } else { -- cgit v1.2.3 From fab85208f678ba1be53bdb73a73ce3c5c937d448 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 26 Jun 2019 11:01:58 -0400 Subject: =?UTF-8?q?qt:=20Run=20=C2=ABmake=20translate=C2=BB=20in=20./src/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/qt/bitcoinstrings.cpp | 17 +- src/qt/locale/bitcoin_en.ts | 455 +++++++++++++++++++++++++------------------- 2 files changed, 264 insertions(+), 208 deletions(-) diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index dc997e96cc..87736cd185 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -9,14 +9,13 @@ #define UNUSED #endif static const char UNUSED *bitcoin_strings[] = { -QT_TRANSLATE_NOOP("bitcoin-core", "Bitcoin Core"), QT_TRANSLATE_NOOP("bitcoin-core", "The %s developers"), QT_TRANSLATE_NOOP("bitcoin-core", "" "-maxtxfee is set very high! Fees this large could be paid on a single " "transaction."), QT_TRANSLATE_NOOP("bitcoin-core", "" -"Can't generate a change-address key. Private keys are disabled for this " -"wallet."), +"Can't generate a change-address key. No keys in the internal keypool and " +"can't generate any keys."), QT_TRANSLATE_NOOP("bitcoin-core", "" "Cannot obtain a lock on data directory %s. %s is probably already running."), QT_TRANSLATE_NOOP("bitcoin-core", "" @@ -88,9 +87,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" "Warning: The network does not appear to fully agree! Some miners appear to " "be experiencing issues."), QT_TRANSLATE_NOOP("bitcoin-core", "" -"Warning: Unknown block versions being mined! It's possible unknown rules are " -"in effect"), -QT_TRANSLATE_NOOP("bitcoin-core", "" "Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; " "if your balance or transactions are incorrect you should restore from a " "backup."), @@ -124,15 +120,13 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet %s. Duplicate -wallet fi QT_TRANSLATE_NOOP("bitcoin-core", "Error opening block database"), QT_TRANSLATE_NOOP("bitcoin-core", "Error reading from database, shutting down."), QT_TRANSLATE_NOOP("bitcoin-core", "Error upgrading chainstate database"), -QT_TRANSLATE_NOOP("bitcoin-core", "Error"), QT_TRANSLATE_NOOP("bitcoin-core", "Error: A fatal internal error occurred, see debug.log for details"), QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low for %s"), -QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low!"), +QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is too low!"), QT_TRANSLATE_NOOP("bitcoin-core", "Failed to listen on any port. Use -listen=0 if you want this."), QT_TRANSLATE_NOOP("bitcoin-core", "Failed to rescan the wallet during initialization"), QT_TRANSLATE_NOOP("bitcoin-core", "Importing..."), QT_TRANSLATE_NOOP("bitcoin-core", "Incorrect or no genesis block found. Wrong datadir for network?"), -QT_TRANSLATE_NOOP("bitcoin-core", "Information"), QT_TRANSLATE_NOOP("bitcoin-core", "Initialization sanity check failed. %s is shutting down."), QT_TRANSLATE_NOOP("bitcoin-core", "Insufficient funds"), QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -onion address or hostname: '%s'"), @@ -150,6 +144,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Loading wallet..."), QT_TRANSLATE_NOOP("bitcoin-core", "Need to specify a port with -whitebind: '%s'"), QT_TRANSLATE_NOOP("bitcoin-core", "Not enough file descriptors available."), QT_TRANSLATE_NOOP("bitcoin-core", "Prune cannot be configured with a negative value."), +QT_TRANSLATE_NOOP("bitcoin-core", "Prune mode is incompatible with -blockfilterindex."), QT_TRANSLATE_NOOP("bitcoin-core", "Prune mode is incompatible with -txindex."), QT_TRANSLATE_NOOP("bitcoin-core", "Pruning blockstore..."), QT_TRANSLATE_NOOP("bitcoin-core", "Reducing -maxconnections from %d to %d, because of system limitations."), @@ -179,9 +174,11 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large for fee policy"), QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large"), QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind returned error %s)"), QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer. %s is probably already running."), +QT_TRANSLATE_NOOP("bitcoin-core", "Unable to create the PID file '%s': %s"), QT_TRANSLATE_NOOP("bitcoin-core", "Unable to generate initial keys"), QT_TRANSLATE_NOOP("bitcoin-core", "Unable to generate keys"), QT_TRANSLATE_NOOP("bitcoin-core", "Unable to start HTTP server. See debug log for details."), +QT_TRANSLATE_NOOP("bitcoin-core", "Unknown -blockfilterindex value %s."), QT_TRANSLATE_NOOP("bitcoin-core", "Unknown network specified in -onlynet: '%s'"), QT_TRANSLATE_NOOP("bitcoin-core", "Unsupported logging category %s=%s."), QT_TRANSLATE_NOOP("bitcoin-core", "Upgrading UTXO database"), @@ -189,9 +186,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Upgrading txindex database"), QT_TRANSLATE_NOOP("bitcoin-core", "User Agent comment (%s) contains unsafe characters."), QT_TRANSLATE_NOOP("bitcoin-core", "Verifying blocks..."), QT_TRANSLATE_NOOP("bitcoin-core", "Verifying wallet(s)..."), -QT_TRANSLATE_NOOP("bitcoin-core", "Wallet %s resides outside wallet directory %s"), QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart %s to complete"), -QT_TRANSLATE_NOOP("bitcoin-core", "Warning"), QT_TRANSLATE_NOOP("bitcoin-core", "Warning: unknown new rules activated (versionbit %i)"), QT_TRANSLATE_NOOP("bitcoin-core", "Zapping all transactions from wallet..."), }; diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index c6ecbc3f87..bff7469071 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -59,7 +59,7 @@ &Delete - + Choose the address to send coins to @@ -90,7 +90,7 @@ - These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + These are your Bitcoin addresses for receiving payments. Use the 'Create new receiving address' button in the receive tab to create new addresses. @@ -132,7 +132,7 @@ AddressTableModel - + Label @@ -297,7 +297,7 @@ BanTableModel - + IP/Netmask @@ -315,12 +315,12 @@ Sign &message... - + Synchronizing with network... Synchronizing with network... - + &Overview &Overview @@ -400,12 +400,12 @@ - + Wallet: - + Click to disable network activity. @@ -430,12 +430,12 @@ Reindexing blocks on disk... - + Proxy is <b>enabled</b>: %1 - + Send coins to a Bitcoin address Send coins to a Bitcoin address @@ -465,12 +465,7 @@ &Verify message... - - Bitcoin - Bitcoin - - - + &Send &Send @@ -505,12 +500,12 @@ Verify messages to ensure they were signed with specified Bitcoin addresses - + &File &File - + &Settings &Settings @@ -525,7 +520,7 @@ Tabs toolbar - + Request payments (generates QR codes and bitcoin: URIs) @@ -545,12 +540,12 @@ - + &Command-line options - + %n active connection(s) to Bitcoin network %n active connection to Bitcoin network @@ -591,27 +586,27 @@ Transactions after this will not yet be visible. - + Error Error - + Warning Warning - + Information Information - + Up to date Up to date - + &Sending addresses @@ -621,12 +616,52 @@ - + + Open Wallet + + + + + Open a wallet + + + + + Close Wallet... + + + + + Close wallet + + + + Show the %1 help message to get a list with possible Bitcoin command-line options - + + default wallet + + + + + Opening Wallet <b>%1</b>... + + + + + Open Wallet Failed + + + + + No wallets available + + + + &Window &Window @@ -651,7 +686,7 @@ - + %1 client @@ -666,7 +701,17 @@ Catching up... - + + Error: %1 + + + + + Warning: %1 + + + + Date: %1 @@ -737,7 +782,7 @@ Wallet is <b>encrypted</b> and currently <b>locked</b> - + A fatal error occurred. Bitcoin can no longer continue safely and will quit. @@ -830,7 +875,7 @@ Confirmed - + Copy address @@ -1031,7 +1076,7 @@ HelpMessageDialog - + version version @@ -1120,7 +1165,7 @@ - + Error: Specified data directory "%1" cannot be created. @@ -1171,7 +1216,7 @@ - + Unknown... @@ -1207,8 +1252,8 @@ - - Unknown. Syncing Headers (%1)... + + Unknown. Syncing Headers (%1, %2%)... @@ -1540,12 +1585,12 @@ default - + none - + Confirm options reset Confirm options reset @@ -1689,7 +1734,7 @@ PaymentServer - + @@ -1698,7 +1743,7 @@ - + Cannot start bitcoin: click-to-pay handler @@ -1706,14 +1751,14 @@ + - URI handling - + 'bitcoin://' is not a valid URI. Use 'bitcoin:' instead. @@ -1728,12 +1773,13 @@ - + + Cannot process payment request because BIP70 support was not compiled in. - + Invalid payment address %1 @@ -1744,16 +1790,17 @@ + Payment request file handling - + Payment request file cannot be read! This can be caused by an invalid payment request file. - + @@ -1832,7 +1879,7 @@ PeerTableModel - + User Agent @@ -1865,17 +1912,17 @@ QObject - + Amount Amount - + Enter a Bitcoin address (e.g. %1) - + %1 d @@ -1985,20 +2032,7 @@ - - %1 didn't yet exit safely... - - - - - unknown - - - - - QObject::QObject - - + Error parsing command line arguments: %1. @@ -2017,11 +2051,21 @@ Error: %1 + + + %1 didn't yet exit safely... + + + + + unknown + + QRImageWidget - + &Save Image... @@ -2030,6 +2074,21 @@ &Copy Image + + + Resulting URI too long, try to reduce the text for label / message. + + + + + Error encoding URI into QR Code. + + + + + QR code support not available. + + Save QR Code @@ -2056,7 +2115,7 @@ - + @@ -2078,7 +2137,7 @@ N/A - + Client version Client version @@ -2178,7 +2237,7 @@ - + &Reset @@ -2206,8 +2265,8 @@ - - + + Select a peer to view detailed information. @@ -2242,13 +2301,13 @@ - - + + User Agent - + Open the %1 debug log file from the current data directory. This can take a few seconds for large log files. @@ -2263,7 +2322,7 @@ - + Services @@ -2313,7 +2372,7 @@ - + Last block time Last block time @@ -2328,7 +2387,7 @@ &Console - + &Network Traffic @@ -2348,7 +2407,7 @@ - + Debug log file Debug log file @@ -2358,7 +2417,7 @@ Clear console - + 1 &hour @@ -2396,7 +2455,7 @@ - + Welcome to the %1 RPC console. @@ -2513,43 +2572,43 @@ - - - An optional amount to request. Leave this empty or zero to not request a specific amount. + + Native segwit addresses (aka Bech32 or BIP-173) reduce your transaction fees later on and offer better protection against typos, but old wallets don't support them. When checked, an address compatible with older wallets will be created instead. - - Clear all fields of the form. + + Generate legacy address - - Clear + + + An optional amount to request. Leave this empty or zero to not request a specific amount. - - Native segwit addresses (aka Bech32 or BIP-173) reduce your transaction fees later on and offer better protection against typos, but old wallets don't support them. When unchecked, an address compatible with older wallets will be created instead. + + &Create new receiving address - - Generate native segwit (Bech32) address + + Clear all fields of the form. - - Requested payments history + + Clear - - &Request payment + + Requested payments history - + Show the selected request (does the same as double clicking an entry) @@ -2569,7 +2628,7 @@ - + Copy URI @@ -2612,7 +2671,7 @@ - + Request payment to %1 @@ -2651,16 +2710,6 @@ Wallet Wallet - - - Resulting URI too long, try to reduce the text for label / message. - - - - - Error encoding URI into QR Code. - - RecentRequestsTableModel @@ -2704,7 +2753,7 @@ SendCoinsDialog - + Send Coins Send Coins @@ -2891,7 +2940,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos S&end - + Copy quantity @@ -2931,10 +2980,19 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - - - - + + from wallet '%1' + + + + + + %1 to '%2' + + + + + %1 to %2 @@ -2954,12 +3012,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - - from wallet %1 - - - - + Please, review your transaction. @@ -2979,12 +3032,17 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + + To review recipient list click "Show Details..." + + + + Confirm send coins - + The recipient address is not valid. Please recheck. @@ -3179,7 +3237,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos SendConfirmationDialog - + Yes @@ -3399,7 +3457,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos TransactionDesc - + Open for %n more block(s) Open for %n more block @@ -3640,7 +3698,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos TransactionTableModel - + Date Date @@ -3776,7 +3834,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos TransactionView - + All @@ -3975,11 +4033,29 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos UnitDisplayStatusBarControl - + Unit to show amounts in. Click to select another unit. + + WalletController + + + Close wallet + + + + + Are you sure you wish to close wallet <i>%1</i>? + + + + + Closing the wallet for too long can result in having to resync the entire chain if pruning is enabled. + + + WalletFrame @@ -4043,7 +4119,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + default wallet @@ -4099,7 +4175,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos bitcoin-core - + Distributed under the MIT software license, see the accompanying file %s or %s @@ -4119,7 +4195,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + Error: A fatal internal error occurred, see debug.log for details @@ -4129,22 +4205,22 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + Unable to start HTTP server. See debug log for details. - - Bitcoin Core - Bitcoin Core + + The %s developers + - - The %s developers + + Can't generate a change-address key. No keys in the internal keypool and can't generate any keys. - + Cannot obtain a lock on data directory %s. %s is probably already running. @@ -4199,7 +4275,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade. @@ -4290,11 +4366,6 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - Error: Disk space is low! - Error: Disk space is low! - - - Failed to listen on any port. Use -listen=0 if you want this. Failed to listen on any port. Use -listen=0 if you want this. @@ -4314,7 +4385,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos Incorrect or no genesis block found. Wrong datadir for network? - + Initialization sanity check failed. %s is shutting down. @@ -4334,22 +4405,27 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + Specified blocks directory "%s" does not exist. - + Upgrading txindex database - + Loading P2P addresses... - + + Error: Disk space is too low! + + + + Loading banlist... @@ -4364,7 +4440,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + Prune mode is incompatible with -txindex. @@ -4394,12 +4470,12 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + Unable to generate keys - + Unsupported logging category %s=%s. @@ -4419,12 +4495,12 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos Verifying blocks... - + Wallet needed to be rewritten: restart %s to complete - + Error: Listening for incoming connections failed (listen returned error %s) @@ -4439,7 +4515,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain @@ -4454,17 +4530,12 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + Error: Disk space is low for %s - - Information - Information - - - + Invalid -onion address or hostname: '%s' @@ -4489,7 +4560,12 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + + Prune mode is incompatible with -blockfilterindex. + + + + Reducing -maxconnections from %d to %d, because of system limitations. @@ -4556,26 +4632,26 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - Unable to generate initial keys + Unable to create the PID file '%s': %s - - Verifying wallet(s)... + + Unable to generate initial keys - - Wallet %s resides outside wallet directory %s + + Unknown -blockfilterindex value %s. - - Warning - Warning + + Verifying wallet(s)... + - + Warning: unknown new rules activated (versionbit %i) @@ -4585,7 +4661,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + -maxtxfee is set very high! Fees this large could be paid on a single transaction. @@ -4606,11 +4682,6 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - Warning: Unknown block versions being mined! It's possible unknown rules are in effect - - - - Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup. @@ -4625,12 +4696,12 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + Keypool ran out, please call keypoolrefill first - + Starting network threads... @@ -4665,22 +4736,17 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + Unknown network specified in -onlynet: '%s' Unknown network specified in -onlynet: '%s' - + Insufficient funds Insufficient funds - - Can't generate a change-address key. Private keys are disabled for this wallet. - - - - + Cannot upgrade a non HD split wallet without upgrading to support pre split keypool. Please use -upgradewallet=169900 or -upgradewallet with no version specified. @@ -4695,12 +4761,12 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos - + Cannot write to data directory '%s'; check permissions. - + Loading block index... Loading block index... @@ -4710,24 +4776,19 @@ Note: Since the fee is calculated on a per-byte basis, a fee of "100 satos Loading wallet... - + Cannot downgrade wallet Cannot downgrade wallet - + Rescanning... Rescanning... - + Done loading Done loading - - - Error - Error - -- cgit v1.2.3 From fa64b947bb3075ff8737656706b941af691908ab Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 27 Jun 2019 15:07:17 -0400 Subject: util: No translation of `Bitcoin Core` in the copyright --- src/util/system.cpp | 7 ++++--- test/lint/lint-format-strings.py | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/system.cpp b/src/util/system.cpp index fca29a9f31..2bb99d648a 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -1188,10 +1188,11 @@ int GetNumCores() std::string CopyrightHolders(const std::string& strPrefix) { - std::string strCopyrightHolders = strPrefix + strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION)); + const auto copyright_devs = strprintf(_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION); + std::string strCopyrightHolders = strPrefix + copyright_devs; - // Check for untranslated substitution to make sure Bitcoin Core copyright is not removed by accident - if (strprintf(COPYRIGHT_HOLDERS, COPYRIGHT_HOLDERS_SUBSTITUTION).find("Bitcoin Core") == std::string::npos) { + // Make sure Bitcoin Core copyright is not removed by accident + if (copyright_devs.find("Bitcoin Core") == std::string::npos) { strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers"; } return strCopyrightHolders; diff --git a/test/lint/lint-format-strings.py b/test/lint/lint-format-strings.py index 224e62f04a..99b0eaa38e 100755 --- a/test/lint/lint-format-strings.py +++ b/test/lint/lint-format-strings.py @@ -16,8 +16,7 @@ FALSE_POSITIVES = [ ("src/dbwrapper.cpp", "vsnprintf(p, limit - p, format, backup_ap)"), ("src/index/base.cpp", "FatalError(const char* fmt, const Args&... args)"), ("src/netbase.cpp", "LogConnectFailure(bool manual_connection, const char* fmt, const Args&... args)"), - ("src/util/system.cpp", "strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION))"), - ("src/util/system.cpp", "strprintf(COPYRIGHT_HOLDERS, COPYRIGHT_HOLDERS_SUBSTITUTION)"), + ("src/util/system.cpp", "strprintf(_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION)"), ("src/wallet/wallet.h", "WalletLogPrintf(std::string fmt, Params... parameters)"), ("src/wallet/wallet.h", "LogPrintf((\"%s \" + fmt).c_str(), GetDisplayName(), parameters...)"), ("src/logging.h", "LogPrintf(const char* fmt, const Args&... args)"), -- cgit v1.2.3