X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fbuild%2Fwebsite_post.py;h=c31aa06cd9bc10d1c74254dae35e8563bc7c594f;hb=912d8cf5e3c04f89af05c71441760a9b864e5924;hp=fbb462a51dab90a205963ba780d70251d0363f24;hpb=ff872773ac4aa6048413016dec3173e58276b41d;p=lilypond.git diff --git a/scripts/build/website_post.py b/scripts/build/website_post.py index fbb462a51d..c31aa06cd9 100644 --- a/scripts/build/website_post.py +++ b/scripts/build/website_post.py @@ -1,7 +1,7 @@ #!@PYTHON@ #-*- coding: utf-8 -*- -##### This is web_post.py. This script deals with translations +##### This is website_post.py. This script deals with translations ##### in the "make website" target. import sys @@ -11,6 +11,14 @@ import re ###### Translation data, move out, see create-weblinks-itexi.py translations = { + 'ca': { + 'English': 'Català ', + 'Other languages': 'Altres idiomes', + }, + 'cs': { + 'English': 'Äesky', + 'Other languages': 'Jiné jazyky', + }, 'de': { 'English': 'Deutsch', 'Other languages': 'Andere Sprachen', @@ -27,26 +35,39 @@ translations = { 'English': 'Magyar', 'Other languages': 'Más nyelvek', }, + 'it': { + 'English': 'Italiano', + 'Other languages': 'Altre lingue', + }, 'ja': { - 'English': 'Japanese', + 'English': 'æ¥æ¬èª', 'Other languages': 'ä»ã®è¨èª', }, 'nl': { 'English': 'Nederlands', 'Other languages': 'Andere talen', }, + 'zh': { + 'English': 'ä¸æ', + '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 # Keep some freakin' gettext compatibility -if HAVE_GETTEXT: - import lilylib as ly; - global _;_=ly._ -else: # poor mans translation - def _ (string, lang=os.environ['LANG']): - return translations.get (lang.split ('_')[0], {}).get (string, string) +#if HAVE_GETTEXT: +# import lilylib as ly; +# global _;_=ly._ +#else: # poor mans translation +# def _ (string, lang=os.environ['LANG']): +# return translations.get (lang.split ('_')[0], {}).get (string, string) + +#### this works on lilypond.org +def _ (string, lang): + return translations.get (lang.split ('_')[0], {}).get (string, string) exclude_manuals = [ @@ -94,12 +115,14 @@ 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