X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=share%2Fqt%2Fextract_strings_qt.py;h=771f28ab0a9f71d5bed5bb8b022a1b6a9dc6f5c7;hb=11cd41652519be7053b16847ffa2a7c7df64b95d;hp=03d3a1ba37a1e096c49c84b3ca3634a5ef6cfaac;hpb=76d8170ce8b4714657f8defd791bd30fef1a8de4;p=novacoin.git diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py index 03d3a1b..771f28a 100755 --- a/share/qt/extract_strings_qt.py +++ b/share/qt/extract_strings_qt.py @@ -54,9 +54,15 @@ child = Popen(['xgettext','--output=-','-n','--keyword=_'] + files, stdout=PIPE) messages = parse_po(out) f = open(OUT_CPP, 'w') -f.write('#include \n') -f.write('// Automatically generated by extract_strings.py\n') -f.write('static const char *bitcoin_strings[] = {') +f.write("""#include +// Automatically generated by extract_strings.py +#ifdef __GNUC__ +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif +""") +f.write('static const char UNUSED *bitcoin_strings[] = {') for (msgid, msgstr) in messages: if msgid != EMPTY: f.write('QT_TRANSLATE_NOOP("bitcoin-core", %s),\n' % ('\n'.join(msgid)))