diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-06-13 18:17:28 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-06-13 18:19:16 +0200 |
commit | 15094f7654f62a176045a96a60c16db1e2bfb6a8 (patch) | |
tree | 1266d07873bd044d26fd8f9cc9f4a280f0c74289 /share/qt/extract_strings_qt.py | |
parent | 44c89996c8a9472b03b90ef1cfffb7c8503bf1da (diff) |
Update bitcoinstrings from core and English source translation file
This is necessary as any strings have changed since last time.
Also the python script used to extract bitcoinstrings.cpp, extract_strings_qt.py
now sorts the strings before generating the output file. This results in more
deterministic output and thus smaller diffs.
Diffstat (limited to 'share/qt/extract_strings_qt.py')
-rwxr-xr-x | share/qt/extract_strings_qt.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py index 771f28ab0a..1267b1856a 100755 --- a/share/qt/extract_strings_qt.py +++ b/share/qt/extract_strings_qt.py @@ -5,6 +5,7 @@ they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob +import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] @@ -62,7 +63,8 @@ f.write("""#include <QtGlobal> #define UNUSED #endif """) -f.write('static const char UNUSED *bitcoin_strings[] = {') +f.write('static const char UNUSED *bitcoin_strings[] = {\n') +messages.sort(key=operator.itemgetter(0)) for (msgid, msgstr) in messages: if msgid != EMPTY: f.write('QT_TRANSLATE_NOOP("bitcoin-core", %s),\n' % ('\n'.join(msgid))) |