]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/build/create-weblinks-itexi.py
Make distributed tarball from Git file list
[lilypond.git] / scripts / build / create-weblinks-itexi.py
index 4e84a5297a7a1934ad6558bf15c5f02e885d147f..62d5afbfbd28e41e70a2b6c6e96cb0d35ee56f4b 100644 (file)
@@ -9,18 +9,26 @@ 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 = ['', '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
 '''
-for i in de es fr hu it ja nl zh; do
+for i in cs de es fr hu it ja nl zh; do
     echo "'"$i"': {"
     (echo '--' ; grep -nH -B1 translationof Documentation/$i/web/* ) \
         | pytt '^--\n.*@(?:unnum|sub)[^ ]* (.*)\n.*@translationof (.*)\n' "'\2': '\1',\n" \
@@ -120,8 +128,6 @@ translations = {
         'Snippets': 'Kódrészletek',
         'Web': 'Web',
         'Changes': 'Változások',
-
-        #TODO
         'Extending': 'Bővítés',
         'Internals': 'Belső működés',
         'Contributor': 'Közreműködés',
@@ -129,12 +135,12 @@ translations = {
         ' (split HTML)': ' (HTML oldalak)',
         ' (big HTML)': ' (egy nagy HTML oldal)',
 
-        'Regression tests for ': 'Regressziós tesztek a következőhöz: ',
-        'PDF of regtests for ': 'Regressziós tesztek PDF formátumban a következőhöz: ',
-        'MusicXML Regression tests for ': 'MusicXML regressziós tesztek a következőhöz: ',
-        'PDF of MusicXML regtests for ': 'MusicXML regressziós tesztek PDF formátumban a következőhöz: ',
+        'Regression tests for ': 'Regressziós tesztek - verzió: ',
+        'PDF of 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 ': 'Doc tarball a következőhöz: ',
+        'Doc tarball for ': 'Tömörített csomag - verzió: ',
         ' (did not exist in 2.12)': ' (nem létezett a 2.12-es verzióban)',
         },
     'ja': {
@@ -149,20 +155,21 @@ translations = {
         'Changes': '変更点',
 
         #TODO
-        'Extending': 0,
+        'Extending': '拡張',
         'Internals': '内部リファレンス',
-        'Contributor': 0,
+        'Contributor': '貢献者向けガイド',
 
-        ' (split HTML)': 0,
-        ' (big HTML)': 0,
+# keep the spaces!
+        ' (split HTML)': ' (ページ毎に分割された HTML)',
+        ' (big HTML)': ' (1 つの大きな HTML)',
 
-        'Regression tests for ': 0,
-        'PDF of regtests for ': 0,
-        'MusicXML Regression tests for ': 0,
-        'PDF of MusicXML regtests for ': 0,
+        'Regression tests for ': '回帰テスト バージョン ',
+        'PDF of regtests for ': '回帰テスト (PDF 版) バージョン ',
+        'MusicXML Regression tests for ': 'MusicXML 回帰テスト バージョン ',
+        'PDF of MusicXML regtests for ': 'MusicXML 回帰テスト (PDF 版) バージョン ',
 
-        'Doc tarball for ': 0,
-        ' (did not exist in 2.12)': 0,
+        'Doc tarball for ': 'ドキュメント アーカイブ バージョン ',
+        ' (did not exist in 2.12)': ' (バージョン 2.12 には存在しません)',
 
         },
     'nl': {
@@ -193,30 +200,31 @@ translations = {
         ' (did not exist in 2.12)': ' (bestond nog niet in 2.12)',
      },
     'zh': {
-        'Source': 0,
-        'Learning': 0,
-        'Music glossary': 0,
-        'Essay': 0,
-        'Notation': 0,
-        'Usage': 0,
-        'Snippets': 0,
-        'Web': 0,
-        'Changes': 0,
-
-        'Extending': 0,
-        'Internals': 0,
-        'Contributor': 0,
-
-        ' (split HTML)': 0,
-        ' (big HTML)': 0,
-
-        'Regression tests for ': 0,
-        'PDF of regtests for ': 0,
-        'MusicXML Regression tests for ': 0,
-        'PDF of MusicXML regtests for ': 0,
-
-        'Doc tarball for ': 0,
-        ' (did not exist in 2.12)': 0,
+        'Source': '源码',
+        'Learning': '学习',
+        'Music glossary': '音乐术语表',
+        'Essay': '文章',
+        'Notation': '记谱法',
+        'Usage': '使用',
+        'Snippets': '片断',
+        'Web': 'Web',
+        'Changes': '变化',
+
+        'Extending': '扩展',
+        'Internals': '内部机制',
+        'Contributor': '贡献者',
+
+# keep the spaces!
+        ' (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 回归测试 ',
+
+        'Doc tarball for ': '为文档压缩包',
+        ' (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")
@@ -346,8 +354,6 @@ def translateNameToUrl(manual, version):
     ver_minor = ver_split[0] + '.' + ver_split[1]
     url = depth + "doc/v" + ver_minor + "/Documentation/"
 
-    if (ver_minor == '2.13'):
-        return url+manual
     if (ver_minor == '2.12'):
         if (manual=='learning'):
             return url+'user/lilypond-learning'
@@ -369,6 +375,8 @@ def translateNameToUrl(manual, version):
             return url+'user/lilypond/Interfaces-for-programmers.html'
         else:
             return ''
+    else:
+        return url+manual
 
 def addLang(url, lang):
     if lang:
@@ -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),
@@ -490,8 +498,8 @@ print "@c ************************ Download source ************"
 # FIXME: icky hard-coding!  -gp
 for lang in langs:
     print "@c *********", lang, "***"
-    make_download_source("downloadStableSource","v2.12",VERSION_STABLE,lang)
-    make_download_source("downloadDevelSource","v2.13",VERSION_DEVEL,lang)
+    make_download_source("downloadStableSource","v2.14",VERSION_STABLE,lang)
+    make_download_source("downloadDevelSource","v2.15",VERSION_DEVEL,lang)
 
 print "@c ************************ Manual links ************"
 for lang in langs: