~inkscape.dev/inkscape/trunk

7865 by helix84
i18n.py: fixed shebang
1
#!/usr/bin/env python
6984 by Ted Gould
* Removing the bitmap files that aren't being used.
2
3
from xml.dom import minidom
4
import sys
5
6
doc = minidom.parse(sys.argv[1])
7
8
filters = doc.getElementsByTagName('filter')
9
10271 by Campbell Barton
support python3.x for other i18n scripts
10
sys.stdout.write("char * stringlst = [")
6984 by Ted Gould
* Removing the bitmap files that aren't being used.
11
12
for filter in filters:
13350 by JazzyNico
i18n. Fix for bug #1318289 (preferences > bitmap > rendering shows po file headers).
13
    label = "N_(\"" + filter.getAttribute('inkscape:label') + "\")"
14
    menu = "N_(\"" + filter.getAttribute('inkscape:menu') + "\")"
15
    if (filter.getAttribute('inkscape:menu-tooltip')):
16
        desc = "N_(\"" + filter.getAttribute('inkscape:menu-tooltip') + "\")"
17
    else:
18
        desc = ""
19
    comment = ""
6984 by Ted Gould
* Removing the bitmap files that aren't being used.
20
13350 by JazzyNico
i18n. Fix for bug #1318289 (preferences > bitmap > rendering shows po file headers).
21
    if "NR" in label:
22
        comment = '/* TRANSLATORS: NR means non-realistic. See menu Filters > Non realistic shaders */\n'
23
    
24
    sys.stdout.write(comment + "\n" + label + ",\n" + menu + ",\n" + desc + ",\n")
6984 by Ted Gould
* Removing the bitmap files that aren't being used.
25
10271 by Campbell Barton
support python3.x for other i18n scripts
26
sys.stdout.write("];")