diff options
| author | Ivan Mas??r <helix84@centrum.sk> | 2009-05-26 15:22:40 +0000 |
|---|---|---|
| committer | helix84 <helix84@users.sourceforge.net> | 2009-05-26 15:22:40 +0000 |
| commit | bee09b5eae58df54954c703414f8bf0d5b022766 (patch) | |
| tree | ab6658d69e7fee01dc08e53373876bb08e494b2f /share/patterns | |
| parent | * [INTL:*] string fixes (diff) | |
| download | inkscape-bee09b5eae58df54954c703414f8bf0d5b022766.tar.gz inkscape-bee09b5eae58df54954c703414f8bf0d5b022766.zip | |
* [INTL:*] added i18n of patterns.svg
* [INTL:*] make inkscape.pot
* [INTL: sk] Slovak translation update (trunk)
(bzr r7943)
Diffstat (limited to 'share/patterns')
| -rw-r--r-- | share/patterns/Makefile.am | 8 | ||||
| -rw-r--r-- | share/patterns/README | 8 | ||||
| -rwxr-xr-x | share/patterns/i18n.py | 18 |
3 files changed, 32 insertions, 2 deletions
diff --git a/share/patterns/Makefile.am b/share/patterns/Makefile.am index c92123e24..e79e262aa 100644 --- a/share/patterns/Makefile.am +++ b/share/patterns/Makefile.am @@ -2,7 +2,11 @@ patternsdir = $(datadir)/inkscape/patterns patterns_DATA = \ - patterns.svg \ - README + README \ + patterns.svg \ + patterns.svg.h + +patterns.svg.h: patterns.svg i18n.py + $(srcdir)/i18n.py $(srcdir)/patterns.svg > $(srcdir)/patterns.svg.h EXTRA_DIST = $(patterns_DATA) diff --git a/share/patterns/README b/share/patterns/README index b650370e4..7035a58a9 100644 --- a/share/patterns/README +++ b/share/patterns/README @@ -4,3 +4,11 @@ Inkscape, they can be accessed via the pattern fill option on either Fill or Stroke tab of the Fill & Stroke dialog (Ctrl+Shift+F). You can also create a new pattern from selected objects by the Objects to Pattern command. + +Internationalization + +This file is internationalized the same way as share/filters/filters/svg +The i18n.py script called from the makefile will extract strings from +patterns.svg into a patterns.svg.h file. Intltool is then able to extracts +these strings just like from normal .h files. + diff --git a/share/patterns/i18n.py b/share/patterns/i18n.py new file mode 100755 index 000000000..3fe7f2d34 --- /dev/null +++ b/share/patterns/i18n.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +from xml.dom import minidom +import sys + +doc = minidom.parse(sys.argv[1]) + +filters = doc.getElementsByTagName('pattern') + +print "char * stringlst = [" + +for filter in filters: + id = filter.getAttribute('id') + stockid = filter.getAttribute('inkscape:stockid') + + print "N_(\"" + stockid + "\")," + +print "];" |
