Browse Source

allow translation of "options" used in the --help message / split translation of RPC console welcome message and remove the need to take care of "<br>" / remove some spaces in strings and misc other stuff related to translations

0.8
Philip Kaufmann 12 years ago
parent
commit
8b4d653663
  1. 2
      src/init.cpp
  2. 2
      src/net.cpp
  3. 10
      src/qt/bitcoin.cpp
  4. 2
      src/qt/forms/messagepage.ui
  5. 8
      src/qt/optionsdialog.cpp
  6. 6
      src/qt/rpcconsole.cpp
  7. 2
      src/qt/verifymessagedialog.cpp

2
src/init.cpp

@ -645,7 +645,7 @@ bool AppInit2()
if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee)) if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee))
return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s'"), mapArgs["-paytxfee"].c_str())); return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s'"), mapArgs["-paytxfee"].c_str()));
if (nTransactionFee > 0.25 * COIN) if (nTransactionFee > 0.25 * COIN)
InitWarning(_("Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction.")); InitWarning(_("Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."));
} }
// //

2
src/net.cpp

@ -1755,7 +1755,7 @@ bool BindListenPort(const CService &addrBind, string& strError)
{ {
int nErr = WSAGetLastError(); int nErr = WSAGetLastError();
if (nErr == WSAEADDRINUSE) if (nErr == WSAEADDRINUSE)
strError = strprintf(_("Unable to bind to %s on this computer. Bitcoin is probably already running."), addrBind.ToString().c_str()); strError = strprintf(_("Unable to bind to %s on this computer. Bitcoin is probably already running."), addrBind.ToString().c_str());
else else
strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %d, %s)"), addrBind.ToString().c_str(), nErr, strerror(nErr)); strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %d, %s)"), addrBind.ToString().c_str(), nErr, strerror(nErr));
printf("%s\n", strError.c_str()); printf("%s\n", strError.c_str());

10
src/qt/bitcoin.cpp

@ -147,14 +147,14 @@ HelpMessageBox::HelpMessageBox(QWidget *parent):
QMessageBox(parent) QMessageBox(parent)
{ {
header = tr("Bitcoin-Qt") + " " + tr("version") + " " + header = tr("Bitcoin-Qt") + " " + tr("version") + " " +
QString::fromStdString(FormatFullVersion()) + "\n\n" + QString::fromStdString(FormatFullVersion()) + "\n\n" +
tr("Usage:") + "\n" + tr("Usage:") + "\n" +
" bitcoin-qt [options] " + "\n"; " bitcoin-qt [" + tr("options") + "] " + "\n";
coreOptions = QString::fromStdString(HelpMessage()); coreOptions = QString::fromStdString(HelpMessage());
uiOptions = tr("UI options") + ":\n" + uiOptions = tr("UI options") + ":\n" +
" -lang=<lang> " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" + " -lang=<lang> " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" +
" -min " + tr("Start minimized") + "\n" + " -min " + tr("Start minimized") + "\n" +
" -splash " + tr("Show splash screen on startup (default: 1)") + "\n"; " -splash " + tr("Show splash screen on startup (default: 1)") + "\n";
setWindowTitle(tr("Bitcoin-Qt")); setWindowTitle(tr("Bitcoin-Qt"));
setTextFormat(Qt::PlainText); setTextFormat(Qt::PlainText);

2
src/qt/forms/messagepage.ui

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Sign Message Dialog</string> <string>Sign Message</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>

8
src/qt/optionsdialog.cpp

@ -249,7 +249,7 @@ DisplayOptionsPage::DisplayOptionsPage(QWidget *parent):
QHBoxLayout *lang_hbox = new QHBoxLayout(); QHBoxLayout *lang_hbox = new QHBoxLayout();
lang_hbox->addSpacing(18); lang_hbox->addSpacing(18);
QLabel *lang_label = new QLabel(tr("User Interface &Language: ")); QLabel *lang_label = new QLabel(tr("User Interface &Language:"));
lang_hbox->addWidget(lang_label); lang_hbox->addWidget(lang_label);
lang = new QValueComboBox(this); lang = new QValueComboBox(this);
// Make list of languages // Make list of languages
@ -270,7 +270,7 @@ DisplayOptionsPage::DisplayOptionsPage(QWidget *parent):
QHBoxLayout *unit_hbox = new QHBoxLayout(); QHBoxLayout *unit_hbox = new QHBoxLayout();
unit_hbox->addSpacing(18); unit_hbox->addSpacing(18);
QLabel *unit_label = new QLabel(tr("&Unit to show amounts in: ")); QLabel *unit_label = new QLabel(tr("&Unit to show amounts in:"));
unit_hbox->addWidget(unit_label); unit_hbox->addWidget(unit_label);
unit = new QValueComboBox(this); unit = new QValueComboBox(this);
unit->setModel(new BitcoinUnits(this)); unit->setModel(new BitcoinUnits(this));
@ -354,7 +354,7 @@ NetworkOptionsPage::NetworkOptionsPage(QWidget *parent):
QHBoxLayout *proxy_hbox = new QHBoxLayout(); QHBoxLayout *proxy_hbox = new QHBoxLayout();
proxy_hbox->addSpacing(18); proxy_hbox->addSpacing(18);
QLabel *proxy_ip_label = new QLabel(tr("Proxy &IP: ")); QLabel *proxy_ip_label = new QLabel(tr("Proxy &IP:"));
proxy_hbox->addWidget(proxy_ip_label); proxy_hbox->addWidget(proxy_ip_label);
proxy_ip = new QLineEdit(); proxy_ip = new QLineEdit();
proxy_ip->setMaximumWidth(140); proxy_ip->setMaximumWidth(140);
@ -363,7 +363,7 @@ NetworkOptionsPage::NetworkOptionsPage(QWidget *parent):
proxy_ip->setToolTip(tr("IP address of the proxy (e.g. 127.0.0.1)")); proxy_ip->setToolTip(tr("IP address of the proxy (e.g. 127.0.0.1)"));
proxy_ip_label->setBuddy(proxy_ip); proxy_ip_label->setBuddy(proxy_ip);
proxy_hbox->addWidget(proxy_ip); proxy_hbox->addWidget(proxy_ip);
QLabel *proxy_port_label = new QLabel(tr("&Port: ")); QLabel *proxy_port_label = new QLabel(tr("&Port:"));
proxy_hbox->addWidget(proxy_port_label); proxy_hbox->addWidget(proxy_port_label);
proxy_port = new QLineEdit(); proxy_port = new QLineEdit();
proxy_port->setMaximumWidth(55); proxy_port->setMaximumWidth(55);

6
src/qt/rpcconsole.cpp

@ -207,9 +207,9 @@ void RPCConsole::clear()
"b { color: #006060; } " "b { color: #006060; } "
); );
message(CMD_REPLY, tr("Welcome to the Bitcoin RPC console.<br>" message(CMD_REPLY, (tr("Welcome to the Bitcoin RPC console.") + "<br>" +
"Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.<br>" tr("Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.") + "<br>" +
"Type <b>help</b> for an overview of available commands."), true); tr("Type <b>help</b> for an overview of available commands.")), true);
} }
void RPCConsole::message(int category, const QString &message, bool html) void RPCConsole::message(int category, const QString &message, bool html)

2
src/qt/verifymessagedialog.cpp

@ -25,7 +25,7 @@ VerifyMessageDialog::VerifyMessageDialog(AddressTableModel *addressModel, QWidge
#if (QT_VERSION >= 0x040700) #if (QT_VERSION >= 0x040700)
/* Do not move this to the XML file, Qt before 4.7 will choke on it */ /* Do not move this to the XML file, Qt before 4.7 will choke on it */
ui->lnSig->setPlaceholderText(tr("Enter Bitcoin signature")); ui->lnSig->setPlaceholderText(tr("Enter Bitcoin signature"));
ui->lnAddress->setPlaceholderText(tr("Click \"Apply\" to obtain address")); ui->lnAddress->setPlaceholderText(tr("Click \"Verify Message\" to obtain address"));
#endif #endif
GUIUtil::setupAddressWidget(ui->lnAddress, this); GUIUtil::setupAddressWidget(ui->lnAddress, this);

Loading…
Cancel
Save