]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/build/create-weblinks-itexi.py
Imported Upstream version 2.16.0
[lilypond.git] / scripts / build / create-weblinks-itexi.py
index c48b0085b0d82588be85030fdb794bc387676f7f..62d5afbfbd28e41e70a2b6c6e96cb0d35ee56f4b 100644 (file)
@@ -9,14 +9,22 @@ import sys
 import os
 import glob
 
-# these links are relative from /website/ on lilypond.org
-depth = "../"
-
 ### translation data -- shouldn't be here; see issue
 ### http://code.google.com/p/lilypond/issues/detail?id=1050
 
-#langs = ['', 'cs', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nl', 'zh']
-langs = ['', 'cs', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nl', 'zh']
+import langdefs
+# GUB only has python 2.4 !!!
+# langs = [i.code if i.code != 'en' else '' for i in langdefs.WEB_LANGUAGES]
+langs = []
+for lang in langdefs.WEB_LANGUAGES:
+    if lang.code == 'en':
+        langs.append('')
+    else:
+        langs.append(lang.code)
+
+
+# these links are relative from /website/ on lilypond.org
+depth = "../"
 
 # Get/update node translations
 '''
@@ -196,27 +204,27 @@ translations = {
         'Learning': '学习',
         'Music glossary': '音乐术语表',
         'Essay': '文章',
-        'Notation': '五线谱',
+        'Notation': '记谱法',
         'Usage': '使用',
         'Snippets': '片断',
         'Web': 'Web',
         'Changes': '变化',
 
         'Extending': '扩展',
-        'Internals': '内部',
+        'Internals': '内部机制',
         'Contributor': '贡献者',
 
 # keep the spaces!
-        ' (split HTML)': ' (分开的HTML',
-        ' (big HTML)': ' (大的HTML)',
+        ' (split HTML)': ' (分开的 HTML)',
+        ' (big HTML)': ' (大的 HTML)',
 
-        'Regression tests for ': '回归测试',
-        'PDF of regtests for ': '回归的PDF',
-        'MusicXML Regression tests for ': 'MusicXML回归测试',
-        'PDF of MusicXML regtests for ': 'MusicXML的PDF回归',
+        'Regression tests for ': '回归测试 ',
+        'PDF of regtests for ': '回归测试的 PDF ',
+        'MusicXML Regression tests for ': 'MusicXML 回归测试 ',
+        'PDF of MusicXML regtests for ': 'MusicXML 的 PDF 回归测试 ',
 
         'Doc tarball for ': '为文档压缩包',
-        ' (did not exist in 2.12)': ' (在2.12中不存在)',
+        ' (did not exist in 2.12)': ' (在 2.12 中不存在)',
         },
     }
 
@@ -312,11 +320,11 @@ def make_download_source(name, vstring, version, lang):
 
 def make_all_downloads(macroName, version):
     make_download("download"+macroName+"LinuxNormal", "linux-x86/",
-        "linux-x86.sh",    version, "1", "Linux x86")
+        "linux-x86.sh",    version, "1", "GNU/Linux x86")
     make_download("download"+macroName+"LinuxBig", "linux-64/",
-        "linux-64.sh", version, "1", "Linux 64")
+        "linux-64.sh", version, "1", "GNU/Linux 64")
     make_download("download"+macroName+"LinuxPPC", "linux-ppc/",
-        "linux-ppc.sh", version, "1", "Linux PPC")
+        "linux-ppc.sh", version, "1", "GNU/Linux PPC")
 
     make_download("download"+macroName+"FreeBSDNormal", "freebsd-x86/",
         "freebsd-x86.sh", version, "1", "FreeBSD i386")
@@ -409,9 +417,9 @@ def make_manual_links(name, version, 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
+        # 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),