From e0a73c4160632444c75c6517b258746c256e54eb Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Mon, 8 Mar 2010 22:01:47 +0000 Subject: [PATCH] Web build: thinkos in previous commit. --- scripts/build/website_post.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/build/website_post.py b/scripts/build/website_post.py index 9d64cb18b0..619693c492 100644 --- a/scripts/build/website_post.py +++ b/scripts/build/website_post.py @@ -47,9 +47,9 @@ for file in html_files: elif (len(file_split) == 3): # it's a translation lang = file_split[1] - # make sure it's a translated language - if (not (lang == "en")): - langs_set.add(lang) + # make sure it's a translated language + if (not (lang == "en")): + langs_set.add(lang) langs = list(langs_set) langs.sort() @@ -131,16 +131,19 @@ for file in html_files: lang_footer = makeFooter(file_base, lang) - ### replace links as appropraite + ### alter file for line in lines: + ### alter links as appropriate link = getLocalHref(line) if (link != ""): link_base = link.split('.')[0] - if (line.endswith(".html")): + if (link.endswith(".html")): langlink = addLangExt(link_base, lang, "html") - line.replace(link, langlink) - if (line.endswith(".pdf")): + line = line.replace(link, langlink) + if (link.endswith(".pdf")): langlink = addLangExt(link_base, lang, "pdf") + line = line.replace(link, langlink) + ### add language selection footer if (line.find("") >= 0): outfile.write( lang_footer ) outfile.write(line) -- 2.39.2