diff options
Diffstat (limited to '')
-rwxr-xr-x | share/paint/i18n.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/share/paint/i18n.py b/share/paint/i18n.py new file mode 100755 index 0000000..1113f26 --- /dev/null +++ b/share/paint/i18n.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +from xml.dom import minidom +import sys + +doc = minidom.parse(sys.argv[1]) + +filters = doc.getElementsByTagName('pattern') + +sys.stdout.write("char * stringlst = [") + +for filter in filters: + id = filter.getAttribute('id') + stockid = filter.getAttribute('inkscape:stockid') + + sys.stdout.write("N_(\"" + stockid + "\"),") + +sys.stdout.write("];") |