[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Build: another hack for translations (fix 1323). (issue2520041)
From: |
percival . music . ca |
Subject: |
Build: another hack for translations (fix 1323). (issue2520041) |
Date: |
Thu, 14 Oct 2010 20:16:01 +0000 |
Reviewers: ,
Description:
Build: another hack for translations (fix 1323).
Please review this at http://codereview.appspot.com/2520041/
Affected files:
M python/auxiliar/postprocess_html.py
Index: python/auxiliar/postprocess_html.py
diff --git a/python/auxiliar/postprocess_html.py
b/python/auxiliar/postprocess_html.py
index
38e325e297835021380fe2ca8b4f349d7feb421d..78978c090fdd71b4085558ce22b3a5e8c9ad2aef
100644
--- a/python/auxiliar/postprocess_html.py
+++ b/python/auxiliar/postprocess_html.py
@@ -347,15 +347,26 @@ def process_html_files (package_name = '',
s = add_header (s, prefix)
# make the "return to doc index" work with the online website.
if target == 'online':
+ if lang_ext == '':
+ # normal docs
+ add_to_url = ''
+ extra_depth = ''
+ else:
+ # translation
+ add_to_url = '.' + lang_ext
+ extra_depth = '../'
+ old_link = ('href=\"../../' + extra_depth +
+ '/Documentation/web/manuals' + add_to_url + '.html\"')
+ devel_link = ('href=\"../../../../' + extra_depth +
+ 'website/development' + add_to_url + '.html\"')
+ manuals_link = ('href=\"../../../../' + extra_depth +
+ 'website/manuals' + add_to_url + '.html\"')
+ # the CG is never translated, so don't add lang_ext
if (('Documentation/contributor' in prefix) or
(int (versiontup[1]) % 2)):
- s = s.replace (
- 'href=\"../..//Documentation/web/manuals.html\"',
- 'href=\"../../../../website/development.html\"')
+ s = s.replace ( old_link, devel_link )
else:
- s = s.replace (
- 'href=\"../..//Documentation/web/manuals.html\"',
- 'href=\"../../../../website/manuals.html\"')
+ s = s.replace ( old_link, manuals_link )
### add footer
if footer_tag_re.search (s) == None: