summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-12 17:29:27 +0000
committerCampbell Barton <ideasman42@gmail.com>2011-06-12 17:29:27 +0000
commit6a8fb5d72ae23abb99081961d4187ba0f784071a (patch)
tree0773e619e640a4eb4b9293dc240d089c0b998f86
parentOn arch linux python3 is default, changes so this works on py3 (first commit,... (diff)
downloadinkscape-6a8fb5d72ae23abb99081961d4187ba0f784071a.tar.gz
inkscape-6a8fb5d72ae23abb99081961d4187ba0f784071a.zip
support python3.x for other i18n scripts
(bzr r10271)
-rwxr-xr-xshare/filters/i18n.py6
-rwxr-xr-xshare/palettes/i18n.py10
2 files changed, 8 insertions, 8 deletions
diff --git a/share/filters/i18n.py b/share/filters/i18n.py
index c4e09959b..d13f007b1 100755
--- a/share/filters/i18n.py
+++ b/share/filters/i18n.py
@@ -7,7 +7,7 @@ doc = minidom.parse(sys.argv[1])
filters = doc.getElementsByTagName('filter')
-print "char * stringlst = ["
+sys.stdout.write("char * stringlst = [")
for filter in filters:
label = filter.getAttribute('inkscape:label')
@@ -18,6 +18,6 @@ for filter in filters:
if "NR" in label:
comment = '/* TRANSLATORS: NR means non-realistic. See menu Filters > Non realistic shaders */\n'
- print comment + "N_(\"" + label + "\"), N_(\"" + menu + "\"), N_(\"" + desc + "\"),"
+ sys.stdout.write(comment + "N_(\"" + label + "\"), N_(\"" + menu + "\"), N_(\"" + desc + "\"),")
-print "];"
+sys.stdout.write("];")
diff --git a/share/palettes/i18n.py b/share/palettes/i18n.py
index 853e29efb..76e45b346 100755
--- a/share/palettes/i18n.py
+++ b/share/palettes/i18n.py
@@ -4,7 +4,7 @@ import sys
import glob
import re
-print "char * stringlst = ["
+sys.stdout.write("char * stringlst = [")
# Gimp palette format: R G B Label (255 0 0 Red)
@@ -16,10 +16,10 @@ for filename in sys.argv[1:]:
for line in file:
match = regex.match(line)
if match:
- print '\n/* Palette: ' + filename + ' */'
+ sys.stdout.write('\n/* Palette: ' + filename + ' */')
search = regexnoc.search(match.group(1))
if search:
- print "/* xgettext:no-c-format */"
- print "NC_(\"Palette\", \"" + match.group(1) + "\"),"
+ sys.stdout.write("/* xgettext:no-c-format */")
+ sys.stdout.write("NC_(\"Palette\", \"" + match.group(1) + "\"),")
-print "];"
+sys.stdout.write("];")