" +
tr("IMPORTANT: Any previous backups you have made of your wallet file "
"should be replaced with the newly generated, encrypted wallet file. "
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index f2513eb392..392ae8569f 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#if defined(HAVE_CONFIG_H)
+#include "config/dash-config.h"
+#endif
+
#include "bitcoingui.h"
#include "bitcoinunits.h"
@@ -127,7 +131,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this);
- QString windowTitle = tr("Dash Core") + " - ";
+ QString windowTitle = tr(PACKAGE_NAME) + " - ";
#ifdef ENABLE_WALLET
/* if compiled with wallet support, -disablewallet can still disable the wallet */
enableWallet = !GetBoolArg("-disablewallet", false);
@@ -374,7 +378,7 @@ void BitcoinGUI::createActions()
quitAction->setStatusTip(tr("Quit application"));
quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
quitAction->setMenuRole(QAction::QuitRole);
- aboutAction = new QAction(QIcon(":/icons/" + theme + "/about"), tr("&About Dash Core"), this);
+ aboutAction = new QAction(QIcon(":/icons/" + theme + "/about"), tr("&About %1").arg(tr(PACKAGE_NAME)), this);
aboutAction->setStatusTip(tr("Show information about Dash Core"));
aboutAction->setMenuRole(QAction::AboutRole);
aboutAction->setEnabled(false);
@@ -382,7 +386,7 @@ void BitcoinGUI::createActions()
aboutQtAction->setStatusTip(tr("Show information about Qt"));
aboutQtAction->setMenuRole(QAction::AboutQtRole);
optionsAction = new QAction(QIcon(":/icons/" + theme + "/options"), tr("&Options..."), this);
- optionsAction->setStatusTip(tr("Modify configuration options for Dash Core"));
+ optionsAction->setStatusTip(tr("Modify configuration options for %1").arg(tr(PACKAGE_NAME)));
optionsAction->setMenuRole(QAction::PreferencesRole);
optionsAction->setEnabled(false);
toggleHideAction = new QAction(QIcon(":/icons/" + theme + "/about"), tr("&Show / Hide"), this);
@@ -436,7 +440,7 @@ void BitcoinGUI::createActions()
showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this);
showHelpMessageAction->setMenuRole(QAction::NoRole);
- showHelpMessageAction->setStatusTip(tr("Show the Dash Core help message to get a list with possible Dash Core command-line options"));
+ showHelpMessageAction->setStatusTip(tr("Show the %1 help message to get a list with possible Bitcoin command-line options").arg(tr(PACKAGE_NAME)));
showPrivateSendHelpAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&PrivateSend information"), this);
showPrivateSendHelpAction->setMenuRole(QAction::NoRole);
@@ -722,7 +726,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle)
{
trayIcon = new QSystemTrayIcon(this);
- QString toolTip = tr("Dash Core client") + " " + networkStyle->getTitleAddText();
+ QString toolTip = tr("%1 client").arg(tr(PACKAGE_NAME)) + " " + networkStyle->getTitleAddText();
trayIcon->setToolTip(toolTip);
trayIcon->setIcon(networkStyle->getTrayAndWindowIcon());
trayIcon->hide();
diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp
index 4379212051..df351750de 100644
--- a/src/qt/dash.cpp
+++ b/src/qt/dash.cpp
@@ -626,14 +626,14 @@ int main(int argc, char *argv[])
/// - Do not call GetDataDir(true) before this step finishes
if (!boost::filesystem::is_directory(GetDataDir(false)))
{
- QMessageBox::critical(0, QObject::tr("Dash Core"),
+ QMessageBox::critical(0, QObject::tr(PACKAGE_NAME),
QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
return EXIT_FAILURE;
}
try {
ReadConfigFile(mapArgs, mapMultiArgs);
} catch (const std::exception& e) {
- QMessageBox::critical(0, QObject::tr("Dash Core"),
+ QMessageBox::critical(0, QObject::tr(PACKAGE_NAME),
QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what()));
return EXIT_FAILURE;
}
@@ -648,7 +648,7 @@ int main(int argc, char *argv[])
try {
SelectParams(ChainNameFromCommandLine());
} catch(std::exception &e) {
- QMessageBox::critical(0, QObject::tr("Dash Core"), QObject::tr("Error: %1").arg(e.what()));
+ QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), QObject::tr("Error: %1").arg(e.what()));
return EXIT_FAILURE;
}
#ifdef ENABLE_WALLET
@@ -716,7 +716,7 @@ int main(int argc, char *argv[])
app.createWindow(networkStyle.data());
app.requestInitialize();
#if defined(Q_OS_WIN) && QT_VERSION >= 0x050000
- WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("Dash Core didn't yet exit safely..."), (HWND)app.getMainWinId());
+ WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), (HWND)app.getMainWinId());
#endif
app.exec();
app.requestShutdown();
diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui
index b75417b72a..40a4f85cff 100644
--- a/src/qt/forms/debugwindow.ui
+++ b/src/qt/forms/debugwindow.ui
@@ -406,7 +406,7 @@
- Open the Dash Core debug log file from the current data directory. This can take a few seconds for large log files.
+ Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.&Open
diff --git a/src/qt/forms/helpmessagedialog.ui b/src/qt/forms/helpmessagedialog.ui
index 24ca5fafdf..334546ed95 100644
--- a/src/qt/forms/helpmessagedialog.ui
+++ b/src/qt/forms/helpmessagedialog.ui
@@ -16,9 +16,6 @@
500
-
- Dash Core - Command-line options
- 0
diff --git a/src/qt/forms/intro.ui b/src/qt/forms/intro.ui
index dd014d90a9..19b90f705f 100644
--- a/src/qt/forms/intro.ui
+++ b/src/qt/forms/intro.ui
@@ -15,12 +15,12 @@
-
+ QLabel { font-style:italic; }
- Welcome to Dash Core.
+ Welcome to %1.true
@@ -44,9 +44,9 @@
-
+
- As this is the first time the program is launched, you can choose where Dash Core will store its data.
+ As this is the first time the program is launched, you can choose where %1 will store its data.true
@@ -56,7 +56,7 @@
- Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.
+ %1 will download and store a copy of the Dash block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.true
diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index 4681792d39..d4df3ba2fe 100644
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -30,10 +30,10 @@
- Automatically start Dash Core after logging in to the system.
+ Automatically start %1 after logging in to the system.
- &Start Dash Core on system login
+ &Start %1 on system login
@@ -681,7 +681,7 @@
- The user interface language can be set here. This setting will take effect after restarting Dash Core.
+ The user interface language can be set here. This setting will take effect after restarting %1.
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index 3effc3275e..f18720f608 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#if defined(HAVE_CONFIG_H)
+#include "config/dash-config.h"
+#endif
+
#include "intro.h"
#include "ui_intro.h"
@@ -119,11 +123,13 @@ Intro::Intro(QWidget *parent) :
signalled(false)
{
ui->setupUi(this);
+ ui->welcomeLabel->setText(ui->welcomeLabel->text().arg(tr(PACKAGE_NAME)));
+ ui->storageLabel->setText(ui->storageLabel->text().arg(tr(PACKAGE_NAME)));
uint64_t pruneTarget = std::max(0, GetArg("-prune", 0));
requiredSpace = BLOCK_CHAIN_SIZE;
if (pruneTarget)
requiredSpace = CHAIN_STATE_SIZE + std::ceil(pruneTarget * 1024 * 1024.0 / GB_BYTES);
- ui->sizeWarningLabel->setText(ui->sizeWarningLabel->text().arg(requiredSpace));
+ ui->sizeWarningLabel->setText(ui->sizeWarningLabel->text().arg(tr(PACKAGE_NAME)).arg(requiredSpace));
startThread();
}
@@ -194,7 +200,7 @@ void Intro::pickDataDirectory()
TryCreateDirectory(GUIUtil::qstringToBoostPath(dataDir));
break;
} catch (const fs::filesystem_error&) {
- QMessageBox::critical(0, tr("Dash Core"),
+ QMessageBox::critical(0, tr(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 e41881d8d0..337a476cee 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -100,6 +100,11 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
/* Language selector */
QDir translations(":translations");
+
+ ui->bitcoinAtStartup->setToolTip(ui->bitcoinAtStartup->toolTip().arg(tr(PACKAGE_NAME)));
+ ui->bitcoinAtStartup->setText(ui->bitcoinAtStartup->text().arg(tr(PACKAGE_NAME)));
+
+ ui->lang->setToolTip(ui->lang->toolTip().arg(tr(PACKAGE_NAME)));
ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant(""));
Q_FOREACH(const QString &langStr, translations.entryList())
{
diff --git a/src/qt/res/dash-qt-res.rc b/src/qt/res/dash-qt-res.rc
index 6210740eaf..5922a9bd55 100644
--- a/src/qt/res/dash-qt-res.rc
+++ b/src/qt/res/dash-qt-res.rc
@@ -19,13 +19,13 @@ BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Dash"
- VALUE "FileDescription", "Dash Core (GUI node for Dash)"
+ VALUE "FileDescription", PACKAGE_NAME " (GUI node for Dash)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "dash-qt"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "dash-qt.exe"
- VALUE "ProductName", "Dash Core"
+ VALUE "ProductName", PACKAGE_NAME
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index db739485f9..be86e3bd3c 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#if defined(HAVE_CONFIG_H)
+#include "config/dash-config.h"
+#endif
+
#include "rpcconsole.h"
#include "ui_debugwindow.h"
@@ -262,6 +266,9 @@ RPCConsole::RPCConsole(const PlatformStyle *platformStyle, QWidget *parent) :
{
ui->setupUi(this);
GUIUtil::restoreWindowGeometry("nRPCConsoleWindow", this->size(), this);
+
+ ui->openDebugLogfileButton->setToolTip(ui->openDebugLogfileButton->toolTip().arg(tr(PACKAGE_NAME)));
+
QString theme = GUIUtil::getThemeName();
if (platformStyle->getImagesOnButtons()) {
ui->openDebugLogfileButton->setIcon(QIcon(":/icons/" + theme + "/export"));
@@ -643,7 +650,7 @@ void RPCConsole::clear(bool clearHistory)
).arg(fixedFontInfo.family(), QString("%1pt").arg(consoleFontSize))
);
- message(CMD_REPLY, (tr("Welcome to the Dash Core RPC console.") + " " +
+ message(CMD_REPLY, (tr("Welcome to the %1 RPC console.").arg(tr(PACKAGE_NAME)) + " " +
tr("Use up and down arrows to navigate history, and Ctrl-L to clear screen.") + " " +
tr("Type help for an overview of available commands.")), true);
}
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index a568c9aab1..f28c461f71 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#if defined(HAVE_CONFIG_H)
+#include "config/dash-config.h"
+#endif
+
#include "splashscreen.h"
#include "guiutil.h"
@@ -42,10 +46,9 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
float fontFactor = 1.0;
// define text to place
- QString titleText = tr("Dash Core");
+ QString titleText = tr(PACKAGE_NAME);
QString versionText = QString(tr("Version %1")).arg(QString::fromStdString(FormatFullVersion()));
- QString copyrightTextBtc = QChar(0xA9)+QString(" 2009-%1 ").arg(COPYRIGHT_YEAR) + QString(tr("The Bitcoin Core developers"));
- QString copyrightTextDash = QChar(0xA9)+QString(" 2014-%1 ").arg(COPYRIGHT_YEAR) + QString(tr("The Dash Core developers"));
+ QString copyrightText = QString::fromUtf8(CopyrightHolders(strprintf("\xc2\xA9 %u-%u ", 2009, COPYRIGHT_YEAR)).c_str());
QString titleAddText = networkStyle->getTitleAddText();
// networkstyle.cpp can't (yet) read themes, so we do it here to get the correct Splash-screen
QString splashScreenPath = ":/images/" + GUIUtil::getThemeName() + "/splash";
@@ -65,9 +68,8 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
// check font size and drawing with
pixPaint.setFont(QFont(font, 28*fontFactor));
QFontMetrics fm = pixPaint.fontMetrics();
- int titleTextWidth = fm.width(titleText);
- if(titleTextWidth > 160) {
- // strange font rendering, Arial probably not found
+ int titleTextWidth = fm.width(titleText);
+ if (titleTextWidth > 160) {
fontFactor = 0.75;
}
@@ -80,9 +82,13 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
pixPaint.drawText(paddingLeft,paddingTop+titleVersionVSpace,versionText);
// draw copyright stuff
- pixPaint.setFont(QFont(font, 10*fontFactor));
- pixPaint.drawText(paddingLeft,paddingTop+titleCopyrightVSpace,copyrightTextBtc);
- pixPaint.drawText(paddingLeft,paddingTop+titleCopyrightVSpace+12,copyrightTextDash);
+ {
+ pixPaint.setFont(QFont(font, 10*fontFactor));
+ const int x = paddingLeft;
+ const int y = paddingTop+titleCopyrightVSpace;
+ QRect copyrightRect(x, y, pixmap.width() - x, pixmap.height() - y);
+ pixPaint.drawText(copyrightRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, copyrightText);
+ }
// draw additional text if special network
if(!titleAddText.isEmpty()) {
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index 180cf56fe5..5af0c22996 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#if defined(HAVE_CONFIG_H)
+#include "config/dash-config.h"
+#endif
+
#include "utilitydialog.h"
#include "ui_helpmessagedialog.h"
@@ -34,7 +38,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, HelpMode helpMode) :
{
ui->setupUi(this);
- QString version = tr("Dash Core") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion());
+ QString version = tr(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 ambigious.
*/
@@ -46,7 +50,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, HelpMode helpMode) :
if (helpMode == about)
{
- setWindowTitle(tr("About Dash Core"));
+ setWindowTitle(tr("About %1").arg(tr(PACKAGE_NAME)));
/// HTML-format the license message from the core
QString licenseInfo = QString::fromStdString(LicenseInfo());
@@ -57,7 +61,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, HelpMode helpMode) :
uri.setMinimal(true); // use non-greedy matching
licenseInfoHTML.replace(uri, "\\1");
// Replace newlines with HTML breaks
- licenseInfoHTML.replace("\n\n", "
" +
+ tr("%1 is shutting down...").arg(tr(PACKAGE_NAME)) + "
" +
tr("Do not shut down the computer until this window disappears.")));
setLayout(layout);
}
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 5ac9b6928a..ac8e51a1d5 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -404,12 +404,27 @@ BOOST_AUTO_TEST_CASE(test_FormatParagraph)
{
BOOST_CHECK_EQUAL(FormatParagraph("", 79, 0), "");
BOOST_CHECK_EQUAL(FormatParagraph("test", 79, 0), "test");
- BOOST_CHECK_EQUAL(FormatParagraph(" test", 79, 0), "test");
+ BOOST_CHECK_EQUAL(FormatParagraph(" test", 79, 0), " test");
BOOST_CHECK_EQUAL(FormatParagraph("test test", 79, 0), "test test");
BOOST_CHECK_EQUAL(FormatParagraph("test test", 4, 0), "test\ntest");
- BOOST_CHECK_EQUAL(FormatParagraph("testerde test ", 4, 0), "testerde\ntest");
+ BOOST_CHECK_EQUAL(FormatParagraph("testerde test", 4, 0), "testerde\ntest");
BOOST_CHECK_EQUAL(FormatParagraph("test test", 4, 4), "test\n test");
- BOOST_CHECK_EQUAL(FormatParagraph("This is a very long test string. This is a second sentence in the very long test string."), "This is a very long test string. This is a second sentence in the very long\ntest string.");
+
+ // Make sure we don't indent a fully-new line following a too-long line ending
+ BOOST_CHECK_EQUAL(FormatParagraph("test test\nabc", 4, 4), "test\n test\nabc");
+
+ BOOST_CHECK_EQUAL(FormatParagraph("This_is_a_very_long_test_string_without_any_spaces_so_it_should_just_get_returned_as_is_despite_the_length until it gets here", 79), "This_is_a_very_long_test_string_without_any_spaces_so_it_should_just_get_returned_as_is_despite_the_length\nuntil it gets here");
+
+ // Test wrap length is exact
+ BOOST_CHECK_EQUAL(FormatParagraph("a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 a b c de f g h i j k l m n o p", 79), "a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 a b c de\nf g h i j k l m n o p");
+ BOOST_CHECK_EQUAL(FormatParagraph("x\na b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 a b c de f g h i j k l m n o p", 79), "x\na b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 a b c de\nf g h i j k l m n o p");
+ // Indent should be included in length of lines
+ BOOST_CHECK_EQUAL(FormatParagraph("x\na b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 a b c de f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 a b c d e fg h i j k", 79, 4), "x\na b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 a b c de\n f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 a b c d e fg\n h i j k");
+
+ BOOST_CHECK_EQUAL(FormatParagraph("This is a very long test string. This is a second sentence in the very long test string.", 79), "This is a very long test string. This is a second sentence in the very long\ntest string.");
+ BOOST_CHECK_EQUAL(FormatParagraph("This is a very long test string.\nThis is a second sentence in the very long test string. This is a third sentence in the very long test string.", 79), "This is a very long test string.\nThis is a second sentence in the very long test string. This is a third\nsentence in the very long test string.");
+ BOOST_CHECK_EQUAL(FormatParagraph("This is a very long test string.\n\nThis is a second sentence in the very long test string. This is a third sentence in the very long test string.", 79), "This is a very long test string.\n\nThis is a second sentence in the very long test string. This is a third\nsentence in the very long test string.");
+ BOOST_CHECK_EQUAL(FormatParagraph("Testing that normal newlines do not get indented.\nLike here.", 79), "Testing that normal newlines do not get indented.\nLike here.");
}
BOOST_AUTO_TEST_CASE(test_FormatSubVersion)
diff --git a/src/timedata.cpp b/src/timedata.cpp
index d0619d4f4d..172c940e5b 100644
--- a/src/timedata.cpp
+++ b/src/timedata.cpp
@@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#if defined(HAVE_CONFIG_H)
+#include "config/dash-config.h"
+#endif
+
#include "timedata.h"
#include "netaddress.h"
@@ -99,7 +103,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
if (!fMatch)
{
fDone = true;
- string strMessage = _("Please check that your computer's date and time are correct! If your clock is wrong Dash Core will not work properly.");
+ 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));
strMiscWarning = strMessage;
uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING);
}
diff --git a/src/util.cpp b/src/util.cpp
index 9bd081b6cc..f833f1774a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -954,6 +954,17 @@ int GetNumCores()
#endif
}
+std::string CopyrightHolders(const std::string& strPrefix)
+{
+ std::string strCopyrightHolders = strPrefix + _(COPYRIGHT_HOLDERS);
+ if (strCopyrightHolders.find("%s") != strCopyrightHolders.npos) {
+ strCopyrightHolders = strprintf(strCopyrightHolders, _(COPYRIGHT_HOLDERS_SUBSTITUTION));
+ }
+ if (strCopyrightHolders.find("Bitcoin Core developers") == strCopyrightHolders.npos) {
+ strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers";
+ }
+ return strCopyrightHolders;
+}
uint32_t StringVersionToInt(const std::string& strVersion)
{
diff --git a/src/util.h b/src/util.h
index dc9cc5f2b6..725349f004 100644
--- a/src/util.h
+++ b/src/util.h
@@ -271,6 +271,7 @@ template void TraceThread(const char* name, Callable func)
}
}
+std::string CopyrightHolders(const std::string& strPrefix);
/**
* @brief Converts version strings to 4-byte unsigned integer
diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
index bf304a935f..11f0250e32 100644
--- a/src/utilstrencodings.cpp
+++ b/src/utilstrencodings.cpp
@@ -478,34 +478,40 @@ bool ParseDouble(const std::string& str, double *out)
std::string FormatParagraph(const std::string& in, size_t width, size_t indent)
{
std::stringstream out;
- size_t col = 0;
size_t ptr = 0;
- while(ptr < in.size())
+ size_t indented = 0;
+ while (ptr < in.size())
{
- // Find beginning of next word
- ptr = in.find_first_not_of(' ', ptr);
- if (ptr == std::string::npos)
- break;
- // Find end of next word
- size_t endword = in.find_first_of(' ', ptr);
- if (endword == std::string::npos)
- endword = in.size();
- // Add newline and indentation if this wraps over the allowed width
- if (col > 0)
- {
- if ((col + endword - ptr) > width)
- {
- out << '\n';
- for(size_t i=0; i