From: John Mandereau Date: Sun, 16 Mar 2008 16:03:55 +0000 (+0100) Subject: Update translations status and translations-status.py X-Git-Tag: release/2.11.43-1~38 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e80a3d7fa7d74a57f2a4003b0cc8ce3aab9b5b30;p=lilypond.git Update translations status and translations-status.py - don't show uptodateness percentages in HTML output - generate text output in out/ with uptodateness percentages - run 'make translation-status' in Documentation. translations-status.py complains about a lot of unknown committishes, ceratinly because I've pruned my Git repository :-( --- diff --git a/Documentation/translations.html.in b/Documentation/translations.html.in index f85c4e553c..f514d31f92 100644 --- a/Documentation/translations.html.in +++ b/Documentation/translations.html.in @@ -1,6 +1,6 @@ +translations.template.html.in; DO NOT EDIT !--> is finished.

-

Last updated Tue Feb 26 15:43:29 UTC 2008 +

Last updated Sun Mar 16 15:46:21 UTC 2008

@@ -47,19 +47,19 @@ translations.template.html; DO NOT EDIT !--> - + @@ -85,15 +85,15 @@ translations.template.html; DO NOT EDIT !--> Jean-Charles Malahieude
Jean-Yves Baudais

translated
- partially up-to-date (96 %)
+ partially up to date
@@ -105,11 +105,11 @@ translations.template.html; DO NOT EDIT !--> Valentin Villenave
John Mandereau
translated
- partially up-to-date (23 %)
+ partially up to date
- - + @@ -155,11 +155,11 @@ translations.template.html; DO NOT EDIT !--> John Mandereau
Jean-Charles Malahieude
partially translated (79 %)
- partially up-to-date (86 %)
+ partially up to date
- + - - -
es
Section titles
(406)
Section titles
(396)
John Mandereau
Jean-Charles Malahieude
translated
- up to date
+ partially up to date
Till Rettig
translated
- up to date
+ partially up to date
Francisco Vila
translated
- partially up-to-date (93 %)
+ partially up to date
Till Rettig
translated
- partially up-to-date (96 %)
+ partially up to date
Francisco Vila
translated
-
+ up to date
Till Rettig
translated
- partially up-to-date (95 %)
+ partially up to date
Francisco Vila
translated
@@ -122,28 +122,28 @@ translations.template.html; DO NOT EDIT !--> Jean-Charles Malahieude
John Mandereau

partially translated (39 %)
- partially up-to-date (80 %)
+ partially up to date
not translated
not translated
+
partially translated (27 %)
4 Tweaking output
(11862)
4 Tweaking output
(12134)
Valentin Villenave
Nicolas Klutchnikoff
Jean-Charles Malahieude
John Mandereau

- partially translated (16 %)
- partially up-to-date (9 %)
+ partially translated (18 %)
+ partially up to date
Till Rettig
- partially translated (16 %)
- partially up-to-date (9 %)
+ partially translated (18 %)
+ partially up to date
Francisco Vila
- partially translated (16 %)
+ partially translated (18 %)

Till Rettig
partially translated (79 %)
- partially up-to-date (86 %)
+ partially up to date
Francisco Vila
partially translated (79 %)
@@ -167,12 +167,12 @@ translations.template.html; DO NOT EDIT !-->
A Templates
(297)
A Templates
(483)
not translated
Till Rettig
translated
- partially up-to-date (24 %)
+ partially up to date
Francisco Vila
translated
@@ -185,88 +185,7 @@ translations.template.html; DO NOT EDIT !-->
Till Rettig
partially translated (91 %)
- partially up-to-date (85 %)
-
not translated
-
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -281,19 +200,19 @@ translations.template.html; DO NOT EDIT !--> - + @@ -305,11 +224,11 @@ translations.template.html; DO NOT EDIT !--> @@ -318,66 +237,66 @@ translations.template.html; DO NOT EDIT !--> Valentin Villenave
Jean-Charles Malahieude

translated
- partially up-to-date (13 %)
+
- + - + - + @@ -387,11 +306,11 @@ translations.template.html; DO NOT EDIT !--> Jean-Charles Malahieude
John Mandereau

translated
- partially up-to-date (39 %)
+
- + - + - + @@ -454,11 +373,11 @@ translations.template.html; DO NOT EDIT !--> @@ -466,7 +385,7 @@ translations.template.html; DO NOT EDIT !--> @@ -481,11 +400,11 @@ translations.template.html; DO NOT EDIT !--> Jean-Charles Malahieude
John Mandereau

partially translated (56 %)
- partially up-to-date (87 %)
+
@@ -566,15 +485,15 @@ translations.template.html; DO NOT EDIT !--> Jean-Charles Malahieude
John Mandereau

translated
- partially up-to-date (80 %)
+
@@ -583,11 +502,11 @@ translations.template.html; DO NOT EDIT !--> Jean-Charles Malahieude
John Mandereau

partially translated (88 %)
- partially up-to-date (94 %)
+
- + @@ -615,7 +534,7 @@ translations.template.html; DO NOT EDIT !--> @@ -633,7 +552,7 @@ translations.template.html; DO NOT EDIT !--> @@ -669,11 +588,11 @@ translations.template.html; DO NOT EDIT !-->
GNU LilyPond --- program usage frdees
Section titles
(384)
John Mandereau
- Jean-Charles Malahieude
- translated
- up to date
-
Till Rettig
- translated
- up to date
-
Francisco Vila
- translated
- partially up-to-date (93 %)
-
1 Install
(1477)
John Mandereau
- Jean-Charles Malahieude
- partially translated (11 %)
- partially up-to-date (96 %)
-
not translated
-
Francisco Vila
- partially translated (11 %)
- partially up-to-date (88 %)
-
2 Setup
(947)
not translated
-
Till Rettig
- translated
- partially up-to-date (96 %)
-
Francisco Vila
- translated
-
-
3 Running LilyPond
(2860)
not translated
-
not translated
-
not translated
-
4 @command{lilypond-book}: Integrating text and music
(2840)
not translated
-
not translated
-
not translated
-
5 Converting from other formats
(975)
Jean-Charles Malahieude
- translated
- up to date
-
not translated
+ partially up to date
not translated
es
Section titles
(549)
Section titles
(539)
John Mandereau
Jean-Charles Malahieude
translated
- partially up-to-date (86 %)
+ partially up to date
Till Rettig
translated
- partially up-to-date (86 %)
+ up to date
Francisco Vila
translated
- partially up-to-date (96 %)
+ partially up to date
Till Rettig
translated
- partially up-to-date (79 %)
+
Francisco Vila
translated
- partially up-to-date (79 %)
+
Till Rettig
translated
- partially up-to-date (13 %)
+
Francisco Vila
translated
- up to date
+ partially up to date
1.2 Rhythms
(7056)
1.2 Rhythms
(7279)
Frédéric Chiasson
Valentin Villenave
Jean-Charles Malahieude

translated
- partially up-to-date (29 %)
+
Till Rettig
partially translated (82 %)
- partially up-to-date (29 %)
+
Francisco Vila
partially translated (87 %)
- up to date
+ partially up to date
1.3 Expressive marks
(1602)
1.3 Expressive marks
(1681)
Valentin Villenave
Jean-Charles Malahieude
John Mandereau

translated
- partially up-to-date (29 %)
+
Till Rettig
translated
- partially up-to-date (29 %)
+
Francisco Vila
translated
- partially up-to-date (83 %)
+ partially up to date
1.4 Repeats
(717)
1.4 Repeats
(738)
Valentin Villenave
Jean-Charles Malahieude
John Mandereau

translated
- partially up-to-date (39 %)
+
Till Rettig
translated
- partially up-to-date (39 %)
+
Francisco Vila
translated
- up to date
+ partially up to date
Till Rettig
partially translated (58 %)
- partially up-to-date (39 %)
+
Francisco Vila
partially translated (58 %)
@@ -399,16 +318,16 @@ translations.template.html; DO NOT EDIT !-->
1.6 Staff notation
(1637)
1.6 Staff notation
(1861)
Valentin Villenave
Jean-Charles Malahieude
John Mandereau
translated
- partially up-to-date (41 %)
+
Till Rettig
- partially translated (49 %)
- partially up-to-date (41 %)
+ partially translated (32 %)
+
Francisco Vila
translated
@@ -416,33 +335,33 @@ translations.template.html; DO NOT EDIT !-->
1.7 Editorial annotations
(866)
1.7 Editorial annotations
(879)
Jean-Charles Malahieude
translated
- partially up-to-date (9 %)
+
Till Rettig
- partially translated (38 %)
- partially up-to-date (9 %)
+ partially translated (41 %)
+
Francisco Vila
- partially translated (95 %)
- up to date
+ translated
+ partially up to date
1.8 Text
(2329)
1.8 Text
(2361)
Jean-Charles Malahieude
Valentin Villenave
John Mandereau

translated
- partially up-to-date (39 %)
+
not translated
Francisco Vila
translated
- up to date
+ partially up to date
Till Rettig
translated
- partially up-to-date (68 %)
+
Francisco Vila
translated
- partially up-to-date (68 %)
+
Valentin Villenave
Jean-Charles Malahieude
partially translated (89 %)
- partially up-to-date (89 %)
+
not translated
Till Rettig
partially translated (56 %)
- partially up-to-date (87 %)
+
Francisco Vila
partially translated (56 %)
@@ -498,11 +417,11 @@ translations.template.html; DO NOT EDIT !--> Jean-Charles Malahieude
John Mandereau

translated
- partially up-to-date (89 %)
+
Till Rettig
translated
- partially up-to-date (89 %)
+
Francisco Vila
translated
@@ -515,11 +434,11 @@ translations.template.html; DO NOT EDIT !--> Jean-Charles Malahieude
John Mandereau

translated
- partially up-to-date (92 %)
+
Till Rettig
translated
- partially up-to-date (92 %)
+
Francisco Vila
translated
@@ -532,11 +451,11 @@ translations.template.html; DO NOT EDIT !--> Jean-Charles Malahieude
John Mandereau

translated
- partially up-to-date (91 %)
+
Till Rettig
translated
- partially up-to-date (91 %)
+
Francisco Vila
translated
@@ -549,15 +468,15 @@ translations.template.html; DO NOT EDIT !--> Jean-Charles Malahieude
John Mandereau

translated
- partially up-to-date (61 %)
+
Till Rettig
translated
- partially up-to-date (61 %)
+
Francisco Vila
translated
- partially up-to-date (61 %)
+ up to date
Till Rettig
partially translated (94 %)
- partially up-to-date (80 %)
+
Francisco Vila
translated
- partially up-to-date (80 %)
+ up to date
Till Rettig
partially translated (88 %)
- partially up-to-date (94 %)
+
Francisco Vila
partially translated (88 %)
@@ -595,10 +514,10 @@ translations.template.html; DO NOT EDIT !-->
3 Input syntax
(2448)
3 Input syntax
(2458)
Jean-Charles Malahieude
partially translated (7 %)
- partially up-to-date (99 %)
+ partially up to date
not translated
not translated
Francisco Vila
- partially translated (3 %)
+ translated
up to date
Valentin Villenave
Gilles Thibault
translated
- partially up-to-date (77 %)
+ partially up to date
not translated
Frédéric Chiasson
Jean-Charles Malahieude
partially translated (13 %)
- partially up-to-date (93 %)
+
Till Rettig
partially translated (84 %)
- partially up-to-date (90 %)
+ partially up to date
Francisco Vila
partially translated (97 %)
@@ -698,5 +617,86 @@ translations.template.html; DO NOT EDIT !-->

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GNU LilyPond --- program usage frdees
Section titles
(374)
John Mandereau
+ Jean-Charles Malahieude
+ translated
+ partially up to date
+
Till Rettig
+ translated
+ partially up to date
+
Francisco Vila
+ translated
+ partially up to date
+
1 Install
(1477)
John Mandereau
+ Jean-Charles Malahieude
+ partially translated (11 %)
+ partially up to date
+
not translated
+
Francisco Vila
+ partially translated (11 %)
+ partially up to date
+
2 Setup
(947)
not translated
+
Till Rettig
+ translated
+ partially up to date
+
Francisco Vila
+ translated
+
+
3 Running LilyPond
(2860)
not translated
+
not translated
+
not translated
+
4 @command{lilypond-book}: Integrating text and music
(2917)
not translated
+
not translated
+
not translated
+
5 Converting from other formats
(975)
Jean-Charles Malahieude
+ translated
+ up to date
+
not translated
+
not translated
+
+

+ diff --git a/buildscripts/translations-status.py b/buildscripts/translations-status.py index 0242e973a5..2335d5d5e1 100644 --- a/buildscripts/translations-status.py +++ b/buildscripts/translations-status.py @@ -69,13 +69,17 @@ skeleton_str = '-- SKELETON FILE --' diff_cmd = 'git diff --no-color %(committish)s HEAD -- %(original)s | cat' format_table = { - 'not translated': {'color':'d0f0f8', 'short':_doc ('no'), 'long':_doc ('not translated')}, + 'not translated': {'color':'d0f0f8', 'short':_doc ('no'), 'abbr':'NT', + 'long':_doc ('not translated')}, 'partially translated': {'color':'dfef77', 'short':_doc ('partially (%(p)d %%)'), - 'long':_doc ('partially translated (%(p)d %%)')}, - 'fully translated': {'color':'1fff1f', 'short':_doc ('yes'), 'long': _doc ('translated')}, - 'up to date': {'short':_doc ('yes'), 'long':_doc ('up to date')}, - 'outdated': {'short':_doc ('partially (%(p)d %%)'), 'long':_doc ('partially up-to-date (%(p)d %%)')}, - 'N/A': {'short':_doc ('N/A'), 'long':'', 'color':'d587ff' }, + 'abbr':'%(p)d%%', 'long':_doc ('partially translated (%(p)d %%)')}, + 'fully translated': {'color':'1fff1f', 'short':_doc ('yes'), 'abbr':'FT', + 'long': _doc ('translated')}, + 'up to date': {'short':_doc ('yes'), 'long':_doc ('up to date'), 'abbr':'100%%', + 'vague':_doc ('up to date')}, + 'outdated': {'short':_doc ('partially (%(p)d %%)'), 'abbr':'%(p)d%%', + 'vague':_doc ('partially up to date')}, + 'N/A': {'short':_doc ('N/A'), 'abbr':'N/A', 'color':'d587ff', 'vague':''}, 'pre-GDP':_doc ('pre-GDP'), 'post-GDP':_doc ('post-GDP') } @@ -287,28 +291,33 @@ class TranslatedTelyDocument (TelyDocument): if self.checkers: s += ' ' + '
\n '.join (self.checkers) + '

\n' - c = self.completeness (['long', 'color']) + c = self.completeness (['color', 'long']) s += ' %(long)s
\n' % c if self.partially_translated: - u = self.uptodateness (['long', 'color']) - s += ' %(long)s
\n' % u + u = self.uptodateness (['vague', 'color']) + s += ' %(vague)s
\n' % u s += ' \n' return s + def text_status (self): + s = self.completeness ('abbr')['abbr'] + ' ' + + if self.partially_translated: + s += self.uptodateness ('abbr')['abbr'] + ' ' + return s + def html_status (self): # TODO return '' class MasterTelyDocument (TelyDocument): def __init__ (self, filename, parent_translations=dict ([(lang, None) for lang in langdefs.LANGDICT.keys()])): - #print "init MasterTelyDocument %s" % filename TelyDocument.__init__ (self, filename) self.size = len (self.contents) self.word_count = tely_word_count (self.contents) translations = dict ([(lang, os.path.join (lang, filename)) for lang in langdefs.LANGDICT.keys()]) - #print translations self.translations = dict ([(lang, TranslatedTelyDocument (translations[lang], self, parent_translations.get (lang))) for lang in langdefs.LANGDICT.keys() if os.path.exists (translations[lang])]) if self.translations: @@ -344,6 +353,31 @@ class MasterTelyDocument (TelyDocument): s += '\n

\n' return s + def text_status (self, numbering=SectionNumber (), colspec=[45,14]): + if self.title == 'Untitled' or not self.translations: + return '' + + s = '' + if self.level[1] == 0: # if self is a master document + s += (self.print_title (numbering) + ' ').ljust (colspec[0]) + s += ''.join (['%s'.ljust (colspec[1]) % l for l in self.translations.keys ()]) + s += '\n' + s += ('Section titles (%d)' % sum (self.word_count)).ljust (colspec[0]) + + else: + s = '%s (%d) ' \ + % (self.print_title (numbering), sum (self.word_count)) + s = s.ljust (colspec[0]) + + s += ''.join ([t.text_status ().ljust(colspec[1]) for t in self.translations.values ()]) + s += '\n\n' + s += ''.join ([i.text_status (numbering) for i in self.includes]) + + if self.level[1] == 0: + s += '\n' + return s + + progress ("Reading documents...") tely_files = read_pipe ("find -maxdepth 2 -name '*.tely'")[0].splitlines () @@ -359,7 +393,9 @@ main_status_page = open ('translations.template.html.in').read () progress ("Generating status pages...") -main_status_html = '

Last updated %s

\n' % read_pipe ('LANG= date -u')[0] +date_time = read_pipe ('LANG= date -u')[0] + +main_status_html = '

Last updated %s

\n' % date_time main_status_html += '\n'.join ([doc.html_status () for doc in master_docs]) html_re = re.compile ('', re.I) @@ -372,3 +408,16 @@ translations.template.html.in; DO NOT EDIT !-->''', main_status_page) main_status_page = end_body_re.sub (main_status_html + '\n', main_status_page) open ('translations.html.in', 'w').write (main_status_page) + +main_status_txt = '''Documentation translations status +Generated %s +NT = not translated +FT = fully translated + +''' % date_time + +main_status_txt += '\n'.join ([doc.text_status () for doc in master_docs]) + +status_txt_file = 'out/translations-status.txt' +progress ("Writing %s..." % status_txt_file) +open (status_txt_file, 'w').write (main_status_txt)