]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/build/create-weblinks-itexi.py
Imported Upstream version 2.18.0
[lilypond.git] / scripts / build / create-weblinks-itexi.py
index 7d87e8b5d68e44dc937fb1a2467f9e28d14ce246..e7caa311610f8dc8f282b4099ce1459cf5e1f813 100644 (file)
@@ -38,6 +38,35 @@ done
 '''
 
 translations = {
+    'cs': {
+        'Source': 'Source',
+        'Learning': 'Učení',
+        'Music glossary': 'Slovníček',
+        'Essay': 'Článek',
+        'Notation': 'Notový zápis',
+        'Usage': 'Používání',
+        'Snippets': 'Úryvky',
+        'Web': 'Web',
+        'Changes': 'Změny',
+
+        'Extending': 'Rozšíření',
+        'Internals': 'Vnitřnosti',
+        'Contributor': 'Vývojářské',
+
+        ' (split HTML)': ' (rozdělené HTML)',
+        ' (big HTML)': ' (velké HTML)',
+
+        'Regression tests for ': 'Zkoušky regresí ',
+        'PDF of regtests for ': 'PDF zkoušky regresí ',
+        'abc2ly Regression tests for ': 'abc2ly zkoušky regresí ',
+        'PDF of abc2ly regtests for ': 'PDF abc2ly zkoušky regresí ',
+        'lilypond-book Regression tests for ': 'lilypond-book zkoušky regresí ',
+        'PDF of lilypond-book regtests for ': 'PDF lilypond-book zkoušky regresí ',
+        'MusicXML Regression tests for ': 'MusicXML zkoušky regresí ',
+        'PDF of MusicXML regtests for ': 'PDF MusicXML zkoušky regresí ',
+
+        'Doc tarball for ': 'Doc tarball for ',
+        },
     'de': {
         'Source': 'Quellen',
         'Learning': 'Einführung',
@@ -58,11 +87,14 @@ translations = {
 
         'Regression tests for ': 'Regressionstests für ',
         'PDF of regtests for ': 'PDF der Regressionstests für ',
+        'abc2ly Regression tests for ': 'abc2ly Regressionstests für ',
+        'PDF of abc2ly regtests for ': 'PDF der abc2ly Regressionstests für ',
+        'lilypond-book Regression tests for ': 'lilypond-book Regressionstests für ',
+        'PDF of lilypond-book regtests for ': 'PDF der lilypond-book Regressionstests für ',
         'MusicXML Regression tests for ': 'MusicXML Regressionstests für ',
         'PDF of MusicXML regtests for ': 'PDF der MusicXML Regressionstests für ',
 
         'Doc tarball for ': 'Dokumentation tar-gepackt für ',
-        ' (did not exist in 2.12)': ' (nicht existent in 2.12)',
         },
     'es': {
         'Source': 'Código fuente',
@@ -85,11 +117,14 @@ translations = {
 
         'Regression tests for ': 'Pruebas de regresión para ',
         'PDF of regtests for ': 'Pruebas en PDF para ',
+        'abc2ly Regression tests for ': 'Pruebas de regresión de abc2ly para ',
+        'PDF of abc2ly regtests for ': 'Pruebas de abc2ly en PDF para ',
+        'lilypond-book Regression tests for ': 'Pruebas de regresión de lilypond-book para ',
+        'PDF of lilypond-book regtests for ': 'Pruebas de lilypond-book en PDF para ',
         'MusicXML Regression tests for ': 'Pruebas de regresión de MusicXML para ',
         'PDF of MusicXML regtests for ': 'Pruebas de MusicXML en PDF para ',
 
         'Doc tarball for ': 'Tarball de la documentación para ',
-        ' (did not exist in 2.12)': ' (no existía en la versión 2.12)',
      },
     'fr': {
         'Source': 'Sources',
@@ -112,11 +147,14 @@ translations = {
 
         'Regression tests for ': 'Tests de régression pour ',
         'PDF of regtests for ': 'PDF des tests de régression pour ',
+        'abc2ly Regression tests for ': 'Tests de régression de abc2ly pour ',
+        'PDF of abc2ly regtests for ': 'PDF des tests de régression de abc2ly pour ',
+        'lilypond-book Regression tests for ': 'Tests de régression de lilypond-book pour ',
+        'PDF of lilypond-book regtests for ': 'PDF des tests de régression de lilypond-book pour ',
         'MusicXML Regression tests for ': 'Tests de régression de MusicXML pour ',
         'PDF of MusicXML regtests for ': 'PDF des tests de régression de MusicXML pour ',
 
         'Doc tarball for ': 'Archive de la documentation pour ',
-        ' (did not exist in 2.12)': ' (non disponible pour la version 2.12)',
         },
     'hu': {
         'Source': 'Forrás',
@@ -137,11 +175,43 @@ translations = {
 
         'Regression tests for ': 'Regressziós tesztek - verzió: ',
         'PDF of regtests for ': 'PDF formátumban - verzió: ',
+        'abc2ly Regression tests for ': 'abc2ly regressziós tesztek - verzió: ',
+        'PDF of abc2ly regtests for ': 'PDF formátumban - verzió: ',
+        'lilypond-book Regression tests for ': 'lilypond-book regressziós tesztek - verzió: ',
+        'PDF of lilypond-book regtests for ': 'PDF formátumban - verzió: ',
         'MusicXML Regression tests for ': 'MusicXML regressziós tesztek - verzió: ',
         'PDF of MusicXML regtests for ': 'PDF formátumban - verzió: ',
 
         'Doc tarball for ': 'Tömörített csomag - verzió: ',
-        ' (did not exist in 2.12)': ' (nem létezett a 2.12-es verzióban)',
+        },
+    'it': {
+        'Source': 'Sorgenti',
+        'Learning': 'Apprendimento',
+        'Music glossary': 'Glossario',
+        'Essay': 'Saggio',
+        'Notation': 'Notazione',
+        'Usage': 'Uso',
+        'Snippets': 'Frammenti',
+        'Web': 'Web',
+        'Changes': 'Cambiamenti',
+        'Extending': 'Estendere',
+        'Internals': 'Funzionamento interno',
+        'Contributor': 'Guida del collaboratore',
+
+# keep the spaces!
+        ' (split HTML)': ' (HTML multipagina)',
+        ' (big HTML)': ' (HTML pagina unica)',
+
+        'Regression tests for ': 'Test di collaudo per ',
+        'PDF of regtests for ': 'PDF dei test di collaudo per ',
+        'abc2ly Regression tests for ': 'Test di collaudo di abc2ly per ',
+        'PDF of abc2ly regtests for ': 'PDF dei test di collaudo di abc2ly per ',
+        'lilypond-book Regression tests for ': 'Test di collaudo di lilypond-book per ',
+        'PDF of lilypond-book regtests for ': 'PDF dei test di collaudo di lilypond-book per ',
+        'MusicXML Regression tests for ': 'Test di collaudo di MusicXML per ',
+        'PDF of MusicXML regtests for ': 'PDF dei test di collaudo di MusicXML per ',
+
+        'Doc tarball for ': 'Archivio della documentazione per ',
         },
     'ja': {
         'Source': 'ソース',
@@ -165,11 +235,14 @@ translations = {
 
         'Regression tests for ': '回帰テスト バージョン ',
         'PDF of regtests for ': '回帰テスト (PDF 版) バージョン ',
+        'abc2ly Regression tests for ': 'abc2ly 回帰テスト バージョン ',
+        'PDF of abc2ly regtests for ': 'abc2ly 回帰テスト (PDF 版) バージョン ',
+        'lilypond-book Regression tests for ': 'lilypond-book 回帰テスト バージョン ',
+        'PDF of lilypond-book regtests for ': 'lilypond-book 回帰テスト (PDF 版) バージョン ',
         'MusicXML Regression tests for ': 'MusicXML 回帰テスト バージョン ',
         'PDF of MusicXML regtests for ': 'MusicXML 回帰テスト (PDF 版) バージョン ',
 
         'Doc tarball for ': 'ドキュメント アーカイブ バージョン ',
-        ' (did not exist in 2.12)': ' (バージョン 2.12 には存在しません)',
 
         },
     'nl': {
@@ -193,11 +266,14 @@ translations = {
 
         'Regression tests for ': 'Regressietesten voor ',
         'PDF of regtests for ': 'PDF van regressietesten voor ',
+        'abc2ly Regression tests for ': 'abc2ly regressietesten voor ',
+        'PDF of abc2ly regtests for ': 'abc2ly regressietesten voor ',
+        'lilypond-book Regression tests for ': 'lilypond-book regressietesten voor ',
+        'PDF of lilypond-book regtests for ': 'lilypond-book regressietesten voor ',
         'MusicXML Regression tests for ': 'MusicXML regressietesten voor ',
         'PDF of MusicXML regtests for ': 'MusicXML regressietesten voor ',
 
         'Doc tarball for ': 'Tarball met documentation voor ',
-        ' (did not exist in 2.12)': ' (bestond nog niet in 2.12)',
      },
     'zh': {
         'Source': '源码',
@@ -220,11 +296,14 @@ translations = {
 
         'Regression tests for ': '回归测试 ',
         'PDF of regtests for ': '回归测试的 PDF ',
+        'abc2ly Regression tests for ': 'abc2ly 回归测试 ',
+        'PDF of abc2ly regtests for ': 'abc2ly 的 PDF 回归测试 ',
+        'lilypond-book Regression tests for ': 'lilypond-book 回归测试 ',
+        'PDF of lilypond-book regtests for ': 'lilypond-book 的 PDF 回归测试 ',
         'MusicXML Regression tests for ': 'MusicXML 回归测试 ',
         'PDF of MusicXML regtests for ': 'MusicXML 的 PDF 回归测试 ',
 
         'Doc tarball for ': '为文档压缩包',
-        ' (did not exist in 2.12)': ' (在 2.12 中不存在)',
         },
     }
 
@@ -275,11 +354,13 @@ for line in version_contents:
 VERSION = str(major)+'.'+str(minor)+'.'+str(patch)
 
 def _ (string, lang):
-    return translations.get (lang.split ('_')[0], {}).get (string, string)
+    return translations.get (lang.split ('_')[0], {}).get (string, None)
 
 getTrans = _
 # let's not barf, but print a warning when something's missing
 def getTrans(text, lang):
+    if not lang:
+        return text
     trans = _ (text, lang)
     if not trans:
         trans = text
@@ -287,7 +368,7 @@ def getTrans(text, lang):
     return trans
 
 def macroLang(name, lang):
-    if (lang != ''):
+    if lang:
         return name + '-' + lang
     return name
 
@@ -356,29 +437,7 @@ def translateNameToUrl(manual, version):
     ver_minor = ver_split[0] + '.' + ver_split[1]
     url = depth + "doc/v" + ver_minor + "/Documentation/"
 
-    if (ver_minor == '2.12'):
-        if (manual=='learning'):
-            return url+'user/lilypond-learning'
-        elif (manual=='internals'):
-            return url+'user/lilypond-internals'
-        elif (manual=='notation'):
-            return url+'user/lilypond'
-        elif (manual=='usage'):
-            return url+'user/lilypond-program'
-        elif (manual=='snippets'):
-            return url+'../input/lsr/lilypond-snippets'
-        elif (manual=='changes'):
-            return url+'topdocs/NEWS.html'
-        elif (manual=='music-glossary'):
-            return url+'user/music-glossary'
-        elif (manual=='essay'):
-            return url+'user/lilypond-learning/Background.html'
-        elif (manual=='extending'):
-            return url+'user/lilypond/Interfaces-for-programmers.html'
-        else:
-            return ''
-    else:
-        return url+manual
+    return url+manual
 
 def addLang(url, lang):
     if lang:
@@ -404,25 +463,6 @@ def make_manual_links(name, version, lang):
             manual = 'Music glossary'
         url = translateNameToUrl(m, version)
 
-        if (url == ''):
-            # can't have a comma here due to texinfo
-            make_ver_link(macroLang("manual"+name+mshort+'Pdf',lang),
-                "http://lilypond.org",
-                mshort+getTrans(" (did not exist in 2.12)",lang))
-            make_ver_link(macroLang("manual"+name+mshort+'Split',lang),
-                "http://lilypond.org",
-                mshort+getTrans(" (did not exist in 2.12)",lang))
-            make_ver_link(macroLang("manual"+name+mshort+'Big',lang),
-                "http://lilypond.org",
-                mshort+getTrans(" (did not exist in 2.12)",lang))
-            make_ver_link(macroLang("manual"+name+mshort+'SplitNoName',lang),
-                "http://lilypond.org",
-                mshort+getTrans(" (did not exist in 2.12)",lang))
-            continue
-        # this is stupid and I shouldn't have bothered trying
-        # to support the 2.12 docs and it will be deleted once
-        # 2.14 is out and the website won't be visible to users
-        # until 2.14 is out.  -gp
         if (url.endswith('.html')):
             make_ver_link(macroLang("manual"+name+mshort+'Pdf',lang),
                       addLang(url, lang),
@@ -493,7 +533,7 @@ def make_doctarball_links(name, version, lang):
         url, getTrans("Doc tarball for ", lang)+version)
 
 print "@c This file was autogenerated"
-print "@c     from: VERSION"
+print "@c     from: %s" % VERSION
 print "@c     by:   %s" % sys.argv[0]
 print ""
 print "@c ************************ Download binaries ************"