summaryrefslogtreecommitdiffstats
path: root/share/palettes
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2010-11-01 08:45:51 +0000
committerJazzyNico <nicoduf@yahoo.fr>2010-11-01 08:45:51 +0000
commitc489bc15c52d89abeffd8efc6a06c950bce44e0d (patch)
tree926a8d8e3d1d75e30022b1ea7bb4ffafca75e798 /share/palettes
parentPrevent context menu and keyboard shortcuts from interrupting grabs (diff)
downloadinkscape-c489bc15c52d89abeffd8efc6a06c950bce44e0d.tar.gz
inkscape-c489bc15c52d89abeffd8efc6a06c950bce44e0d.zip
i18n. Color palette items are now translatable (see Bug #667402, Color palette not translatable).
Fixed bugs: - https://launchpad.net/bugs/667402 (bzr r9870)
Diffstat (limited to 'share/palettes')
-rw-r--r--share/palettes/Makefile.am18
-rw-r--r--share/palettes/echo-palette.gpl2
-rwxr-xr-xshare/palettes/i18n.py21
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 "];"