]> git.donarmstrong.com Git - lilypond.git/commitdiff
translations-status.py: Better @multitable fixup. Somewhat readable PDF and info.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 13 Apr 2010 10:15:40 +0000 (12:15 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 13 Apr 2010 10:18:35 +0000 (12:18 +0200)
The html-only output is still a lot nicer, however.  Add a warning, consider
using HTML-only for now!

Documentation/de/translations.itexi
Documentation/es/translations.itexi
Documentation/fr/translations.itexi
Documentation/hu/translations.itexi
Documentation/it/translations.itexi
Documentation/ja/translations.itexi
Documentation/nl/translations.itexi
Documentation/translations.itexi
scripts/auxiliar/translations-status.py

index 6d40e16c400e2056c05124a4e99d3dcfa61b2af8..c0ba6ff0d1c2d5a3ddaafcaf74d9473d2b673223 100644 (file)
@@ -16,9 +16,9 @@ td { border: 1px solid black; text-align: center; }
 
 @end html
 @end ifhtml
-@emph{Last updated Tue Apr 13 08:17:20 UTC 2010
+@emph{Last updated Tue Apr 13 10:11:41 UTC 2010
 }
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 Aufsatz über den automatischen Musiksatz
@@ -138,7 +138,7 @@ teilweise
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 Extending LilyPond
@@ -258,7 +258,7 @@ teilweise
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond Handbuch zum Lernen
@@ -463,7 +463,7 @@ ja
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 GNU LilyPond Benutzerhandbuch
@@ -1181,7 +1181,7 @@ teilweise
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 GNU LilyPond Programmbenutzung
@@ -1330,7 +1330,7 @@ ja
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond -- Notation für Jedermann
index 03b563cfa64fa17cd83777311df8e8fc0da3c070..a4c8680890682d354921029d5f5a64ffdcf1c238 100644 (file)
@@ -16,9 +16,9 @@ td { border: 1px solid black; text-align: center; }
 
 @end html
 @end ifhtml
-@emph{Last updated Tue Apr 13 08:17:20 UTC 2010
+@emph{Last updated Tue Apr 13 10:11:41 UTC 2010
 }
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 Registro de cambios de LilyPond
@@ -57,7 +57,7 @@ parcialmente
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 Ensayo sobre grabado musical automatizado
@@ -70,7 +70,7 @@ Ensayo sobre grabado musical automatizado
 Títulos de sección
 @*
 93
-@tab 
+@tab Team-es
 @tab 
 @tab 
 @ifhtml
@@ -97,7 +97,7 @@ sí
 LilyPond --- \TITLE\
 @*
 1107
-@tab 
+@tab Team-es
 @tab 
 @tab 
 @ifhtml
@@ -124,7 +124,7 @@ sí
 1 Grabado musical
 @*
 5297
-@tab 
+@tab Team-es
 @tab 
 @tab 
 @ifhtml
@@ -151,7 +151,7 @@ parcialmente
 2 Lista de referencias bibliográficas
 @*
 319
-@tab 
+@tab Team-es
 @tab 
 @tab 
 @ifhtml
@@ -177,7 +177,7 @@ sí
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 Extending LilyPond
@@ -190,7 +190,7 @@ Extending LilyPond
 Títulos de sección
 @*
 107
-@tab 
+@tab Team-es
 @tab 
 @tab 
 @ifhtml
@@ -217,7 +217,7 @@ sí
 LilyPond --- \TITLE\
 @*
 1107
-@tab 
+@tab Team-es
 @tab 
 @tab 
 @ifhtml
@@ -244,7 +244,7 @@ sí
 A Tutorial de Scheme
 @*
 4934
-@tab 
+@tab Team-es
 @tab 
 @tab 
 @ifhtml
@@ -271,7 +271,7 @@ parcialmente
 1 Interfaces para programadores
 @*
 3815
-@tab 
+@tab Team-es
 @tab 
 @tab 
 @ifhtml
@@ -297,7 +297,7 @@ sí
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 Manual de aprendizaje de GNU LilyPond
@@ -498,7 +498,7 @@ sí
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 Referencia de la notación de GNU LilyPond
@@ -1239,7 +1239,7 @@ sí
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond: manual de utilización del programa
@@ -1440,7 +1440,7 @@ sí
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond: notación musical para todos
index ee788ae47c92c8986765c7773b2b0afc07af1c36..7cafe6fc1e406a54f873952a46064542974389a0 100644 (file)
@@ -16,9 +16,9 @@ td { border: 1px solid black; text-align: center; }
 
 @end html
 @end ifhtml
-@emph{Last updated Tue Apr 13 08:17:19 UTC 2010
+@emph{Last updated Tue Apr 13 10:11:41 UTC 2010
 }
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 Essai sur la gravure musicale automatisée
@@ -144,7 +144,7 @@ oui
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 GNU LilyPond -- Manuel d'initiation
@@ -373,7 +373,7 @@ partiellement
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 GNU LilyPond -- Manuel de notation
@@ -1151,7 +1151,7 @@ partiellement
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 GNU LilyPond -- Utilisation des programmes
@@ -1279,7 +1279,7 @@ partiellement
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond -- la notation musicale pour tous
index c107b95afb69cbbffc90f9d6681d5e8e42762753..927f59cdda46593bce85f50eb6d9656f31b9f58c 100644 (file)
@@ -16,9 +16,9 @@ td { border: 1px solid black; text-align: center; }
 
 @end html
 @end ifhtml
-@emph{Last updated Tue Apr 13 08:17:20 UTC 2010
+@emph{Last updated Tue Apr 13 10:11:41 UTC 2010
 }
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond Tankönyv
@@ -219,7 +219,7 @@ partially
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond Használati útmutató
@@ -232,7 +232,7 @@ LilyPond Használati útmutató
 Section titles
 @*
 135
-@tab 
+@tab Team-hu
 @tab 
 @tab 
 @ifhtml
@@ -259,7 +259,7 @@ partially
 LilyPond --- \TITLE\
 @*
 1107
-@tab 
+@tab Team-hu
 @tab 
 @tab 
 @ifhtml
@@ -286,7 +286,7 @@ partially
 1 A @command{lilypond} használata
 @*
 2902
-@tab 
+@tab Team-hu
 @tab 
 @tab 
 @ifhtml
@@ -313,7 +313,7 @@ yes
 2 A @command{convert-ly} használata
 @*
 1189
-@tab 
+@tab Team-hu
 @tab 
 @tab 
 @ifhtml
@@ -339,7 +339,7 @@ yes
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond -- kottaszedés mindenkinek
index fd351d1b836714f3758a05dc37bafe72267eb899..71541463c7d896e8e5df22747ef168f3becd788d 100644 (file)
@@ -16,9 +16,9 @@ td { border: 1px solid black; text-align: center; }
 
 @end html
 @end ifhtml
-@emph{Last updated Tue Apr 13 08:17:20 UTC 2010
+@emph{Last updated Tue Apr 13 10:11:41 UTC 2010
 }
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 Manuale di apprendimento di LilyPond
index 18e87031b5b3ac64ba5c5bac785f8de554fae0a8..eded04be9e9a8051ade62092a7425850a1925107 100644 (file)
@@ -16,9 +16,9 @@ td { border: 1px solid black; text-align: center; }
 
 @end html
 @end ifhtml
-@emph{Last updated Tue Apr 13 08:17:20 UTC 2010
+@emph{Last updated Tue Apr 13 10:11:41 UTC 2010
 }
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 GNU LilyPond -- 学習マニュアル
@@ -219,7 +219,7 @@ partially
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 GNU LilyPond -- アプリケーション使用方法
@@ -393,7 +393,7 @@ partially
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond -- みんなの楽譜作成
index 22dc17d61b25364775d3b3b3db9c9c8cfdfbee92..fe330d151f2a93c7f2183b7a58eaa8f26248d230 100644 (file)
@@ -16,9 +16,9 @@ td { border: 1px solid black; text-align: center; }
 
 @end html
 @end ifhtml
-@emph{Last updated Tue Apr 13 08:17:20 UTC 2010
+@emph{Last updated Tue Apr 13 10:11:41 UTC 2010
 }
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond beginnershandleiding
@@ -165,7 +165,7 @@ ja
 @end multitable
 
 
-@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond -- Muzieknotatie voor iedereen
index 2b22b660a5ededb799e2e05d45f496caea1a3400..4a0b0b930252800a6ef5124fa2f7072fc4928baa 100644 (file)
@@ -16,9 +16,9 @@ td { border: 1px solid black; text-align: center; }
 
 @end html
 @end ifhtml
-@emph{Last updated Tue Apr 13 08:17:19 UTC 2010
+@emph{Last updated Tue Apr 13 10:11:41 UTC 2010
 }
-@multitable 
+@multitable @columnfractions  0.5 0.5
 
 @headitem
 LilyPond Changes
@@ -53,7 +53,7 @@ partially up to date
 @end multitable
 
 
-@multitable
+@multitable @columnfractions  0.25 0.25 0.25 0.25
 
 @headitem
 Essay on automated music engraving
@@ -87,7 +87,7 @@ translated
 @ifnothtml
 partially up to date
 @end ifnothtml
-@tab 
+@tab Team-es
 @*
 
 @ifhtml
@@ -180,7 +180,7 @@ translated
 @ifnothtml
 up to date
 @end ifnothtml
-@tab 
+@tab Team-es
 @*
 
 @ifhtml
@@ -273,7 +273,7 @@ translated
 @ifnothtml
 partially up to date
 @end ifnothtml
-@tab 
+@tab Team-es
 @*
 
 @ifhtml
@@ -370,7 +370,7 @@ translated
 @ifnothtml
 partially up to date
 @end ifnothtml
-@tab 
+@tab Team-es
 @*
 
 @ifhtml
@@ -465,7 +465,7 @@ not translated
 @ifnothtml
 up to date
 @end ifnothtml
-@tab 
+@tab Team-es
 @*
 
 @ifhtml
@@ -534,7 +534,7 @@ up to date
 @end multitable
 
 
-@multitable 
+@multitable @columnfractions  0.333333333333 0.333333333333 0.333333333333
 
 @headitem
 Extending LilyPond
@@ -567,7 +567,7 @@ translated
 @ifnothtml
 partially up to date
 @end ifnothtml
-@tab 
+@tab Team-es
 @*
 
 @ifhtml
@@ -617,7 +617,7 @@ translated
 @ifnothtml
 up to date
 @end ifnothtml
-@tab 
+@tab Team-es
 @*
 
 @ifhtml
@@ -667,7 +667,7 @@ partially translated (4 %)
 @ifnothtml
 partially up to date
 @end ifnothtml
-@tab 
+@tab Team-es
 @*
 
 @ifhtml
@@ -717,7 +717,7 @@ translated
 @ifnothtml
 partially up to date
 @end ifnothtml
-@tab 
+@tab Team-es
 @*
 
 @ifhtml
@@ -767,7 +767,7 @@ not translated
 @ifnothtml
 up to date
 @end ifnothtml
-@tab 
+@tab Team-es
 @*
 
 @ifhtml
@@ -793,7 +793,7 @@ up to date
 @end multitable
 
 
-@multitable 
+@multitable @columnfractions  0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
 
 @headitem
 LilyPond Learning Manual
@@ -2626,7 +2626,7 @@ up to date
 @end multitable
 
 
-@multitable 
+@multitable @columnfractions  0.25 0.25 0.25 0.25
 
 @headitem
 LilyPond Notation Reference
@@ -5191,7 +5191,7 @@ up to date
 @end multitable
 
 
-@multitable 
+@multitable @columnfractions  0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667 0.166666666667
 
 @headitem
 LilyPond Application Usage
@@ -5275,7 +5275,7 @@ translated
 @ifnothtml
 partially up to date
 @end ifnothtml
-@tab 
+@tab Team-hu
 @*
 
 @ifhtml
@@ -5396,7 +5396,7 @@ translated
 @ifnothtml
 up to date
 @end ifnothtml
-@tab 
+@tab Team-hu
 @*
 
 @ifhtml
@@ -5519,7 +5519,7 @@ not translated
 @ifnothtml
 partially up to date
 @end ifnothtml
-@tab 
+@tab Team-hu
 @*
 
 @ifhtml
@@ -5640,7 +5640,7 @@ not translated
 @ifnothtml
 up to date
 @end ifnothtml
-@tab 
+@tab Team-hu
 @*
 
 @ifhtml
@@ -5781,7 +5781,7 @@ not translated
 @ifnothtml
 partially up to date
 @end ifnothtml
-@tab 
+@tab Team-hu
 @*
 
 @ifhtml
@@ -5902,7 +5902,7 @@ not translated
 @ifnothtml
 up to date
 @end ifnothtml
-@tab 
+@tab Team-hu
 @*
 
 @ifhtml
@@ -6023,7 +6023,7 @@ not translated
 @ifnothtml
 up to date
 @end ifnothtml
-@tab 
+@tab Team-hu
 @*
 
 @ifhtml
@@ -6144,7 +6144,7 @@ not translated
 @ifnothtml
 up to date
 @end ifnothtml
-@tab 
+@tab Team-hu
 @*
 
 @ifhtml
@@ -6193,7 +6193,7 @@ up to date
 @end multitable
 
 
-@multitable 
+@multitable @columnfractions  0.142857142857 0.142857142857 0.142857142857 0.142857142857 0.142857142857 0.142857142857 0.142857142857
 
 @headitem
 LilyPond -- Music notation for everyone
index 7337a4f43c137eff07d2588f9353913c28555ef2..221746360be79e305bf270fa13584f9fd1f6bf24 100755 (executable)
@@ -12,12 +12,16 @@ USAGE: cd Documentation && translations-status.py
     contributor/doc-translation-list.itexi
 
 TODO:
-   * decide if we really want this in printed output:
-     - the PDF output of TexiMarkup () is useless
-     - the INFO output of TexiMarkup() is useless
-     - using markup = HTMLMarkup (), we get nice <td title="FILENAME">
-       popups -- do we want that with texi output? -- how?
-       or possibly links to the git archive?
+   * using markup = TexiMarkup (), html tables (columns)
+     are evenly spaced and bit too wide.  This can
+     be fixed by using
+        @multitable @columnfractions 0 0 0 0 0 0 0 0,
+     but with that, PDF and info output get borked.
+   * in info and PDF, columns have too little separation
+   * using markup = HTMLMarkup (), we get nice
+        <td title="FILENAME">
+     popups -- do we want that with texi output? -- how?
+     or possibly links to the git archive?
 
 '''
 
@@ -203,7 +207,7 @@ class HTMLMarkup (object):
 Translation status currently only available in HTML.
 @end ifnothtml
 '''
-                + self.html (string)
+                + string
                 + self.texi_footer)
     def entity (self, name, string='', attributes=[]):
         attr_list = ''.join ([' %s="%s"' % x for x in attributes])
@@ -237,12 +241,22 @@ th { border: 1px solid black; text-align: center; }
 td { border: 1px solid black; text-align: center; }
 !--></style>
 ''')
-                + (string
-                   .replace ('''item \n@tab ''', '''item
-''')
-                   .replace ('@multitable',
-                             '@multitable @columnfractions' + ' 0' * 10))
+                + self.columnfraction_disaster (self.itemtab_disaster (string))
                 + self.texi_footer)
+    def itemtab_disaster (self, string):
+        return string.replace ('''item \n@tab ''', '''item
+''')
+    def columnfraction_disaster (self, string):
+        if False:
+            # nice trick for html-only
+            return string.replace ('@multitable', '@multitable @columnfractions 0 0 0 0 0 0 0 0 0 0')
+        tables = re.findall ('(?s)(@multitable)(.*?)(@item)', string)
+        for t in tables:
+            columns = len (re.findall ('(?s)(\n@tab)', t[1])) + 1
+            columnfractions = '@columnfractions ' + (' ' + str (1.0/columns)) * columns
+            string = string.replace ('@multitable\n',
+                                     '@multitable %(columnfractions)s\n' % locals (), 1)
+        return string
     def entity (self, name, string='', attributes=[]):
         return '''
 @%(name)s
@@ -357,8 +371,8 @@ class TranslatedTelyDocument (TelyDocument):
             and (not self.translators or not self.translators[0])
             and not 'macros.itexi' in self.filename):
             error (self.filename + ''': error: no translator name found
-please specify one ore more lines in the master file
-@c Translator: FirstName LastName[, FirstName LastName]..''')
+    please specify one ore more lines in the master file
+    @c Translator: FirstName LastName[, FirstName LastName]..''')
         self.checkers = []
         m = checkers_re.findall (self.contents)
         if m:
@@ -696,7 +710,11 @@ date_time = buildlib.read_pipe ('LANG= date -u')[0]
 # TEXI output sort of works
 # TODO: table border, td-titles :-)
 # markup = HTMLMarkup ()
+#sys.stderr.write ('''translations-status.py:713: warning: using markup = HTMLMarkup (): HTML only\n''')
 markup = TexiMarkup ()
+sys.stderr.write ('''translations-status.py:717: warning: using markup = TexiMarkup (): ugly HTML
+    output, questionable PDF and info output.
+    Consider using HTML-only markup = HTMLMarkup ()\n''')
 
 main_status_body = markup.paragraph (markup.emph (last_updated_string % date_time))
 main_status_body += '\n'.join ([doc.texi_status (markup) for doc in master_docs])