Dash Core  0.12.2.1
P2P Digital Currency
qt_translations.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 # Helpful little script that spits out a comma-separated list of
4 # language codes for Qt icons that should be included
5 # in binary Dash Core distributions
6 
7 import glob
8 import os
9 import re
10 import sys
11 
12 if len(sys.argv) != 3:
13  sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.argv[0])
14 
15 d1 = sys.argv[1]
16 d2 = sys.argv[2]
17 
18 l1 = set([ re.search(r'qt_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d1, 'qt_*.qm')) ])
19 l2 = set([ re.search(r'dash_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d2, 'dash_*.qm')) ])
20 
21 print ",".join(sorted(l1.intersection(l2)))
22