]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/build/create-weblinks-itexi.py
create-weblinks-itexi.py: Enable 'fr'
[lilypond.git] / scripts / build / create-weblinks-itexi.py
index bc3d2295a1a14b6022b20a60779f180d72903383..39dde5298edbce4d567d49a811fd96c5c9c38f44 100644 (file)
@@ -17,41 +17,146 @@ depth = "../"
 
 # don't add your language to this list unless you have all the
 # items.
-langs = ['', 'es']
+# Hmm, is this a feature -- why not keep original english as a fallback?
+langs = ['', 'es', 'fr', 'nl']
+
+# Get/update node translations
+'''
+for i in es fr nl de hu ja it; do
+    echo "'"$i"': {"
+    (echo '--' ; grep -nH -B1 translationof Documentation/$i/web/*) \
+        | pytt '^--\n.*@(?:unnum|sub)[^ ]* (.*)\n.*@translationof (.*)\n' "'\2': '\1',\n" \
+        | grep -E 'Source|Learning|Glossary|Essay|Notation|Usage|Snippets|Web|Changes|Extending|Internals|Contributor'
+    echo "},"
+done
+'''
 
 translations = {
     'es': {
         'Source': 'Código fuente',
 
-        'Learning': 'Aprendizaj',
+        'Learning': 'Aprendizaje',
         'Music glossary': 'Glosario',
-        'Essay': 'a',
-        'Notation': 'b',
-        'Usage': 'c',
-        'Snippets': 'd',
-        'Web': 'e',
-        'Changes': 'f',
-        'Extending': 'g',
-        'Internals': 'h',
+        'Essay': 'Ensayo',
+        'Notation': 'Notación',
+        'Usage': 'Utilización',
+        'Snippets': 'Fragmentos',
+        'Web': 'Web',
+        'Changes': 'Cambios',
+        'Extending': 'Extensión',
+        'Internals': 'Funcionamiento interno',
         'Contributor': 'Guía del colaborador',
 
 # keep the spaces!
-        ' (split HTML)': ' (muchas páginas HTML)',
-        ' (big HTML)': ' (como una sola página HTML enorme)',
+        ' (split HTML)': ' (HTML seccionado)',
+        ' (big HTML)': ' (HTML monolítico)',
 
-        'Regression tests for ': 'aa ',
-        'PDF of regtests for ': 'bb ',
-        'MusicXML Regression tests for ': 'cc ',
-        'PDF of MusicXML regtests for ': 'dd ',
+        'Regression tests for ': 'Pruebas de regresión para ',
+        'PDF of regtests for ': 'Pruebas 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 ': 'ee ',
-        ' (did not exist in 2.12)': ' (existes la nottes e 2.12)',
+        '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': {
-        'Learning': 'Apprener?',
-        'Music glossary': 'Lizes ici pour les motes?',
+        'Source': 'Sources',
+
+        'Learning': 'Initiation',
+        'Music glossary': 'Glossaire',
+        'Essay': 'Essai',
+        'Notation': 'Notation',
+        'Usage': 'Utilisation',
+        'Snippets': 'Morceaux choisis',
+        'Web': 'Web',
+        'Changes': 'Nouveautés',
+        'Extending': 'Extension',
+        'Internals': 'Propriétés internes',
+        'Contributor': 'Guide du contributeur',
+
+# keep the spaces!
+        ' (split HTML)': ' (HTML multipages)',
+        ' (big HTML)': ' (HTML en page unique)',
+
+        'Regression tests for ': 'Tests de régression pour ',
+        'PDF of regtests for ': 'PDF des tests de régression 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)',
+        },
+    'nl': {
+        'Source': 'Broncode',
+
+        'Learning': 'Beginnen',
+        'Music glossary': 'Terminologie',
+        'Essay': 'Essay',
+        'Notation': 'Notatie',
+        'Usage': 'Gebruik',
+        'Snippets': 'Snippers',
+        'Web': 'Web',
+        'Changes': 'Veranderingen',
+        'Extending': 'Uitbreidingen',
+        'Internals': 'Internals',
+        'Contributor': 'Contributor',
+
+# keep the spaces!
+        ' (split HTML)': ' (opgesplitste HTML)',
+        ' (big HTML)': ' (grote pagina HTML)',
+
+        'Regression tests for ': 'Regressietesten voor ',
+        'PDF of regtests for ': 'PDF van 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)',
      },
-}
+    'de': {
+        'Source': 'Quellen',
+        'Learning': 'Einführung',
+        'Music glossary': 'Glossar',
+        'Essay': 'Aufsatz',
+        'Notation': 'Notation',
+        'Usage': 'Benutzung',
+        'Snippets': 'Schnipsel',
+        'Web': 'Web',
+        'Changes': 'Änderungen',
+        'Internals': 'Interna',
+
+        #TODO
+        },
+    'hu': {
+        'Source': 'Forrás',
+        'Learning': 'Tankönyv',
+        'Music glossary': 'Fogalomtár',
+        'Essay': 'Esszé',
+        'Notation': 'Kottaírás',
+        'Usage': 'Használat',
+        'Snippets': 'Kódrészletek',
+        'Web': 'Web',
+        'Changes': 'Változások',
+        'Internals': 'Belső működés',
+
+        #TODO
+        },
+    'ja': {
+        'Source': 'ソース',
+        'Learning': '学習',
+        'Music glossary': '用語集',
+        'Essay': 'エッセー',
+        'Notation': '記譜法',
+        'Usage': '使用方法',
+        'Snippets': 'コード断片集',
+        'Web': 'Web',
+        'Changes': '変更点',
+        'Internals': '内部リファレンス',
+
+        #TODO
+        },
+    }
+
 
 
 
@@ -197,6 +302,11 @@ def translateNameToUrl(manual, version):
 
 
 def make_manual_links(name, version, lang):
+    """Here is where all the macros manualStableLearningSplit,
+    manualStableLearningBig, manualStableLearningSplitNoName, etc. are
+    created on the fly.  Hopefully this documentation string will help
+    others a bit while grepping for those.
+    """
     for m in manuals:
         manual = m
         # TODO: this is a stupid way of doing it
@@ -244,7 +354,7 @@ def make_manual_links(name, version, lang):
             newurl = url + '/index.html'
         make_ver_link(macroLang("manual"+name+mshort+'SplitNoName',lang),
                   newurl,
-                  manual.capitalize())
+                  getTrans(manual.capitalize(),lang))
 
 def make_regtest_links(name, version, lang):
     ver_split = version.split('.')