Merge #16291: gui: Stop translating PACKAGE_NAME
fa64b947bb
util: No translation of `Bitcoin Core` in the copyright (MarcoFalke)fab85208f6
qt: Run «make translate» in ./src/ (MarcoFalke)fabe87d2c9
scripted-diff: Avoid passing PACKAGE_NAME for translation (MarcoFalke)fa5e9f157e
build: Stop translating PACKAGE_NAME (MarcoFalke) Pull request description: Generally the package name is not translated, but the package description is. E.g. `GIMP` or `Firefox` are always called that way regardless of the system language. However, "`Firefox` webbrowser" or "`GIMP` image manipulation program" are translated. ACKs for top commit: hebasto: ACKfa64b947bb
, I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged. Tree-SHA512: 626f811531182d0ba0ef1044930d32726773349bcb49b10261288a86ee6b80a183db30a87d817d5b0d501fad058ac22d6272311716b4f5a154f17c6f391a5a1a
This commit is contained in:
commit
4882040182
17 changed files with 309 additions and 256 deletions
|
@ -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:
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1185,7 +1185,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;
|
||||
}
|
||||
|
@ -1203,7 +1203,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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -459,7 +459,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;
|
||||
}
|
||||
|
@ -496,12 +496,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;
|
||||
}
|
||||
|
@ -516,7 +516,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
|
||||
|
@ -573,7 +573,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();
|
||||
|
|
|
@ -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);
|
||||
|
@ -728,7 +728,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
|
||||
|
@ -1291,7 +1291,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();
|
||||
|
|
|
@ -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..."),
|
||||
};
|
||||
|
|
|
@ -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<int64_t>(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 */
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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)) + "<br>" +
|
||||
message(CMD_REPLY, (tr("Welcome to the %1 RPC console.").arg(PACKAGE_NAME) + "<br>" +
|
||||
tr("Use up and down arrows to navigate history, and %1 to clear screen.").arg("<b>"+clsKey+"</b>") + "<br>" +
|
||||
tr("Type %1 for an overview of available commands.").arg("<b>help</b>") + "<br>" +
|
||||
tr("For more information on using this console type %1.").arg("<b>help-console</b>") +
|
||||
|
|
|
@ -39,7 +39,7 @@ SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const Netw
|
|||
devicePixelRatio = static_cast<QGuiApplication*>(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();
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
@ -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)) + "<br /><br />" +
|
||||
tr("%1 is shutting down...").arg(PACKAGE_NAME) + "<br /><br />" +
|
||||
tr("Do not shut down the computer until this window disappears.")));
|
||||
setLayout(layout);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -1184,10 +1184,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;
|
||||
|
|
|
@ -4119,12 +4119,12 @@ std::shared_ptr<CWallet> 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 {
|
||||
|
|
|
@ -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)"),
|
||||
|
|
Loading…
Reference in a new issue