X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fbuild%2Fwebsite_post.py;h=93e3c8d50d2bad0061c45d53b730d43b22107a98;hb=522f419e3ed3e09ecf834bbb5315ac1777ab13e0;hp=7e8ffefbd624a59510fbf0d5cc49d8c5df52105f;hpb=750a77a78a9ca1a6d49b9920a291ffdc59de4823;p=lilypond.git diff --git a/scripts/build/website_post.py b/scripts/build/website_post.py index 7e8ffefbd6..93e3c8d50d 100644 --- a/scripts/build/website_post.py +++ b/scripts/build/website_post.py @@ -45,11 +45,11 @@ translations = { }, 'zh': { 'English': '中文', - 'Other languages': '其它语言', + 'Other languages': '其他语言', }, } -# needs at least: make -C po or make- C Documentation/po +# needs at least: make -C po or make -C Documentation/po HAVE_GETTEXT = False #### this breaks on lilypond.org @@ -111,10 +111,10 @@ def addLangExt(filename, lang, ext): return text def makeFooter (filename, currentLang): - # TODO: add link to automatic language selection? - # still need to include this page in the new webpages somewhere footer = '''

%(other)s: %(lst)s. +
+%(browser_language)s

''' def link (lang): @@ -124,6 +124,9 @@ def makeFooter (filename, currentLang): return str % locals () lst = ', '.join ([link (lang) for lang in langs if lang != currentLang]) other = _ ('Other languages', currentLang) + browser_lang = _ ('About automatic language selection.', currentLang) + browser_language_url = "http://www.lilypond.org/website/misc/browser-language" + browser_language = browser_lang % browser_language_url return footer % locals () def getLocalHref(line): @@ -153,7 +156,7 @@ for file in html_files: lang = '' # possibly necessary for automatic language selection file_symlink = file.replace(".html", ".en.html") - if (not (os.path.exists(file_symlink))): + if not os.path.lexists (file_symlink): os.symlink (file, file_symlink) elif (len(file_split) == 3): # it's a translation