]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/build/create-weblinks-itexi.py
Replace Tab with 8 spaces for .py files #2
[lilypond.git] / scripts / build / create-weblinks-itexi.py
index 97a53694a290597d3949d945eda8b03c40e97118..d799925909c9c4933527cafe77bfb56149977c4b 100644 (file)
@@ -15,11 +15,12 @@ depth = "../"
 ### translation data -- shouldn't be here; see issue
 ### http://code.google.com/p/lilypond/issues/detail?id=1050
 
-langs = ['', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nl']
+#langs = ['', 'cs', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nl', 'zh']
+langs = ['', 'cs', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nl', 'zh']
 
 # Get/update node translations
 '''
-for i in de es fr hu it ja nl; 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" \
@@ -119,8 +120,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',
@@ -128,12 +127,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': {
@@ -192,6 +191,33 @@ translations = {
         'Doc tarball for ': 'Tarball met documentation voor ',
         ' (did not exist in 2.12)': ' (bestond nog niet in 2.12)',
      },
+    'zh': {
+        '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中不存在)',
+        },
     }
 
 
@@ -320,8 +346,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'
@@ -343,6 +367,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:
@@ -383,9 +409,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),
@@ -464,8 +490,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: