2011-11-10 19:01:40 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
# Helpful little script that spits out a comma-separated list of
|
|
|
|
# language codes for Qt icons that should be included
|
2016-03-06 16:26:01 +01:00
|
|
|
# in binary dash distributions
|
2011-11-10 19:01:40 +01:00
|
|
|
|
|
|
|
import glob
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import sys
|
|
|
|
|
|
|
|
if len(sys.argv) != 3:
|
|
|
|
sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.argv[0])
|
|
|
|
|
|
|
|
d1 = sys.argv[1]
|
|
|
|
d2 = sys.argv[2]
|
|
|
|
|
|
|
|
l1 = set([ re.search(r'qt_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d1, 'qt_*.qm')) ])
|
2016-03-04 08:25:16 +01:00
|
|
|
l2 = set([ re.search(r'dash_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d2, 'dash_*.qm')) ])
|
2011-11-10 19:01:40 +01:00
|
|
|
|
|
|
|
print ",".join(sorted(l1.intersection(l2)))
|
|
|
|
|