diff options
Diffstat (limited to 'share')
| -rw-r--r-- | share/palettes/Makefile.am | 18 | ||||
| -rw-r--r-- | share/palettes/echo-palette.gpl | 2 | ||||
| -rwxr-xr-x | share/palettes/i18n.py | 21 |
3 files changed, 38 insertions, 3 deletions
diff --git a/share/palettes/Makefile.am b/share/palettes/Makefile.am index 3bb5bed88..850312e9f 100644 --- a/share/palettes/Makefile.am +++ b/share/palettes/Makefile.am @@ -21,6 +21,20 @@ palettes_DATA = \ Ubuntu.gpl \ webhex.gpl \ websafe22.gpl \ - windowsXP.gpl + windowsXP.gpl \ + palettes.h -EXTRA_DIST = $(palettes_DATA) +palettes_i18n = \ + echo-palette.gpl \ + inkscape.gpl \ + LaTeX-Beamer.gpl \ + svg.gpl \ + Tango-Palette.gpl \ + Ubuntu.gpl + +palettes.h: i18n.py $(palettes_i18n) + $(srcdir)/i18n.py $(palettes_i18n) > $(srcdir)/palettes.h + +EXTRA_DIST = $(palettes_DATA) \ + i18n.py + diff --git a/share/palettes/echo-palette.gpl b/share/palettes/echo-palette.gpl index e3215901c..1b3bf99ca 100644 --- a/share/palettes/echo-palette.gpl +++ b/share/palettes/echo-palette.gpl @@ -2,7 +2,7 @@ GIMP Palette Name: Echo Icon Theme Palette Columns: 3 # - 25 174 255 Blue1 + 25 174 255 Blue1 0 132 200 Blue2 0 92 148 Blue3 255 65 65 Red1 diff --git a/share/palettes/i18n.py b/share/palettes/i18n.py new file mode 100755 index 000000000..9e381f6e0 --- /dev/null +++ b/share/palettes/i18n.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +import sys +import glob +import re + +palettes = sys.argv; + +print "char * stringlst = [" + +regex = re.compile(r'^\s*\d{1,3}\s+\d{1,3}\s+\d{1,3}\s+([^#\s].*)') + +for filename in palettes: + file = open (filename, 'r') + print '\n/* Palette: ' + filename + ' */' + for line in file: + match = regex.match(line) + if match: + print "N_(\"" + match.group(1) + "\")," + +print "];" |
