Hi,
for now (trunk r5865) the baseurl (configured in pootle.prefs) seems to be
ignored for the images of the page banner.
The attached patch fixes the problem for me.
regards,
Lars
--- ../Pootle.orig/pagelayout.py 2007-05-16 14:10:18.000000000 +0200
+++ pagelayout.py 2007-06-15 02:43:44.000000000 +0200
@@ -19,16 +19,16 @@
# along with translate; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-def layout_banner(maxheight, session):
+def layout_banner(maxheight, session, baseurl):
"""calculates dimensions, image name for banner"""
logo_width, logo_height = min((98*maxheight/130, maxheight), (98, 130))
banner_width, banner_height = min((290*maxheight/160, maxheight), (290, 160))
if logo_width <= 61:
- logo_image = getattr(getattr(session.instance, "logos", None), "medium", "/images/pootle-medium.png")
+ logo_image = getattr(getattr(session.instance, "logos", None), "medium", baseurl + "images/pootle-medium.png")
else:
- logo_image = getattr(getattr(session.instance, "logos", None), "normal", "/images/pootle.png")
- banner_image = getattr(getattr(session.instance, "logos", None), "banner", "/images/WordForge-white.png")
+ logo_image = getattr(getattr(session.instance, "logos", None), "normal", baseurl + "images/pootle.png")
+ banner_image = getattr(getattr(session.instance, "logos", None), "banner", baseurl + "images/WordForge-white.png")
return {"logo_width": logo_width, "logo_height": logo_height,
"banner_width": banner_width, "banner_height": banner_height,
"logo_image": logo_image, "banner_image": banner_image}
@@ -90,7 +90,7 @@
templatevars["baseurl"] = getattr(session.instance, "baseurl", "/")
if not templatevars["baseurl"].endswith("/"):
templatevars["baseurl"] += "/"
- banner_layout = layout_banner(bannerheight, session)
+ banner_layout = layout_banner(bannerheight, session, templatevars["baseurl"])
banner_layout["logo_alttext"] = session.localize("Pootle Logo")
banner_layout["banner_alttext"] = session.localize("WordForge Translation Project")
templatevars.update(banner_layout)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle