diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2014-01-15 21:08:27 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2014-01-15 21:08:27 +0000 |
| commit | d1a182e5e94e5967d1ef19519e25e41ed81f3e9e (patch) | |
| tree | cb060e45ed582300b62d1953b3a8a8028c1934d0 /share/templates | |
| parent | for rubberband outline, add shading instead of XOR (Bug 1266308) (diff) | |
| download | inkscape-d1a182e5e94e5967d1ef19519e25e41ed81f3e9e.tar.gz inkscape-d1a182e5e94e5967d1ef19519e25e41ed81f3e9e.zip | |
i18n. New from Template entries now translatable (see Bug #383844). POT file and French translation updated.
Fixed bugs:
- https://launchpad.net/bugs/383844
(bzr r12937)
Diffstat (limited to 'share/templates')
| -rw-r--r-- | share/templates/Makefile.am | 65 | ||||
| -rw-r--r-- | share/templates/README | 6 | ||||
| -rwxr-xr-x | share/templates/i18n.py | 20 |
3 files changed, 88 insertions, 3 deletions
diff --git a/share/templates/Makefile.am b/share/templates/Makefile.am index 02acbfcf5..41c6a3f84 100644 --- a/share/templates/Makefile.am +++ b/share/templates/Makefile.am @@ -10,7 +10,7 @@ templates_DATA = \ business_card_85x54mm.svg \ business_card_90x50mm.svg \ CD_cover_300dpi.svg \ - CD_label_120x120.svg \ + CD_label_120x120.svg \ DVD_cover_regular_300dpi.svg \ DVD_cover_slim_300dpi.svg \ DVD_cover_superslim_300dpi.svg \ @@ -30,7 +30,62 @@ templates_DATA = \ default.ja.svg \ default.lt.svg \ default.nl.svg \ - default.pl.svg \ + default.pl.svg \ + default.pt_BR.svg \ + default.sk.svg \ + default_mm.svg \ + default_pt.svg \ + desktop_1024x768.svg \ + desktop_1600x1200.svg \ + desktop_640x480.svg \ + desktop_800x600.svg \ + fontforge_glyph.svg \ + icon_16x16.svg \ + icon_32x32.svg \ + icon_48x48.svg \ + icon_64x64.svg \ + Letter_landscape.svg \ + Letter.svg \ + no_borders.svg \ + no_layers.svg \ + video_HDTV_1920x1080.svg \ + video_NTSC_720x486.svg \ + video_PAL_720x576.svg \ + web_banner_468x60.svg \ + web_banner_728x90.svg \ + LaTeX_Beamer.svg \ + Typography_Canvas.svg \ + templates.h + +templates_i18n = \ + A4_landscape.svg \ + A4.svg \ + black_opaque.svg \ + white_opaque.svg \ + business_card_85x54mm.svg \ + business_card_90x50mm.svg \ + CD_cover_300dpi.svg \ + CD_label_120x120.svg \ + DVD_cover_regular_300dpi.svg \ + DVD_cover_slim_300dpi.svg \ + DVD_cover_superslim_300dpi.svg \ + DVD_cover_ultraslim_300dpi.svg \ + default.svg \ + default.be.svg \ + default.ca.svg \ + default.cs.svg \ + default.de.svg \ + default.eo.svg \ + default.eu.svg \ + default.es.svg \ + default.fi.svg \ + default.fr.svg \ + default.hu.svg \ + default.it.svg \ + default.ja.svg \ + default.lt.svg \ + default.nl.svg \ + default.pl.svg \ default.pt_BR.svg \ default.sk.svg \ default_mm.svg \ @@ -56,5 +111,9 @@ templates_DATA = \ LaTeX_Beamer.svg \ Typography_Canvas.svg +templates.h: i18n.py $(templates_i18n) + $(srcdir)/i18n.py $(foreach i,$(templates_i18n),$(srcdir)/$(i)) > $(srcdir)/templates.h -EXTRA_DIST = $(templates_DATA) +EXTRA_DIST = $(templates_DATA) \ + i18n.py + diff --git a/share/templates/README b/share/templates/README index c611da431..2959dd6a6 100644 --- a/share/templates/README +++ b/share/templates/README @@ -10,3 +10,9 @@ different languages. The default.svg itself is in English. These translations co a translated name of the default layer and possibly different canvas size. Each language version of Inkscape will only use one of these templates and ignore the rest. +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 the *.svg +into a *.svg.h file. Intltool is then able to extracts these strings just like +from normal .h files. diff --git a/share/templates/i18n.py b/share/templates/i18n.py new file mode 100755 index 000000000..6180d2546 --- /dev/null +++ b/share/templates/i18n.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +from xml.dom import minidom +import sys + +elements = ["inkscape:_name", "inkscape:_shortdesc", "inkscape:_keywords"] + +sys.stdout.write("char * stringlst = [") + +for filename in sys.argv[1:]: + doc = minidom.parse(filename) + templates = doc.getElementsByTagName('inkscape:_templateinfo') + + if templates: + for element in elements: + lines = templates[0].getElementsByTagName(element) + if lines: + sys.stdout.write("N_(\"" + lines[0].firstChild.nodeValue + "\"),") + +sys.stdout.write("];") |
