"Wikitravel has a speed and convenience the books' publishers can only envy." Time Europe

Tech:Move table of contents to right side on Hebrew version

From Wikitravel Shared
Jump to: navigation, search

In hebrew we write from right to left. Therefor the contact table should be placed on the right side, not the left. So if you can do something about it, this will be great. Thanks. Orel zion 06:19, 17 September 2007 (EDT)

I'm sorry Orel, I've tried to help you by emailing Kevin, but still no response. I know it's important to you, please try to be patient and hopefully someone will look into this soon. I hope things are going well for you on :he – cacahuate talk 02:08, 6 November 2007 (EST)
Pretty much, we've just got our 50th article, and I hope for good. Orel zion 08:39, 6 November 2007 (EST)
In general it would help to get important problems on Top_bugs. I'm not sure what the "contact table" is. Can you give me a more detailed description of the problem and specific page that I can use as an example? Unfortunately I don't read Hebrew, so the more help you can give me in terms of what I'm looking at, the easier it will be for me. Kevin Unsigned comment by KevinSours (talkcontribs) .
I'm pretty sure he means the table of contents... they want it on the right side of the page, since they read from right to left. See he:User talk:Zvika for an example of what it looks like now. They seemed to have been trying something here with what looks to be a MediaWiki page named Tocright. But whatever that is doesn't seem to have done the trick. – cacahuate talk 23:20, 12 November 2007 (EST)
I'm not sure, but I guess this problem relates to style attribute below.
Example; HTML source of Tech:Error displaying SVG images.
<div id="p-toc" class="portlet" style="float: left; margin-right: 1em">
<h5>Contents</h5>
<div class="pBody">
<ul class='xoxo wt-toc'>
<li class='wt-toc'><a ...
I am wondering whether "float: left;" for the div tag (id="p-toc") is necessary or not. -- Tatata 01:07, 13 November 2007 (EST)
Probably worth a try... Tatata, is this something you can play with, or only Kevin? – cacahuate talk 20:32, 13 November 2007 (EST)
Though something I can do is a little bit... I tried on my local pc. Shared and language versions read from left to right need "float: left;" to position contents. Hebrew version needs "float: right;" to position contents. And some adjustments of the TOC itself are needed for Hebrew version. So I guess, a modification of MediaWiki program is needed for this problem to output "float: right;" for Hebrew version and output "float: left;" for others, or replace "float: left;" with "float: right;" by using JavaScript when Hebrew version page is loaded to browser. -- Tatata 23:05, 13 November 2007 (EST)
Nice detective work... does that help Kevin? – cacahuate talk 02:00, 14 November 2007 (EST)
Considerably. Its much more than I expected. Or was really required. But I appreciate it. I took a look at it a bit today. The float:left is hard coded in the Wikitravel specific skin, which explains why the left/right tag in the mediawiki (not sure what that markup is called actually) isn't working right. However, I think we do need the float, since that should be causing the text to wrap nicely around the TOC. I need to find some time to play with it and look a little more into how the TOC rendering works on the back end. 71.128.148.22 02:39, 14 November 2007 (EST)

So guys, what's happening? Are we going to do something? (Pleaeeeeeeeeeeeeeeeeese) Orel zion 10:53, 5 December 2007 (EST)

Okay, I think I have a handle on things. First, Wikitravel does its own thing with the TOC so pretty much all the stuff for adjusting position in the Mediawiki documentation isn't going to work here. About all you can do with the magic words is turn it on and off explicitly. Because of that, I'm not going to be able to let people right or left align it for each page. I should be able to do it for each language version that wants it, which I'm hoping will be good enough. The right alignment isn't perfect -- there is a bit more of a gap than on the left alignment -- but I think it'll work okay.
Rather than dumping this out on live and leaving for the weekend, I'm going to hold off implementing the fix until next week. That way if something goes awry I'll hopefully be around to revert it before too long. KevinSours
Thank you all guys for your help. Well, is it already done, or I need to do something about it? Orel zion 10:21, 22 March 2008 (EDT)
I think he is waiting until after the weekend to make the change, so if anything goes wrong he can fix it right away, it should be changed in the next few days! Sorry it took so long Orel – cacahuate talk 22:33, 22 March 2008 (EDT)
That's exactly it. I've pushed this change live for he and cleared the cache for he:User talk:Zvika so you can see it there. You can get it to show up on additional pages by clearing the cache (you can save the page or there is a special url will do it which I don't know off the top of my head). I can, if requested, blow the entire cache for he once somebody has confirmed that the fix is good.
This is, unfortunately, a back end configuration change. Its also only settable for an entire language version. However if there are any other language versions I can change the value for them on request. KevinSours 13:45, 24 March 2008 (EDT)
It's working, but not well. See my talk page he:שיחת משתמש:אוראל Orel zion 02:11, 25 March 2008 (EDT)
Can you be specific as to the problems you are seeing?
I think he's referring to the way that the section header "shared:Tech:Contect_table_right_side:" is appearing in the ToC. Overly long unbroken section headers usually do run off the ToC to the right & are then broken. It looks extra weird since the ToC on Orel's talk page has both English and Hebrew section headers to display, and because Hebrew and English are written in opposite directions, but I don't think there is a good solution for this, and it is not unique to the Hebrew version. --Peter Talk 13:05, 25 March 2008 (EDT)
That's more or less what I thought as well, but I didn't want to assume. I also don't think that there is much we can do about the long names -- as you say it is difficult problem without any good solutions KevinSours 15:58, 7 April 2008 (EDT)

I'd like to move this issue off of Top bugs and re-open it if we get more feedback on it. But since this was technically a Feature Request, I'm not sure where to put it. Thoughts? JuCo 18:48, 11 April 2008 (EDT)

I call this closed, but I'll put it on the backburner, in case Orel has some additional changes he'd like to see. --Peter Talk 00:10, 12 April 2008 (EDT)

Variants

Actions

In other languages