From 249b5d20c63a15f91476e8aaede1be5e26e04710 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 18 Sep 2014 21:49:44 +0200 Subject: Convert 'default.svg' to use 'mm'. Update all 'default.xx.svg' files to match 'default.svg' (using new PERL script 'create_defaults.pl'). Remove 'default_mm.svg' (duplicates 'default.svg'). Add 'default_px.svg' (equivalent to old 'default.svg). Add letter size, inch-based 'default.en_US.svg'. Update README. (bzr r13341.1.213) --- share/templates/Makefile.am | 6 ++-- share/templates/README | 6 ++++ share/templates/create_defaults.pl | 64 ++++++++++++++++++++++++++++++++++++++ share/templates/default.be.svg | 3 -- share/templates/default.ca.svg | 9 +++--- share/templates/default.cs.svg | 26 +++++++--------- share/templates/default.de.svg | 7 +++-- share/templates/default.en_US.svg | 37 ++++++++++++++++++++++ share/templates/default.eo.svg | 7 +++-- share/templates/default.es.svg | 7 +++-- share/templates/default.eu.svg | 38 +++++++--------------- share/templates/default.fi.svg | 38 +++++++--------------- share/templates/default.fr.svg | 5 +-- share/templates/default.hu.svg | 5 +-- share/templates/default.it.svg | 7 +++-- share/templates/default.ja.svg | 7 +++-- share/templates/default.lt.svg | 39 ++++++++--------------- share/templates/default.nl.svg | 5 +-- share/templates/default.pl.svg | 19 +++++------ share/templates/default.pt_BR.svg | 7 +++-- share/templates/default.ro.svg | 5 +-- share/templates/default.sk.svg | 7 +++-- share/templates/default.svg | 7 +++-- share/templates/default.zh_TW.svg | 7 +++-- share/templates/default_mm.svg | 38 ---------------------- share/templates/default_px.svg | 37 ++++++++++++++++++++++ 26 files changed, 259 insertions(+), 184 deletions(-) create mode 100755 share/templates/create_defaults.pl create mode 100644 share/templates/default.en_US.svg delete mode 100644 share/templates/default_mm.svg create mode 100644 share/templates/default_px.svg diff --git a/share/templates/Makefile.am b/share/templates/Makefile.am index 41c6a3f84..452c6aa91 100644 --- a/share/templates/Makefile.am +++ b/share/templates/Makefile.am @@ -20,6 +20,7 @@ templates_DATA = \ default.ca.svg \ default.cs.svg \ default.de.svg \ + default.en_US.svg \ default.eo.svg \ default.eu.svg \ default.es.svg \ @@ -33,8 +34,8 @@ templates_DATA = \ default.pl.svg \ default.pt_BR.svg \ default.sk.svg \ - default_mm.svg \ default_pt.svg \ + default_px.svg \ desktop_1024x768.svg \ desktop_1600x1200.svg \ desktop_640x480.svg \ @@ -75,6 +76,7 @@ templates_i18n = \ default.ca.svg \ default.cs.svg \ default.de.svg \ + default.en_US.svg \ default.eo.svg \ default.eu.svg \ default.es.svg \ @@ -88,8 +90,8 @@ templates_i18n = \ default.pl.svg \ default.pt_BR.svg \ default.sk.svg \ - default_mm.svg \ default_pt.svg \ + default_px.svg \ desktop_1024x768.svg \ desktop_1600x1200.svg \ desktop_640x480.svg \ diff --git a/share/templates/README b/share/templates/README index 2959dd6a6..38a0be05c 100644 --- a/share/templates/README +++ b/share/templates/README @@ -16,3 +16,9 @@ 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. + +The internationalized default files (A4 only) are created using the +PERL script "create_defaults.pl" and are based on default.svg. To add +a new language, add it to the database at the beginning of the PERL +script. (You'll also need to edit Makefile.am and the appropriate 'po' +file). diff --git a/share/templates/create_defaults.pl b/share/templates/create_defaults.pl new file mode 100755 index 000000000..451877296 --- /dev/null +++ b/share/templates/create_defaults.pl @@ -0,0 +1,64 @@ +#!/usr/bin/perl + +# Purpose: To create internationalized versions of default.svg. + +# Usage: create_defaults.pl + +use strict; +use warnings; +use utf8; + +my $count = 0; + +# Data base + +my @data = ( + ["be", "Пласт 1", "layer1"], + ["ca", "Capa 1", "capa1"], + ["cs", "Vrstva 1", "layer1"], + ["de", "Ebene 1", "layer1"], + ["eo", "Tavolo 1", "layer1"], + ["es", "Capa 1", "layer1"], + ["eu", "Capa 1", "layer1"], + ["fi", "Taso 1", "layer1"], + ["fr", "Calque 1", "layer1"], + ["hu", "1. réteg", "layer1"], + ["it", "Livello 1", "layer1"], + ["ja", "レイヤー 1", "layer1"], + ["lt", "Sluoksnis 1", "layer1"], + ["nl", "Laag 1", "layer1"], + ["pl", "Warstwa 1", "layer1"], + ["pt_BR", "Camada 1", "layer1"], + ["ro", "Strat 1", "layer1"], + ["sk", "Vrstva 1", "layer1"], + ["zh_TW", "圖層 1", "layer1"] + ); + +foreach my $lang (@data ) { + + ++$count; + + my @values = @{$lang}; + print "$values[0]\n"; + + my $filename = "default." . $values[0] . ".svg"; + open( OUTPUT, '>:encoding(UTF-8)', $filename ) or die "Cannot open $filename.\n"; + + # Open input again to return to top... + open (INPUT, '<:encoding(UTF-8)', "default.svg") or die 'Cannot open input\n'; + + while( my $line = ) { + + if( $line =~ /inkscape:label=/ ) { + $line =~ s/Layer 1/$values[1]/; + } + print OUTPUT $line; + + } + + close( INPUT ); + close( OUTPUT ); +} + + +print "Created $count files.\n"; diff --git a/share/templates/default.be.svg b/share/templates/default.be.svg index 8759775cb..ef272db54 100644 --- a/share/templates/default.be.svg +++ b/share/templates/default.be.svg @@ -17,9 +17,6 @@ pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" - gridtolerance="10000" - guidetolerance="10" - objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.35" diff --git a/share/templates/default.ca.svg b/share/templates/default.ca.svg index f8fb8c4cf..fc9f74d41 100644 --- a/share/templates/default.ca.svg +++ b/share/templates/default.ca.svg @@ -8,8 +8,9 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" - width="744.09448819" - height="1052.3622047"> + width="210mm" + height="297mm" + viewBox="0 0 210 297"> @@ -33,5 +34,5 @@ - + diff --git a/share/templates/default.cs.svg b/share/templates/default.cs.svg index 1f3f80b0e..583d27bb7 100644 --- a/share/templates/default.cs.svg +++ b/share/templates/default.cs.svg @@ -1,17 +1,16 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://web.resource.org/cc/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + width="210mm" + height="297mm" + viewBox="0 0 210 297"> + inkscape:cy="520" + inkscape:document-units="mm" + inkscape:current-layer="layer1" /> - + diff --git a/share/templates/default.de.svg b/share/templates/default.de.svg index 6f0c400a2..c18e303b7 100644 --- a/share/templates/default.de.svg +++ b/share/templates/default.de.svg @@ -9,7 +9,8 @@ xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" width="210mm" - height="297mm"> + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.en_US.svg b/share/templates/default.en_US.svg new file mode 100644 index 000000000..9ebba869d --- /dev/null +++ b/share/templates/default.en_US.svg @@ -0,0 +1,37 @@ + + + + + + + + + image/svg+xml + + + + + + diff --git a/share/templates/default.eo.svg b/share/templates/default.eo.svg index 1b2008d53..3614b4a73 100644 --- a/share/templates/default.eo.svg +++ b/share/templates/default.eo.svg @@ -8,8 +8,9 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" - width="744.09448819" - height="1052.3622047"> + width="210mm" + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.es.svg b/share/templates/default.es.svg index 5b2741a9d..fc9f74d41 100644 --- a/share/templates/default.es.svg +++ b/share/templates/default.es.svg @@ -9,7 +9,8 @@ xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" width="210mm" - height="297mm"> + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.eu.svg b/share/templates/default.eu.svg index 5531c802f..fc9f74d41 100644 --- a/share/templates/default.eu.svg +++ b/share/templates/default.eu.svg @@ -1,23 +1,17 @@ - + viewBox="0 0 210 297"> + - + inkscape:cx="375" + inkscape:cy="520" + inkscape:document-units="mm" + inkscape:current-layer="layer1" /> + @@ -45,8 +34,5 @@ - + diff --git a/share/templates/default.fi.svg b/share/templates/default.fi.svg index 0a7b41c2b..8b8e71330 100644 --- a/share/templates/default.fi.svg +++ b/share/templates/default.fi.svg @@ -1,22 +1,17 @@ - + viewBox="0 0 210 297"> + - + inkscape:cx="375" + inkscape:cy="520" + inkscape:document-units="mm" + inkscape:current-layer="layer1" /> + @@ -44,9 +34,5 @@ - + diff --git a/share/templates/default.fr.svg b/share/templates/default.fr.svg index 2f211f9f7..2622b1d33 100644 --- a/share/templates/default.fr.svg +++ b/share/templates/default.fr.svg @@ -9,7 +9,8 @@ xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" width="210mm" - height="297mm"> + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.hu.svg b/share/templates/default.hu.svg index 41e4cb73c..f091ddee4 100644 --- a/share/templates/default.hu.svg +++ b/share/templates/default.hu.svg @@ -9,7 +9,8 @@ xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" width="210mm" - height="297mm"> + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.it.svg b/share/templates/default.it.svg index df4f3ed95..422e95e1d 100644 --- a/share/templates/default.it.svg +++ b/share/templates/default.it.svg @@ -8,8 +8,9 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" - width="744.09448819" - height="1052.3622047"> + width="210mm" + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.ja.svg b/share/templates/default.ja.svg index bbec862b6..db943edf6 100644 --- a/share/templates/default.ja.svg +++ b/share/templates/default.ja.svg @@ -9,7 +9,8 @@ xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" width="210mm" - height="297mm"> + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.lt.svg b/share/templates/default.lt.svg index 58d9042f5..9f6666eda 100644 --- a/share/templates/default.lt.svg +++ b/share/templates/default.lt.svg @@ -1,22 +1,17 @@ - + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://web.resource.org/cc/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + width="210mm" + height="297mm" + viewBox="0 0 210 297"> + - + inkscape:cy="520" + inkscape:document-units="mm" + inkscape:current-layer="layer1" /> + @@ -44,8 +34,5 @@ - + diff --git a/share/templates/default.nl.svg b/share/templates/default.nl.svg index 448a2a152..da08cc5a8 100644 --- a/share/templates/default.nl.svg +++ b/share/templates/default.nl.svg @@ -9,7 +9,8 @@ xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" width="210mm" - height="297mm"> + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.pl.svg b/share/templates/default.pl.svg index a368bef1b..6a1161799 100644 --- a/share/templates/default.pl.svg +++ b/share/templates/default.pl.svg @@ -1,15 +1,16 @@ + viewBox="0 0 210 297"> @@ -33,5 +34,5 @@ - + diff --git a/share/templates/default.pt_BR.svg b/share/templates/default.pt_BR.svg index 771f8be22..e1c26c7fb 100644 --- a/share/templates/default.pt_BR.svg +++ b/share/templates/default.pt_BR.svg @@ -9,7 +9,8 @@ xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" width="210mm" - height="297mm"> + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.ro.svg b/share/templates/default.ro.svg index 8c985e2a7..906db67b4 100644 --- a/share/templates/default.ro.svg +++ b/share/templates/default.ro.svg @@ -9,7 +9,8 @@ xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" width="210mm" - height="297mm"> + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.sk.svg b/share/templates/default.sk.svg index 2f2fac9c8..583d27bb7 100644 --- a/share/templates/default.sk.svg +++ b/share/templates/default.sk.svg @@ -8,8 +8,9 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" - width="744.09448819" - height="1052.3622047"> + width="210mm" + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.svg b/share/templates/default.svg index a6a610fdb..f5da5fdfd 100644 --- a/share/templates/default.svg +++ b/share/templates/default.svg @@ -8,8 +8,9 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" - width="744.09448819" - height="1052.3622047"> + width="210mm" + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default.zh_TW.svg b/share/templates/default.zh_TW.svg index ca203048c..6dcee2ef9 100644 --- a/share/templates/default.zh_TW.svg +++ b/share/templates/default.zh_TW.svg @@ -8,8 +8,9 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" - width="744.09448819" - height="1052.3622047"> + width="210mm" + height="297mm" + viewBox="0 0 210 297"> diff --git a/share/templates/default_mm.svg b/share/templates/default_mm.svg deleted file mode 100644 index f5da5fdfd..000000000 --- a/share/templates/default_mm.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - diff --git a/share/templates/default_px.svg b/share/templates/default_px.svg new file mode 100644 index 000000000..eb1cad0ca --- /dev/null +++ b/share/templates/default_px.svg @@ -0,0 +1,37 @@ + + + + + + + + + image/svg+xml + + + + + + -- cgit v1.2.3