File: make_pot_file.py

package info (click to toggle)
svn-workbench 1.6.8-2.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,172 kB
  • ctags: 2,147
  • sloc: python: 15,925; sh: 108; makefile: 15; ansic: 9
file content (32 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/python
import sys
import os
import glob

all_py_files = set( glob.glob( '*.py' ) )
all_py_files.remove( 'wb_diff_images.py' )
all_py_files.remove( 'wb_images.py' )

f = open( 'wb_files.tmp', 'wt' )
for py_file in all_py_files:
    f.write( '%s\n' % py_file )
f.close()

cmd = ('xgettext '
    '--files-from=wb_files.tmp '
    '--default-domain=pysvn_workbench '
    '--output=I18N/pysvn_workbench.current.pot '
    '--msgid-bugs-address=barryscott@tigris.org '
    '--copyright-holder="Barry Scott" '
    '--keyword=U_ '
    '--keyword=T_ '
    '--keyword=S_:1,2 '
    '--add-comments '
    '--no-wrap '
    '--width=2047 '
    '--add-comments=Translat '
    '--language=Python')

print 'Info: %s' % (cmd,)
rc = os.system( cmd )
sys.exit( rc )