It seems the strings in qt/bitcoin.cpp are not translated.
E.g. qt/bitcoin-qt -lang=cz -datadir=/tmp/a2 gives me a warning in English that the datadir does not exist.
It seems the strings in qt/bitcoin.cpp are not translated.
E.g. qt/bitcoin-qt -lang=cz -datadir=/tmp/a2 gives me a warning in English that the datadir does not exist.
Where did you set the language?
I don't think the problem here is that that string, or others in qt/bitcoin.cpp is untranslated. It appears in the ts files.
However the startup of bitcoind, and even more the GUI is a complex multi-stage process with settings that are fetched from different sources at different times. Before locating the data directory (which is very early) it may not have found your language setting yet.
E.g. qt/bitcoin-qt -lang=cz -datadir=/tmp/a2 gives me a warning in English that the datadir does not exist.
Oh, -lang, yes that should have been picked up by then. Weird.
Czech language is code cs, not cz.
I tried different language codes, all failed. Could someone try really quick with qt/bitcoin-qt -lang=fr -datadir=/tmp/a2
It appears in the ts files.
But when you change the string, it is no longer picked up by xgettext?
But when you change the string, it is no longer picked up by xgettext?
I'm not sure what exact steps you're using, but xgettext does nothing with the qt files, it's only used to read strings from the core for bitcoinstrings.cpp to be picked up by qt's tools. Do you do make translate?
@laanwj What I mean is that locale/bitcoin_en.ts is not updated on make translate, it seems:
git checkout bitcoin/master && cd src/ && make translate && git commit -a -m "bump translations" && git apply < /tmp/patch-1 && make translate && git diff -U1
gives only this (the cpp change is from /tmp/patch-1, the ts change is from make translate)
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 430e6dd..c6e249a 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -588,3 +588,3 @@ int main(int argc, char *argv[])
QMessageBox::critical(0, QObject::tr(PACKAGE_NAME),
- QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
+ QObject::tr("Error: Data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
return 1;
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 444e35d..fa38770 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -134,3 +134,3 @@ void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
// and this is the only place, where this address is supplied.
- widget->setPlaceholderText(QObject::tr("Enter a Bitcoin address (e.g. %1)").arg(
+ widget->setPlaceholderText(QObject::tr("Enter address (e.g. %1)").arg(
QString::fromStdString(DummyAddress(Params()))));
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 2dce780..490de2d 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -1705,3 +1705,3 @@
<location filename="../guiutil.cpp" line="+135"/>
- <source>Enter a Bitcoin address (e.g. %1)</source>
+ <source>Enter address (e.g. %1)</source>
<translation type="unfinished"></translation>
Maybe this is expected, but I don't understand either why the existing translations (e.g. fr, de, ...) of those strings are not picked up.
Maybe this is expected, but I don't understand either why the existing translations (e.g. fr, de, ...) of those strings are not picked up.
Translations in Qt have a 'context' which needs to match as well as the string, for the translation to appear. This may be what is throwing you off track.
Possibly related: #8900
Reopening.
The regression was never fixed.
Are you sure? This wasn't fixed by #8911?
Which ones specifically are you missing? The wallet ones are in there, at least:
src/qt/addressbookpage.cpp: case SendingTab: setWindowTitle(tr("Choose the address to send coins to")); break;
src/qt/locale/bitcoin_en.ts: <source>Choose the address to send coins to</source>
Two examples:
$ git grep 'Specified data directory' src/qt/|grep 'does not exist'
src/qt/bitcoin.cpp: QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(GetArg("-datadir", ""))));
$ git grep 'This is a pre-release test build' src|grep -v 'src/qt/locale/'
src/warnings.cpp: strStatusBar = "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications";
src/warnings.cpp: strGUI = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications");
See #9457 for a possible fix
Milestone
0.14.0