Changeset View
Changeset View
Standalone View
Standalone View
share/qt/extract_strings_qt.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2012-2017 The Bitcoin Core developers | # Copyright (c) 2012-2017 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
''' | ''' | ||||
Extract _("...") strings for translation and convert to Qt stringdefs so that | Extract _("...") strings for translation and convert to Qt stringdefs so that | ||||
they can be picked up by Qt linguist. | they can be picked up by Qt linguist. | ||||
''' | ''' | ||||
from subprocess import Popen, PIPE | |||||
import operator | import operator | ||||
import os | import os | ||||
import sys | import sys | ||||
from subprocess import PIPE, Popen | |||||
OUT_CPP = "qt/bitcoinstrings.cpp" | OUT_CPP = "qt/bitcoinstrings.cpp" | ||||
EMPTY = ['""'] | EMPTY = ['""'] | ||||
def parse_po(text): | def parse_po(text): | ||||
""" | """ | ||||
Parse 'po' format produced by xgettext. | Parse 'po' format produced by xgettext. | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |